Uses
Uses | Description |
---|---|
wp-includes/functions.php: _deprecated_function() | Mark a function as deprecated and inform when it has been used. |
wp-includes/post.php: is_sticky() | Determines whether a post is sticky. |
This function has been deprecated. Use post_class() instead.
Display “sticky” CSS class, if a post is sticky.
(int) (Optional) An optional post ID.
Default value: null
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'; }
Version | Description |
---|---|
3.5.0 | Use post_class() |
2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/sticky_class