コード例 #1
0
ファイル: class-fl-updater.php プロジェクト: ImtiH/BAPWD
 /**
  * Retrives the data for the plugin info lightbox.
  *
  * @since 1.0
  * @param bool $false
  * @param string $action
  * @param object $args
  * @return object|bool
  */
 public function plugin_info($false, $action, $args)
 {
     if (!isset($args->slug) || $args->slug != $this->settings['slug']) {
         return $false;
     }
     $response = FLUpdater::api_request(self::$_updates_api_url, array('fl-api-method' => 'plugin_info', 'email' => FLUpdater::get_subscription_email(), 'domain' => network_home_url(), 'product' => $this->settings['name'], 'slug' => $this->settings['slug'], 'version' => $this->settings['version']));
     if (isset($response) && is_object($response) && $response !== false) {
         $response->name = $this->settings['name'];
         $response->sections = (array) $response->sections;
         return $response;
     }
     return $false;
 }
コード例 #2
0
 /**
  * Static method for updating the subscription license.
  *
  * @since 1.0
  * @param string $license The new license key.
  * @return void
  */
 public static function save_subscription_license($license)
 {
     FLUpdater::api_request(self::$_updates_api_url, array('fl-api-method' => 'activate_domain', 'license' => $license, 'domain' => network_home_url(), 'products' => json_encode(self::$_products)));
     update_site_option('fl_themes_subscription_email', $license);
 }