Section_Product_Meta
Section Product Meta class.
Namespace: WebberZone\Knowledge_Base\Admin
Since: 3.0.0
Source: includes/admin/class-section-product-meta.php line 22
Methods
__construct()
Main constructor class.
Since: 2.3.0
Line: 29
public function __construct( );
filter_parent_dropdown_args()
Filter dropdown args to use custom walker for parent selection.
Since: 3.0.0
Line: 50
public function filter_parent_dropdown_args( $args, $taxonomy ): array;
| Type | Name | Description |
|---|---|---|
array | $args | Dropdown args. |
string | $taxonomy | Taxonomy name. |
Returns: array — Modified args.
add_product_field()
Add product dropdown field to add new section form.
Since: 3.0.0
Line: 62
public function add_product_field( );
edit_product_field()
Add product dropdown field to edit section form.
Since: 3.0.0
Line: 108
public function edit_product_field( $term );
| Type | Name | Description |
|---|---|---|
\WP_Term | $term | The term being edited. |
save_product_meta()
Save product assignment when section is added or edited.
Note: No nonce verification needed here because WordPress core verifies the nonce in wp-admin/edit-tags.php before calling wp_insert_term() / wp_update_term(), which then fires this hook. See: check_admin_referer( ‘add-tag’ ) and check_admin_referer( ‘update-tag_’ . $tag_ID )
Since: 3.0.0
Line: 166
public function save_product_meta( $term_id );
| Type | Name | Description |
|---|---|---|
int | $term_id | Term ID. |