[wp-trac] [WordPress Trac] #34799: Tell admin-post.php to check for $_REQUEST['action2'] ?

WordPress Trac noreply at wordpress.org
Fri Nov 27 10:05:57 UTC 2015


#34799: Tell admin-post.php to check for $_REQUEST['action2'] ?
----------------------------+-----------------------------
 Reporter:  jlambe          |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 In plugin development, we can handle POST requests through the `admin-
 post.php` file. This file is looking after an input with a name of
 `action` so we can register a custom hook to handle the POST request.

 After looking at the WP_List_Table, the bulk "select" '''top''' tag has a
 name attribute of `action`. So for custom development, the form where the
 list table fit can easily point to `admin-post.php` and we can handle the
 bulk POST request through a custom hook and it works.

 But here is the issue, if users use the "select" '''bottom''' tag for
 their bulk action, it won't work because the bottom select tag has a name
 attribute of `action2`. So if a POST request to `admin-post.php`, we can
 no longer listen to a custom hook to manipulate the request and its data.

 So I'm asking if it will be ok to update the `admin-post.php` file to
 check after a `$_REQUEST['action2']` as well?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34799>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list