mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49193 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -456,7 +456,7 @@ function has_excerpt( $post = 0 ) {
|
||||
*/
|
||||
function post_class( $class = '', $post_id = null ) {
|
||||
// Separates classes with a single space, collates classes for post DIV.
|
||||
echo 'class="' . esc_attr( join( ' ', get_post_class( $class, $post_id ) ) ) . '"';
|
||||
echo 'class="' . esc_attr( implode( ' ', get_post_class( $class, $post_id ) ) ) . '"';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -592,7 +592,7 @@ function get_post_class( $class = '', $post_id = null ) {
|
||||
*/
|
||||
function body_class( $class = '' ) {
|
||||
// Separates class names with a single space, collates class names for body element.
|
||||
echo 'class="' . esc_attr( join( ' ', get_body_class( $class ) ) ) . '"';
|
||||
echo 'class="' . esc_attr( implode( ' ', get_body_class( $class ) ) ) . '"';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user