sticky_class

The timeline below displays how wordpress function sticky_class has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Display "sticky" CSS class, if a post is sticky.
 *
 * @since 2.7.0
 * @deprecated 3.5.0 Use post_class()
 * @see post_class()
 *
 * @param int $post_id An optional post ID.
 */
function sticky_class($post_id = null)
{
    _deprecated_function(__FUNCTION__, '3.5.0', 'post_class()');
    if (is_sticky($post_id)) {
        echo ' sticky';
    }
}

WordPress Version: 4.4

/**
 * Display "sticky" CSS class, if a post is sticky.
 *
 * @since 2.7.0
 * @deprecated 3.5.0 Use post_class()
 * @see post_class()
 *
 * @param int $post_id An optional post ID.
 */
function sticky_class($post_id = null)
{
    _deprecated_function(__FUNCTION__, '3.5', 'post_class()');
    if (is_sticky($post_id)) {
        echo ' sticky';
    }
}

WordPress Version: 3.7

/**
 * Display "sticky" CSS class, if a post is sticky.
 *
 * @since 2.7.0
 * @deprecated 3.5.0
 * @deprecated Use post_class()
 * @see post_class()
 *
 * @param int $post_id An optional post ID.
 */
function sticky_class($post_id = null)
{
    _deprecated_function(__FUNCTION__, '3.5', 'post_class()');
    if (is_sticky($post_id)) {
        echo ' sticky';
    }
}