Make WordPress Core

Ticket #17451: upgrade-notice.17451.diff

File upgrade-notice.17451.diff, 903 bytes (added by stephenharris, 10 years ago)

Add upgrade notice to plugins page

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

    diff --git src/wp-admin/includes/update.php src/wp-admin/includes/update.php
    index 943e19c..77b0f00 100644
    function wp_plugin_update_row( $file, $plugin_data ) { 
    325325                } else {
    326326                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) );
    327327                }
     328
     329                if ( isset( $plugin_data['upgrade_notice'] ) ) {
     330                        echo '<br />' . strip_tags( $plugin_data->update->upgrade_notice );
     331                }
     332
    328333                /**
    329334                 * Fires at the end of the update message container in each
    330335                 * row of the plugins list table.