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:
scribu
2010-08-28 11:57:28 +00:00
parent fbdaa80fde
commit b3ef955990
5 changed files with 27 additions and 42 deletions
+3 -7
View File
@@ -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) )