The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

$page_hook - issue (2 posts)

  1. mihaigrigori
    Posted 10 years ago #

    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.
    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.

  2. moshu
    Posted 10 years ago #

    WP install v1.5...
    It seems you hit a similar problem as this poster:
    Maybe upgrading to 1.5.2 would be a good idea.

Topic Closed

This topic has been closed to new replies.

About this Topic