77
88namespace WebberZone \Knowledge_Base \Admin ;
99
10+ use WebberZone \Knowledge_Base \Util \Hook_Registry ;
11+
1012// If this file is called directly, abort.
1113if ( ! defined ( 'WPINC ' ) ) {
1214 die;
@@ -25,20 +27,20 @@ class Admin_Columns {
2527 * @since 2.3.0
2628 */
2729 public function __construct () {
28- add_filter ( 'manage_edit-wzkb_category_columns ' , array ( $ this , 'tax_columns ' ) );
29- add_filter ( 'manage_edit-wzkb_category_sortable_columns ' , array ( $ this , 'tax_sortable_columns ' ) );
30- add_filter ( 'manage_edit-wzkb_tag_columns ' , array ( $ this , 'tax_columns ' ) );
31- add_filter ( 'manage_edit-wzkb_tag_sortable_columns ' , array ( $ this , 'tax_sortable_columns ' ) );
30+ Hook_Registry:: add_filter ( 'manage_edit-wzkb_category_columns ' , array ( $ this , 'tax_columns ' ) );
31+ Hook_Registry:: add_filter ( 'manage_edit-wzkb_category_sortable_columns ' , array ( $ this , 'tax_sortable_columns ' ) );
32+ Hook_Registry:: add_filter ( 'manage_edit-wzkb_tag_columns ' , array ( $ this , 'tax_columns ' ) );
33+ Hook_Registry:: add_filter ( 'manage_edit-wzkb_tag_sortable_columns ' , array ( $ this , 'tax_sortable_columns ' ) );
3234
33- add_filter ( 'manage_wzkb_category_custom_column ' , array ( $ this , 'tax_id ' ), 10 , 3 );
34- add_filter ( 'manage_wzkb_tag_custom_column ' , array ( $ this , 'tax_id ' ), 10 , 3 );
35+ Hook_Registry:: add_filter ( 'manage_wzkb_category_custom_column ' , array ( $ this , 'tax_id ' ), 10 , 3 );
36+ Hook_Registry:: add_filter ( 'manage_wzkb_tag_custom_column ' , array ( $ this , 'tax_id ' ), 10 , 3 );
3537
3638 // Register Product filter for Articles admin screen.
37- add_action ( 'restrict_manage_posts ' , array ( $ this , 'add_product_filter_dropdown ' ) );
38- add_action ( 'pre_get_posts ' , array ( $ this , 'filter_articles_by_product ' ) );
39+ Hook_Registry:: add_action ( 'restrict_manage_posts ' , array ( $ this , 'add_product_filter_dropdown ' ) );
40+ Hook_Registry:: add_action ( 'pre_get_posts ' , array ( $ this , 'filter_articles_by_product ' ) );
3941
4042 // Add sorting.
41- add_filter ( 'terms_clauses ' , array ( $ this , 'sort_terms_by_product ' ), 10 , 2 );
43+ Hook_Registry:: add_filter ( 'terms_clauses ' , array ( $ this , 'sort_terms_by_product ' ), 10 , 2 );
4244 }
4345
4446 /**
0 commit comments