buddyboss-platform icon indicating copy to clipboard operation
buddyboss-platform copied to clipboard

Only load update info modal the first time after an update

Open noplanman opened this issue 2 years ago • 0 comments

"Hello" modal to display plugin update information should only load once after an update. This PR makes sure the footer HTML is only loaded the first time after updating the plugin.

As it is now, the modal including the YouTube video meta load on every single WP Admin page load, even though it is never displayed.

The current workaround / fix in my child theme is to remove the action that renders the HTML in the footer:

if ( ! get_option( '_bb_is_update' ) ) {
	remove_action( 'admin_footer', [ buddypress()?->admin, 'bb_display_update_plugin_information' ] );
}

noplanman avatar Sep 04 '22 01:09 noplanman