WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] http_get for a plugin (4 posts)

  1. whooami
    Member
    Posted 6 years ago #

    oh dear.

    So ok, I need to be able to RELOAD a page added via a plugin, like so:

    wp-admin/this.php?page=that.php?action=some&thing=5

    However I get a friendly message telling me :

    Cannot load that.php?action=some.

    complete with the period.

    is there a way to to do this?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    wp-admin/this.php?page=that.php?action=some&thing=5

    So... your variables are:
    page = 'that.php?action=some'
    thing = '5'

    Somehow, I don't think that was what you wanted.

    You can't include a second question mark in a URL like that. Are you trying to pass query variables to that.php? If so, then you'll need to have this.php recognize and pass along those query variables itself.

  3. whooami
    Member
    Posted 6 years ago #

    Yeah, I typo'd.

    pages added to wp-admin typically are added as subpages, ie, like so:

    .../wp-admin/options-general.php?page=thing.php

    where thing.php is the added plugin page, and options-general.php is the parent page.

    My variables are action=some AND thing=5 and I need those to be sent to this.php which is a child of a regular admin page.

    The url ends up being like this:

    ...wp-admin/parent.php?page=child.php?action=somet&thing=1

    but hmm.. the second question mark .. I just read that. :)

    Lets go see :)

    --

    that was it, thank you Otto! Ive been working on this thing for way too long.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Again, you can't do that. You cannot include a second question mark in the URL.

    Do it like this instead.
    /wp-admin/parent.php?page=child.php&action=somet&thing=1

    The parent.php is not redirecting you to child.php. Child.php is being loaded by parent.php. This makes all the difference.

    Edit: I see your edit. Glad it works. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.