sticky_class( int $post_id = null )

This function has been deprecated. Use post_class() instead.

Display “sticky” CSS class, if a post is sticky.

Description

See also

Parameters

$post_idintoptional
An optional post ID.

Default:null

Source

function sticky_class( $post_id = null ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'post_class()' );
	if ( is_sticky( $post_id ) )
		echo ' sticky';
}

Changelog

VersionDescription
3.5.0Use post_class()
2.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.