Initialize classes array. see #7457
git-svn-id: https://develop.svn.wordpress.org/trunk@8642 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
812ff9b44f
commit
6992ce6781
@ -175,8 +175,11 @@ function has_excerpt( $id = 0 ) {
|
||||
function post_class( $class = '', $post_id = null ) {
|
||||
$post = get_post($post_id);
|
||||
|
||||
$classes = array();
|
||||
|
||||
$classes[] = $post->post_type;
|
||||
|
||||
// sticky for Sticky Posts
|
||||
if ( is_sticky($post->ID) )
|
||||
$classes[] = 'sticky';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user