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-includes/category-template.php

    r49108 r49193  
    10111011             */
    10121012            $return  = "<ul class='wp-tag-cloud' role='list'>\n\t<li>";
    1013             $return .= join( "</li>\n\t<li>", $a );
     1013            $return .= implode( "</li>\n\t<li>", $a );
    10141014            $return .= "</li>\n</ul>\n";
    10151015            break;
    10161016        default:
    1017             $return = join( $args['separator'], $a );
     1017            $return = implode( $args['separator'], $a );
    10181018            break;
    10191019    }
     
    13501350    $term_links = apply_filters( "term_links-{$taxonomy}", $links );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    13511351
    1352     return $before . join( $sep, $term_links ) . $after;
     1352    return $before . implode( $sep, $term_links ) . $after;
    13531353}
    13541354
Note: See TracChangeset for help on using the changeset viewer.