PHP Class RWMB_Image_Advanced_Field

Inheritance: extends RWMB_Media_Field
Afficher le fichier Open project: rilwis/meta-box Class Usage Examples

Méthodes publiques

Méthode 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 méthode

Enqueue scripts and styles
static public admin_enqueue_scripts ( )

file_info() static public méthode

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).
Résultat array | boolean False if file not found. Array of image info on success

format_single_value() public static méthode

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
Résultat string

format_value() public static méthode

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
Résultat string

get_value() static public méthode

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

normalize() static public méthode

Normalize parameters for field
static public normalize ( array $field ) : array
$field array
Résultat array

print_templates() public static méthode

Template for media item
public static print_templates ( ) : void
Résultat void