global $wp_meta_boxes returns NULL

When I call global $wp_meta_boxes; it returns null.
I’m trying to calling like:

class my_class()
{
public function __construct(){
add_action( ‘wp_dashboard_setup’ , array( $this , ‘my_meta_boxes’ ));
}
public function my_meta_boxes(){
global $wp_meta_boxes;
return $wp_meta_boxes;
}
}

The class is working fine, but I cannot make it work.
I appreciate any suggestion.

Read more here:: global $wp_meta_boxes returns NULL

Leave a Reply

Your email address will not be published. Required fields are marked *