Tribe__Editor::add_support( array $args = array() )
Adds the required fields into the Events Post Type so that we can use Block Editor
Contents
Parameters
- $args
-
(array) (Optional) Arguments used to setup the Post Type
Default value: array()
Return
(array)
Source
File: src/Tribe/Editor.php
public function add_support( $args = array() ) {
// Make sure we have the Support argument and it's an array
if ( ! isset( $args['supports'] ) || ! is_array( $args['supports'] ) ) {
$args['supports'] = array();
}
// Add Editor Support
if ( ! in_array( 'editor', $args['supports'] ) ) {
$args['supports'][] = 'editor';
}
return $args;
}
Changelog
| Version | Description |
|---|---|
| 4.8 | Introduced. |