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

    r49108 r49193  
    43464346        case 'list':
    43474347            $r .= "<ul class='page-numbers'>\n\t<li>";
    4348             $r .= join( "</li>\n\t<li>", $page_links );
     4348            $r .= implode( "</li>\n\t<li>", $page_links );
    43494349            $r .= "</li>\n</ul>\n";
    43504350            break;
    43514351
    43524352        default:
    4353             $r = join( "\n", $page_links );
     4353            $r = implode( "\n", $page_links );
    43544354            break;
    43554355    }
Note: See TracChangeset for help on using the changeset viewer.