mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-23 04:34:41 +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:
@@ -13,7 +13,7 @@ class Tests_Post_PostClass extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
public function test_post_class() {
|
||||
$expected = 'class="' . join( ' ', get_post_class( '', $this->post_id ) ) . '"';
|
||||
$expected = 'class="' . implode( ' ', get_post_class( '', $this->post_id ) ) . '"';
|
||||
$this->expectOutputString( $expected );
|
||||
post_class( '', $this->post_id );
|
||||
}
|
||||
@@ -21,7 +21,7 @@ class Tests_Post_PostClass extends WP_UnitTestCase {
|
||||
public function test_post_class_extra_esc_attr() {
|
||||
$classes = get_post_class( '', $this->post_id );
|
||||
$escaped_again = array_map( 'esc_attr', $classes );
|
||||
$escaped_another_time = 'class="' . esc_attr( join( ' ', $escaped_again ) ) . '"';
|
||||
$escaped_another_time = 'class="' . esc_attr( implode( ' ', $escaped_again ) ) . '"';
|
||||
|
||||
$this->expectOutputString( $escaped_another_time );
|
||||
post_class( '', $this->post_id );
|
||||
|
||||
Reference in New Issue
Block a user