Make WordPress Core


Ignore:
Timestamp:
10/18/2020 05:25:10 PM (5 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/menu-header.php

    r48963 r49193  
    107107        }
    108108
    109         $class     = $class ? ' class="' . join( ' ', $class ) . '"' : '';
     109        $class     = $class ? ' class="' . implode( ' ', $class ) . '"' : '';
    110110        $id        = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
    111111        $img       = '';
     
    241241                }
    242242
    243                 $class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
     243                $class = $class ? ' class="' . implode( ' ', $class ) . '"' : '';
    244244
    245245                $menu_hook = get_plugin_page_hook( $sub_item[2], $item[2] );
Note: See TracChangeset for help on using the changeset viewer.