Make WordPress Core


Ignore:
Timestamp:
10/18/2020 05:25:10 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Replace alias PHP functions with the canonical names.

Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

This replaces all uses of the following:

  • join() with implode()
  • sizeof() with count()
  • is_writeable() with is_writable()
  • doubleval() with a (float) cast

In part, this is a follow-up to #47746.

Props jrf.
See #50767.

File:
1 edited

Legend:

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

    r49183 r49193  
    11191119    }
    11201120
    1121     return join( "\n", $out );
     1121    return implode( "\n", $out );
    11221122}
    11231123
     
    11961196        'label' => __( 'Size' ),
    11971197        'input' => 'html',
    1198         'html'  => join( "\n", $out ),
     1198        'html'  => implode( "\n", $out ),
    11991199    );
    12001200}
     
    14251425        }
    14261426
    1427         $t['value'] = join( ', ', $values );
     1427        $t['value'] = implode( ', ', $values );
    14281428
    14291429        $form_fields[ $taxonomy ] = $t;
     
    17851785
    17861786        if ( ! empty( $field['helps'] ) ) {
    1787             $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
     1787            $item .= "<p class='help'>" . implode( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
    17881788        }
    17891789        $item .= "</td>\n\t\t</tr>\n";
     
    18841884            }
    18851885
    1886             $t['value']    = join( ', ', $values );
     1886            $t['value']    = implode( ', ', $values );
    18871887            $t['taxonomy'] = true;
    18881888
     
    19771977
    19781978        if ( ! empty( $field['helps'] ) ) {
    1979             $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
     1979            $item .= "<p class='help'>" . implode( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
    19801980        }
    19811981
Note: See TracChangeset for help on using the changeset viewer.