Support » Requests and Feedback » $page_hook – issue

  • I installed wp-cache plugin on a WP install v1.5. This plugin integrates itself into wp-admin in option under WP-cache section. I does that using
    add_action(‘admin_menu’, ‘wp_cache_add_pages’);
    Anyway the proble was that I already had a plugin that was integrated too in the same manner and stopped working after I activated wp-cache.
    Why? (it took me some time but found it)
    A global variable called $page_hook was being overridden in the file menu-header.php arround the line 42 (where the submenu is created). So no matter what section I was selecting only the last one was being dispalyed.
    Solution.
    I changed the name of that variable $page_hook into $local_page_hook in the file menu-header.php


    if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}")) {
    $local_page_hook = get_plugin_page_hook($item[2], $parent_file);
    if ( $local_page_hook )
    ....

    (I don’t think this will affect other stuff as long as it is used only to create that submenu)

    Maybe this is a bug. Maybe not. Maybe this will help someone.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘$page_hook – issue’ is closed to new replies.