Make WordPress Core


Ignore:
Timestamp:
10/08/2008 11:32:34 PM (18 years ago)
Author:
ryan
Message:

Draggable dash, first cut. Props mdawaffe. see #7552

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r9098 r9103  
    466466        if ( ! $comment ) die('1');
    467467
    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';
    469470        $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1';
    470471        $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
    … …  
    476477
    477478        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                }
    479485                $comment_list_item = ob_get_contents();
    480486        ob_end_clean();
Note: See TracChangeset for help on using the changeset viewer.