Initialize classes array. see #7457
git-svn-id: http://svn.automattic.com/wordpress/trunk@8642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9e05ca767a
commit
f592eb9e43
|
@ -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