PHP Class RWMB_Image_Field

Inheritance: extends RWMB_File_Field
显示文件 Open project: rilwis/meta-box Class Usage Examples

Public Methods

Method Description
admin_enqueue_scripts ( ) Enqueue scripts and styles.
file_html ( integer $image ) : string Get HTML markup for ONE uploaded image
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.

Method Details

admin_enqueue_scripts() public static method

Enqueue scripts and styles.
public static admin_enqueue_scripts ( )

file_html() public static method

Get HTML markup for ONE uploaded image
public static file_html ( integer $image ) : string
$image integer Image ID
return string

file_info() public static method

Get uploaded file information
public static 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