Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created February 8, 2018 14:26
Show Gist options
  • Save plugin-republic/e74706129351e6a66620ab13d2de1162 to your computer and use it in GitHub Desktop.
Save plugin-republic/e74706129351e6a66620ab13d2de1162 to your computer and use it in GitHub Desktop.
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