#46074 closed enhancement (fixed)
Provide way for hosts to create a correctly labeled button or link to directly upgrade PHP
Reported by: | kirasong | Owned by: | afragen |
---|---|---|---|
Milestone: | 5.1.1 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Site Health | Keywords: | dev-reviewed servehappy has-patch has-screenshots |
Focuses: | Cc: |
Description
At the moment, it's straightforward to change the link for more information for a user within the hosting upgrade metabox (see: make/core), but if hosts want to link users to immediately upgrade, the text "Learn more..." isn't appropriate for that action.
I think WordPress should either provide a way to do so, or a documented best practice to do so.
See this P2 comment and feedback in Slack for previous context.
Attachments (7)
Change History (41)
This ticket was mentioned in Slack in #hosting-community by mike. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-php by mike. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-php by aaroncampbell. View the logs.
6 years ago
This ticket was mentioned in Slack in #hosting-community by mike. View the logs.
6 years ago
#7
@
6 years ago
- Keywords has-patch dev-feedback has-screenshots added; needs-patch removed
At WordCamp Phoenix Contributor Day @aaroncampbell and I came up with this as a solution.
An environmental variable and/or a filter may be used to customize this button link, similarly to the customizable link for information on updating PHP in r44476
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by afragen. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by afragen. View the logs.
6 years ago
#13
@
6 years ago
46074.2.diff worked great!
In 46074.3.diff, I pulled the code that determines the URL into a separate function. This allows the URL to be retrieved and used in different contexts without the default button. The main use case I had in mind for this was a host filtering the information page URL to one within the WordPress admin with their own branding. They could then output the URL into a call to action on that page.
This ticket was mentioned in Slack in #core-php by desrosj. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by desrosj. View the logs.
6 years ago
#18
@
6 years ago
Two minor notes on 46074.3.diff:
- "Update your site PHP" label looks a bit strange to me, what about just "Update PHP"?
- Having two primary buttons next to each other also looks a bit weird. Maybe "Learn more" should not have the
button-primary
class if there's a direct PHP update URL available?
#19
@
6 years ago
@SergeyBiryukov also consider the situation where the host may have another link for Learn more. $46044
#20
@
6 years ago
This diff includes the suggested text change to "Update PHP". Other than that, it's identical to the previous one.
#23
@
6 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to backport.
#25
@
6 years ago
I noticed that @since 5.1.1
is missing from the doc block of the wp_get_direct_php_update_url()
function in changeset:44814 and changeset:44815.
#26
@
6 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks, @birgire! I will add that now.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
6 years ago
#30
@
6 years ago
- Keywords dev-reviewed added; needs-dev-review removed
46074.5.diff looks good to me for backporting.
Let's look at this for 5.1.1.