Make WordPress Core

Ticket #16539: 16539-4.patch

File 16539-4.patch, 9.0 KB (added by azaozz, 13 years ago)
  • wp-content/themes/twentyeleven/colors/dark.css

     
    4242input[type=text]:focus,
    4343textarea:focus {
    4444}
    45 input#s {
     45input.searchinput {
    4646        background-color: #ddd;
    4747}
    4848
     
    6767#site-description {
    6868        color: #858585;
    6969}
    70 #branding #s {
     70#branding input.searchinput {
    7171        background-color: #ddd;
    7272}
    7373
     
    253253
    254254/* =error404
    255255----------------------------------------------- */
    256 .error404 #main #searchform {
     256.error404 #main .searchform {
    257257        background: #060606;
    258258        border-color: #222;
    259259}
     
    406406}
    407407
    408408/* Search Widget */
    409 .widget_search #searchsubmit {
     409.widget_search .searchsubmit {
    410410        background: #222;
    411411        border-color: #333;
    412412        -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
     
    414414        box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
    415415        color: #777;
    416416}
    417 .widget_search #searchsubmit:active {
     417.widget_search .searchsubmit:active {
    418418        -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
    419419        -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
    420420        box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
  • wp-content/themes/twentyeleven/rtl.css

     
    5252        margin-right: 102px;
    5353}
    5454/* Make sure the logo and search form don't collide */
    55 .one-column #branding #searchform {
     55.one-column #branding form.searchform {
    5656        right: auto;
    5757        left: 40px;
    5858}
     
    9999        padding-left: 0;
    100100        padding-right: 3px;
    101101}
    102 input#s {
     102input.searchinput {
    103103        background-position: 97% 6px;
    104104        padding: 4px 28px 4px 10px;
    105105}
     
    147147}
    148148
    149149/* Search Form */
    150 #branding #searchform {
     150#branding form.searchform {
    151151        right: auto;
    152152        left: 7.6%;
    153153        text-align: left;
    154154}
    155 #branding #s {
     155#branding .searchinput {
    156156        float: left;
    157157}
    158158#branding .only-search + #access div {
  • wp-content/themes/twentyeleven/searchform.php

     
    77 * @since Twenty Eleven 1.0
    88 */
    99?>
    10         <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    11                 <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
    12                 <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    13                 <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    14         </form>
     10<form method="get"<?php echo $form_id; ?> class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
     11        <label for="<?php echo $text_id; ?>" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
     12        <input type="text" class="searchinput field" name="s" id="<?php echo $text_id; ?>" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
     13        <input type="submit" class="searchsubmit submit" name="submit"<?php echo $submit_id; ?> value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
     14</form>
  • wp-content/themes/twentyeleven/style.css

     
    278278        width: auto;
    279279}
    280280/* Make sure the logo and search form don't collide */
    281 .one-column #branding #searchform {
     281.one-column #branding .searchform {
    282282        right: 40px;
    283283        top: 4em;
    284284}
     
    453453input[type=text] {
    454454        padding: 3px;
    455455}
    456 input#s {
     456input.searchinput {
    457457        background: url(images/search.png) no-repeat 5px 6px;
    458458        -moz-border-radius: 2px;
    459459        border-radius: 2px;
     
    462462        line-height: 1.2em;
    463463        padding: 4px 10px 4px 28px;
    464464}
    465 input#searchsubmit {
     465input.searchsubmit {
    466466        display: none;
    467467}
    468468
     
    620620}
    621621
    622622/* Search Form */
    623 #branding #searchform {
     623#branding .searchform {
    624624        position: absolute;
    625625        top: 3.8em;
    626626        right: 7.6%;
    627627        text-align: right;
    628628}
    629 #branding #searchform div {
     629#branding .searchform div {
    630630        margin: 0;
    631631}
    632 #branding #s {
     632#branding .searchinput {
    633633        float: right;
    634634        -webkit-transition-duration: 400ms;
    635635        -webkit-transition-property: width, background;
     
    642642        -o-transition-timing-function: ease;
    643643        width: 72px;
    644644}
    645 #branding #s:focus {
     645#branding .searchinput:focus {
    646646        background-color: #f9f9f9;
    647647        width: 196px;
    648648}
    649 #branding #searchsubmit {
     649#branding .searchsubmit {
    650650        display: none;
    651651}
    652 #branding .only-search #searchform {
     652#branding .only-search .searchform {
    653653        top: 5px;
    654654        z-index: 1;
    655655}
    656 #branding .only-search #s {
     656#branding .only-search .searchinput {
    657657        background-color: #666;
    658658        border-color: #000;
    659659        color: #222;
    660660}
    661 #branding .only-search #s,
    662 #branding .only-search #s:focus {
     661#branding .only-search .searchinput {
    663662        width: 85%;
    664663}
    665 #branding .only-search #s:focus {
     664#branding .only-search .searchinput:focus {
    666665        background-color: #bbb;
    667666}
    668 #branding .with-image #searchform {
     667#branding .with-image .searchform {
    669668        top: auto;
    670669        bottom: -27px;
    671670        max-width: 195px;
     
    787786        border-top: 1px solid #ddd;
    788787        padding: 6px 10px 6px 0;
    789788}
    790 .entry-content #s {
     789.entry-content .searchinput {
    791790        width: 75%;
    792791}
    793792.comment-content ul,
     
    12771276/* =error404
    12781277----------------------------------------------- */
    12791278
    1280 .error404 #main #searchform {
     1279.error404 #main .searchform {
    12811280        background: #f9f9f9;
    12821281        border: 1px solid #ddd;
    12831282        border-width: 1px 0;
     
    12851284        overflow: hidden;
    12861285        padding: 1.625em 8.9%;
    12871286}
    1288 .error404 #main #s {
     1287.error404 #main .searchinput {
    12891288        width: 95%;
    12901289}
    12911290.error404 #main .widget {
     
    17591758.widget_search form {
    17601759        margin: 0 0 1.625em;
    17611760}
    1762 .widget_search #s {
     1761.widget_search .searchinput {
    17631762        width: 77%;
    17641763}
    1765 .widget_search #searchsubmit {
     1764.widget_search .searchsubmit {
    17661765        background: #ddd;
    17671766        border: 1px solid #ccc;
    17681767        -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
     
    17741773        position: relative;
    17751774        top: -2px;
    17761775}
    1777 .widget_search #searchsubmit:active {
     1776.widget_search .searchsubmit:active {
    17781777        background: #1982d1;
    17791778        border-color: #0861a5;
    17801779        -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
     
    23992398                margin-right: 0;
    24002399        }
    24012400        /* Make sure the logo and search form don't collide */
    2402         #branding #searchform {
     2401        #branding .searchform {
    24032402                top: 1.625em !important;
    24042403        }
    24052404        /* Floated content doesn't work well at this size */
     
    25132512        #site-description {
    25142513                font-size: 10pt;
    25152514        }
    2516         #branding #searchform {
     2515        #branding .searchform {
    25172516                display: none;
    25182517        }
    25192518        #branding img {
  • wp-content/themes/twentyten/style.css

     
    11201120.widget-area select {
    11211121        max-width: 100%;
    11221122}
    1123 .widget_search #s {/* This keeps the search inputs in line */
     1123.widget_search .searchinput {/* This keeps the search inputs in line */
    11241124        width: 60%;
    11251125}
    11261126.widget_search label {
     
    13541354        .home .sticky {
    13551355                border: none;
    13561356        }
    1357 }
    1358  No newline at end of file
     1357}
  • wp-includes/general-template.php

     
    131131 * @param boolean $echo Default to echo and not return the form.
    132132 */
    133133function get_search_form($echo = true) {
     134        static $search_form_counter = 0;
     135
    134136        do_action( 'get_search_form' );
    135137
     138        // Initialize the id values
     139        $form_id = $search_form_counter ? '' : ' id="searchform"';
     140        $text_id = $search_form_counter ? 's-' . $search_form_counter : 's';
     141        $submit_id = $search_form_counter ? '' : ' id="searchsubmit"';
     142
     143        $search_form_counter++;
     144       
    136145        $search_form_template = locate_template('searchform.php');
    137146        if ( '' != $search_form_template ) {
    138147                require($search_form_template);
    139148                return;
    140149        }
    141150
    142         $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
    143         <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
    144         <input type="text" value="' . get_search_query() . '" name="s" id="s" />
    145         <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
     151        $form = '<form role="search" method="get"' . $form_id . ' class="searchform" action="' . home_url( '/' ) . '" >
     152        <div><label class="screen-reader-text" for="' . $text_id . '">' . __('Search for:') . '</label>
     153        <input type="text" class="searchinput field" value="' . get_search_query() . '" name="s" id="' . $text_id . '" />
     154        <input type="submit" class="searchsubmit submit" ' . $submit_id . ' value="'. esc_attr__('Search') .'" />
    146155        </div>
    147156        </form>';
    148157