Skip to content

Instantly share code, notes, and snippets.

@dparker1005
Created December 10, 2019 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dparker1005/c75111de817cf2b6b16494ce3569f59e to your computer and use it in GitHub Desktop.
Save dparker1005/c75111de817cf2b6b16494ce3569f59e to your computer and use it in GitHub Desktop.
Example for using pmpronm_prioritize_levels filter.
<?php
// Copy from below here...
/*
* Example for using pmpronm_prioritize_levels filter.
*
* Will try to apply menu for level_id 3, then 2, then 1.
* Afterwards will check the rest of the user's levels in
* an undefined order.
*/
function my_pmpronm_prioritize_levels( $prioritized_levels ) {
return array( 3, 2, 1 );
}
add_filter( 'pmpronm_prioritize_levels', 'my_pmpronm_prioritize_levels' );
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Using the Nav Menus Add On in a Multiple Memberships Per User Environment" at Paid Memberships Pro here: https://www.paidmembershipspro.com/nav-menus-add-on-mmpu-multiple-memberships-per-user/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment