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 #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_admin_menu action.
*/
add_action(
'learndash_admin_menu',
function( $parent_slug ) {
// May add any custom logic using $parent_slug
}
);
Changelog #
| Version | Description |
|---|---|
| 2.4.0 | Introduced. |