Make WordPress Core

Ticket #31136: 31136.patch

File 31136.patch, 2.4 KB (added by eherman24, 10 years ago)

added new plugin header metadata 'Uninstall Notification' , which gets displayed to the user on plugin uninstall if the metadata is set in the plugin header.

  • wp-admin/css/dashboard.css

     
    811811        font-size: 14px;
    812812}
    813813
     814.alternate.uninstall-notification {
     815        padding: 5px;
     816        margin: 5px 0;
     817}
     818
     819.alternate.uninstall-notification:empty {
     820        display: none;
     821}
     822
    814823/* Recent Comments */
    815824
    816825#latest-comments #the-comment-list {
  • wp-admin/includes/plugin.php

     
    8383                'Network' => 'Network',
    8484                // Site Wide Only is deprecated in favor of Network.
    8585                '_sitewide' => 'Site Wide Only',
     86                'Uninstall_Notification' => 'Uninstall Notification'
    8687        );
    8788
    8889        $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' );
  • wp-admin/plugins.php

     
    295295                                                foreach ( $plugin_info as $plugin ) {
    296296                                                        if ( $plugin['is_uninstallable'] ) {
    297297                                                                /* translators: 1: plugin name, 2: plugin author */
    298                                                                 echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>)' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']) ), '</li>';
     298                                                                echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>) <div class="alternate uninstall-notification" style="padding:5px;">%3$s</div>' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']), wp_kses( $plugin['Uninstall_Notification'] , wp_kses_allowed_html( 'post' ) ) ), '</li>';
    299299                                                                $data_to_delete = true;
    300300                                                        } else {
    301301                                                                /* translators: 1: plugin name, 2: plugin author */
    302                                                                 echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']) ), '</li>';
     302                                                                echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em> <div class="alternate uninstall-notification" style="padding:5px;">%3$s</div>' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']), wp_kses( $plugin['Uninstall_Notification'] , wp_kses_allowed_html( 'post' ) ) ), '</li>';
    303303                                                        }
    304304                                                }
    305305                                                ?>