strangerstudios / pmpro-nav-menus

Creates member navigation menus and swaps your theme's navigation based on a user's Membership Level
https://www.paidmembershipspro.com/add-ons/pmpro-nav-menus/
14 stars 15 forks source link

MMPU Compatibility #12

Closed dparker1005 closed 4 years ago

dparker1005 commented 5 years ago

Currently, this add-on only looks at the earliest active membership level held by the user to determine what menu items should show. It is not immediately clear what a MMPU-compatible version of this plugin would look like since there are a couple of ways to go about doing it:

  1. Create a menu for each combination of membership levels (though this will result in potentially a huge menu page)
  2. Have some kind of priority system to rank which menu should be shown if a user has multiple memberships
  3. Just have a single menu and for each element in it, select the levels for which it should be shown (similar to how we currently restrict pages)

Needs thought.

dparker1005 commented 4 years ago

User requested this update, should notify when a workaround is in place: https://www.paidmembershipspro.com/forums/topic/nav-bar-priority-by-level/#post-230843

dparker1005 commented 4 years ago

Implemented workaround here: https://github.com/strangerstudios/pmpro-nav-menus/pull/14 Example Gist for using workaround: https://gist.github.com/dparker1005/c75111de817cf2b6b16494ce3569f59e

class-pmpro-nav-menu-widget.php was not yet updated to be MMPU compatible in any way.

We also probably want a more built-in solution for full MMPU compatibility, likely either strategy 2 or 3 above

dparker1005 commented 4 years ago

Filter added in v.3.4