Changeset 30167
- Timestamp:
- 11/01/2014 10:47:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r30155 r30167 104 104 */ 105 105 function wp_ajax_ajax_tag_search() { 106 if ( isset( $_GET['tax'] ) ) { 107 $taxonomy = sanitize_key( $_GET['tax'] ); 108 $tax = get_taxonomy( $taxonomy ); 109 if ( ! $tax ) 110 wp_die( 0 ); 111 if ( ! current_user_can( $tax->cap->assign_terms ) ) 112 wp_die( -1 ); 113 } else { 106 if ( ! isset( $_GET['tax'] ) ) { 114 107 wp_die( 0 ); 108 } 109 110 $taxonomy = sanitize_key( $_GET['tax'] ); 111 $tax = get_taxonomy( $taxonomy ); 112 if ( ! $tax ) { 113 wp_die( 0 ); 114 } 115 116 if ( ! current_user_can( $tax->cap->assign_terms ) ) { 117 wp_die( -1 ); 115 118 } 116 119 … … 1143 1146 if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) ) 1144 1147 wp_die( 1 ); 1145 1148 1146 1149 // If the post is an autodraft, save the post as a draft and then 1147 1150 // attempt to save the meta.
Note: See TracChangeset
for help on using the changeset viewer.