Property | Type | Description | |
---|---|---|---|
$action | Themosis\Hook\IHook | ||
$container | |||
$datas | Store the taxonomy data. | ||
$fields | array | The taxonomy custom fields. | |
$prefix | string | ||
$validator | |||
$view | Illuminate\View\Factory |
Method | Description | |
---|---|---|
__construct ( |
Build a TaxonomyBuilder instance. | |
addFields ( array $fields, string $taxonomy = '' ) : |
Register/display taxonomy custom fields. | |
bind ( ) : |
Link the taxonomy to its custom post type. Allow the taxonomy to be found in 'parse_query' or 'pre_get_posts' filters. | |
displayAddFields ( ) | Display fields on add form screen. | |
displayEditFields ( stdClass $term ) | Display fields on edit form screen. | |
get ( null $property = null ) : array | Return a defined taxonomy property. | |
make ( string $name, string | array $postType, string $plural, string $singular ) : |
||
register ( ) | Triggered by the 'init' action/event. | |
registerFields ( ) | Register the term meta. | |
sanitize ( array $rules = [] ) : |
Sanitize custom fields values by using passed rules. | |
sanitizeField ( mixed $value, string $key, string $type ) : mixed | Used to run the sanitize callbacks. | |
save ( integer $term_id ) | Save term custom field data to database. | |
set ( array $params = [] ) : |
Set the custom taxonomy. A user can also override the arguments by passing an array of taxonomy arguments. |
Method | Description | |
---|---|---|
getValue ( integer $term_id, Themosis\Field\Fields\IField $field, string $value = '' ) : mixed | string | Return a default value for the custom fields. | |
setDefaultArguments ( array $posttypes, string $plural, string $singular ) : array | Set the taxonomy default arguments. | |
setNonce ( ) | Set a custom nonce. |
public __construct ( |
||
$container | ||
$datas | The taxonomy properties. | |
$action | Themosis\Hook\IHook | |
$validator | ||
$view | Illuminate\View\Factory |
public bind ( ) : |
||
return |
public displayEditFields ( stdClass $term ) | ||
$term | stdClass | The term object |
public make ( string $name, string | array $postType, string $plural, string $singular ) : |
||
$name | string | The taxonomy slug name. |
$postType | string | array | The taxonomy object type slug: 'post', 'page', ... |
$plural | string | The taxonomy plural display name. |
$singular | string | The taxonomy singular display name. |
return |
protected Application,Themosis\Foundation $container | ||
return |
protected DataContainer,Themosis\Foundation $datas | ||
return |
protected ValidationBuilder,Themosis\Validation $validator | ||
return |