Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_ajax_get_comments [ WordPress Function ]

wp_ajax_get_comments ( $action )
Defined at:



No description yet.

Source


<?php
function wp_ajax_get_comments$action ) {
    global 
$wp_list_table$post_id;
    if ( empty( 
$action ) )
        
$action 'get-comments';

    
check_ajax_referer$action );

    
set_current_screen'edit-comments' );

    
$wp_list_table _get_list_table('WP_Post_Comments_List_Table');

    if ( !
current_user_can'edit_post'$post_id ) )
        
wp_die( -);

    
$wp_list_table->prepare_items();

    if ( !
$wp_list_table->has_items() )
        
wp_die);

    
$x = new WP_Ajax_Response();
    
ob_start();
    foreach ( 
$wp_list_table->items as $comment ) {
        if ( ! 
current_user_can'edit_comment'$comment->comment_ID ) )
            continue;
        
get_comment$comment );
        
$wp_list_table->single_row$comment );
    }
    
$comment_list_item ob_get_contents();
    
ob_end_clean();

    
$x->add( array(
        
'what' => 'comments',
        
'data' => $comment_list_item
    
) );
    
$x->send();
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics