WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11542 closed enhancement (fixed)

Add "Upgrade" to bulk actions on plugins.php

Reported by: janeforshort Owned by: nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Plugins Keywords: has-patch
Focuses: Cc:

Description

Meant to have the action there as well as in GUU in 2.9 but it fell through the cracks. Since people will more naturally look here to upgrade plugins all at once if they are not upgrade WP at that moment, we should make the action available here.

Attachments (2)

11542.diff (2.9 KB) - added by dd32 4 years ago.
11542.2.diff (4.5 KB) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 caesarsgrunt4 years ago

"Upgrade All" button might be nice too, rather than having to tick ech box and then select upgrade from the bulk actions menu.

comment:2 dd324 years ago

  • Keywords needs-patch added

rather than having to tick ech box

Thats what the Check All checkbox in the header should be for. (Not sure if its there at present though?)

comment:3 caesarsgrunt4 years ago

Yes, but then you find you've ticked the box for every plugin, not just those in need of upgrading. And even then, it's three clicks instead of one.

I think that when there are plugin upgrades available, a notice should be shorn at the top of the plugin page saying "N plugins need updating. Update All""

dd324 years ago

comment:4 dd324 years ago

  • Keywords has-patch added; needs-patch removed

attachment 11542.diff added

  • Adds Bulk plugin upgrade to the plugins screen
  • Allows you to select multiple plugins (ie. Select All) and only upgrades those with available updates

Defects:

  • If you dont select anything, You get a screen with Enable, Disable maintaince mode. Nothing more.
    • This is due to the Bulk plugin upgrade being hacked into the Upgrader skin for single plugins, Needs to be prettied up, See #11232

comment:5 hakre4 years ago

  • Keywords developer-feedback added

Regarding your patch and the defects: Why don't you do a check if 0 < count($plugins) and only then instantiate the updater?

comment:6 dd324 years ago

  • Keywords developer-feedback removed

and only then instantiate the updater?

That would be the best way of achieving it, yes. Patch was designed as a first cut, not an end-all :) - I'll update the patch when i've got a chance to add that, If it gets commited before then, Then please leave this ticket open so i can submit some cleanups to it.

comment:7 ShaneF4 years ago

  • Cc ShaneF added

adding myself to cc

comment:8 nacin4 years ago

  • Owner changed from westi to nacin
  • Status changed from new to accepted

I can pick up where dd32 left off here.

nacin4 years ago

comment:9 nacin4 years ago

11542.2.diff has a few improvements.

If no out of date plugins are selected, then the plugins page is again shown and a message is displayed. It also doesn't include the wp-upgrader class before it needs to, does some cap checks, and moves over to site transients.

If you check two plugins, only one of which is out of date, and you attempt a bulk upgrade, it takes you to the upgrader and say it is upgrading 2 plugins. If as the original patch suggested we do not pass those plugins along, you don't get that proper feedback (and instead, you checked two, but only see "1 of 1" being upgraded).

My suggestion that is patched is that we check to make sure at least one of the checked plugins are out of date. (If none, we break and display the message.) Then we pass ALL (including up-to-date) plugins to the upgrader, and let the upgrader provide feedback.

There's a big thing outstanding here, and that is how this ties into #11232, which dd32 and I need to revisit. Pretty feedback in the upgrader is very important. That said, the patch here does not need to wait for us to finish our work there and is ready for testing and commit.

comment:10 dd324 years ago

(In [12832]) First scratch at Bulk plugin upgrade from Plugins page. Props nacin for cleanups. See #11542

comment:11 dd324 years ago

Strings need a cleanup, But i've throwns the core functionality in.

Will have to look closer at the skins shortly.

Example output currently:

Enabling Maintenance mode…

The plugin is at the latest version.

The plugin is at the latest version.

The plugin is at the latest version.
Updating plugin 4 of 4…

Downloading update from http://downloads.wordpress.org/plugin/post-navigation-widget.zip…

Unpacking the update…

comment:12 nacin4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Skins can be tackled in #11232.

Note: See TracTickets for help on using tickets.