Setup_Page::on_load()


Source

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

476public function on_load() {
477    $_GET['noheader'] = 'true';
478    if( !defined('IFRAME_REQUEST') ){
479        define('IFRAME_REQUEST', true);
480    }
481 
482    $options = Plugin::instance()->get_options();
483    // you must use this instead of menu_page_url() to avoid API error
484    $settings_page_url = sprintf(
485        'edit.php?post_type=%s&page=%s',
486        Plugin::instance()->get_admin()->get_post_type()->get_post_type(),
487        Plugin::instance()->get_admin()->get_admin_menu()->get_page( 'cvm_settings' )->get_menu_slug()
488    );
489 
490    $this->vimeo_oauth = new Vimeo_Oauth(
491        $options['vimeo_consumer_key'],
492        $options['vimeo_secret_key'],
493        $options['oauth_token'],
494        admin_url( $settings_page_url )
495    );
496 
497    wp_enqueue_style(
498        'vimeotheque-setup',
499        VIMEOTHEQUE_URL . 'assets/back-end/css/setup-page.css',
500        false,
501        VIMEOTHEQUE_VERSION
502    );
503 
504    wp_enqueue_script(
505        'vimeotheque-setup',
506        VIMEOTHEQUE_URL . 'assets/back-end/js/setup.js',
507        [ 'jquery', 'wp-color-picker' ],
508        VIMEOTHEQUE_VERSION
509    );
510 
511    wp_localize_script(
512        'vimeotheque-setup',
513        'vimeotheque',
514        [
515            'restURL' => rest_url(),
516            'restNonce' => wp_create_nonce( 'wp_rest' )
517        ]
518    );
519 
520    wp_enqueue_style('wp-color-picker');
521}

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!