| @@ -11,10 +11,10 @@ | ||
| 11 | 11 | * Should we load the integration logic. |
| 12 | 12 | * |
| 13 | 13 | * @return bool Should we load. |
| 14 | 14 | */ |
| 15 | - function should_load() { | |
| 16 | - include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
| 15 | + public function should_load() { | |
| 16 | + include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 17 | 17 | return is_plugin_active( 'wp-rest-cache/wp-rest-cache.php' ); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | /** |
| 21 | 21 | * Register integration details. |
| 22 | 22 | */ |
| 23 | 23 | public function register() { |
| 24 | - add_filter( 'rest_pre_echo_response', [$this, 'api_optimization'], 10, 3 ); | |
| 24 | + add_filter( 'rest_pre_echo_response', [ $this, 'api_optimization' ], 10, 3 ); | |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Replace the urls in the api response. |