learndash_admin_menu

do_action( 'learndash_admin_menu',  string $parent_slug )

Fires after the LearnDash menu and submenu are added.


Description #

Action added to trigger add-ons when LD menu and submenu items have been added to the system. This works better than trying to fiddle with priority on WP ‘admin_menu’ hook.


Parameters #

$parent_slug

(string) LearnDash menu parent slug.


Source #

File: includes/admin/class-learndash-admin-menus-tabs.php


Examples #

 <?php
/**
 * Example usage for learndash_admin_menu action.
 */
add_action(
	'learndash_admin_menu',
	function( $parent_slug ) {
		// May add any custom logic using $parent_slug

		echo '<div>Custom content or markup</div>';
	}
);
 

Changelog #

Changelog
Version Description
2.4.0 Introduced.