_wp_ajax_add_hierarchical_term() no longer gets passed an action, so pull it from POST. see #20699.

git-svn-id: https://develop.svn.wordpress.org/trunk@20888 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-05-24 21:38:01 +00:00
parent 90e5ed949b
commit ea4b2a2452
1 changed files with 2 additions and 1 deletions

View File

@ -303,7 +303,8 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
* POST-based Ajax handlers.
*/
function _wp_ajax_add_hierarchical_term( $action ) {
function _wp_ajax_add_hierarchical_term() {
$action = $_POST['action'];
$taxonomy = get_taxonomy(substr($action, 4));
check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
if ( !current_user_can( $taxonomy->cap->edit_terms ) )