twentyfifteen_search_form_modify

Add a `screen-reader-text` class to the search form's submit button.

Description

(string) twentyfifteen_search_form_modify( (string) $html ); 

Returns (string)

Modified search form HTML.

Parameters (1)

0. $html (string)
Search form HTML.

Usage

  1. if ( !function_exists( 'twentyfifteen_search_form_modify' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // Search form HTML. 
  5. $html = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = twentyfifteen_search_form_modify($html); 
  9.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function twentyfifteen_search_form_modify( $html ) { 
  2. return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html );