sticky_class

函数


sticky_class ( $post_id = null )
参数
  • (int)
    $post_id
    An optional post ID.
    Required:
    Default: null
相关
  • post_class()
定义位置
  • wp-includes/deprecated.php
    , line 3154
引入
2.7.0
弃用
3.5.0

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';
}