Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search: Fix fatal error in dev mode, and add a message #10812

Merged
merged 1 commit into from
Dec 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions modules/widgets/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,19 @@ public function widget( $args, $instance ) {

$display_filters = false;

if ( Jetpack::is_development_mode() ) {
echo $args['before_widget'];
?><div id="<?php echo esc_attr( $this->id ); ?>-wrapper">
<div class="jetpack-search-sort-wrapper">
<label>
<?php esc_html_e( 'Jetpack Search not supported in Development Mode', 'jetpack' ); ?>
</label>
</div>
</div><?php
echo $args['after_widget'];
return;
}

if ( is_search() ) {
if ( Jetpack_Search_Helpers::should_rerun_search_in_customizer_preview() ) {
Jetpack_Search::instance()->update_search_results_aggregations();
Expand Down