WordPress.org

Ready to get started?Download WordPress

Forums

Admin menu item not reappearing (2 posts)

  1. benjt
    Member
    Posted 3 years ago #

    Hi there,

    So I am tweaking the Google Analyticator plugin. Since I don't want other users to have access to the options page, I removed the link under the Settings section of the Admin panel. I did that by simply commenting out the following code:

    // Hook in the options page function
    function add_ga_option_page() {
        $plugin_page = add_options_page(__('Google Analyticator Settings', 'google-analyticator'), 'Google Analytics', 'manage_options', basename(__FILE__), 'ga_options_page');
    
        # Include javascript on the GA settings page
        add_action('admin_head-' . $plugin_page, 'ga_admin_ajax');
    }

    In hindsight, I realize that instead of removing the link, it looks like that kept the options page from being created. However, I have uncommented that section, and the options page has not been restored.

    Is there anything else I need to do?

  2. worldofharry
    Member
    Posted 3 years ago #

    Remove '-' from the line below.
    add_action('admin_head-' . $plugin_page, 'ga_admin_ajax');

Topic Closed

This topic has been closed to new replies.

About this Topic