Facebook_Provider::register()

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

Contents


Source

File: src/Tribe/Meetings/Facebook_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.facebook', self::class );
		$this->container->singleton( self::class, self::class );

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

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

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

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

Top ↑

Changelog

Changelog
Version Description
1.7.0 Introduced.