Changeset 15549 for trunk/wp-includes/post-template.php
- Timestamp:
- 08/28/2010 11:57:28 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-template.php
r15264 r15549 13 13 * 14 14 * @since 0.71 15 * @uses $id16 15 */ 17 16 function the_ID() { 18 global $id; 19 echo $id; 17 echo get_the_ID(); 20 18 } 21 19 … … 24 22 * 25 23 * @since 2.1.0 26 * @uses $ id27 * 28 * @return unknown24 * @uses $post 25 * 26 * @return int 29 27 */ 30 28 function get_the_ID() { 31 global $ id;32 return $ id;29 global $post; 30 return $post->ID; 33 31 } 34 32 … … 182 180 */ 183 181 function get_the_content($more_link_text = null, $stripteaser = 0) { 184 global $ id, $post, $more, $page, $pages, $multipage, $preview;182 global $post, $more, $page, $pages, $multipage, $preview; 185 183 186 184 if ( null === $more_link_text ) … … 217 215 if ( count($content) > 1 ) { 218 216 if ( $more ) { 219 $output .= '<span id="more-' . $ id. '"></span>' . $content[1];217 $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1]; 220 218 } else { 221 219 if ( ! empty($more_link_text) ) 222 $output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more- $id\" class=\"more-link\">$more_link_text</a>", $more_link_text );220 $output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">$more_link_text</a>", $more_link_text ); 223 221 $output = force_balance_tags($output); 224 222 }
Note: See TracChangeset
for help on using the changeset viewer.