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:
Ryan Boren
2008-08-13 18:21:52 +00:00
parent c53da5a523
commit 2b8caf9a1f
5 changed files with 40 additions and 12 deletions

View File

@@ -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>',