Filter: group privacy

Hook
peepso_filter_group_privacy_settings_create

 

Plugin PeepSo Groups
Since 3.0.5.0
Status Active
Args
array

Description #

Yo uca use this filter to disable a privacy level for users when creating a group

  • 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
What are your feelings
Updated on Sep 22, 2023