OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In

Advanced Sidebar Menu – Version 8.9

June 17, 2022

Version 8.9 of the Advanced Sidebar Menu plugin is now available and ready for general use.

Version 8.9 focused on proving a more robust API for working with excluded menu items.

Excluding of Individual Items

From the beginning, it has always been possible to provide a list of excluded ids to the various widgets using filters or settings. This version introduced the ability to target specific ids for exclusion without requiring a list of all excluded.

New Filters

Each widget now has its own filter for excluding an item or cancelling exclusion of an item without filtering the full excluded list.

advanced-sidebar-menu/menus/page/is-excluded

Filter whether an individual page is excluded from the widgets. Used to exclude/include an item outside of the excluded pages settings.

Accepts 5 arguments:

  1. If the page is excluded. bool
  2. Id of the page. int
  3. The widget arguments. array
  4. The widget values. array
  5. The full menu object. Menu_Abstract

advanced-sidebar-menu/menus/category/is-excluded

Filter whether an individual term is excluded from the widgets. Used to exclude/include an item outside of the excluded category settings.

Accepts 5 arguments:

  1. If the term is excluded. bool
  2. Id of the page. int
  3. The widget arguments. array
  4. The widget values. array
  5. The full menu object. Menu_Abstract

advanced-sidebar-menu/menus/navigation/is-excluded

Filter whether an individual navigation menu item is excluded from the widgets. Used to exclude/include an item outside of the excluded menu item settings.

Note: A navigation menu item id is not the same as a page or term id.

Accepts 5 arguments:

  1. If the menu item is excluded. bool
  2. Id of the menu item. int
  3. The widget arguments. array
  4. The widget values. array
  5. The full menu object. Menu_Abstract

New Method

A new Navigation::is_excluded method has been introduced to allow checking if the navigation item is excluded. When called, the method automatically calculates the type of menu item being checked and honors the corresponding filters and settings.

PHP

Navigation Menu Item Improvements

Introduced an Item::get_level method for retrieving the level of the menu an item resides in. Returns a numeric representation of a level as follows:

  • 1: top
  • 2: child
  • 3: grandchild
  • 4: great grandchild
  • 5:…. etc.
PHP

Added a $levels parameter to the Item::get_parent method. Allows retrieval of higher levels of grandparents like so:

  • 1: parent
  • 2: grandparent
  • 3: great-grandparent
  • 4: etc….
PHP

Introduced an Item::get_parent_id method. Simple retrieval of the parent menu item’s id.

PHP

Miscellaneous

  • Made is_in_current_hierarchy honor missing parents and menu items.
  • Tested to WordPress core version 6.0.0.

Filed Under: Products, WordPress

« Retrieving Account Access For a Discontinued Email
Go Live Update Urls – Version 6.7 »

Find Something

Categories

Follow Us

Subscribe to get the latest news and updates.

Follow

Latest Articles

Advanced Sidebar Menu – Version 9.1

Advanced Sidebar – Gutenberg Blocks

Advanced Sidebar Menu – Version 8.8

© 2023 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact