PHP Class Themosis\Taxonomy\TaxMeta

Allow the user to retrieve a custom field of a taxonomy.
显示文件 Open project: themosis/framework

Public Methods

Method Description
all ( string $taxonomySlug, integer $term_id ) : array | boolean Retrieve all custom fields of a term.
get ( string $taxonomySlug, integer $term_id, string $key ) : array | string Retrieve one custom field of a term.

Method Details

all() public static method

Retrieve all custom fields of a term.
public static all ( string $taxonomySlug, integer $term_id ) : array | boolean
$taxonomySlug string The registered taxonomy slug.
$term_id integer The term ID.
return array | boolean The custom field values. False if empty.

get() public static method

Retrieve one custom field of a term.
public static get ( string $taxonomySlug, integer $term_id, string $key ) : array | string
$taxonomySlug string The registered taxonomy slug.
$term_id integer The term ID.
$key string The key name of the custom field.
return array | string The saved value in the option table.