You appear to be a bot. Output may be restricted
Description
Usage
Akismet_Admin::check_for_spam_button( $comment_status );
Parameters
- $comment_status
- ( mixed ) required –
Returns
void
Source
File name: akismet/class.akismet-admin.php
Lines:
1 to 44 of 44
public static function check_for_spam_button( $comment_status ) { // The "Check for Spam" button should only appear when the page might be showing // a comment with comment_approved=0, which means an un-trashed, un-spammed, // not-yet-moderated comment. if ( 'all' != $comment_status && 'moderated' != $comment_status ) { return; } $link = ''; $comments_count = wp_count_comments(); echo '</div>'; echo '<div class="alignleft actions">'; $classes = array( 'button-secondary', 'checkforspam', 'button-disabled' // Disable button until the page is loaded ); if ( $comments_count->moderated > 0 ) { $classes[] = 'enable-on-load'; if ( ! Akismet::get_api_key() ) { $link = self::get_page_url(); $classes[] = 'ajax-disabled'; } } echo '<a class="' . esc_attr( implode( ' ', $classes ) ) . '"' . ( ! empty( $link ) ? ' href="' . esc_url( $link ) . '"' : '' ) . /* translators: The placeholder is for showing how much of the process has completed, as a percent. e.g., "Checking for Spam (40%)" */ ' data-progress-label="' . esc_attr( __( 'Checking for Spam (%1$s%)', 'akismet' ) ) . '" data-success-url="' . esc_attr( remove_query_arg( array( 'akismet_recheck', 'akismet_recheck_error' ), add_query_arg( array( 'akismet_recheck_complete' => 1, 'recheck_count' => urlencode( '__recheck_count__' ), 'spam_count' => urlencode( '__spam_count__' ) ) ) ) ) . '" data-failure-url="' . esc_attr( remove_query_arg( array( 'akismet_recheck', 'akismet_recheck_complete' ), add_query_arg( array( 'akismet_recheck_error' => 1 ) ) ) ) . '" data-pending-comment-count="' . esc_attr( $comments_count->moderated ) . '" data-nonce="' . esc_attr( wp_create_nonce( 'akismet_check_for_spam' ) ) . '" ' . ( ! in_array( 'ajax-disabled', $classes ) ? 'onclick="return false;"' : '' ) . ' >' . esc_html__('Check for Spam', 'akismet') . '</a>'; echo '<span class="checkforspam-spinner"></span>'; }