[wp-trac] [WordPress Trac] #31236: wp_ajax_upload_attachment does not properly handle situation when post_id is set
WordPress Trac
noreply at wordpress.org
Wed Mar 18 14:32:30 UTC 2015
#31236: wp_ajax_upload_attachment does not properly handle situation when post_id
is set
-------------------------------------+------------------
Reporter: johncacpro | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: Media | Version: 4.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+------------------
Comment (by helen):
Replying to [comment:4 joemcgill]:
The magic is in `func_get_args()`, which allows for variable length arg
lists. In whatever decade we'll get to be 5.6+, it'll be easier to
understand that from the function definition instead of having to look
inside the function. See
http://php.net/manual/en/functions.arguments.php#functions.variable-arg-
list
Meta caps are quite powerful, as they can be controlled at a very granular
level - note the singular name for the capability instead. I find it quite
readable - can the current user edit the post with the ID of X. Just don't
judge the readability of code that filters meta caps. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31236#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list