PHP Class RWMB_Media_Field

Inheritance: extends RWMB_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
get_attributes ( array $field, mixed $value = null ) : array Get the attributes for a field
html ( mixed $meta, array $field ) : string Get field HTML
normalize ( array $field ) : array Normalize parameters for field
print_templates ( ) Template for media item
save ( $new, $old, $post_id, $field ) Save meta value
value ( mixed $new, mixed $old, integer $post_id, array $field ) : array | mixed Get meta values to save

Protected Methods

Method Description
get_mime_extensions ( ) : array Get supported mime extensions.

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 ( )

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_mime_extensions() protected static method

Get supported mime extensions.
protected static get_mime_extensions ( ) : array
return array

html() public static method

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

normalize() public static method

Normalize parameters for field
public static normalize ( array $field ) : array
$field array
return array

print_templates() public static method

Template for media item
public static print_templates ( )

save() public static method

Save meta value
public static save ( $new, $old, $post_id, $field )
$new
$old
$post_id
$field

value() public static method

Get meta values to save
public static value ( mixed $new, mixed $old, integer $post_id, array $field ) : array | mixed
$new mixed
$old mixed
$post_id integer
$field array
return array | mixed