PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.2
WebberZone Top 10 — Popular Posts v4.5.2
4.5.2 4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 All 118 releases
← All changes | includes/class-hook-loader.php +7 -1 4.4.3 → 4.5.2 View file →
@@ -54,9 +54,11 @@
54 54 */
55 55 private function register_init_hooks(): void {
56 56 Hook_Registry::add_action( 'init', array( $this, 'initiate_plugin' ) );
57 57 Hook_Registry::add_action( 'widgets_init', array( $this, 'register_widgets' ) );
58 - Hook_Registry::add_action( 'rest_api_init', array( $this, 'register_rest_routes' ) );
58 + if ( Feature_Manager::is_enabled( 'rest_api' ) ) {
59 + Hook_Registry::add_action( 'rest_api_init', array( $this, 'register_rest_routes' ) );
60 + }
59 61 Hook_Registry::add_action( 'parse_query', array( $this, 'parse_query' ) );
60 62 }
61 63
62 64 /**
@@ -97,8 +99,12 @@
97 99 *
98 100 * @since 3.0.0
99 101 */
100 102 public function register_rest_routes(): void {
103 + if ( ! Feature_Manager::is_enabled( 'rest_api' ) ) {
104 + return;
105 + }
106 +
101 107 $controller = new Frontend\REST_API();
102 108 $controller->register_routes();
103 109 }
104 110