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/media.php

    r49128 r49193  
    10361036
    10371037        if ( is_array( $size_class ) ) {
    1038             $size_class = join( 'x', $size_class );
     1038            $size_class = implode( 'x', $size_class );
    10391039        }
    10401040
     
    29512951    }
    29522952
    2953     $html .= sprintf( '<audio %s controls="controls">', join( ' ', $attr_strings ) );
     2953    $html .= sprintf( '<audio %s controls="controls">', implode( ' ', $attr_strings ) );
    29542954
    29552955    $fileurl = '';
     
    32193219    }
    32203220
    3221     $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
     3221    $html .= sprintf( '<video %s controls="controls">', implode( ' ', $attr_strings ) );
    32223222
    32233223    $fileurl = '';
Note: See TracChangeset for help on using the changeset viewer.