Changeset 14731
- Timestamp:
- 05/18/2010 10:14:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r14730 r14731 1463 1463 break; 1464 1464 case 'set-post-thumbnail': 1465 $post_ id= intval( $_POST['post_id'] );1466 if ( !current_user_can( 'edit_post', $post_ id) )1465 $post_ID = intval( $_POST['post_id'] ); 1466 if ( !current_user_can( 'edit_post', $post_ID ) ) 1467 1467 die( '-1' ); 1468 1468 $thumbnail_id = intval( $_POST['thumbnail_id'] ); 1469 1469 1470 check_ajax_referer( "set_post_thumbnail-$post_ id" );1470 check_ajax_referer( "set_post_thumbnail-$post_ID" ); 1471 1471 1472 1472 if ( $thumbnail_id == '-1' ) { 1473 delete_post_meta( $post_ id, '_thumbnail_id' );1473 delete_post_meta( $post_ID, '_thumbnail_id' ); 1474 1474 die( _wp_post_thumbnail_html() ); 1475 1475 } … … 1478 1478 $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ); 1479 1479 if ( !empty( $thumbnail_html ) ) { 1480 update_post_meta( $post_ id, '_thumbnail_id', $thumbnail_id );1480 update_post_meta( $post_ID, '_thumbnail_id', $thumbnail_id ); 1481 1481 die( _wp_post_thumbnail_html( $thumbnail_id ) ); 1482 1482 }
Note: See TracChangeset
for help on using the changeset viewer.