PHP Класс Ooyala, vip-mu-plugins-public

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$allowed_values
$paramMapping mapping of shortcode param => API param
$playerDefaults some of these field names differ from the player API bc WP lowercases shortcode params, they are mapped below
$settings_default

Открытые методы

Метод Описание
action_init ( ) Register shortcodes
admin_enqueue ( ) Enqueue all assets used for admin view. Localize scripts.
admin_init ( ) Register settings screen and validation callback
admin_notices ( ) Notify the user if the API credentials have not been entered
ajax_check ( ) Check against a nonce to limit exposure, all AJAX handlers must use this
ajax_download ( ) Process download, return image ID to use as featured image.
ajax_error ( $message = null, $data = [] ) Emit an error result via AJAX
ajax_get_image_id ( ) Look up an attachment ID from a preview URL
ajax_sign_request ( ) Process signing request
ajax_success ( $message = null, $data = [] ) Emit a success message via AJAX
configured ( ) : boolean Is this module configured?
get_attachment_id ( string $url ) : integer Look up an attachment ID based on a given Ooyala thumbnail URL
get_settings ( ) : array Get the user's saved settings for this plugin, filled in with default values.
instance ( )
is_default ( string $field, mixed $value ) : boolean Determine if the supplied shortcode param is the default for the player
media_buttons ( $editor_id = 'content' ) Add "Ooyala.
print_media_templates ( ) Include all of the templates used by Backbone views
settings_fields ( ) Emit settings fields
shortcode ( $atts, $content = null ) Render the Ooyala shortcode
validate_settings ( $settings ) Validate option value

Приватные методы

Метод Описание
__clone ( )
__construct ( ) : null Register actions and filters

Описание методов

action_init() публичный Метод

Register shortcodes
public action_init ( )

admin_enqueue() публичный Метод

Enqueue all assets used for admin view. Localize scripts.
public admin_enqueue ( )

admin_init() публичный Метод

Register settings screen and validation callback
public admin_init ( )

admin_notices() публичный Метод

Notify the user if the API credentials have not been entered
public admin_notices ( )

ajax_check() публичный Метод

Check against a nonce to limit exposure, all AJAX handlers must use this
public ajax_check ( )

ajax_download() публичный Метод

Process download, return image ID to use as featured image.
public ajax_download ( )

ajax_error() публичный Метод

Emit an error result via AJAX
public ajax_error ( $message = null, $data = [] )

ajax_get_image_id() публичный Метод

Look up an attachment ID from a preview URL
public ajax_get_image_id ( )

ajax_sign_request() публичный Метод

Process signing request
public ajax_sign_request ( )

ajax_success() публичный Метод

Emit a success message via AJAX
public ajax_success ( $message = null, $data = [] )

configured() публичный Метод

Is this module configured?
public configured ( ) : boolean
Результат boolean

get_attachment_id() публичный Метод

Look up an attachment ID based on a given Ooyala thumbnail URL
public get_attachment_id ( string $url ) : integer
$url string
Результат integer

get_settings() публичный Метод

Get the user's saved settings for this plugin, filled in with default values.
public get_settings ( ) : array
Результат array settings or defaults

instance() публичный статический Метод

public static instance ( )

is_default() публичный Метод

Determine if the supplied shortcode param is the default for the player
public is_default ( string $field, mixed $value ) : boolean
$field string shortcode field name
$value mixed
Результат boolean determination

media_buttons() публичный Метод

.." button to edit screen
public media_buttons ( $editor_id = 'content' )

print_media_templates() публичный Метод

Include all of the templates used by Backbone views

settings_fields() публичный Метод

Emit settings fields
public settings_fields ( )

shortcode() публичный Метод

Render the Ooyala shortcode
public shortcode ( $atts, $content = null )

validate_settings() публичный Метод

Validate option value
public validate_settings ( $settings )

Описание свойств

$allowed_values публичное свойство

public $allowed_values

$paramMapping публичное свойство

mapping of shortcode param => API param
public $paramMapping

$playerDefaults публичное свойство

some of these field names differ from the player API bc WP lowercases shortcode params, they are mapped below
public $playerDefaults

$settings_default публичное свойство

public $settings_default