• How can I pass three variables when ‘admin_menu’ is run without creating an additional function in functions.php?

    Function located in plugins folder:

    function set_options($i_name, $i_folder, $sub_folder){
         if( file_exists(WP_PLUGIN_DIR.'/'.$i_folder.'/'.$i_name) ){
              return true;
         }else{
              return false;
         }
    }

    Add_action located in theme functions.php:
    add_action('admin_menu', 'set_options', 10, 3);

  • The topic ‘add_action() Help’ is closed to new replies.