WordPress.org

Ready to get started?Download WordPress

Forums

Possible bug in /wp-admin/includes/media.php (1 post)

  1. wordpress4you
    Member
    Posted 5 years ago #

    Hello.

    I can't know for sure but it look like there's a bug/oversight in /wp-admin/includes/media.php.

    The media inserting pop-up iframe has 4 (or 3 depending of if there are any media attached to the post) tabs. Each tab have a form (I mean <form .. > ..</form>). Each form has $form_action_url as form action. But only 2 of 4 tabs ("From Computer" and "From URL") has media_upload_form_url filter applied to $form_action_url variable.

    I'm sorry if I bothered you in vain but to my mind it will be obvious if each form action will have these filter so this media inserting dialog pop-up can be utilized for plug-ins use.

    For developers who also faced this bug:

    Here is my solution overcome this bug without touching /wp-admin/includes/media.php.

    Why calling the pop-up you can add a $_GET variable to request string and then use _wp_http_referer variable to track if the pop-up was opened with your code or with generic WP posing routine.

    Of course it is not too pretty but I don't see other solutions unless this bug will not be fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic