Esempio n. 1
0
 public function run($arguments)
 {
     $arguments = Ithemes_Sync_Functions::merge_defaults($arguments, $this->default_arguments);
     return Ithemes_Sync_Functions::get_plugin_details($arguments);
 }
Esempio n. 2
0
 private function add_old_plugin_updater_support()
 {
     $plugins = Ithemes_Sync_Functions::get_plugin_details();
     $data['3.0'] = get_site_transient('update_plugins');
     $data['2.8'] = get_transient('update_plugins');
     $data['2.6'] = get_option('update_plugins');
     foreach (array('2.8', '2.6') as $version) {
         if (is_object($data[$version]) && !empty($data[$version]->response)) {
             foreach ($data[$version]->response as $plugin => $plugin_data) {
                 if (!empty($data['3.0']->response[$plugin]) || !empty($this->old_update_data['plugins'][$plugin])) {
                     continue;
                 }
                 if (!empty($plugins[$plugin]) && !empty($plugins[$plugin]['Version']) && version_compare($plugin_data->new_version, $plugins[$plugin]['Version'], '<=')) {
                     continue;
                 }
                 $this->old_update_data['plugins'][$plugin] = $plugin_data;
             }
         }
     }
     if (empty($this->old_update_data['plugins'])) {
         return;
     }
     add_filter('site_transient_update_plugins', array($this, 'filter_update_plugins_add_old_update_data'));
 }