OnPoint Plugins

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

Advanced Sidebar Menu – Version 8 Migration Guide

All previous functionality and data remains intact and requires no special process to continue using everything as is. If you have not extended the plugin via code, there is nothing you need to worry about.

There have been some code changes which require special considerations if you are extending the plugin via filters/actions or using classes directly.

New namespace structure

Previously, to support PHP 5.2, classes had long names such as Advanced_Sidebar_Menu_Menus_Page and every class lived in the root namespace. Now every class has been moved into the Advanced_Sidebar_Menu namespace and has a name which matches the file.

Converting the old class names to namespaces may be done like so:

  1. Change Advanced_Sidebar_Menu_ to Advanced_Sidebar_Menu\
  2. The PRO version shares the same namespace as basic so remove the Pro_ from any applicable class names.
  3. Replace the _ after the directory name with \. For example, if the class has Widget_ in the name you change Widget_ to Widget\.

Any direct calls within your filters to plugin classes must be updated to use the new name-spaced structure. For example Advanced_Sidebar_Menu_Menus_Page is now \Advanced_Sidebar_Menu\Menus\Page.

Default styling

From the beginning there was an option to enable the plugin’s default styling for widgets. The styles were very rudimentary and did not match individual sites very well. As part of our continued effort to introduce more dynamic styling, the default styles were removed in version 8.

If you would like to continue to use the default styling, you may add the following CSS to your site:

CSS

New actions and filters

While the majority of non previously deprecated actions/filters remain intact, some really old ones have been renamed from their snake-case structure to the modern slashed structure to follow current patterns.

Here is a list of actions/filters (in no particular order) which have been updated:

  1. advanced_sidebar_menu_post_type => advanced-sidebar-menu/menus/page/post-type
  2. advanced_sidebar_menu_available_post_types => advanced-sidebar-menu-pro/widget-options/page/post-type/available-post-types
  3. advanced_sidebar_menu_excluded_pages => advanced-sidebar-menu/menus/page/excluded
  4. advanced_sidebar_menu_after_widget_form => advanced-sidebar-menu/widget/page/right-column
  5. advanced_sidebar_menu_page_widget_output => advanced-sidebar-menu/menus/page/output
  6. advanced_sidebar_menu_top_parent => advanced-sidebar-menu/menus/page/top-parent
  7. advanced_sidebar_menu_page_order => advanced-sidebar-menu/menus/page/order
  8. advanced_sidebar_menu_order_by => advanced-sidebar-menu/menus/page/order-by
  9. advanced_sidebar_menu_widget_pre_render => advanced-sidebar-menu/widget/before-render
  10. advanced_sidebar_menu_category_widget_output => advanced-sidebar-menu/menus/category/output
  11. advanced_sidebar_menu_excluded_categories => advanced-sidebar-menu/menus/category/excluded
  12. advanced_sidebar_menu_first_level_category => advanced-sidebar-menu/menus/category/is-first-level-term
  13. advanced_sidebar_menu_category_order => advanced-sidebar-menu/menus/category/order
  14. advanced_sidebar_menu_category_orderby => advanced-sidebar-menu/menus/category/order-by
  15. advanced_sidebar_menu_taxonomy => advanced-sidebar-menu/menus/category/taxonomy
  16. advanced_sidebar_menu_category_ids => advanced-sidebar-menu/menus/category/included-term-ids
  17. advanced_sidebar_menu_widget_title => advanced-sidebar-menu/menus/widget-title
  18. advanced_sidebar_menu_category_widget_update => advanced-sidebar-menu/widget/category/update
  19. advanced_sidebar_menu_page_widget_update => advanced-sidebar-menu/widget/page/update
  20. advanced_sidebar_menu_template_part => advanced-sidebar-menu/core/get-template-part
  21. advanced_sidebar_menu_list_pages_args => advanced-sidebar-menu/list-pages/parse-args
  22. advanced_sidebar_menu_page_ancestor => advanced-sidebar-menu/list-pages/is-current-page-ancestor
  23. advanced_sidebar_menu_font_weights => advanced-sidebar-menu/styles/font-weights
  24. advanced_sidebar_menu_bullet_types => advanced-sidebar-menu/styles/bullet_types
  25. advanced_sidebar_menu_accordion_styles => advanced-sidebar-menu/styles/accordion

Related Content

  • Advanced Sidebar Menu
    • Gutenberg Blocks
    • Usage
    • Developer Docs
    • PRO - Usage
    • PRO - Developer Docs
    • Version 8 - Migration Guide
    • Changelog
Go PRO

Latest Articles

Advanced Sidebar – Gutenberg Blocks

Advanced Sidebar Menu – Version 8.9

Advanced Sidebar Menu – Version 8.8

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

  • Plugins
  • Blog
  • Contact