當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Akismet::get_user_comments_approved方法代碼示例

本文整理匯總了PHP中Akismet::get_user_comments_approved方法的典型用法代碼示例。如果您正苦於以下問題:PHP Akismet::get_user_comments_approved方法的具體用法?PHP Akismet::get_user_comments_approved怎麽用?PHP Akismet::get_user_comments_approved使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Akismet的用法示例。


在下文中一共展示了Akismet::get_user_comments_approved方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: akismet_get_user_comments_approved

function akismet_get_user_comments_approved($user_id, $comment_author_email, $comment_author, $comment_author_url)
{
    _deprecated_function(__FUNCTION__, '3.0', 'Akismet::get_user_comments_approved()');
    return Akismet::get_user_comments_approved($user_id, $comment_author_email, $comment_author, $comment_author_url);
}
開發者ID:Didox,項目名稱:beminfinito,代碼行數:5,代碼來源:wrapper.php

示例2: comment_row_action

 public static function comment_row_action($a, $comment)
 {
     // failsafe for old WP versions
     if (!function_exists('add_comment_meta')) {
         return $a;
     }
     $akismet_result = get_comment_meta($comment->comment_ID, 'akismet_result', true);
     $akismet_error = get_comment_meta($comment->comment_ID, 'akismet_error', true);
     $user_result = get_comment_meta($comment->comment_ID, 'akismet_user_result', true);
     $comment_status = wp_get_comment_status($comment->comment_ID);
     $desc = null;
     if ($akismet_error) {
         $desc = __('Awaiting spam check', 'akismet');
     } elseif (!$user_result || $user_result == $akismet_result) {
         // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same
         if ($akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash') {
             $desc = __('Flagged as spam by Akismet', 'akismet');
         } elseif ($akismet_result == 'false' && $comment_status == 'spam') {
             $desc = __('Cleared by Akismet', 'akismet');
         }
     } else {
         $who = get_comment_meta($comment->comment_ID, 'akismet_user', true);
         if ($user_result == 'true') {
             $desc = sprintf(__('Flagged as spam by %s', 'akismet'), $who);
         } else {
             $desc = sprintf(__('Un-spammed by %s', 'akismet'), $who);
         }
     }
     // add a History item to the hover links, just after Edit
     if ($akismet_result) {
         $b = array();
         foreach ($a as $k => $item) {
             $b[$k] = $item;
             if ($k == 'edit' || $k == 'unspam' && $GLOBALS['wp_version'] >= 3.4) {
                 $b['history'] = '<a href="comment.php?action=editcomment&amp;c=' . $comment->comment_ID . '#akismet-status" title="' . esc_attr__('View comment history', 'akismet') . '"> ' . esc_html__('History', 'akismet') . '</a>';
             }
         }
         $a = $b;
     }
     if ($desc) {
         echo '<span class="akismet-status" commentid="' . $comment->comment_ID . '"><a href="comment.php?action=editcomment&amp;c=' . $comment->comment_ID . '#akismet-status" title="' . esc_attr__('View comment history', 'akismet') . '">' . esc_html($desc) . '</a></span>';
     }
     if (apply_filters('akismet_show_user_comments_approved', get_option('akismet_show_user_comments_approved'))) {
         $comment_count = Akismet::get_user_comments_approved($comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url);
         $comment_count = intval($comment_count);
         echo '<span class="akismet-user-comment-count" commentid="' . $comment->comment_ID . '" style="display:none;"><br><span class="akismet-user-comment-counts">' . sprintf(esc_html(_n('%s approved', '%s approved', $comment_count, 'akismet')), number_format_i18n($comment_count)) . '</span></span>';
     }
     return $a;
 }
開發者ID:valiror,項目名稱:sharingdais_demo1,代碼行數:49,代碼來源:class.akismet-admin.php

示例3: akismet_get_user_comments_approved

function akismet_get_user_comments_approved($user_id, $comment_author_email, $comment_author, $comment_author_url)
{
    return Akismet::get_user_comments_approved($user_id, $comment_author_email, $comment_author, $comment_author_url);
}
開發者ID:TheHiddenHaku,項目名稱:fuzzy-waddle,代碼行數:4,代碼來源:wrapper.php


注:本文中的Akismet::get_user_comments_approved方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。