Twenty Thirteen: remove searchform.php template once core search form accepts HTML5 argument. Props obenland, fixes #23701.

git-svn-id: http://core.svn.wordpress.org/trunk@23673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-03-12 17:44:27 +00:00
parent 76f2325439
commit 9e4ce0a952
8 changed files with 23 additions and 38 deletions

View File

@ -21,7 +21,7 @@ get_header(); ?>
<h2><?php _e( 'This is somewhat embarrassing, isn&rsquo;t it?', 'twentythirteen' ); ?></h2>
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentythirteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form( true, 'html5' ); ?>
</div><!-- .page-content -->
</div><!-- .page-wrapper -->

View File

@ -38,7 +38,7 @@ if ( post_password_required() )
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
?>
<nav class="navigation comment-navigation" role="navigation">
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>
<h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentythirteen' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentythirteen' ) ); ?></div>
</nav>

View File

@ -20,12 +20,12 @@
<?php elseif ( is_search() ) : ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with different keywords.', 'twentythirteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form( true, 'html5' ); ?>
<?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentythirteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form( true, 'html5' ); ?>
<?php endif; ?>
</div><!-- .page-content -->

View File

@ -32,7 +32,7 @@ Styles for older IE versions (previous to IE9).
left: 100%;
}
.site-header .searchform .field {
.site-header .searchform [type="search"] {
padding-top: 6px;
}
@ -174,8 +174,7 @@ img.alignleft {
width: 13px;
}
.ie7 .assistive-text,
.ie7 .site .screen-reader-text {
.ie7 .screen-reader-text {
clip: rect(1px 1px 1px 1px); /* IE7 */
}
@ -204,7 +203,7 @@ img.alignleft {
left: 100%;
}
.ie7 .site-header .searchform .field {
.ie7 .site-header .searchform [type="search"] {
background-color: #fff;
border: 2px solid #c3c0ab;
cursor: text;

View File

@ -303,7 +303,7 @@ function twentythirteen_paging_nav() {
return;
?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="assistive-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>
<div class="nav-links">
<?php if ( get_next_posts_link() ) : ?>
@ -339,7 +339,7 @@ function twentythirteen_post_nav() {
return;
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="assistive-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>
<div class="nav-links">
<?php previous_post_link( '%link', _x( '<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'twentythirteen' ) ); ?>

View File

@ -49,9 +49,9 @@ $html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
<div id="navbar" class="navbar">
<nav id="site-navigation" class="navigation main-navigation" role="navigation">
<h3 class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></h3>
<a class="assistive-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a>
<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>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
<?php get_search_form(); ?>
<?php get_search_form( true, 'html5' ); ?>
</nav><!-- #site-navigation -->
</div><!-- #navbar -->
</header><!-- #masthead -->

View File

@ -1,14 +0,0 @@
<?php
/**
* The template for displaying search forms in Twenty Thirteen.
*
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
*/
?>
<form method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<label for="s" class="assistive-text"><?php _ex( 'Search', 'assistive text', 'twentythirteen' ); ?></label>
<input type="search" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentythirteen' ); ?>" />
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentythirteen' ); ?>" />
</form>

View File

@ -537,14 +537,14 @@ hr {
}
/* Assistive text */
.assistive-text {
.screen-reader-text {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
}
.assistive-text:hover,
.assistive-text:active,
.assistive-text:focus {
.screen-reader-text:hover,
.screen-reader-text:active,
.screen-reader-text:focus {
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
@ -926,13 +926,13 @@ ul.nav-menu li:hover > ul,
width: 100%;
}
.main-navigation .searchform {
.site-header .searchform {
position: absolute;
right: 0;
top: 1px;
}
.site-header .searchform .field {
.site-header .searchform [type="search"] {
background-color: transparent;
background-image: url(images/search-icon.png);
background-position: 5px center;
@ -949,7 +949,7 @@ ul.nav-menu li:hover > ul,
width: 0;
}
.site-header .searchform .field:focus {
.site-header .searchform [type="search"]:focus {
background-color: #fff;
border: 2px solid #c3c0ab;
cursor: text;
@ -2549,11 +2549,11 @@ footer.entry-meta {
}
/* Search widget */
.searchform .submit {
.searchform [type="submit"] {
display: none;
}
.widget .searchform .field {
.widget .searchform [type="text"] {
width: 100%;
}
@ -3162,7 +3162,7 @@ footer.entry-meta {
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
.site-header .searchform .field {
.site-header .searchform [type="search"] {
background-image: url(images/search-icon-2x.png);
}
@ -3182,8 +3182,8 @@ footer.entry-meta {
font-size: 10pt;
}
footer a[rel=bookmark]:link:after,
footer a[rel=bookmark]:visited:after {
footer a[rel="bookmark"]:link:after,
footer a[rel="bookmark"]:visited:after {
content: " [" attr(href) "] "; /* Show URLs */
}