Changeset 9103 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 10/08/08 23:32:34 (2 months ago)
- Files:
-
- trunk/wp-admin/admin-ajax.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r9098 r9103 466 466 if ( ! $comment ) die('1'); 467 467 468 $mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail'; 468 $modes = array( 'single', 'detail', 'dashboard' ); 469 $mode = isset($_POST['mode']) && in_array( $_POST['mode'], $modes ) ? $_POST['mode'] : 'detail'; 469 470 $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; 470 471 $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; … … 476 477 477 478 ob_start(); 478 _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox ); 479 if ( 'dashboard' == $mode ) { 480 require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); 481 _wp_dashboard_recent_comments_row( $comment, false ); 482 } else { 483 _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox ); 484 } 479 485 $comment_list_item = ob_get_contents(); 480 486 ob_end_clean();
