WordPress开发者和主题制作者的搜索引擎



sticky_class ›

Since2.7.0
已弃用3.5.0
sticky_class ( $post_id = null )
参数:
  • (int) $post_id An optional post ID.
    Required: No
    默认: null
查看:
定义在:
文档:

Display "sticky" CSS class, if a post is sticky.



源码

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