In `get_post_class()`, ensure that we always coerce the class list passed to the function to an array, even when it's empty.
This is consistent with `get_body_class()`, see [18176]. See #34452. Built from https://develop.svn.wordpress.org/trunk@35399 git-svn-id: http://core.svn.wordpress.org/trunk@35363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
03a03f7dc6
commit
16441a7766
|
@ -429,6 +429,9 @@ function get_post_class( $class = '', $post_id = null ) {
|
||||||
$class = preg_split( '#\s+#', $class );
|
$class = preg_split( '#\s+#', $class );
|
||||||
}
|
}
|
||||||
$classes = array_map( 'esc_attr', $class );
|
$classes = array_map( 'esc_attr', $class );
|
||||||
|
} else {
|
||||||
|
// Ensure that we always coerce class to being an array.
|
||||||
|
$class = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $post ) {
|
if ( ! $post ) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-beta1-35398';
|
$wp_version = '4.4-beta1-35399';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue