示例#1
0
 /**
  * Returns the active status of the importer
  *
  * @return bool
  */
 public static function isActive()
 {
     global $wpdb;
     if (!current_user_can('upload_files') || !PluginInfo::isInstalled('NextGEN Gallery') || !($gallery_count = (int) $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}ngg_gallery`"))) {
         return false;
     }
     return true;
 }
 /**
  * Returns the active status of the importer
  *
  * @return bool
  */
 public static function isActive()
 {
     // Only active if ...
     if (!current_user_can('upload_files') || !PluginInfo::isInstalled('WP Flickr Background') || ($options = get_option(static::WP_OPTION_NAME)) === false || !array_key_exists('galleries', $options) || !is_array($options['galleries']) || count($options['galleries']) == 0) {
         return false;
     }
     return true;
 }