Opened 10 years ago
Closed 8 years ago
#31850 closed defect (bug) (fixed)
Customizer links should use canonical admin URL
Reported by: | helen | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.7.4 | Priority: | lowest |
Severity: | normal | Version: | 3.4 |
Component: | Customize | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
Now that we're removing some query args for notices (#23367), we need to ensure those aren't kept by the customizer return arg, lest users wonder why closing out of the customizer greets them with a message like "1 post moved to Trash".
Attachments (3)
Change History (17)
#4
@
10 years ago
Issue #32280 is regarding the behavior of clicking the Customize link just after having downloaded a plugin. Those query params need to be stripped as well from the return URL.
#5
@
8 years ago
- Keywords has-patch added; needs-patch removed
31850.2.diff would remove the wp_removable_query_args()
from the locations I could find where the Customize return
parameter was derived from $_SERVER['REQUEST_URI']
.
#6
@
8 years ago
- Priority changed from normal to lowest
@dlh to confirm, in practice a user will now never encounter the problem that this ticket originally describes because the WP_Customize_Manager::set_return_url()
method does remove_query_arg( wp_removable_query_args(), $return_url )
itself. So the only benefit of 31850.2.diff is that it removes the removable query params from the return
query param as it appears in the URL? As such, it would purely be a technical-cosmetic change?
This ticket was mentioned in Slack in #core-customize by melchoyce. View the logs.
8 years ago
#9
@
8 years ago
- Keywords commit added
- Milestone changed from Future Release to 4.7.4
- Owner set to westonruter
- Status changed from new to accepted
- Version set to 3.4
#10
@
8 years ago
remove_query_arg( wp_removable_query_args(), $url )
is also used by WP_Customize_Manager::set_return_url()
and two other places in core. Would a new remove_removable_query_args()
function make sense to make this more DRY?
#11
@
8 years ago
@swissspidy I think the cost of adding yet another global function outweighs the benefits of DRY in this case, since the duplicated code is almost inconsequential.
Maybe the list of removable query args in
wp_admin_canonical_url()
does need to be in its own function.