Changeset 10116 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 08/05/2020 01:36:05 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r10114 r10116 560 560 561 561 // Instantiate our copy of the Jetpack_Search class. 562 if ( class_exists( 'Jetpack' ) && \Jetpack::get_option( 'id' ) && ! class_exists( 'Jetpack_Search' ) 563 && ! isset( $_GET['s'] ) ) { // Don't run the ES query if we're going to redirect to the pretty search URL 564 require_once __DIR__ . '/libs/site-search/jetpack-search.php'; 565 \Jetpack_Search::instance(); 562 if ( 563 class_exists( 'Jetpack' ) && 564 \Jetpack::get_option( 'id' ) && // Don't load in Meta Environments 565 ! class_exists( 'Jetpack_Search' ) && 566 ( 567 // Don't run the ES query if we're going to redirect to the pretty search URL 568 ! isset( $_GET['s'] ) 569 || 570 // But load it for the query-plugins REST API endpoint, for simpler debugging 571 ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp-json/plugins/v1/query-plugins' ) ) 572 ) 573 ) { 574 require_once __DIR__ . '/libs/site-search/jetpack-search.php'; 575 \Jetpack_Search::instance(); 566 576 } 567 577 }
Note: See TracChangeset
for help on using the changeset viewer.