mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +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:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user