Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#45686 closed enhancement (fixed)

Refine Update PHP core notice

Reported by: flixos90's profile flixos90 Owned by: flixos90's profile flixos90
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Site Health Keywords: servehappy has-patch ui-feedback has-dev-note
Focuses: Cc:

Description

As clarified in recent weeks, the goal for the initial parts of the Servehappy core integrations is to be released as part of WordPress 5.1. For core, this encompasses both #44458 and refining the notice introduced via #41191 - the latter is covered by this ticket.

Tasks to take care of:

  • Version numbers need to be updated to 5.1.0.
  • The link URL to the Update PHP page needs to be updated to use the slug update-php, see https://wordpress.org/support/update-php/.
  • The link URL needs to be customizable via both an environment variable (preferably for hosting providers) and a filter (for runtime adjustment).
  • In case the link URL is changed from the default one via one of the two mentioned ways, there should be an annotation indicating that this link is not officially endorsed by WordPress.

Attachments (4)

45686.diff (3.0 KB) - added by flixos90 6 years ago.
Servehappy-Notice.png (96.6 KB) - added by flixos90 6 years ago.
Servehappy Notice without link annotation
45686.2.diff (4.5 KB) - added by flixos90 6 years ago.
Servehappy-Notice-with-custom-link.png (97.3 KB) - added by flixos90 6 years ago.

Download all attachments as: .zip

Change History (18)

@flixos90
6 years ago

#1 @flixos90
6 years ago

  • Keywords has-patch ui-feedback added; needs-patch removed

45686.diff introduces a function to retrieve the Update PHP URL, which includes support for a WP_UPDATE_PHP_URL environment variable and also runs the result through a wp_update_php_url filter. The patch furthermore adjusts version numbers and accounts for the slug change of the default URL.

@pento Could you clarify what the requirements are for an annotation as mentioned, which would clarify that the custom URL, if provided, is not endorsed by WordPress? We could use some help by someone with the legal background for this. Furthermore, we would need design guidance of how to incorporate this message in the UI.

For reference, I provided a current screenshot.

Last edited 6 years ago by flixos90 (previous) (diff)

@flixos90
6 years ago

Servehappy Notice without link annotation

This ticket was mentioned in Slack in #core-php by flixos90. View the logs.


6 years ago

This ticket was mentioned in Slack in #core-php by flixos90. View the logs.


6 years ago

#4 @afragen
6 years ago

@flixos90 should I be updating the other relevant Servehappy tickets with the proposed wp_get_update_php_url()?

#5 follow-up: @flixos90
6 years ago

@afragen I suggest to wait until this is committed. You don't wanna do double work in case it gets changed again. :)

#6 in reply to: ↑ 5 @afragen
6 years ago

Replying to flixos90:

@afragen I suggest to wait until this is committed. You don't wanna do double work in case it gets changed again. :)

True enough.

#7 @SergeyBiryukov
6 years ago

In 44420:

Plugins: Use newer "Updating PHP" page URL in the notice displayed when a plugin requires a higher PHP version.

Props afragen.
Fixes #43986. See #45686.

This ticket was mentioned in Slack in #core-php by flixos90. View the logs.


6 years ago

@flixos90
6 years ago

#9 @flixos90
6 years ago

45686.2.diff adds a note when the URL to the Update PHP has been adjusted (via environment variable or filter, as mentioned before). This note indicates that the URL is not provided by WordPress core itself. The original URL is also linked to as an additional resource.

A screenshot with that has been provided.

This ticket was mentioned in Slack in #core-php by flixos90. View the logs.


6 years ago

#11 @flixos90
6 years ago

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

In 44476:

General: Make Update PHP notice link customizable.

After [42832], [42891] and [43006], this changeset refines the core notice informing about an outdated PHP version:

  • The link to the Update PHP information page can now be adjusted using either a WP_UPDATE_PHP_URL environment variable, or a new wp_update_php_url filter.
  • If that URL is different from the default one that points to https://wordpress.org/support/update-php/ or its localized equivalent, a note indicates that the linked resource has not been provided by WordPress itself, and the default URL is still linked to as an additional resource.
  • The URL for the default information page has been updated to use the slug update-php instead of upgrade-php.
  • @since annotations have been updated.

Going forward, admin areas that display information related to the PHP version should use the new function wp_get_update_php_url().

Props afragen, fierevere, flixos90, markjaquith, miss_jwo, nerrad, pento, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #45686. See #41191.

#12 @flixos90
6 years ago

In 44627:

Plugins: Use centralized API to display information about updating PHP when a plugin requires a higher version.

This changeset uses the API functions introduced in [44476] to link to the resource about updating PHP when highlighting a plugin's required PHP version is not met. It furthermore expands them, introducing a new wp_update_php_annotation() function that prints the markup to indicate that the default URL has been altered by the web host, allowing it to be reused universally.

Furthermore, this changeset adds missing update_php capability checks before displaying the information about updating PHP.

Props afragen.
Fixes #45986. See #43986, #45686.

#13 @desrosj
6 years ago

  • Keywords has-dev-note added

#14 @spacedmonkey
5 years ago

  • Component changed from General to Site Health
Note: See TracTickets for help on using tickets.