Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'dev'

  • Loading branch information...
commit 8dd7cabab0bbe1d403437451040dc6620621bd2d 2 parents e3238e3 + d6dbae9
@thomasgriffin thomasgriffin authored
View
6 README
@@ -1,7 +1,7 @@
=== TGM Plugin Activation ===
Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com)
Gary Jones (Github: @GaryJones / Twitter: GaryJ)
-Version: 2.3.0
+Version: 2.3.1
Requires at least: 3.0.0
Tested up to: 3.3.1
@@ -35,6 +35,10 @@ You can also follow project progress and updates on Twitter. Follow us here at h
== Changelog ==
+= 2.3.1 =
+
+* Fixed bug with not finding class (reverted back to Plugin_Upgrader)
+
= 2.3.0 =
* Improved sorting of plugins by sorting them by required/recommended (while still maintaining alphabetical order within each group)
View
57 tgm-plugin-activation/class-tgm-plugin-activation.php
@@ -3,7 +3,7 @@
* Plugin installation and activation for WordPress themes.
*
* @package TGM-Plugin-Activation
- * @version 2.3.0
+ * @version 2.3.1
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2012, Thomas Griffin
@@ -469,7 +469,7 @@ protected function do_plugin_install() {
$source = ( 'upload' == $type ) ? $this->default_path . $plugin['source'] : $plugin['source'];
/** Create a new instance of Plugin_Upgrader */
- $upgrader = new TGM_Plugin_Installer( $skin = new Plugin_Installer_Skin( compact( 'type', 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
+ $upgrader = new Plugin_Upgrader( $skin = new Plugin_Installer_Skin( compact( 'type', 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
/** Perform the action and install the plugin from the $source urldecode() */
$upgrader->install( $source );
@@ -1587,59 +1587,6 @@ public function prepare_items() {
*/
if ( ! class_exists( 'WP_Upgrader' ) && isset( $_GET[sanitize_key( 'page' )] ) && TGM_Plugin_Activation::$instance->menu == $_GET[sanitize_key( 'page' )] ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
-
- if ( ! class_exists( 'TGM_Plugin_Installer' ) ) {
- /**
- * Installer class to handle singular plugin installations.
- *
- * Extends Plugin_Upgrader and customizes the install location.
- *
- * @since 2.3.0
- *
- * @package TGM-Plugin-Activation
- * @author Thomas Griffin <thomas@thomasgriffinmedia.com>
- * @author Gary Jones <gamajo@gamajo.com>
- */
- class TGM_Plugin_Installer extends Plugin_Upgrader {
-
- /**
- * Processes the plugin installation.
- *
- * @since 2.3.0
- *
- * @param array $package The plugin source needed for installation
- * @param boolean $must_use Whether or not the plugin is a 'must-use' plugin
- * @return null|boolean Return early on failure, installation success if true
- */
- public function install( $package ) {
-
- $this->init();
- $this->install_strings();
-
- add_filter( 'upgrader_source_selection', array( &$this, 'check_package' ) );
-
- $this->run( array(
- 'package' => $package,
- 'destination' => WP_PLUGIN_DIR,
- 'clear_destination' => false,
- 'clear_working' => true,
- 'hook_extra' => array()
- ) );
-
- remove_filter( 'upgrader_source_selection', array( &$this, 'check_package' ) );
-
- if ( ! $this->result || is_wp_error( $this->result ) )
- return $this->result;
-
- // Force refresh of plugin update information
- delete_site_transient( 'update_plugins' );
-
- return true;
-
- }
-
- }
- }
if ( ! class_exists( 'TGM_Bulk_Installer' ) ) {
/**
View
2  tgm-plugin-activation/example.php
@@ -8,7 +8,7 @@
*
* @package TGM-Plugin-Activation
* @subpackage Example
- * @version 2.3.0
+ * @version 2.3.1
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2012, Thomas Griffin
Please sign in to comment.
Something went wrong with that request. Please try again.