Changeset 16114 for trunk/wp-includes/theme.php
- Timestamp:
- 10/31/2010 11:02:17 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r16029 r16114 856 856 */ 857 857 function get_tag_template() { 858 global $wp_query; 859 860 $tag = $wp_query->get_queried_object(); 858 $tag = get_queried_object(); 861 859 $tag_name = $tag->slug; 862 860 $tag_id = $tag->term_id; … … 962 960 */ 963 961 function get_page_template() { 964 global $wp_query; 965 966 $id = (int) $wp_query->get_queried_object_id(); 962 $id = get_queried_object_id(); 967 963 $template = get_post_meta($id, '_wp_page_template', true); 968 964 $pagename = get_query_var('pagename'); … … 970 966 if ( !$pagename && $id > 0 ) { 971 967 // If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object 972 $post = $wp_query->get_queried_object();968 $post = get_queried_object(); 973 969 $pagename = $post->post_name; 974 970 } … … 1019 1015 */ 1020 1016 function get_single_template() { 1021 global $wp_query; 1022 1023 $object = $wp_query->get_queried_object(); 1017 $object = get_queried_object(); 1024 1018 $templates = array('single-' . $object->post_type . '.php', 'single.php'); 1025 1019
Note: See TracChangeset
for help on using the changeset viewer.