WordPress.org

Make WordPress Core

Ticket #23868: 23868-2.2.patch

File 23868-2.2.patch, 1.9 KB (added by WraithKenny, 5 years ago)

back-compat

  • wp-content/themes/twentyeleven/searchform.php

     
    66 * @subpackage Twenty_Eleven
    77 * @since Twenty Eleven 1.0
    88 */
     9
     10// Compat for WP < 3.6
     11if ( ! isset( $search_form_counter ) ) {
     12        static $search_form_counter = 0;
     13        $form_id   = $search_form_counter ? '' : ' id="searchform"';
     14        $submit_id = $search_form_counter ? '' : ' id="searchsubmit"';
     15        $text_id   = $search_form_counter ? 's-' . $search_form_counter : 's';
     16}
    917?>
    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' ); ?>" />
     18        <form method="get"<?php echo $form_id; ?> class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
     19                <label for="<?php echo $text_id; ?>" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
     20                <input type="text" class="field" name="s" id="<?php echo $text_id; ?>" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
     21                <input type="submit" class="submit" name="submit"<?php echo $submit_id; ?> value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    1422        </form>
  • wp-content/themes/twentyeleven/style.css

     
    477477        line-height: 1.2em;
    478478        padding: 4px 10px 4px 28px;
    479479}
    480 input#searchsubmit {
     480.searchform input.submit {
    481481        display: none;
    482482}
    483483