Astra_Ext_Nav_Menu_Loader::load_scripts()
Load page builder scripts and styles.
Description
Return
(void)
Source
File: addons/nav-menu/classes/class-astra-ext-nav-menu-loader.php
public function load_scripts() { $menu_locations = get_nav_menu_locations(); foreach ( $menu_locations as $menu_id ) { $nav_items = wp_get_nav_menu_items( $menu_id ); if ( ! empty( $nav_items ) ) { foreach ( $nav_items as $nav_item ) { if ( isset( $nav_item->megamenu_template ) && '' != $nav_item->megamenu_template ) { $page_builder_base_instance = Astra_Addon_Page_Builder_Compatibility::get_instance(); $page_builder_instance = $page_builder_base_instance->get_active_page_builder( $nav_item->megamenu_template ); if ( is_callable( array( $page_builder_instance, 'enqueue_scripts' ) ) ) { $page_builder_instance->enqueue_scripts( $nav_item->megamenu_template ); } } } } } }
Expand full source code Collapse full source code View on Trac