/**
  * Dump options to database.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.3
  */
 function store()
 {
     $this->_logger->entrance();
     $option_name = $this->_get_option_manager_name();
     if ($this->_logger->is_on()) {
         $this->_logger->info($option_name . ' = ' . var_export($this->_options, true));
     }
     // Update DB.
     update_option($option_name, $this->_options);
     if (!WP_FS__DEBUG_SDK) {
         wp_cache_set($option_name, $this->_options, WP_FS__SLUG);
     }
 }
 public static function _uninstall_plugin()
 {
     self::_load_required_static();
     self::$_static_logger->entrance();
     if (!current_user_can('activate_plugins')) {
         return;
     }
     $plugin_file = substr(current_filter(), strlen('uninstall_'));
     self::$_static_logger->info('plugin = ' . $plugin_file);
     $fs = self::load_instance_by_file($plugin_file);
     if (is_object($fs)) {
         $fs->_uninstall_plugin_event();
     }
 }
예제 #3
0
 /**
  * Account page resources load.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.6
  */
 function _account_page_load()
 {
     $this->_logger->entrance();
     $this->_logger->info(var_export($_REQUEST, true));
     fs_enqueue_local_style('fs_account', '/admin/account.css');
     if ($this->_has_addons()) {
         wp_enqueue_script('plugin-install');
         add_thickbox();
         function fs_addons_body_class($classes)
         {
             $classes .= ' plugins-php';
             return $classes;
         }
         add_filter('admin_body_class', 'fs_addons_body_class');
     }
     $this->_handle_account_edits();
     $this->do_action('account_page_load_before_departure');
 }
예제 #4
0
 /**
  * Account page resources load.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.6
  */
 function _account_page_load()
 {
     $this->_logger->entrance();
     $this->_logger->info(var_export($_REQUEST, true));
     fs_enqueue_local_style('fs_account', '/admin/account.css');
     if ($this->has_addons()) {
         wp_enqueue_script('plugin-install');
         add_thickbox();
         function fs_addons_body_class($classes)
         {
             $classes .= ' plugins-php';
             return $classes;
         }
         add_filter('admin_body_class', 'fs_addons_body_class');
     }
     if ($this->has_paid_plan() && !$this->has_any_license() && !$this->is_sync_executed()) {
         /**
          * If no licenses found and no sync job was executed during the last 24 hours,
          * just execute the sync job right away (blocking execution).
          *
          * @since 1.1.7.3
          */
         $this->run_manual_sync();
     }
     $this->_handle_account_edits();
     $this->do_action('account_page_load_before_departure');
 }