<?php /** * The searchform.php template. * * Used any time that get_search_form() is called. * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ /* * Generate a unique ID for each form and a string containing an aria-label * if one was passed to get_search_form() in the args array. */ $twentytwenty_unique_id = twentytwenty_unique_id( 'search-form-' ); $twentytwenty_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : ''; // Backward compatibility, in case a child theme template uses a `label` argument. if ( empty( $twentytwenty_aria_label ) && ! empty( $args['label'] ) ) { $twentytwenty_aria_label = 'aria-label="' . esc_attr( $args['label'] ) . '"'; } ?> <form role="search" <?php echo $twentytwenty_aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <label for="<?php echo esc_attr( $twentytwenty_unique_id ); ?>"> <span class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Search for:', 'twentytwenty' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?> </span> <input type="search" id="<?php echo esc_attr( $twentytwenty_unique_id ); ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'twentytwenty' ); ?>" value="<?php echo get_search_query(); ?>" name="s" /> </label> <input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentytwenty' ); ?>" /> </form>
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
assets | Folder | 0755 |
|
|
classes | Folder | 0755 |
|
|
inc | Folder | 0755 |
|
|
template-parts | Folder | 0755 |
|
|
templates | Folder | 0755 |
|
|
404.php | File | 813 B | 0644 |
|
comments.php | File | 3.13 KB | 0644 |
|
error_log | File | 323 B | 0644 |
|
footer.php | File | 2.07 KB | 0644 |
|
functions.php | File | 28.44 KB | 0644 |
|
functionsbak.php | File | 27.23 KB | 0644 |
|
header.php | File | 4.96 KB | 0644 |
|
index.php | File | 2.9 KB | 0644 |
|
package-lock.json | File | 1.12 MB | 0644 |
|
package.json | File | 1.99 KB | 0644 |
|
print.css | File | 2.64 KB | 0644 |
|
readme.txt | File | 5.53 KB | 0644 |
|
screenshot.png | File | 51.82 KB | 0644 |
|
searchform.php | File | 1.73 KB | 0644 |
|
singular.php | File | 550 B | 0644 |
|
style-rtl.css | File | 119.45 KB | 0644 |
|
style.css | File | 120.44 KB | 0644 |
|