# jetpack/16.3-beta/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3-beta. 33 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3-beta/code/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php
- Raw: https://pluginprobe.com/plugins/jetpack/16.3-beta/raw/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php
- Modified: 2025-11-24T17:00:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/16.3-beta/code/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php#L10-L20`.

```php
<?php
/**
 * Jetpack compatibility
 *
 * @package automattic/jetpack-search
 */

namespace Automattic\Jetpack\Search\Compatibility\Jetpack;

use Jetpack;

if ( ! defined( 'ABSPATH' ) ) {
	exit( 0 );
}

/**
 * Override the condition to show Search submenu when Jetpack plugin exists.
 */
function should_show_jetpack_search_submenu() {
	if ( ! current_user_can( 'manage_options' ) ) {
		return false;
	}

	// If site is in Offline Mode or not connected yet.
	if ( ! Jetpack::is_active_and_not_offline_mode() ) {
		return false;
	}

	return true;
}

add_filter( 'jetpack_search_should_add_search_submenu', __NAMESPACE__ . '\should_show_jetpack_search_submenu' );

```
