Skip to content

Commit

Permalink
Remove widget sort option for instant search widgets (#16278)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnmoon authored Jun 29, 2020
1 parent 34e6962 commit 278f6d3
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions modules/widgets/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ public function populate_defaults_for_instant_search( $instance ) {
(array) $instance,
array(
'title' => '',
'sort' => self::DEFAULT_SORT,
'filters' => array(),
'post_types' => array(),
)
Expand Down Expand Up @@ -859,22 +858,6 @@ class="widefat"
<?php endforeach; ?>
</p>

<!-- Default sort order control -->
<p>
<label>
<?php esc_html_e( 'Default sort order:', 'jetpack' ); ?>
<select
name="<?php echo esc_attr( $this->get_field_name( 'sort' ) ); ?>"
class="widefat jetpack-search-filters-widget__sort-order">
<?php foreach ( $this->get_sort_types() as $sort_type => $label ) { ?>
<option value="<?php echo esc_attr( $sort_type ); ?>" <?php selected( $instance['sort'], $sort_type ); ?>>
<?php echo esc_html( $label ); ?>
</option>
<?php } ?>
</select>
</label>
</p>

<!-- Filters control -->
<?php if ( ! Jetpack_Search_Helpers::are_filters_by_widget_disabled() ) : ?>
<div class="jetpack-search-filters-widget__filters">
Expand Down

0 comments on commit 278f6d3

Please sign in to comment.