Recent

Section_Product_Meta class

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;
TypeNameDescription
array$argsDropdown args.
string$taxonomyTaxonomy 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 );
TypeNameDescription
\WP_Term$termThe 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 );
TypeNameDescription
int$term_idTerm ID.