post_comment_meta_box [ WordPress Function ]
post_comment_meta_box ( $post )
| Parameters: |
|
| Defined at: |
|
Soorgelijke functies: post_comment_meta_box_thead, post_comment_status_meta_box, post_custom_meta_box, post_format_meta_box, post_submit_meta_box
Display comments for post.
Source
<?php
function post_comment_meta_box($post) {
global $wpdb, $post_ID;
wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
?>
<p class="hide-if-no-js" id="add-new-comment"><a href="#commentstatusdiv" onclick="commentReply.addcomment(<?php echo $post_ID; ?>);return false;"><?php _e('Add comment'); ?></a></p>
<?php
$total = $wpdb->get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID));
$wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
$wp_list_table->display( true );
if ( 1 > $total ) {
echo '<p id="no-comments">' . __('No comments yet.') . '</p>';
} else {
$hidden = get_hidden_meta_boxes('post');
if ( ! in_array('commentsdiv', $hidden) ) {
?>
<script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
<?php
}
}
?>
<p class="hide-if-no-js hidden" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
<?php
wp_comment_trashnotice();
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- PHPXRef 0.7 : WordPress : Detail view of meta-boxes.php
post_comment_meta_box_thead() post_comment_meta_box() ...
phpxref.ftwr.co.uk - meta-boxes.php - PHP Cross Reference of WordPress Source - Yoast
post_comment_meta_box_thead() post_comment_meta_box() ...
xref.yoast.com - Docs for page meta-boxes.php
/wp-admin/includes/meta-boxes.php. Description. Description | ...
phpdoc.wordpress.org - trunk
... PclZipUtilTranslateWinPath · popuplinks · post_author_meta_box · post_categories_meta_box · post_comment_meta_box · post_comment_meta_box_thead ...
phpdoc.wordpress.org