mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add sticky_class() template tag. see #7457
git-svn-id: https://develop.svn.wordpress.org/trunk@8637 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -160,6 +160,24 @@ function has_excerpt( $id = 0 ) {
|
||||
return ( !empty( $post->post_excerpt ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Echo "sticky" CSS class if a post is sticky
|
||||
*
|
||||
* {@internal Missing Long Description}}
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Post
|
||||
* @since 2.7
|
||||
*
|
||||
* @param int $post_id An optional post ID
|
||||
*/
|
||||
function sticky_class( $post_id = null ) {
|
||||
if ( !is_sticky($post_id) )
|
||||
return;
|
||||
|
||||
echo " sticky";
|
||||
}
|
||||
|
||||
function wp_link_pages($args = '') {
|
||||
$defaults = array(
|
||||
'before' => '<p>' . __('Pages:'), 'after' => '</p>',
|
||||
|
||||
Reference in New Issue
Block a user