Skip to content

Commit

Permalink
New constant, action for suppressing Nav Menu editing filters
Browse files Browse the repository at this point in the history
This workaround was needed for one customer using the Nested Pages plugin.
  • Loading branch information
agapetry committed Apr 23, 2020
1 parent c8f72fd commit 231578b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 231578b

Please sign in to comment.