Changeset 12096 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/component-archive-search.php
- Timestamp:
- 09/28/2022 11:18:13 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/component-archive-search.php
r12067 r12096 5 5 if ( is_post_type_archive() || is_page_template( 'page-lesson-plans.php' ) ) { 6 6 $pt = get_query_var( 'post_type' ); 7 } else if ( is_tax() ) {7 } elseif ( is_tax() ) { 8 8 $current_tax = get_taxonomy( get_query_var( 'taxonomy' ) ); 9 $obj_types = $current_tax->object_type ?? array();10 $pt = array_shift( $obj_types );9 $obj_types = $current_tax->object_type ?? array(); 10 $pt = array_shift( $obj_types ); 11 11 } 12 12 $search_label = get_post_type_object( $pt )->labels->search_items ?? ''; … … 14 14 $form_action = get_post_type_archive_link( $pt ); 15 15 ?> 16 <div class="search-form--is-inline search-form--is-muted search-form--has-border search-form--has-medium-text ">16 <div class="search-form--is-inline search-form--is-muted search-form--has-border search-form--has-medium-text col-4"> 17 17 <form role="search" method="get" class="search-form" action="<?php echo esc_attr( $form_action ); ?>"> 18 <label for="archive-search" class="screen-reader-text">19 <?php echo esc_html( _x( 'Search for:', 'label', 'wporg-learn' )); ?>18 <label for="archive-search"> 19 <?php echo esc_html( $search_label ); ?> 20 20 </label> 21 21 <input … … 23 23 id="archive-search" 24 24 class="search-field" 25 placeholder="<?php echo esc_attr( $search_label ); ?>"26 25 value="<?php echo esc_attr( $search_query ); ?>" 27 26 name="search"
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)