@@ 3604-3610 (lines=7) @@ | ||
3601 | ||
3602 | $result = delete_theme( $stylesheet ); |
|
3603 | ||
3604 | if ( is_wp_error( $result ) ) { |
|
3605 | $status['errorMessage'] = $result->get_error_message(); |
|
3606 | wp_send_json_error( $status ); |
|
3607 | } elseif ( false === $result ) { |
|
3608 | $status['errorMessage'] = __( 'Theme could not be deleted.' ); |
|
3609 | wp_send_json_error( $status ); |
|
3610 | } |
|
3611 | ||
3612 | wp_send_json_success( $status ); |
|
3613 | } |
|
@@ 3877-3883 (lines=7) @@ | ||
3874 | ||
3875 | $result = delete_plugins( array( $plugin ) ); |
|
3876 | ||
3877 | if ( is_wp_error( $result ) ) { |
|
3878 | $status['errorMessage'] = $result->get_error_message(); |
|
3879 | wp_send_json_error( $status ); |
|
3880 | } elseif ( false === $result ) { |
|
3881 | $status['errorMessage'] = __( 'Plugin could not be deleted.' ); |
|
3882 | wp_send_json_error( $status ); |
|
3883 | } |
|
3884 | ||
3885 | wp_send_json_success( $status ); |
|
3886 | } |