Zoom_Provider::register()

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

Contents


Source

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

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

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

		add_filter(
			'tribe_rest_event_data',
			$this->container->callback( Zoom_Meta::class, 'attach_rest_properties' ),
			10,
			2
		);

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

		/**
		 * Allows filtering of the capability required to use the Zoom 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_zoom_admin_ajax_capability', 'manage_options' );

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

Top ↑

Changelog

Changelog
Version Description
1.0.0 Introduced.