PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.5
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.5
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
← All changes | src/class-jetpack-modules-overrides.php +7 -1 12.6.4 → 16.3-a.5 View file →
@@ -4,8 +4,10 @@
4 4 *
5 5 * @package automattic/jetpack
6 6 */
7 7
8 +use Automattic\Jetpack\Feature_Policy;
9 +
8 10 /**
9 11 * Provides methods for dealing with module overrides.
10 12 *
11 13 * @since 5.9.0
@@ -36,9 +38,13 @@
36 38 *
37 39 * @return bool Whether there is a filter on the jetpack_active_modules option.
38 40 */
39 41 public function do_overrides_exist() {
40 - return (bool) ( has_filter( 'option_jetpack_active_modules' ) || has_filter( 'jetpack_active_modules' ) );
42 + if ( method_exists( Feature_Policy::class, 'ensure_hooks' ) ) {
43 + Feature_Policy::ensure_hooks();
44 + }
45 +
46 + return ( has_filter( 'option_jetpack_active_modules' ) || has_filter( 'jetpack_active_modules' ) );
41 47 }
42 48
43 49 /**
44 50 * Gets the override for a given module.