Setup_Page::on_load()


Source

File: includes/libs/admin/page/setup-page.class.php

	public function on_load() {
		$_GET['noheader'] = 'true';
		if( !defined('IFRAME_REQUEST') ){
			define('IFRAME_REQUEST', true);
		}

        $options = Plugin::instance()->get_options();
		// you must use this instead of menu_page_url() to avoid API error
        $settings_page_url = sprintf(
            'edit.php?post_type=%s&page=%s',
	        Plugin::instance()->get_admin()->get_post_type()->get_post_type(),
	        Plugin::instance()->get_admin()->get_admin_menu()->get_page( 'cvm_settings' )->get_menu_slug()
        );

        $this->vimeo_oauth = new Vimeo_Oauth(
			$options['vimeo_consumer_key'],
			$options['vimeo_secret_key'],
			$options['oauth_token'],
			admin_url( $settings_page_url )
		);

		wp_enqueue_style(
			'vimeotheque-setup',
			VIMEOTHEQUE_URL . 'assets/back-end/css/setup-page.css',
			false,
			VIMEOTHEQUE_VERSION
		);

		wp_enqueue_script(
			'vimeotheque-setup',
			VIMEOTHEQUE_URL . 'assets/back-end/js/setup.js',
			[ 'jquery', 'wp-color-picker' ],
			VIMEOTHEQUE_VERSION
		);

        wp_localize_script(
            'vimeotheque-setup',
            'vimeotheque',
            [
                'restURL' => rest_url(),
                'restNonce' => wp_create_nonce( 'wp_rest' )
            ]
        );

		wp_enqueue_style('wp-color-picker');
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!