wp_ajax_get_comments [ WordPress Function ]
wp_ajax_get_comments ( $action )
| Defined at: |
|
Soorgelijke functies: wp_ajax_edit_comment, wp_ajax_delete_comment, wp_ajax_replyto_comment, wp_ajax_dim_comment, get_comments
No description yet.
Source
<?php
function wp_ajax_get_comments( $action ) {
global $wp_list_table, $post_id;
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( -1 );
$wp_list_table->prepare_items();
if ( !$wp_list_table->has_items() )
wp_die( 1 );
$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 ]
Top Google zoekresultaten
- PHPXRef 0.7 : WordPress : Detail view of ajax-actions.php
wp_ajax_get_comments() wp_ajax_replyto_comment() wp_ajax_edit_comment() wp_ajax_add_menu_item() wp_ajax_add_meta() wp_ajax_add_user() ...
phpxref.ftwr.co.uk - Docs for page ajax-actions.php
/wp-admin/includes/ajax-actions.php. Description. Description | ...
phpdoc.wordpress.org - Загрузка комментариев после загрузки всей страницы | Русский ...
29 сен 2011 ... add_action('wp_ajax_get_comments','cd_get_comments'); add_action(' wp_ajax_nopriv_get_comments','cd_get_comments'); function ...
cosydale.com - _wp_auto_add_pages_to_menu - WPSeek | wpseek.com
Similar Functions: wp_page_menu, wp_widgets_add_menu, wp_admin_bar_edit_menu, wp_admin_bar_site_menu, wp_ajax_get_comments . Automatically ...
wpseek.com