Opened 12 years ago
Closed 12 years ago
#18467 closed task (blessed) (fixed)
Redirect to About WordPress page after upgrade
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
When the plugins and themes are upgraded, there's a helpful menu option to "Go To WordPress Updates Page". This is a very useful link as it allows me to get back to the updates page easily. The core upgrade, though, doesn't have such a link (only Go To Dashboard). I often update a site and it's a two (or three) step process, updating core, plugins, and themes. It would be helpful if the updates link appeared on core updates as well.
Proposed Code Change, wp-admin/update-core.php, line 65.
Old Code
show_message( '<a href="' . esc_url( self_admin_url() ) . '">' . __('Go to Dashboard') . '</a> ' );
New Code:
show_message( '<a href="' . esc_url( self_admin_url() ) . '">' . __('Go to Dashboard') . '</a> | <a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' );
Link copied from wp-admin/includes/class-wp-upgrader.php line 1202
Attachments (9)
Change History (52)
#2
@
12 years ago
- Milestone changed from Awaiting Review to 3.3
- Type changed from enhancement to task (blessed)
#4
@
12 years ago
@nacin: Do you actually mean "linking from the new about.php screen"? I'll have @chexee add a back-to-updates link from about.php next to the Dashboard link. She's patching it right now and will post to #18742. One thing though -- prob need a snippet to check for permissions since we're showing about.php to everyone, not just people with update caps, yeah?
#5
@
12 years ago
- Owner set to ocean90
- Status changed from new to assigned
No, I mean linking and/or redirecting from the core update to about.php.
#7
@
12 years ago
18467.2.patch
Because a PHP redirect isn't possible (header already sent output) we need some Javascript magic here. Jane and rboren are fine with this.
- I added a simple function which hooks into
admin_footer-update-core.php
- On success WP returns a link to dashboard, which can be checked via Javascript
- If link is there redirect too
admin_url( 'about.php?afterupgrade=1' )
#9
@
12 years ago
- Summary changed from Standardize Language on Core Update to Redirect to About WordPress page after upgrade
#12
@
12 years ago
Leaving open to see if there is a hook we can abuse for a link that can work without JS, and other minor tweaks (discussed in IRC).
Cleared for beta 4.
#13
@
12 years ago
Had a discussion with a tester on IRC that was confused by the behavior, because during a browser lag, they attempted to click the "Go to Dashboard" link after upgrade, and the browser then redirected to about.php (making it look like the link pointed to about.php).
In this case, at least, the PHP redirect would have been helpful.
If we only want users to continue to the Welcome/about page in this case, the link could also potentially be changed to match the behavior that would otherwise happen with the redirect.
#15
@
12 years ago
- Cc allstruck added
@nacin:
How about leaving the auto-redirect with JS, and rewriting that link to the dashboard in a more explanatory way.
e.g.:
You should be redirect to LINK automatically.
Agreeing with DH-Shredder, the link should match the redirect. And unless there's going to be a lag between the redirect no other links seem necessary.
Agreeing with OP (sparkweb) as well, it would be nice to have the ability to link elsewhere. I would propose rather than adding links that an option be created to override the location (for both the link and redirect.)
#16
@
12 years ago
My two cents is that power users will be annoyed at always being redirected away to an informational screen. I think it would be better to have the list of links - maybe a button inviting new users to find out what's new in 3.3.
#17
@
12 years ago
I would rather the redirect. It's pretty common in open source software to get that kind of screen after an update. See Thunderbird, Mozilla, etc. Power user or not, an orientation to what's about to be different is useful.
#18
@
12 years ago
I have to agree with jane... might there be room for links to "what you might want to do now" on the about page?
What would you think of that sparkweb?
#19
@
12 years ago
@allstruck: I'd be okay with that. I just want an easy way to continue with my updates if that's the path I want to take.
#20
@
12 years ago
Just installed 3.3 beta 4 and I like the new welcome screen a lot. I think my only request would be to have the "Return to Dashboard" links on the bottom be available at the top of the page as well so scrolling to the bottom wouldn't be required.
#21
@
12 years ago
- Owner changed from ocean90 to nacin
- Status changed from assigned to accepted
I've got further tweaks planned for this prior to RC1. The links and redirect will be polished a bit.
#22
@
12 years ago
allstruck: Please have in mind, that new strings can't be translated by WordPress < 3.3, without reloading the language files.
wp-admin/includes/update-core.php
is the only file, which will be replaced during the upgrade and included again.
#23
follow-up:
↓ 26
@
12 years ago
@nacin: What tweaks were you thinking of doing?
I don't want to mar the page with links at the top. The regular navigation already provides access to the main Dashboard by way of the ever-present admin menu. Adding another link to Dashboard at top of screen would be repetitive and cluttering. That point also addresses @allweb's suggestion. We don't need a bunch of 'what do you want to do now' links -- they can get anywhere with a single click already using the left nav.
#24
@
12 years ago
I think reloading the textdomain could bring us some nice improvments. We can add a info what is happing and maybe show a link for no-js.
// Load the default text localization domain. unload_textdomain( 'default' ) ; $locale = get_locale(); load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );
#25
@
12 years ago
18467.3.patch is another approach.
- We can add an action in
update_core
named_core_updated_successfully
- Now we can hook into it and do some magic.
#26
in reply to:
↑ 23
@
12 years ago
Replying to jane:
@nacin: What tweaks were you thinking of doing?
I don't want to mar the page with links at the top. The regular navigation already provides access to the main Dashboard by way of the ever-present admin menu. Adding another link to Dashboard at top of screen would be repetitive and cluttering. That point also addresses @allweb's suggestion. We don't need a bunch of 'what do you want to do now' links -- they can get anywhere with a single click already using the left nav.
@Jane, only referring to links like 'Go to Dashboard' on the core update itself. Nothing more on the About page.
#27
@
12 years ago
- Keywords has-patch added; needs-patch removed
I didn't see ocean90's comments or patches until now. Nice work. :)
I will test this out, but it's very close to what I was going to try to do. Probably better.
#28
follow-up:
↓ 29
@
12 years ago
If we hook into update_core() we could remove the version_compare() on $GLOBALS['wp_version']
. Currently we will have to update the comparison number every version.
#29
in reply to:
↑ 28
@
12 years ago
Replying to duck_:
If we hook into update_core() we could remove the version_compare() on
$GLOBALS['wp_version']
. Currently we will have to update the comparison number every version.
I think ocean90's idea was that this would be for 3.3 only and we would make it less hacky now, to apply for 3.3+.
#31
@
12 years ago
One point for about.php "Return to Dashboard → Updates" isn't the right string for multisite, IMO.
#32
@
12 years ago
- Debug Code — Includes debugging code. Specifically, the window.location bits are commented out and files are not copied. This means your install will not be overridden with the nightly, and your in situ wp-admin/includes/update-core.php will be used.
- Includes no-JS support – namely, a separate string. The no-JS string looks like this:
Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.
- The with-JS string looks like this:
Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.
- As discussed with ocean90 and duck_, I made it so _redirect_to_about_wordpress() only fires when the current install is < 3.3. Once the install is 3.3, the new strings will be in the POT file, and the new code will be in place in wp-admin/update-core.php.
- I needed to alter the return of wp_update_core() to include the *new* version number, otherwise I couldn't do the previous bullet point. This makes me second-guess the previous bullet point as unnecessary.
- In multisite, about.php?updated now links back to the network/update-core.php file.
Thoughts?
#36
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Variable collision and leftover debug.
#42
@
12 years ago
- Cc info@… added
- Resolution fixed deleted
- Status changed from closed to reopened
After some tests I strongly suggest not to redirect if there are still plugins waiting for an update. In this case there is no time to read the about page anyway, and the extra click back to the update page is just wasting time.
I'm hijacking this ticket so we can implement redirection/linking to the new about.php screen.