WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7420 closed enhancement (worksforme)

There should be a "Go back" link after a plugin is automatically upgraded

Reported by: tabreziqbal Owned by:
Milestone: Priority: low
Severity: trivial Version: 2.6
Component: Administration Keywords: has-patch tested 2nd-opinion
Focuses: Cc:

Description

When a plugin is automatically upgraded from Wordpress admin page("update.php?action=upgrade-plugin"), the result page shows the summary of the plugin upgradation process after which the user needs to either use the back button of the browser or click the "Plugins" link at the top-right corner. It would be nice to have a "Go back to plugins page" or some such link on the "Upgrade Plugin" page itself.

wp-admin/update.php:

 else {
		//Result is the new plugin file relative to WP_PLUGIN_DIR
		show_message( __('Plugin upgraded successfully') );	
		if( $result && $was_activated ){
			show_message(__('Attempting reactivation of the plugin'));
			echo '<iframe style="border:0" width="100%" height="170px" src="' . 
                        wp_nonce_url('update.php?action=activate-plugin&plugin=' . 
                        $result, 'activate-plugin_' . $result) .'"></iframe>';
		}
		'''//ADD A LINK TO PLUGIN ADMIN PAGE HERE???'''
	}
	echo '</div>';

Attachments (1)

patch.diff (455 bytes) - added by mattyrob 6 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 mattyrob6 years ago

There is always the admin menu link across the top of the page but I tend to agree that it would be more user friendly if there was a return link at the end of the process (even if it has failed)

mattyrob6 years ago

comment:2 mattyrob6 years ago

  • Keywords has-patch tested 2nd-opinion added

comment:3 DD326 years ago

I just went to implement this, And theres a slight issue:

The Iframe in which the "Plugin reactivated successfully." is shown is 170px high, In order to allow for PHP Fatal error messages to come through (Max height is about 150px for those).

Adding links below this results in a fair bit of whitespace after the reactivation line before the action links.

Thoughts?

One option would be to have the links in the iframe itself (But that has other issues which i want to avoid), Another would be a floating div.. which is ugly and has its own issues.. Or we cab just live with the extra whitespace :)

comment:4 scohoust6 years ago

The whitespace doesn't look that bad. Can't really add it to the iframe because it wouldn't then show if the plugin wasn't already activated.

comment:5 santosj6 years ago

  • Milestone changed from 2.6.1 to 2.7

Should be part of trunk first before backporting to 2.6 branch.

comment:6 tabreziqbal6 years ago

  • Owner changed from anonymous to tabreziqbal
  • Status changed from new to assigned

comment:7 tabreziqbal6 years ago

  • Owner tabreziqbal deleted
  • Status changed from assigned to new

comment:8 caesarsgrunt6 years ago

Might be nice if it automatically returned upon success, only showing the log page on error.
A notice ('Updated Preferences' type) could be shown at the top of the plugin page after an upgrade. (Something like "Plugin Name successfully updated from version old to version new".)

comment:9 DD326 years ago

Some related actions went in with this commit, I'm not sure if its fully fixed this ticket or not though, If anyone can see elsewhere where the actions need adding, rewording, or extra actions added, speak up :)

(In [9141]) Plugin install from DD32. see #6015

comment:10 matt6 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Looks like this has been fixed already.

comment:11 thee175 years ago

  • Milestone 2.7 deleted
Note: See TracTickets for help on using tickets.