Viewing 15 replies - 16 through 30 (of 34 total)
  • Erm. Only way to tell for sure would be to download Strayhorn and diff it against your installation.

    Thread Starter jpigford

    (@jpigford)

    Blah, yeah…I am using 1.5 strayhorn…

    {scurries off to start debugging}

    Thread Starter jpigford

    (@jpigford)

    Okay, i’m echoing $page_hook for one of the pages and got this:

    options_page_BAStats/BAStats

    for this page:

    https://www.website.com/wp-admin/options-general.php?page=BAStats/BAStats.php

    How about the “subscribe-to-comments” one, since that one isn’t a subdirectory (and, I have it installed in my installation :])? What might also be useful would be dumping the page_hook calculated from within the add_menu_page() function to compare it.

    Thread Starter jpigford

    (@jpigford)

    subscribe-to-comments shows “options_page_subscribe-to-comments”

    I will say this…I have that Contact Form plugin and it’s URL is:

    admin.php?page=options-contactform.php

    as opposed to the others being

    options-general.php?page=…….

    Not sure exactly what that means but the admin.php plugin isn’t having trouble while the options-general.php ones are…

    Also, pardon my ignorance but you what dyou mean dump the page_hook?

    Right now I have:

    if (isset($_GET[‘page’])) {
    $plugin_page = plugin_basename($_GET[‘page’]);
    $page_hook = get_plugin_page_hook($plugin_page, $pagenow);
    echo $page_hook;

    to echo things.

    Also, pardon my ignorance but you what dyou mean dump the page_hook?

    Yup, precisely.

    Thread Starter jpigford

    (@jpigford)

    Haha…sorry, was typing WAY to fast…again:

    “Also, pardon my ignorance, by what do you mean dump the page_hook?”

    No, you’re fine. What you have is precisely what I intended :).

    Thread Starter jpigford

    (@jpigford)

    alrighty….so do you have a solution to my problem or what? ?? (kidding)

    alrighty….so did you “dump[ing] the page_hook calculated from within the add_menu_page() function to compare it” or what? ??

    Thread Starter jpigford

    (@jpigford)

    I think i’m confused about your use of “dump”…the only thing I’ve done is add the echo $page_hook; to the add_menu_page() function as well as the:

    // Handle plugin admin pages.
    if (isset($_GET[‘page’])) {

    The only thing I’ve seen is the “options_page_subscribe-to-comments” that gets echoed at the top of the page.

    Ah. But it’s only printing it once? That’s interesting, there’d have to be more than one if you’ve got 2 echos. Make sure you have echos in all conditional paths in the admin.php file, and make sure you cna tell the echos apart (e.g. echo "1. $page_hook"; for one and echo "2. $page_hook"; for another).

    Thread Starter jpigford

    (@jpigford)

    My admin.php looks like this:

    https://www.codepaste.net/54

    And my add_menu_page() function in admin-functions.php looks like this:

    https://www.codepaste.net/55

    With that I’m only getting the number 1.

    Hmm, wait a sec… which version of Subscribe To is that? The latest preview is only for 1.5.1, and as far as I know that’s the only one that has an admin interface.

    Then again, maybe not… after further reading it appears it “works with caveats”.

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘I can’t get to pages in the Admin that use Dir/file.php’ is closed to new replies.