Tribe__Tickets__Metabox::configure( string $post_type = null )

Configures the Tickets Editor into a Post Type


Parameters

$post_type

(string) (Optional) Which post type we are trying to configure

Default value: null


Top ↑

Return

(void)


Top ↑

Source

File: src/Tribe/Metabox.php

	public function configure( $post_type = null ) {
		$modules = Tribe__Tickets__Tickets::modules();
		if ( empty( $modules ) ) {
			return;
		}

		if ( ! in_array( $post_type, Tribe__Tickets__Main::instance()->post_types() ) ) {
			return;
		}

		add_meta_box(
			'tribetickets',
			esc_html__( 'Tickets', 'event-tickets' ),
			array( $this, 'render' ),
			$post_type,
			'normal',
			'high',
			array(
				'__back_compat_meta_box' => true,
			)
		);

		// If we get here means that we will need Thickbox
		add_thickbox();
	}

Top ↑

Changelog

Changelog
Version Description
4.6.2 Introduced.