Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14764 closed enhancement (fixed)

"Check for Updates" button

Reported by: jane's profile jane Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Upgrade/Install Keywords:
Focuses: Cc:


On the update screens, we should provide an overall status and action combination, not just the not-yet-acted-on actions (updates that have not been carried out). That is, something like "WordPress checked for new updates n hours ago. [Check Again]" This would touch update-core.php and plugins.php.

Attachments (5)

14764.patch (454 bytes) - added by simontaotw 14 years ago.
fix_update_available_latest.png (72.2 KB) - added by simontaotw 14 years ago.
fixed_no_update_available_301.png (64.7 KB) - added by simontaotw 14 years ago.
14764.1.patch (1.1 KB) - added by simontaotw 14 years ago.
timestamp.png (71.3 KB) - added by simontaotw 14 years ago.

Download all attachments as: .zip

Change History (18)

#1 @ericmann
14 years ago

  • Cc eric@… added

+1 For this.

Particularly because there are times you know an update is available according to the repository, but it doesn't show up in your "Update" section until a few hours later.

#2 @McGurk
14 years ago

  • Cc jonathan.wilsson@… added


#3 follow-up: @nacin
14 years ago

  • Keywords ux-feedback added

Only issue here is that we currently check core, plugins, and themes independently, and that the last_checked times might not all be the same. So I'm not sure which n should show on update-core.php. Otherwise this is trivial to implement.

One option would be to have Check Again buttons for each section on update-core.php, but it seems that it would be far more usable if it was one single button that called wp_version_check(), wp_update_plugins(), and wp_update_themes() all at once.

#4 in reply to: ↑ 3 @ericmann
14 years ago

Replying to nacin:

it seems that it would be far more usable if it was one single button ...

Absolutely! A single button leads to a simpler UI. If I'm polling the server for updates, I want it to be quick ... not three separate actions when one would suffice.

And as far as which n to display, I'd err on the side of the largest one. If you just checked for plug-in updates, but haven't checked for core or themes in 3 hours, there's no problem in saying "WordPress checked for updates 3 hours ago."

On the other hand, if you last checked core and themes 3 hours ago and plug-ins 1 hour ago, saying "WordPress checked for updates 1 hour ago" would be very misleading.

#5 @nacin
14 years ago

Looking at this further, we already fire all version checks when hitting update-core.php. We call wp_version_check(), and themes and plugins are both fired through hooks. We also fire the theme update checks when hitting themes.php and plugin update checks when hitting plugins.php.

So really, the most we need to add is a string that says "WordPress just checked for updates moments ago." If we were to add a button, all it needs to do is refresh the page.

14 years ago

#6 @simontaotw
14 years ago

  • Cc simontaotw added

I am new here so please excuse me if I make any mistake...

I tried adding both a string and a refresh button as Andrew suggested in the previous comment but felt that only adding a button makes the page look cleaner (see pngs). The intention of the button is fairly clear to me since it's preceded by an already informative string.

I added one line of code to the file update-core.php function core_upgrade_preamble

echo '<a href="' . esc_url('update-core.php') . '" class="button">' . __('Check Again') . '</a>&nbsp;';

Not sure if I am following the correct practice on esc_url and string 'Check Again'.

#7 @nacin
14 years ago

Hi simontaotw,

The patch itself looks fine, the translation is proper, and esc_url() is used properly. Only thing is, we'll also want to wrap the URL in admin_url(), so it would be esc_url( admin_url( 'update-core.php' ) ).

That said, I think we need feedback from Jane on this, on exactly what to add. I don't like the idea of a button, as it ultimately goads the user to click something they don't need to. Something like a simple string to provide feedback that updates were just checked...

14 years ago

14 years ago

#8 @simontaotw
14 years ago

Understandable, the button only does refresh afterall, we already have that on the browser itself... Perhaps something like timestamp.png is what we are looking for?

I recorded the time if wp_version_check() comes back 'successful', and also changed the core_upgrade_preamble signature to consume the recorded time. I grepped the core_upgrade_preamble function calls and I think update-core.php is the only place it's used.

#9 @jane
14 years ago

I think adding the timestamp is best. "Moments ago" is worthless in a world where browser tabs stay open for hours/days without being refreshed. Timestamp + a check again (refresh action) button would be ideal.

#10 @jane
14 years ago

  • Keywords ux-feedback removed

#11 @jane
14 years ago

However, the timestamp line/button should be first on the page after the h2, before the existing content.

#12 @nacin
14 years ago

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

(In [15996]) Add 'Check Again' button and timestamp to update-core. Also return the same error message for themes as we do for plugins when no checkboxes are checked. fixes #14764.

#13 @nacin
14 years ago

And [15997]. Oops. :-)

Note: See TracTickets for help on using tickets.