YouTube_Provider::register()

Registers the bindings, actions and filters required by the YouTube API meetings provider to work.

Contents


Source

File: src/Tribe/Meetings/YouTube_Provider.php

	public function register() {
		// Register this providers in the container to allow calls on it, e.g. to check if enabled.
		$this->container->singleton( 'events-virtual.meetings.youtube', self::class );
		$this->container->singleton( self::class, self::class );

		if ( ! $this->is_enabled() ) {
			return;
		}

		$this->add_actions();
		$this->add_filters();
		$this->enqueue_assets();
		$this->hook_templates();

		/**
		 * Allows filtering of the capability required to use the YouTube integration ajax features.
		 *
		 * @since 1.6.0
		 *
		 * @param string $ajax_capability The capability required to use the ajax features, default manage_options.
		 */
		$ajax_capability = apply_filters( 'tribe_events_virtual_youtube_admin_ajax_capability', 'manage_options' );

		$this->route_admin_by_nonce( $this->admin_routes(), $ajax_capability );
	}

Top ↑

Changelog

Changelog
Version Description
1.0.0 Introduced.