Manish Basdeo
Manish Basdeo

Reputation: 6269

What does the following do_action mean in wordpress?

I wanted my Google Analytics plugin to appear in the author role . I gave the manage_option capability to the author and the plugins do appear. However, I fail to understand why the google analytics does not appear.. While debuggin i came across the

do_action('admin_menu', '');

in the wp_admin/includes/menu.php file and according to me this populates the additional plugins the admin activates.. However, I fail to understand where the function admin_menu is and why the google analytics plugin cannot appear .. I would appreciate some help

Upvotes: 0

Views: 338

Answers (1)

Gmajoulet
Gmajoulet

Reputation: 700

do_action executes a hook, somewhere in your code. If the hook isn't created, it can't be fired...

Upvotes: 1

Related Questions