Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function prefix_ms_plugin_update_message( $file, $plugin ) {
if( is_multisite() && version_compare( $plugin['Version'], $plugin['new_version'], '<') ) {
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
printf(
'<tr class="plugin-update-tr"><td colspan="%s" class="plugin-update update-message notice inline notice-warning notice-alt"><div class="update-message"><h4 style="margin: 0; font-size: 14px;">%s</h4>%s</div></td></tr>',
$wp_list_table->get_column_count(),
$plugin['Name'],
wpautop( $plugin['upgrade_notice'] )
);
}
}
add_action( 'after_plugin_row_wp-your-plugin/your-plugin.php', 'prefix_ms_plugin_update_message', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment