PHP Class Ooyala, vip-mu-plugins-public

Exibir arquivo Open project: Automattic/vip-mu-plugins-public Class Usage Examples

Public Properties

Property Type Description
$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

Public Methods

Method Description
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

Private Methods

Method Description
__clone ( )
__construct ( ) : null Register actions and filters

Method Details

action_init() public method

Register shortcodes
public action_init ( )

admin_enqueue() public method

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

admin_init() public method

Register settings screen and validation callback
public admin_init ( )

admin_notices() public method

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

ajax_check() public method

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

ajax_download() public method

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

ajax_error() public method

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

ajax_get_image_id() public method

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

ajax_sign_request() public method

Process signing request
public ajax_sign_request ( )

ajax_success() public method

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

configured() public method

Is this module configured?
public configured ( ) : boolean
return boolean

get_attachment_id() public method

Look up an attachment ID based on a given Ooyala thumbnail URL
public get_attachment_id ( string $url ) : integer
$url string
return integer

get_settings() public method

Get the user's saved settings for this plugin, filled in with default values.
public get_settings ( ) : array
return array settings or defaults

instance() public static method

public static instance ( )

is_default() public method

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
return boolean determination

media_buttons() public method

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

print_media_templates() public method

Include all of the templates used by Backbone views

settings_fields() public method

Emit settings fields
public settings_fields ( )

shortcode() public method

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

validate_settings() public method

Validate option value
public validate_settings ( $settings )

Property Details

$allowed_values public_oe property

public $allowed_values

$paramMapping public_oe property

mapping of shortcode param => API param
public $paramMapping

$playerDefaults public_oe property

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

$settings_default public_oe property

public $settings_default