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

git-svn-id: http://core.svn.wordpress.org/trunk@20888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-05-24 21:38:01 +00:00
parent 9f97ddf45c
commit d928ce089a
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 ) )