Menus: Fix link expiration error

This snippet for the menus add-on fixes the “The link you followed has expired” error that is caused by some themes / plugins.

Currently fixed:

  • Salient theme by Nectar (2020-07-13)

 

/**
	@brief		Umhook things that interfere with the menus add-on.
	@since		2020-07-13 09:51:26
**/
function bc_fix_link_expiration_error()
{
	/**
		@brief		Nectar themes.
		@since		2020-07-13 09:52:39
	**/
	remove_action( 'wp_update_nav_menu_item', 'nectar_nav_button_style_update', 10, 3 );
}
add_action( 'broadcast_menus_manipulate_menu_item_setup', 'bc_broadcast_menus_manipulate_menu_item_setup' );
add_action( 'broadcast_menus_copy_menus', 'bc_fix_link_expiration_error' );