LLMS_Nav_Menus::__construct()

Constructor.


Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.nav.menus.php

	public function __construct() {

		// Filter menu items on frontend to add real URLs to menu items.
		add_filter( 'wp_nav_menu_objects', array( $this, 'filter_nav_items' ) );

		// Add meta box to the Appearance -> Menus screen on admin panel.
		add_action( 'admin_head-nav-menus.php', array( $this, 'add_metabox' ) );

		// Add LifterLMS menu item type section to customizer.
		add_filter( 'customize_nav_menu_available_item_types', array( $this, 'customize_add_type' ) );

		// Add LifterLMS menu items links to the customizer.
		add_filter( 'customize_nav_menu_available_items', array( $this, 'customize_add_items' ), 10, 4 );

		// Add active classes for nav items for catalog pages.
		add_filter( 'wp_nav_menu_objects', array( $this, 'menu_item_classes' ) );

		// Register block.
		add_action( 'init', array( $this, 'register_block' ) );

		// Render block.
		add_filter( 'render_block', array( $this, 'render_block' ), 10, 2 );

		// Load menu items data in block editor.
		add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
7.3.0 Change render_block_llms/navigation-link to render_block for compatibility with LLMS block visibility.
7.2.0 Add navigation link block and enqueue block editor assets.
7.1.0 Postpone the LifterLMS menu meta box addition to admin_head-nav-menus.php rather than load-nav-menus.php it's not initially hidden (for new users).
3.22.0 Unknown.
3.14.7 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.