mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
_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:
parent
9f97ddf45c
commit
d928ce089a
@ -303,7 +303,8 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
|
|||||||
* POST-based Ajax handlers.
|
* 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));
|
$taxonomy = get_taxonomy(substr($action, 4));
|
||||||
check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
|
check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
|
||||||
if ( !current_user_can( $taxonomy->cap->edit_terms ) )
|
if ( !current_user_can( $taxonomy->cap->edit_terms ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user