Class Fieldmanager_Context_Term
Use fieldmanager to create meta boxes on the new/edit term screens and save data primarily to term meta.
- Fieldmanager_Context
- Fieldmanager_Context_Storable
- Fieldmanager_Context_Term
Methods summary
public
|
#
__construct( array|string $args, string|array $taxonomies = array(), boolean $show_on_add = true, boolean $show_on_edit = true, string $parent = '',
Instantiate this context. You can either pass an array of all args (preferred), or pass them individually (deprecated). |
public
|
#
add_term_fields( string $taxonomy )
Creates the HTML template for wrapping fields on the add term form and prints the field |
public
|
#
edit_term_fields( WP_Term $term, string $taxonomy )
Creates the HTML template for wrapping fields on the edit term form and prints the field |
public
string
|
#
term_fields( string $html_template, string $taxonomy, WP_Term $term = null )
Generates HTML for the term field |
public
|
|
public
|
#
save_to_term_meta( integer $term_id, array $taxonomy, mixed $data = null )
Helper to save an array of data to term meta |
Magic methods summary
Properties summary
public
string
|
$title |
#
Title of field to display in standard term form field location |
public
string[]
|
$taxonomies |
#
What taxonomies to render these fields |
public
boolean
|
$show_on_add |
#
Whether or not to show the fields on the term add form |
public
boolean
|
$show_on_edit |
#
Whether or not to show the fields on the term edit form |
public
integer
|
$parent |
#
Only show this field on child terms of this parent |
public
array
|
$reserved_fields |
#
Field names reserved for WordPress on the term add/edit forms |
public
boolean
|
$use_fm_meta |
#
Use FM term meta or WordPres core term meta. The default is a bit confusing: technically, it's to use core's term meta, but if the class is instantiated using the now-deprecated separated arguments, this gets set to true for backwards-compatibility purposes. |
public
|
$fm |
#
Base field |