PHP Class RWMB_OEmbed_Field

Inheritance: extends RWMB_URL_Field
Show file Open project: rilwis/meta-box Class Usage Examples

Public Methods

Method Description
add_actions ( ) Add actions
admin_enqueue_scripts ( ) Enqueue scripts and styles
format_single_value ( array $field, string $value ) : string Format a single value for the helper functions.
get_attributes ( array $field, mixed $value = null ) : array Get the attributes for a field
get_embed ( string $url ) : string Get embed html from url
html ( mixed $meta, array $field ) : string Get field HTML
wp_ajax_get_embed ( ) Ajax callback for returning oEmbed HTML

Method Details

add_actions() public static method

Add actions
public static add_actions ( )

admin_enqueue_scripts() public static method

Enqueue scripts and styles
public static admin_enqueue_scripts ( )

format_single_value() public static method

Format a single value for the helper functions.
public static format_single_value ( array $field, string $value ) : string
$field array Field parameter
$value string The value
return string

get_attributes() public static method

Get the attributes for a field
public static get_attributes ( array $field, mixed $value = null ) : array
$field array
$value mixed
return array

get_embed() public static method

Get embed html from url
public static get_embed ( string $url ) : string
$url string
return string

html() public static method

Get field HTML
public static html ( mixed $meta, array $field ) : string
$meta mixed
$field array
return string

wp_ajax_get_embed() public static method

Ajax callback for returning oEmbed HTML
public static wp_ajax_get_embed ( )