| @@ -39,8 +39,12 @@ | ||
| 39 | 39 | if ( ! class_exists( 'WP_REST_Server' ) ) { |
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + if ( ! LP_Helper::isRestApiLP() ) { | |
| 44 | + return; | |
| 45 | + } | |
| 46 | + | |
| 43 | 47 | $this->rest_api_includes(); |
| 44 | 48 | |
| 45 | 49 | add_action( 'rest_api_init', array( $this, 'rest_api_register_routes' ), 10 ); |
| 46 | 50 | |
| @@ -46,9 +50,9 @@ | ||
| 46 | 50 | |
| 47 | 51 | } |
| 48 | 52 | |
| 49 | 53 | public function rest_api_includes() { |
| 50 | - // include_once realpath( LP_PLUGIN_PATH . 'inc/rest-api/class-lp-rest-authentication.php' ); | |
| 54 | + | |
| 51 | 55 | } |
| 52 | 56 | |
| 53 | 57 | /** |
| 54 | 58 | * Register routes |