WordPress.org

Make WordPress Core

Ticket #23868: 23868.2.patch

File 23868.2.patch, 1.9 KB (added by WraithKenny, 13 months ago)

back-compat

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

     
    66 * @subpackage Twenty_Eleven 
    77 * @since Twenty Eleven 1.0 
    88 */ 
     9 
     10if ( ! isset( $search_form_counter ) ) // Compat for WP < 3.6 
     11        static $search_form_counter = 0; 
    912?> 
    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' ); ?>" /> 
     13        <form method="get"<?php echo ( $search_form_counter ) ? '' : ' id="searchform"'; ?> class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 
     14                <label for="<?php echo ( $search_form_counter ) ? 's-'.$search_form_counter : 's'; ?>" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label> 
     15                <input type="text" class="field" name="s" id="<?php echo ( $search_form_counter ) ? 's-'.$search_form_counter : 's'; ?>" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 
     16                <input type="submit" class="submit" name="submit"<?php echo ( $search_form_counter ) ? '' : ' id="searchsubmit"'; ?> value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 
    1417        </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