You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, Fieldmanager_Context_Term could be extended so that a field using this context can be added to child terms only (or maybe only to parent terms too).
* Only show this field on child terms of this parent.
*
* @var int
*/
public$parent = '';
Use Case
Here is a real use case where this was needed and could be used:
$fm = newFieldmanager_Checkbox(
[
'checked_value' => '1',
'name' => 'field_key',
]
);
$fm->add_term_meta_box(
title: __( 'Enable in Child Term Only' ),
taxonomies: [ 'category', 'post_tag' ],
show_on_add: false,
parent: 254546546// This only works if one sets the parent term ID.
);
The text was updated successfully, but these errors were encountered:
Description
Ideally,
Fieldmanager_Context_Term
could be extended so that a field using this context can be added to child terms only (or maybe only to parent terms too).Currently, one can set a specific parent term id:
wordpress-fieldmanager/php/context/class-fieldmanager-context-term.php
Lines 42 to 47 in 584979f
Use Case
Here is a real use case where this was needed and could be used:
The text was updated successfully, but these errors were encountered: