[wp-trac] [WordPress Trac] #40474: wp_ajax_(action) hook doesn't work in media gallery
WordPress Trac
noreply at wordpress.org
Tue Apr 18 09:16:52 UTC 2017
#40474: wp_ajax_(action) hook doesn't work in media gallery
--------------------------+-----------------------------
Reporter: hoandang | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 4.7.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Step to reproduce:
1. Open an image in Grid view mode
2. Change image title
3. Add this hook in functions.php
{{{#!php
<?php
add_action('wp_ajax_save-attachment', function($array, $int) {
var_dump('save-attachment');
}, 10, 2);
}}}
Expected: A var_dump result in http network.
Actual: http always responses {"success":true}
[[Image(https://doc-10-48-docs.googleusercontent.com/docs/securesc/ie7eo0n79gvn00ujkkueh6rd6bvedsbl/9e17est6nulkdde5iu0pvale99ina839/1492502400000/01498900461186215144/02963741754222276666/0B74Z16Mr59K5eUx4WU9Fb0x5WUU?e=view&nonce=3kg7l6jsf25pq&user=02963741754222276666&hash=lr8b0ro18bvsg43hmnmrqj3ptn67tilt)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40474>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list