Creatign plugin
-
Hi,
I’m creating a plugins. Works well but I have to add created tab/functionaliy not only to admin. I read manuals, watched tutorials and checked how are another plugins coded but I can’t find this command.The begining of my plugins is like that:
// Hook for adding admin menus add_action('admin_menu', 'ekspertyzy'); // action function for above hook function ekspertyzy() { // Add a new top-level menu (ill-advised): add_menu_page(__('Ekspertyzy'), __('Ekspertyzy'), 'manage_options', 'eksperises', 'ekspertyzy_page' ,'',4); } wp_register_style('myStyleSheet', plugins_url('/ekspertyzy/a_styles.css'), __FILE__); wp_enqueue_style( 'myStyleSheet'); // mt_toplevel_page() displays the page content for the custom Test Toplevel menu function ekspertyzy_page() { //here a code for plugin... }
I was trying to replace
add_action('admin_menu', 'ekspertyzy');
with something like
add_action('admin_menu, author_menu', 'ekspertyzy');
but didn’t find right command.
How can I implement this for authors? Not only for admin.
Regards,
Marcin
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Creatign plugin’ is closed to new replies.