diff --git a/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php b/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php index bca05f7e..74500d31 100644 --- a/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php +++ b/modules/presspermit-collaboration/classes/Permissions/Collab/NavMenus.php @@ -10,7 +10,12 @@ function __construct() { add_filter('get_user_option_nav_menu_recently_edited', [$this, 'fltNavMenuRecent']); add_filter('pre_update_option_nav_menu_options', [$this, 'fltUpdateNavMenuOptions'], 10, 2); - add_filter('update_post_metadata', [$this, 'fltUpdateNavMenuItemParent'], 10, 5); + + if (!defined('PP_NAV_MENU_DISABLE_POSTMETA_FILTER') && (!class_exists('NestedPages') || defined('PP_NAV_MENU_ENABLE_POSTMETA_FILTER'))) { + add_filter('update_post_metadata', [$this, 'fltUpdateNavMenuItemParent'], 10, 5); + } + + do_action('presspermit_nav_menu_filters'); } public function fltNavMenuRecent($opt)