Ejemplo n.º 1
0
 function upgrader_instantiate($plugin_slug)
 {
     $args = array('parent' => $this, 'remote_url' => 'http://updater2.ithemes.com/index.php', 'version' => pb_backupbuddy::settings('version'), 'plugin_slug' => pb_backupbuddy::settings('slug'), 'plugin_path' => plugin_basename(pb_backupbuddy::plugin_path() . '/' . pb_backupbuddy::settings('init')), 'plugin_url' => pb_backupbuddy::plugin_url(), 'product' => pb_backupbuddy::settings('slug'), 'time' => 43200, 'return_format' => 'json', 'method' => 'POST', 'upgrade_action' => 'check');
     // Instantiate object of latest updater (by namespace) and apply to this plugin's pluginbuddy class (in this namespace).
     //$class_name = $plugin_namespace . "\\updater";
     $target_plugin_class_name = 'pb_' . $plugin_slug . '_updater';
     $this_plugin_class_name = 'pb_' . $this->_slug;
     //$this_plugin_class_name::$_updater = new $target_plugin_class_name( $args );
     pb_backupbuddy::$_updater = new $target_plugin_class_name($args);
 }