PeepSo Documentation

Filter: community navigation

Hook
peepso_navigation

 

Plugin PeepSo Foundation
Since 1.8.5
Status Active
Args
array

Description

This filter is used to build the

  • desktop toolbar
  • desktop notification area
  • mobile hamburger menu
  • mobile notification area
  • “community links” section of the profile widget

You can append a new key-value pair to the result array. Key must be an unique string identifying your plugin. Value is an array with the following keys:

    • required
      • href – the URL of the link
      • label – the text label
      • icon – CSS class of an icon. Needs to work both as <i> and <span> and is needed for icon-only and the widget
    • optional
      • class – CSS class of the parent element
      • icon-only – whether the link should be just an icon – label is then ignored
      • count – count of notifications

Each link added to the stack is also required to have five TRUE/FALSE flags deciding which area it should render in:

  • primary
  • secondary
  • mobile-primary
  • mobile-secondary
  • widget

See screenshot below for better explaination

Depending on TRUE/FALSE value of each key, the link will be rendered in the given area. Third parties are generally advised not to use the “secondary” positions, because the layout will most likely break.

With this filter it is possible to have different links in the toolbar and the widget, although for consistency a link should always show both in the primaries and the widget – with optional admin switches to disable them.

Examples

Screenshot

Elements marked in red are managed by peepso_navigation, yellow marks peepso_navigation_profile. Mobile view on the left, desktop view on the right

peepso_navigation filter

peepso_navigation & peepso_navigation_profile

Get 10% off and a free eBook!

Subscribe to our newsletter to get a welcome discount:  10% off your first purchase* and receive a  free eBook:

"The Secrets Of Successful Online Communities"

* The discount code can only be used once, on a new purchase, not a renewal or upgrade. Promotions can't be combined.