| @@ -35,9 +35,9 @@ | ||
| 35 | 35 | |
| 36 | 36 | // WP_REST_Request init. |
| 37 | 37 | $is_rest_request = defined('REST_REQUEST') && REST_REQUEST; |
| 38 | 38 | if ( $is_rest_request ) { |
| 39 | - MeowCommon_Classes_Rest::init_once(); | |
| 39 | + MeowCommon_Rest::init_once(); | |
| 40 | 40 | return true; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // Plain permalinks. |
| @@ -43,9 +43,9 @@ | ||
| 43 | 43 | // Plain permalinks. |
| 44 | 44 | $prefix = rest_get_url_prefix(); |
| 45 | 45 | $request_contains_rest = isset( $_GET['rest_route'] ) && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0; |
| 46 | 46 | if ( $request_contains_rest) { |
| 47 | - MeowCommon_Classes_Rest::init_once(); | |
| 47 | + MeowCommon_Rest::init_once(); | |
| 48 | 48 | return true; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // It can happen that WP_Rewrite is not yet initialized, so better to do it. |
| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | // URL Path begins with wp-json. |
| 62 | 62 | if ( !empty( $current_url['path'] ) && !empty( $rest_url['path'] ) ) { |
| 63 | 63 | $request_contains_rest = strpos( $current_url['path'], $rest_url['path'], 0 ) === 0; |
| 64 | 64 | if ( $request_contains_rest) { |
| 65 | - MeowCommon_Classes_Rest::init_once(); | |
| 65 | + MeowCommon_Rest::init_once(); | |
| 66 | 66 | return true; |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| @@ -176,6 +176,4 @@ | ||
| 176 | 176 | // if ( MeowCommon_Helpers::is_rest() ) { |
| 177 | 177 | // ini_set( 'display_errors', 0 ); |
| 178 | 178 | // } |
| 179 | 179 | } |
| 180 | - | |
| 181 | -?> | |