learndash_login_menu_item_atts

apply_filters( 'learndash_login_menu_item_atts',  array $shortcode_atts,  WP_Post $menu_item,  array $menu_args )

Filters menu_item attributes before they are applied.


Description #


Parameters #

$shortcode_atts

(array) Shortcode array containing url, label, etc.

$menu_item

(WP_Post) WP_Post object for menu item.

$menu_args

(array) An array of arguments related to menu being processed / displayed.


Source #

File: includes/ld-misc-functions.php


Examples #

 <?php
/**
 * Example usage for learndash_login_menu_item_atts filter.
 */
add_filter(
	'learndash_login_menu_item_atts',
	function( $shortcode_atts, $menu_item, $menu_args ) {
		// May add any custom logic using $shortcode_atts, $menu_item, $menu_args.

		// Always return $shortcode_atts.
		return $shortcode_atts;
	},
	10,
	3
);
 

Changelog #

Changelog
Version Description
2.0.7 Introduced.