Created
December 10, 2019 11:35
-
-
Save dparker1005/c75111de817cf2b6b16494ce3569f59e to your computer and use it in GitHub Desktop.
Example for using pmpronm_prioritize_levels filter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/