/** * * @global type $wp_post_types * @return type */ public function refreshList() { global $wp_post_types; AAM_Core_API::deleteOption('aam_metabox_cache'); $type_list = array_keys($wp_post_types); //used to retrieve the list of all wigets on the frontend array_unshift($type_list, 'widgets'); foreach ($type_list as $type) { if ($type == 'widgets') { $url = add_query_arg('init', 'metabox', admin_url('index.php')); } else { $url = add_query_arg('init', 'metabox', admin_url('post-new.php?post_type=' . $type)); } //grab metaboxes AAM_Core_API::cURL($url); } return json_encode(array('status' => 'success')); }
/** * * @param type $object * @param type $id * @return type */ public function deleteOption($object, $id = 0) { return AAM_Core_API::deleteOption($this->getOptionName($object, $id)); }