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:
Sergey Biryukov
2020-10-18 17:25:10 +00:00
parent f124a650ba
commit 97b2f07d2e
61 changed files with 115 additions and 115 deletions

View File

@@ -1010,11 +1010,11 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
* Note: this is redundant but doesn't harm.
*/
$return = "<ul class='wp-tag-cloud' role='list'>\n\t<li>";
$return .= join( "</li>\n\t<li>", $a );
$return .= implode( "</li>\n\t<li>", $a );
$return .= "</li>\n</ul>\n";
break;
default:
$return = join( $args['separator'], $a );
$return = implode( $args['separator'], $a );
break;
}
@@ -1349,7 +1349,7 @@ function get_the_term_list( $post_id, $taxonomy, $before = '', $sep = '', $after
*/
$term_links = apply_filters( "term_links-{$taxonomy}", $links ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
return $before . join( $sep, $term_links ) . $after;
return $before . implode( $sep, $term_links ) . $after;
}
/**