PHP Class RWMB_Taxonomy_Field

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

Méthodes publiques

Méthode Description
get_db_fields ( ) : array Get field names of object to be used by walker
get_option_label ( array $field, string $value ) : string Get option label
get_options ( array $field ) : array Get options for selects, checkbox list, etc via the terms
get_value ( array $field, array $args = [], integer | null $post_id = null ) : array Get the field value Return list of post term objects
normalize ( $field ) : array Add default value for 'taxonomy' field
raw_meta ( integer $post_id, array $field ) : mixed Get raw meta value
save ( mixed $new, mixed $old, integer $post_id, array $field ) Save meta value

Method Details

get_db_fields() public static méthode

Get field names of object to be used by walker
public static get_db_fields ( ) : array
Résultat array

get_option_label() public static méthode

Get option label
public static get_option_label ( array $field, string $value ) : string
$field array Field parameter
$value string Option value
Résultat string

get_options() public static méthode

Get options for selects, checkbox list, etc via the terms
public static get_options ( array $field ) : array
$field array Field parameters
Résultat array

get_value() public static méthode

Get the field value Return list of post term objects
public static get_value ( array $field, array $args = [], integer | null $post_id = null ) : array
$field array Field parameters
$args array Additional arguments. Rarely used. See specific fields for details
$post_id integer | null Post ID. null for current post. Optional.
Résultat array List of post term objects

normalize() public static méthode

Add default value for 'taxonomy' field
public static normalize ( $field ) : array
$field
Résultat array

raw_meta() public static méthode

Get raw meta value
public static raw_meta ( integer $post_id, array $field ) : mixed
$post_id integer
$field array
Résultat mixed

save() public static méthode

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