WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/28/2010 11:57:28 AM (9 years ago)
Author:
scribu
Message:

Don't use the global anymore. Fixes #11624

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r15548 r15549  
    12691269 */
    12701270function get_post_custom($post_id = 0) {
    1271     global $id;
    1272 
    12731271    if ( !$post_id )
    1274         $post_id = (int) $id;
     1272        $post_id = get_the_ID();
    12751273
    12761274    $post_id = (int) $post_id;
     
    13371335 */
    13381336function is_sticky($post_id = null) {
    1339     global $id;
     1337    if ( !$post_id )
     1338        $post_id = get_the_ID();
    13401339
    13411340    $post_id = absint($post_id);
    1342 
    1343     if ( !$post_id )
    1344         $post_id = absint($id);
    13451341
    13461342    $stickies = get_option('sticky_posts');
Note: See TracChangeset for help on using the changeset viewer.