Tribe__Editor::add_support( array $args = array() )

Adds the required fields into the Events Post Type so that we can use Block Editor


Parameters

$args

(array) (Optional) Arguments used to setup the Post Type

Default value: array()


Top ↑

Return

(array)


Top ↑

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;
	}

Top ↑

Changelog

Changelog
Version Description
4.8 Introduced.