Make WordPress Core

Changeset 56662


Ignore:
Timestamp:
09/22/2023 06:12:12 PM (15 months ago)
Author:
joedolson
Message:

Code Modernization: Rename reserved keyword used as variable.

Change the $echo parameter added to wp_update_php_annnotation() to $display to avoid using reserved PHP keywords as parameters. Follow up to [56570].

Props kebbet, mukesh27.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r56654 r56662  
    83198319 * @since 5.1.0
    83208320 * @since 5.2.0 Added the `$before` and `$after` parameters.
    8321  * @since 6.4.0 Added the `$echo` parameter.
    8322  *
    8323  * @param string $before Markup to output before the annotation. Default `<p class="description">`.
    8324  * @param string $after  Markup to output after the annotation. Default `</p>`.
    8325  * @param bool   $echo   Markup should echo if true. Default `true`.
     8321 * @since 6.4.0 Added the `$display` parameter.
     8322 *
     8323 * @param string $before  Markup to output before the annotation. Default `<p class="description">`.
     8324 * @param string $after   Markup to output after the annotation. Default `</p>`.
     8325 * @param bool   $display Whether to echo or return the markup. Default `true` for echo.
    83268326 *
    83278327 * @return string|void
    83288328 */
    8329 function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>', $echo = true ) {
     8329function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>', $display = true ) {
    83308330    $annotation = wp_get_update_php_annotation();
    83318331
    83328332    if ( $annotation ) {
    8333         if ( $echo ) {
     8333        if ( $display ) {
    83348334            echo $before . $annotation . $after;
    83358335        } else {
Note: See TracChangeset for help on using the changeset viewer.