Improve the HTML classes for the new html5 format in get_search_form().
Update Twenty Thirteen to reflect the changes. props obenland. fixes #23850. git-svn-id: http://core.svn.wordpress.org/trunk@24524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
68ec768ba3
commit
ff6dd2b952
|
@ -916,14 +916,13 @@ ul.nav-menu li:hover > ul,
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.site-header .searchform {
|
||||
.site-header .search-form {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.site-header .searchform [type="search"],
|
||||
.site-header .searchform [type="text"] {
|
||||
.site-header .search-field {
|
||||
background-color: transparent;
|
||||
background-image: url(images/search-icon.png);
|
||||
background-position: 5px center;
|
||||
|
@ -940,8 +939,7 @@ ul.nav-menu li:hover > ul,
|
|||
width: 0;
|
||||
}
|
||||
|
||||
.site-header .searchform [type="search"]:focus,
|
||||
.site-header .searchform [type="text"]:focus {
|
||||
.site-header .search-field:focus {
|
||||
background-color: #fff;
|
||||
border: 2px solid #c3c0ab;
|
||||
cursor: text;
|
||||
|
@ -2520,14 +2518,10 @@ footer.entry-meta {
|
|||
}
|
||||
|
||||
/* Search widget */
|
||||
.searchform [type="submit"] {
|
||||
.search-form .search-submit {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.widget .searchform [type="text"] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* RSS Widget */
|
||||
.widget_rss .rss-date {
|
||||
display: block;
|
||||
|
@ -3098,8 +3092,7 @@ footer.entry-meta {
|
|||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
|
||||
.site-header .searchform [type="search"],
|
||||
.site-header .searchform [type="text"] {
|
||||
.site-header .search-field {
|
||||
background-image: url(images/search-icon-2x.png);
|
||||
}
|
||||
|
||||
|
|
|
@ -165,11 +165,12 @@ function get_search_form( $echo = true ) {
|
|||
$form = ob_get_clean();
|
||||
} else {
|
||||
if ( 'html5' == $format ) {
|
||||
$form = '<form role="search" method="get" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
|
||||
<label><span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
|
||||
<input type="search" placeholder="' . esc_attr_x( 'Search …', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" title="' . _x( 'Search for:', 'label' ) . '" />
|
||||
$form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
|
||||
<label>
|
||||
<span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
|
||||
<input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search …', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" title="' . _x( 'Search for:', 'label' ) . '" />
|
||||
</label>
|
||||
<input type="submit" class="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
|
||||
<input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
|
||||
</form>';
|
||||
} else {
|
||||
$form = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
|
||||
|
|
Loading…
Reference in New Issue