Exemple #1
0
 /**
  *
  * @param type $object
  * @param type $object_id
  * @return type
  */
 public function deleteOption($object, $object_id = 0)
 {
     return aam_Core_API::deleteBlogOption($this->getOptionName($object, $object_id));
 }
Exemple #2
0
 /**
  * Clear Default Access settings
  * 
  * @return string
  * 
  * @access public
  */
 public function clearDefaultAccess()
 {
     aam_Core_API::deleteBlogOption($this->getOptionName(aam_Core_Request::post('id')));
     return json_encode(array('status' => 'success'));
 }
 protected function unpinSite()
 {
     return json_encode(array('status' => aam_Core_API::deleteBlogOption('aam_default_site', 1) ? 'success' : 'failure'));
 }
Exemple #4
0
 /**
  * Delete Visitor's Cache
  *
  * @return boolean
  *
  * @access public
  */
 public function clearCache()
 {
     return aam_Core_API::deleteBlogOption('aam_visitor_cache');
 }
Exemple #5
0
 protected function cleanup()
 {
     $this->removeSuperAdmin();
     //remove migration cache
     aam_Core_API::deleteBlogOption('aam_migration_cache', 1);
     return array('status' => 'success', 'stop' => 1);
 }
 /**
  * @inheritdoc
  */
 public function setFlag($flag, $value = true)
 {
     $option = 'aam_' . self::UID . '_' . $this->getId() . "_{$flag}";
     if ($value === true) {
         aam_Core_API::updateBlogOption($option, $value);
     } else {
         aam_Core_API::deleteBlogOption($option);
     }
 }
Exemple #7
0
 /**
  *
  * @global type $wp_post_types
  * @return type
  */
 public function retrieveList()
 {
     global $wp_post_types;
     if (aam_Core_Request::post('refresh') == 1) {
         aam_Core_API::deleteBlogOption('aam_metabox_cache');
         $type_list = array_keys($wp_post_types);
         array_unshift($type_list, self::GROUP_WIDGETS);
         foreach ($type_list as $type) {
             if ($type == 'widgets') {
                 $url = add_query_arg('aam_meta_init', 1, admin_url('index.php'));
             } else {
                 $url = add_query_arg('aam_meta_init', 1, admin_url('post-new.php?post_type=' . $type));
             }
             //grab metaboxes
             aam_Core_API::cURL($url);
         }
     }
     return $this->buildMetaboxList();
 }