Ejemplo n.º 1
0
 public static function remove_meta_box($id, $screen, $context)
 {
     //global $wp_meta_boxes;
     if (empty($screen)) {
         $screen = get_current_screen();
     } elseif (is_string($screen)) {
         $screen = convert_to_screen($screen);
     }
     $page = $screen->id;
     if (!isset(self::$metaboxes)) {
         self::$metaboxes = array();
     }
     if (!isset(self::$metaboxes[$page])) {
         self::$metaboxes[$page] = array();
     }
     if (!isset(self::$metaboxes[$page][$context])) {
         self::$metaboxes[$page][$context] = array();
     }
     foreach (array('high', 'core', 'default', 'low') as $priority) {
         self::$metaboxes[$page][$context][$priority][$id] = false;
     }
 }