mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Code Modernization: Remove obsolete comments about older PHP versions.
This commit: * Removes various comments referencing PHP versions which are no longer supported. * Removes various comments containing “hints” of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons, so have no value: * Even though a function could be turned into a closure, removing the function would be a backward compatibility break which is not acceptable, so this suggestion is not actionable. * Short ternaries are forbidden by the coding standard exactly to prevent the faulty code suggested in the comment from getting into the codebase. Follow-up to [1243/tests], [6543], [11816], [29861], [29864], [34928], [35369], [36698], [38694], [50786], [58678]. Props jrf, ayeshrajans. See #61574. Built from https://develop.svn.wordpress.org/trunk@58682 git-svn-id: http://core.svn.wordpress.org/trunk@58084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bccb3e46e1
commit
11fb201256
@ -1270,7 +1270,7 @@ function xfn_check( $xfn_relationship, $xfn_value = '', $deprecated = '' ) {
|
||||
_deprecated_argument( __FUNCTION__, '2.5.0' ); // Never implemented.
|
||||
}
|
||||
|
||||
$link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
|
||||
$link_rel = isset( $link->link_rel ) ? $link->link_rel : '';
|
||||
$link_rels = preg_split( '/\s+/', $link_rel );
|
||||
|
||||
// Mark the specified value as checked if it matches the current link's relationship.
|
||||
|
@ -6141,8 +6141,7 @@ final class WP_Customize_Manager {
|
||||
* This method exists because the partial object and context data are passed
|
||||
* into a partial's render_callback so we cannot use get_custom_logo() as
|
||||
* the render_callback directly since it expects a blog ID as the first
|
||||
* argument. When WP no longer supports PHP 5.3, this method can be removed
|
||||
* in favor of an anonymous function.
|
||||
* argument.
|
||||
*
|
||||
* @see WP_Customize_Manager::register_controls()
|
||||
*
|
||||
|
@ -73,7 +73,7 @@ class WP_Object_Cache {
|
||||
private $multisite;
|
||||
|
||||
/**
|
||||
* Sets up object properties; PHP 5 style constructor.
|
||||
* Sets up object properties.
|
||||
*
|
||||
* @since 2.0.8
|
||||
*/
|
||||
|
@ -699,12 +699,8 @@ function ms_allowed_http_request_hosts( $is_external, $host ) {
|
||||
* A wrapper for PHP's parse_url() function that handles consistency in the return values
|
||||
* across PHP versions.
|
||||
*
|
||||
* PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute URLs, including
|
||||
* schemeless and relative URLs with "://" in the path. This function works around
|
||||
* those limitations providing a standard output on PHP 5.2~5.4+.
|
||||
*
|
||||
* Secondly, across various PHP versions, schemeless URLs containing a ":" in the query
|
||||
* are being handled inconsistently. This function works around those differences as well.
|
||||
* Across various PHP versions, schemeless URLs containing a ":" in the query
|
||||
* are being handled inconsistently. This function works around those differences.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @since 4.7.0 The `$component` parameter was added for parity with PHP's `parse_url()`.
|
||||
|
@ -453,8 +453,6 @@ function wp_is_maintenance_mode() {
|
||||
/**
|
||||
* Gets the time elapsed so far during this PHP script.
|
||||
*
|
||||
* Uses REQUEST_TIME_FLOAT that appeared in PHP 5.4.0.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @return float Seconds since the PHP script started.
|
||||
|
@ -709,7 +709,7 @@ class WP_REST_Request implements ArrayAccess {
|
||||
* Parses the request body parameters.
|
||||
*
|
||||
* Parses out URL-encoded bodies for request methods that aren't supported
|
||||
* natively by PHP. In PHP 5.x, only POST has these parsed automatically.
|
||||
* natively by PHP.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58681';
|
||||
$wp_version = '6.7-alpha-58682';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user