예제 #1
0
 /**
  * Initialize metabox list
  * 
  * @param string $post_type
  * 
  * @return void
  * 
  * @access public
  */
 public function initialize($post_type)
 {
     $cache = $this->getMetaboxList();
     if ($post_type === 'dashboard') {
         $this->collectWidgets($cache);
     } else {
         $this->collectMetaboxes($post_type, $cache);
     }
     AAM_Core_API::updateOption('aam_metabox_cache', $cache);
 }
예제 #2
0
 /**
  *
  * @param type $value
  * @param type $object
  * @param type $id
  * @return type
  */
 public function updateOption($value, $object, $id = 0)
 {
     return AAM_Core_API::updateOption($this->getOptionName($object, $id), $value);
 }
예제 #3
0
파일: View.php 프로젝트: alvarpoon/aeg
 /**
  * 
  * @return type
  */
 public function confirmWelcome()
 {
     return json_encode(array('status' => AAM_Core_API::updateOption('aam-welcome', 0)));
 }
예제 #4
0
파일: aam.php 프로젝트: lytranuit/wordpress
 /**
  * Run daily routine
  * 
  * Check server extension versions
  * 
  * @return void
  * 
  * @access public
  */
 public static function cron()
 {
     //grab the server extension list
     $response = AAM_Core_Server::check();
     if (!empty($response)) {
         AAM_Core_API::updateOption('aam-extension-repository', $response);
     }
 }
예제 #5
0
 /**
  * Store the license key
  * 
  * This is important to have just for the update extension purposes
  * 
  * @param string $title
  * @param string $license
  * 
  * @return void
  * 
  * @access protected
  */
 protected function storeLicense($title, $license)
 {
     //retrieve the installed list of extensions
     $list = AAM_Core_API::getOption('aam-extension-license', array());
     $list[$title] = $license;
     //update the extension list
     AAM_Core_API::updateOption('aam-extension-license', $list);
 }
예제 #6
0
파일: aam.php 프로젝트: severnrescue/web
 /**
  * Run daily routine
  * 
  * Check server extension versions
  * 
  * @return void
  * 
  * @access public
  */
 public static function cron()
 {
     //grab the server extension list
     $response = AAM_Core_Server::check();
     if (!is_wp_error($response)) {
         AAM_Core_API::updateOption('aam-extension-list', $response);
     }
 }
예제 #7
0
 /**
  * Clear cache
  * 
  * @param AAM_Core_Subject $subject
  * 
  * @return void
  * 
  * @access public
  */
 public function clearCache(AAM_Core_Subject $subject)
 {
     if ($this->isCacheOn()) {
         $group = $subject->getUID() . '-' . $subject->getId();
         if (isset($this->cache[$group])) {
             unset($this->cache[$group]);
         }
         AAM_Core_API::updateOption('aam-cache', $this->cache);
     }
 }