mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Don't use the global anymore. Fixes #11624
git-svn-id: https://develop.svn.wordpress.org/trunk@15549 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1268,10 +1268,8 @@ function delete_post_meta_by_key($post_meta_key) {
|
||||
* @return array
|
||||
*/
|
||||
function get_post_custom($post_id = 0) {
|
||||
global $id;
|
||||
|
||||
if ( !$post_id )
|
||||
$post_id = (int) $id;
|
||||
$post_id = get_the_ID();
|
||||
|
||||
$post_id = (int) $post_id;
|
||||
|
||||
@@ -1336,13 +1334,11 @@ function get_post_custom_values( $key = '', $post_id = 0 ) {
|
||||
* @return bool Whether post is sticky.
|
||||
*/
|
||||
function is_sticky($post_id = null) {
|
||||
global $id;
|
||||
if ( !$post_id )
|
||||
$post_id = get_the_ID();
|
||||
|
||||
$post_id = absint($post_id);
|
||||
|
||||
if ( !$post_id )
|
||||
$post_id = absint($id);
|
||||
|
||||
$stickies = get_option('sticky_posts');
|
||||
|
||||
if ( !is_array($stickies) )
|
||||
|
||||
Reference in New Issue
Block a user