Changeset 11777 for trunk/wp-includes/link-template.php
- Timestamp:
- 08/05/2009 04:43:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r11752 r11777 1807 1807 } 1808 1808 1809 /** 1810 * Output rel=canonical for singular queries 1811 * 1812 * @package WordPress 1813 * @since 2.9.0 1814 */ 1815 function rel_canonical() { 1816 if ( !is_singular() ) 1817 return; 1818 1819 global $wp_the_query; 1820 if ( !$id = $wp_the_query->get_queried_object_id() ) 1821 return; 1822 1823 $link = get_permalink( $id ); 1824 echo "<link rel='canonical' href='$link' />\n"; 1825 } 1826 1809 1827 ?>
Note: See TracChangeset
for help on using the changeset viewer.