Make WordPress Core

Ticket #37951: 37951.patch

File 37951.patch, 785 bytes (added by vetyst, 8 years ago)

deleted_theme hook

  • src/wp-admin/includes/theme.php

     
    7171        $theme_dir = trailingslashit( $themes_dir . $stylesheet );
    7272        $deleted = $wp_filesystem->delete( $theme_dir, true );
    7373
     74        /**
     75         * Fires immediately after a theme deletion attempt.
     76         *
     77         * @since 4.6.1
     78         *
     79         * @param string $stylesheet Stylesheet of the theme.
     80         * @param bool   $deleted    Whether the theme deletion was successful.
     81         */
     82        do_action( 'deleted_theme', $stylesheet, $deleted );
     83
    7484        if ( ! $deleted ) {
    7585                return new WP_Error( 'could_not_remove_theme', sprintf( __( 'Could not fully remove the theme %s.' ), $stylesheet ) );
    7686        }