Ticket #23701: 23701.diff
File 23701.diff, 8.5 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentythirteen/searchform.php
1 <?php2 /**3 * The template for displaying search forms in Twenty Thirteen.4 *5 * @package WordPress6 * @subpackage Twenty_Thirteen7 * @since Twenty Thirteen 1.08 */9 ?>10 <form method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">11 <label for="s" class="assistive-text"><?php _ex( 'Search', 'assistive text', 'twentythirteen' ); ?></label>12 <input type="search" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'twentythirteen' ); ?>" />13 <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentythirteen' ); ?>" />14 </form> -
wp-content/themes/twentythirteen/comments.php
38 38 if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : 39 39 ?> 40 40 <nav class="navigation comment-navigation" role="navigation"> 41 <h1 class=" assistive-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>41 <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1> 42 42 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentythirteen' ) ); ?></div> 43 43 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentythirteen' ) ); ?></div> 44 44 </nav> -
wp-content/themes/twentythirteen/content-none.php
20 20 <?php elseif ( is_search() ) : ?> 21 21 22 22 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with different keywords.', 'twentythirteen' ); ?></p> 23 <?php get_search_form( ); ?>23 <?php get_search_form( true, 'html5' ); ?> 24 24 25 25 <?php else : ?> 26 26 27 27 <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentythirteen' ); ?></p> 28 <?php get_search_form( ); ?>28 <?php get_search_form( true, 'html5' ); ?> 29 29 30 30 <?php endif; ?> 31 31 </div><!-- .page-content --> -
wp-content/themes/twentythirteen/header.php
49 49 <div id="navbar" class="navbar"> 50 50 <nav id="site-navigation" class="navigation main-navigation" role="navigation"> 51 51 <h3 class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></h3> 52 <a class=" assistive-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a>52 <a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a> 53 53 <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?> 54 <?php get_search_form(); ?>55 54 </nav><!-- #site-navigation --> 56 55 </div><!-- #navbar --> 57 56 </header><!-- #masthead --> -
wp-content/themes/twentythirteen/404.php
21 21 <h2><?php _e( 'This is somewhat embarrassing, isn’t it?', 'twentythirteen' ); ?></h2> 22 22 <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentythirteen' ); ?></p> 23 23 24 <?php get_search_form( ); ?>24 <?php get_search_form( true, 'html5' ); ?> 25 25 </div><!-- .page-content --> 26 26 </div><!-- .page-wrapper --> 27 27 -
wp-content/themes/twentythirteen/css/ie.css
32 32 left: 100%; 33 33 } 34 34 35 .site-header .searchform .field{35 .site-header .searchform [type="search"] { 36 36 padding-top: 6px; 37 37 } 38 38 … … 174 174 width: 13px; 175 175 } 176 176 177 .ie7 .assistive-text, 178 .ie7 .site .screen-reader-text { 177 .ie7 .screen-reader-text { 179 178 clip: rect(1px 1px 1px 1px); /* IE7 */ 180 179 } 181 180 … … 204 203 left: 100%; 205 204 } 206 205 207 .ie7 .site-header .searchform .field{206 .ie7 .site-header .searchform [type="search"] { 208 207 background-color: #fff; 209 208 border: 2px solid #c3c0ab; 210 209 cursor: text; -
wp-content/themes/twentythirteen/style.css
537 537 } 538 538 539 539 /* Assistive text */ 540 . assistive-text {540 .screen-reader-text { 541 541 position: absolute !important; 542 542 clip: rect(1px, 1px, 1px, 1px); 543 543 } 544 544 545 . assistive-text:hover,546 . assistive-text:active,547 . assistive-text:focus {545 .screen-reader-text:hover, 546 .screen-reader-text:active, 547 .screen-reader-text:focus { 548 548 background-color: #f1f1f1; 549 549 border-radius: 3px; 550 550 box-shadow: 0 0 2px 2px rgba(0,0,0,.6); … … 925 925 width: 100%; 926 926 } 927 927 928 . main-navigation.searchform {928 .site-header .searchform { 929 929 position: absolute; 930 930 right: 0; 931 931 top: 1px; 932 932 } 933 933 934 .site-header .searchform .field{934 .site-header .searchform [type="search"] { 935 935 background-color: transparent; 936 936 background-image: url(images/search-icon.png); 937 937 background-position: 5px center; … … 948 948 width: 0; 949 949 } 950 950 951 .site-header .searchform .field:focus {951 .site-header .searchform [type="search"]:focus { 952 952 background-color: #fff; 953 953 border: 2px solid #c3c0ab; 954 954 cursor: text; … … 2524 2524 } 2525 2525 2526 2526 /* Search widget */ 2527 .searchform .submit{2527 .searchform [type="submit"] { 2528 2528 display: none; 2529 2529 } 2530 2530 2531 .widget .searchform .field{2531 .widget .searchform [type="text"] { 2532 2532 width: 100%; 2533 2533 } 2534 2534 … … 3137 3137 (-webkit-min-device-pixel-ratio: 1.25), 3138 3138 (min-resolution: 120dpi) { 3139 3139 3140 .site-header .searchform .field{3140 .site-header .searchform [type="search"] { 3141 3141 background-image: url(images/search-icon-2x.png); 3142 3142 } 3143 3143 … … 3157 3157 font-size: 10pt; 3158 3158 } 3159 3159 3160 footer a[rel= bookmark]:link:after,3161 footer a[rel= bookmark]:visited:after {3160 footer a[rel="bookmark"]:link:after, 3161 footer a[rel="bookmark"]:visited:after { 3162 3162 content: " [" attr(href) "] "; /* Show URLs */ 3163 3163 } 3164 3164 -
wp-content/themes/twentythirteen/functions.php
262 262 return; 263 263 ?> 264 264 <nav class="navigation paging-navigation" role="navigation"> 265 <h1 class=" assistive-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>265 <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> 266 266 <div class="nav-links"> 267 267 268 268 <?php if ( get_next_posts_link() ) : ?> … … 298 298 return; 299 299 ?> 300 300 <nav class="navigation post-navigation" role="navigation"> 301 <h1 class=" assistive-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>301 <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1> 302 302 <div class="nav-links"> 303 303 304 304 <?php previous_post_link( '%link', _x( '<span class="meta-nav">←</span> %title', 'Previous post link', 'twentythirteen' ) ); ?> … … 486 486 endif; 487 487 488 488 /** 489 * Adds a search form to the main navigation. 490 * 491 * @since Twenty Thirteen 1.0 492 * 493 * @param string $menu 494 * @return string 495 */ 496 function twentythirteen_navbar_searchform( $menu ) { 497 return $menu .= get_search_form( false, 'html5' ); 498 } 499 add_filter( 'wp_nav_menu', 'twentythirteen_navbar_searchform' ); 500 add_filter( 'wp_page_menu', 'twentythirteen_navbar_searchform' ); 501 502 /** 489 503 * Extends the default WordPress body class to denote: 490 504 * 1. Custom fonts enabled. 491 505 * 2. Single or multiple authors.