Changeset 13978
- Timestamp:
- 04/03/2010 11:38:38 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r13957 r13978 168 168 <h2><?php echo esc_html( $title ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html_x('Add New', 'post'); ?></a> <?php 169 169 if ( isset($_GET['s']) && $_GET['s'] ) 170 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( get_search_query()) ); ?>170 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?> 171 171 </h2> 172 172 -
trunk/wp-admin/upload.php
r13770 r13978 169 169 <h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a> <?php 170 170 if ( isset($_GET['s']) && $_GET['s'] ) 171 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( get_search_query()) ); ?>171 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?> 172 172 </h2> 173 173 -
trunk/wp-includes/feed-atom-comments.php
r13113 r13978 19 19 printf(ent2ncr(__('Comments on %s')), get_the_title_rss()); 20 20 elseif ( is_search() ) 21 printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), esc_attr(get_search_query()));21 printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), get_search_query() ); 22 22 else 23 23 printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); … … 32 32 <id><?php echo get_post_comments_feed_link('', 'atom'); ?></id> 33 33 <?php } elseif(is_search()) { ?> 34 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo home_url() . '?s=' . esc_attr(get_search_query()); ?>" />34 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo home_url() . '?s=' . get_search_query(); ?>" /> 35 35 <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" /> 36 36 <id><?php echo get_search_comments_feed_link('', 'atom'); ?></id> -
trunk/wp-includes/general-template.php
r13831 r13978 157 157 $form = '<form role="search" method="get" id="searchform" action="' . home_url() . '/" > 158 158 <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label> 159 <input type="text" value="' . esc_attr(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />159 <input type="text" value="' . get_search_query() . '" name="s" id="s" /> 160 160 <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" /> 161 161 </div> … … 1643 1643 $href = get_author_feed_link( $author_id ); 1644 1644 } elseif ( is_search() ) { 1645 $title = esc_attr(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( ) ));1645 $title = esc_attr(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) )); 1646 1646 $href = get_search_feed_link(); 1647 1647 } … … 1826 1826 * Retrieve the contents of the search WordPress query variable. 1827 1827 * 1828 * @since 2.3.01829 *1830 * @return string1831 */1832 function get_search_query() {1833 return apply_filters( 'get_search_query', get_query_var( 's' ) );1834 }1835 1836 /**1837 * Display the contents of the search query variable.1838 *1839 1828 * The search query string is passed through {@link esc_attr()} 1840 1829 * to ensure that it is safe for placing in an html attribute. 1841 1830 * 1842 * @uses attr 1831 * @since 2.3.0 1832 * @uses esc_attr() 1833 * 1834 * @param bool $escaped Whether the result is escaped. Default true. 1835 * Only use when you are later escaping it. Do not use unescaped. 1836 * @return string 1837 */ 1838 function get_search_query( $escaped = true ) { 1839 $query = apply_filters( 'get_search_query', get_query_var( 's' ) ); 1840 if ( $escaped ) 1841 $query = esc_attr( $query ); 1842 return $query; 1843 } 1844 1845 /** 1846 * Display the contents of the search query variable. 1847 * 1848 * The search query string is passed through {@link esc_attr()} 1849 * to ensure that it is safe for placing in an html attribute. 1850 * 1851 * @uses esc_attr() 1843 1852 * @since 2.1.0 1844 1853 */ 1845 1854 function the_search_query() { 1846 echo esc_attr( apply_filters( 'the_search_query', get_search_query( ) ) );1855 echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) ); 1847 1856 } 1848 1857 -
trunk/wp-includes/link-template.php
r13922 r13978 687 687 688 688 if ( empty($query) ) 689 $search = get_search_query( );689 $search = get_search_query( false ); 690 690 else 691 691 $search = stripslashes($query);
Note: See TracChangeset
for help on using the changeset viewer.