Changeset 14764
- Timestamp:
- 03/27/2026 06:23:56 AM (5 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-search.php
r14687 r14764 41 41 */ 42 42 private function __construct() { 43 if ( isset( $_GET['s'] ) ) { 44 return false; 43 if ( 44 // Don't load Jetpack Search if it's a front-end ?s=... query, as we'll be redirecting away anyway. 45 isset( $_GET['s'] ) && 46 // Running super-early, before wp_is_serving_rest_request() returns truthful. 47 ! str_contains( $_SERVER['REQUEST_URI'] ?? '', '/wp-json/' ) && 48 // Never return early in an API context. 49 ( ! defined( 'WPORG_IS_API' ) || ! WPORG_IS_API ) 50 ) { 51 return; 45 52 } 46 53 47 54 add_action( 'init', array( $this, 'init' ) ); 48 49 return false;50 55 } 51 56
Note: See TracChangeset
for help on using the changeset viewer.