← All changes
|
jetpack_vendor/automattic/jetpack-import/src/endpoints/class-custom-css.php
+6
-0
13.5.2
→
16.3-beta
View file →
| @@ -10,8 +10,12 @@ | ||
| 10 | 10 | use WP_Error; |
| 11 | 11 | use WP_REST_Request; |
| 12 | 12 | use WP_REST_Response; |
| 13 | 13 | |
| 14 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 15 | + exit( 0 ); | |
| 16 | +} | |
| 17 | + | |
| 14 | 18 | require_once ABSPATH . 'wp-includes/theme.php'; |
| 15 | 19 | |
| 16 | 20 | /** |
| 17 | 21 | * Class Custom_CSS |
| @@ -50,8 +54,10 @@ | ||
| 50 | 54 | * @param WP_REST_Request $request Full details about the request. |
| 51 | 55 | * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
| 52 | 56 | */ |
| 53 | 57 | public function create_item( $request ) { |
| 58 | + // Set the WP_IMPORTING constant to prevent sync notifications | |
| 59 | + $this->set_importing(); | |
| 54 | 60 | $args = array( |
| 55 | 61 | 'stylesheet' => $request['title'], |
| 56 | 62 | ); |
| 57 | 63 | |