PHP Class RWMB_Image_Advanced_Field

Inheritance: extends RWMB_Media_Field
Datei anzeigen Open project: rilwis/meta-box Class Usage Examples

Public Methods

Method Description
admin_enqueue_scripts ( ) Enqueue scripts and styles
file_info ( integer $file, array $args = [] ) : array | boolean Get uploaded file information.
format_single_value ( array $field, array $value ) : string Format a single value for the helper functions.
format_value ( array $field, string | array $value ) : string Format value for the helper functions.
get_value ( array $field, array $args = [], null $post_id = null ) : mixed Get the field value.
normalize ( array $field ) : array Normalize parameters for field
print_templates ( ) : void Template for media item

Method Details

admin_enqueue_scripts() static public method

Enqueue scripts and styles
static public admin_enqueue_scripts ( )

file_info() static public method

Get uploaded file information.
static public file_info ( integer $file, array $args = [] ) : array | boolean
$file integer Attachment image ID (post ID). Required.
$args array Array of arguments (for size).
return array | boolean False if file not found. Array of image info on success

format_single_value() public static method

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

format_value() public static method

Format value for the helper functions.
public static format_value ( array $field, string | array $value ) : string
$field array Field parameter
$value string | array The field meta value
return string

get_value() static public method

Get the field value.
static public get_value ( array $field, array $args = [], null $post_id = null ) : mixed
$field array
$args array
$post_id null
return mixed

normalize() static public method

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

print_templates() public static method

Template for media item
public static print_templates ( ) : void
return void