@@ 122-128 (lines=7) @@ | ||
119 | ); |
|
120 | } |
|
121 | ||
122 | if ( ! Jetpack::is_module_active( $module_slug ) ) { |
|
123 | return new WP_Error( |
|
124 | 'already_inactive', |
|
125 | esc_html__( 'The requested Jetpack module was already inactive.', 'jetpack' ), |
|
126 | array( 'status' => 409 ) |
|
127 | ); |
|
128 | } |
|
129 | ||
130 | if ( Jetpack::deactivate_module( $module_slug ) ) { |
|
131 | return rest_ensure_response( array( |
|
@@ 403-405 (lines=3) @@ | ||
400 | return new WP_Error( 'not_found', esc_html__( 'The requested Jetpack module was not found.', 'jetpack' ), array( 'status' => 404 ) ); |
|
401 | } |
|
402 | ||
403 | if ( ! Jetpack::is_module_active( $data['slug'] ) ) { |
|
404 | return new WP_Error( 'inactive', esc_html__( 'The requested Jetpack module is inactive.', 'jetpack' ), array( 'status' => 409 ) ); |
|
405 | } |
|
406 | } |
|
407 | ||
408 | // Get parameters to update the module. |