diff -Naur wordpress-stable/wp-admin/includes/theme.php wordpress-consistent/wp-admin/includes/theme.php
|
old
|
new
|
|
| 69 | 69 | |
| 70 | 70 | $themes_dir = trailingslashit( $themes_dir ); |
| 71 | 71 | $theme_dir = trailingslashit( $themes_dir . $stylesheet ); |
| | 72 | |
| | 73 | /** |
| | 74 | * Fires immediately before a theme deletion attempt. |
| | 75 | * |
| | 76 | * @since 4.6.0 |
| | 77 | * |
| | 78 | * @param string $stylesheet Stylesheet of the theme to delete. |
| | 79 | */ |
| | 80 | do_action( 'delete_theme', $stylesheet ); |
| | 81 | |
| 72 | 82 | $deleted = $wp_filesystem->delete( $theme_dir, true ); |
| 73 | 83 | |
| | 84 | /** |
| | 85 | * Fires immediately after a theme deletion attempt. |
| | 86 | * |
| | 87 | * @since 4.6.0 |
| | 88 | * |
| | 89 | * @param string $stylesheet Stylesheet of the theme to delete. |
| | 90 | * @param bool $deleted Whether the theme deletion was successful. |
| | 91 | */ |
| | 92 | do_action( 'deleted_theme', $stylesheet, $deleted ); |
| | 93 | |
| 74 | 94 | if ( ! $deleted ) { |
| 75 | 95 | return new WP_Error( 'could_not_remove_theme', sprintf( __( 'Could not fully remove the theme %s.' ), $stylesheet ) ); |
| 76 | 96 | } |