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/includes/class-wp-list-table.php

    r49192 r49193  
    977977            $pagination_links_class .= ' hide-if-js';
    978978        }
    979         $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
     979        $output .= "\n<span class='$pagination_links_class'>" . implode( "\n", $page_links ) . '</span>';
    980980
    981981        if ( $total_pages ) {
     
    12431243
    12441244            if ( ! empty( $class ) ) {
    1245                 $class = "class='" . join( ' ', $class ) . "'";
     1245                $class = "class='" . implode( ' ', $class ) . "'";
    12461246            }
    12471247
Note: See TracChangeset for help on using the changeset viewer.