Changeset 28292
- Timestamp:
- 05/06/2014 03:18:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r28213 r28292 639 639 640 640 check_ajax_referer( 'add-tag', '_wpnonce_add-tag' ); 641 $post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post';642 641 $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; 643 642 $tax = get_taxonomy($taxonomy); … … 879 878 880 879 $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; 881 $comments_status = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';882 883 880 $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; 884 881 $wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); … … 1123 1120 function wp_ajax_hidden_columns() { 1124 1121 check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' ); 1125 $hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : ''; 1126 $hidden = explode( ',', $_POST['hidden'] ); 1122 $hidden = explode( ',', isset( $_POST['hidden'] ) ? $_POST['hidden'] : '' ); 1127 1123 $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; 1128 1124 … … 1333 1329 $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) ); 1334 1330 1335 $mode = $_POST['post_view'];1336 1337 1331 $level = 0; 1338 1332 $request_post = array( get_post( $_POST['post_ID'] ) ); … … 1396 1390 1397 1391 function wp_ajax_find_posts() { 1398 global $wpdb;1399 1400 1392 check_ajax_referer( 'find-posts' ); 1401 1393 … … 1404 1396 1405 1397 $s = wp_unslash( $_POST['ps'] ); 1406 $searchand = $search = '';1407 1398 $args = array( 1408 1399 'post_type' => array_keys( $post_types ), … … 1710 1701 $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0; 1711 1702 1712 $post = $post_type =null;1703 $post = null; 1713 1704 1714 1705 if ( $post_id ) 1715 1706 $post = get_post( $post_id ); 1716 1717 if ( $post )1718 $post_type = $post->post_type;1719 elseif ( isset( $_POST['post_type'] ) && post_type_exists( $_POST['post_type'] ) )1720 $post_type = $_POST['post_type'];1721 1707 1722 1708 check_ajax_referer('update-post_' . $post_id, '_wpnonce'); … … 1968 1954 wp_send_json_error(); 1969 1955 1970 $post = get_post( $post_id, ARRAY_A );1971 1972 1956 foreach ( $attachments as $attachment_id => $menu_order ) { 1973 1957 if ( ! current_user_can( 'edit_post', $attachment_id ) ) … … 2012 1996 2013 1997 $rel = $url = ''; 2014 $html = $title =isset( $attachment['post_title'] ) ? $attachment['post_title'] : '';1998 $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : ''; 2015 1999 if ( ! empty( $attachment['url'] ) ) { 2016 2000 $url = $attachment['url'];
Note: See TracChangeset
for help on using the changeset viewer.