This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Settings_Page::set_unauth_token()

Set token for unauthenticated API requests


Source

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

	private function set_unauth_token(){
		$options = $this->options_obj()->get_options();
		if( !empty( $options['vimeo_consumer_key'] ) && !empty( $options['vimeo_secret_key'] ) ){
			if( empty( $options['oauth_token'] ) || ( isset( $options['oauth_secret'] ) && empty( $options['oauth_secret'] ) ) ){
				// account token
				$token = $this->vimeo_oauth->get_unauth_token();
				if( !is_wp_error( $token ) ){
					// set the token
					$options['oauth_token'] 	= $token;
				}else{
					// reset everything in case of error
					$options['vimeo_consumer_key'] = '';
					$options['vimeo_secret_key'] = '';
					$options['oauth_token'] = '';
					// set a notice for the error
					parent::set_error( $token->get_error_code(), $token->get_error_message() );
				}

				$this->options_obj()->update_options( $options );
				return true;
			}
		}
	}

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!