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
+9 -1
View File
@@ -763,7 +763,14 @@ function get_post_custom_values( $key = '', $post_id = 0 ) {
* @param int $post_id A post ID
* @return bool
*/
function is_sticky($post_id) {
function is_sticky($post_id = null) {
global $id;
$post_id = absint($post_id);
if ( !$post_id )
$post_id = absint($id);
$stickies = get_option('sticky_posts');
if ( !is_array($stickies) )
@@ -775,6 +782,7 @@ function is_sticky($post_id) {
return false;
}
/**
* sanitize_post() - Sanitize every post field
*