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

sticky_class( int $post_id = null )

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


Description Description

See also See also


Top ↑

Parameters Parameters

$post_id

(int) (Optional) An optional post ID.

Default value: null


Top ↑

Source Source

File: wp-includes/deprecated.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.5.0 Use post_class()
2.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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