Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: search_form_format

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
245
246      /**
247       * Filters the HTML format of the search form.
248       *
249       * @since 3.6.0
250       *
251       * @param string $format The type of markup to use in the search form.
252       *                       Accepts 'html5', 'xhtml'.
253       */
254      $format = apply_filters( 'search_form_format', $format );
255
256      $search_form_template = locate_template( 'searchform.php' );
257      if ( '' != $search_form_template ) {
258           ob_start();
259           require( $search_form_template );
260           $form = ob_get_clean();
261      } else {
262           // Build a string containing an aria-label to use for the search form.
263           if ( isset( $args['aria_label'] ) && $args['aria_label'] ) {