Title: static function call
Last modified: August 21, 2016

---

# static function call

 *  [Paul Bearne](https://wordpress.org/support/users/pbearne/)
 * (@pbearne)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/static-function-call/)
 * Strict Standards: Non-static method Category_Checklist::init() should not be 
   called statically in /mec_Author_Box/include/Category-Order.php on line 136
 *     ```
       class Category_Checklist {
   
       	public static function init() {
       		add_action('add_meta_boxes', array(__CLASS__, 'replace_box'));
       	}
   
       	// adapted from wp-admin/edit-form-advanced.php
       	public function replace_box($post_type) {
       		foreach ( get_object_taxonomies($post_type) as $tax_name ) {
       			$taxonomy = get_taxonomy($tax_name);
       			if ( !$taxonomy->show_ui || !$taxonomy->hierarchical )
       				continue;
   
       			$label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name;
   
                   remove_meta_box($tax_name . 'div', $post_type, 'side');
   
       			// don't use 'core' as priority
       			add_meta_box($tax_name . 'div', $label, array(__CLASS__, 'meta_box'), $post_type, 'side', 'default', array( 'taxonomy' => $tax_name ));
       		}
   
       		add_action('admin_footer', array(__CLASS__, 'script'));
       	}
   
       	// Scrolls to first checked category
       	public function script() {
       ?>
       .....
   
       }
       Category_Checklist::init();
       ```
   
 * this is a static class call and the code has none static functions
 * part of the updated code above
 * [http://wordpress.org/plugins/category-checklist-tree/](http://wordpress.org/plugins/category-checklist-tree/)

The topic ‘static function call’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/category-checklist-tree.svg)
 * [Category Checklist Tree](https://wordpress.org/plugins/category-checklist-tree/)
 * [Support Threads](https://wordpress.org/support/plugin/category-checklist-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/category-checklist-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-checklist-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-checklist-tree/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Paul Bearne](https://wordpress.org/support/users/pbearne/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/static-function-call/)
 * Status: not resolved