Make WordPress Core


Ignore:
Timestamp:
10/18/2020 05:25:10 PM (3 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/plugin-editor.php

    r48111 r49193  
    196196    <?php
    197197    if ( is_plugin_active( $plugin ) ) {
    198         if ( is_writeable( $real_file ) ) {
     198        if ( is_writable( $real_file ) ) {
    199199            /* translators: %s: Plugin file name. */
    200200            printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
     
    204204        }
    205205    } else {
    206         if ( is_writeable( $real_file ) ) {
     206        if ( is_writable( $real_file ) ) {
    207207            /* translators: %s: Plugin file name. */
    208208            printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
     
    276276    <?php endif; ?>
    277277
    278     <?php if ( is_writeable( $real_file ) ) : ?>
     278    <?php if ( is_writable( $real_file ) ) : ?>
    279279        <div class="editor-notices">
    280280        <?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { ?>
Note: See TracChangeset for help on using the changeset viewer.