Changeset 878668
- Timestamp:
- 03/20/2014 10:43:51 AM (10 years ago)
- Location:
- akismet/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
akismet/trunk/akismet.php
r875752 r878668 11 11 Author URI: http://automattic.com/wordpress-plugins/ 12 12 License: GPLv2 or later 13 13 14 */ 14 15 -
akismet/trunk/class.akismet-admin.php
r877118 r878668 46 46 47 47 public static function admin_init() { 48 add_meta_box( 'akismet-status', __('Comment History'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' ); 48 load_plugin_textdomain( 'akismet' ); 49 add_meta_box( 'akismet-status', __('Comment History', 'akismet'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' ); 49 50 } 50 51 … … 63 64 public static function load_menu() { 64 65 if ( class_exists( 'Jetpack' ) ) 65 $hook = add_submenu_page( 'jetpack', __( 'Akismet' ), __( 'Akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );66 $hook = add_submenu_page( 'jetpack', __( 'Akismet' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); 66 67 else 67 $hook = add_options_page( __('Akismet' ), __('Akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );68 $hook = add_options_page( __('Akismet'kismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); 68 69 69 70 if ( version_compare( $GLOBALS['wp_version'], '3.3', '>=' ) ) { … … 91 92 'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ), 92 93 'strings' => array( 93 'Remove this URL' => __( 'Remove this URL' ),94 'Removing...' => __( 'Removing...' ),95 'URL removed' => __( 'URL removed' ),96 '(undo)' => __( '(undo)' ),97 'Re-adding...' => __( 'Re-adding...' ),94 'Remove this URL' => __( 'Remove this URL' ), 95 'Removing...' => __( 'Removing...' ), 96 'URL removed' => __( 'URL removed' ), 97 '(undo)' => __( '(undo)' ), 98 'Re-adding...' => __( 'Re-adding...' ), 98 99 ) 99 100 ) ); … … 116 117 array( 117 118 'id' => 'overview', 118 'title' => __( 'Overview' ),119 'title' => __( 'Overview' ), 119 120 'content' => 120 '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .121 '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .122 '<p>' . esc_html__( 'On this page, you are able to setup the Akismet plugin.' ) . '</p>',121 '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' . 122 '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' . 123 '<p>' . esc_html__( 'On this page, you are able to setup the Akismet plugin.' ) . '</p>', 123 124 ) 124 125 ); … … 127 128 array( 128 129 'id' => 'setup-signup', 129 'title' => __( 'New to Akismet' ),130 'title' => __( 'New to Akismet' ), 130 131 'content' => 131 '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .132 '<p>' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' ) . '</p>' .133 '<p>' . sprintf( __( 'Signup for an account on %s to get an API Key.' ), '<a href="https://akismet.com/plugin-signup/" target="_blank">Akismet.com</a>' ) . '</p>',132 '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' . 133 '<p>' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' ) . '</p>' . 134 '<p>' . sprintf( __( 'Signup for an account on %s to get an API Key.' ), '<a href="https://akismet.com/plugin-signup/" target="_blank">Akismet.com</a>' ) . '</p>', 134 135 ) 135 136 ); … … 138 139 array( 139 140 'id' => 'setup-manual', 140 'title' => __( 'Enter an API Key' ),141 'title' => __( 'Enter an API Key' ), 141 142 'content' => 142 '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .143 '<p>' . esc_html__( 'If you already have an API key' ) . '</p>' .143 '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' . 144 '<p>' . esc_html__( 'If you already have an API key' ) . '</p>' . 144 145 '<ol>' . 145 '<li>' . esc_html__( 'Copy and paste the API key into the text field.' ) . '</li>' .146 '<li>' . esc_html__( 'Click the Use this Key button.' ) . '</li>' .146 '<li>' . esc_html__( 'Copy and paste the API key into the text field.' ) . '</li>' . 147 '<li>' . esc_html__( 'Click the Use this Key button.' ) . '</li>' . 147 148 '</ol>', 148 149 ) … … 154 155 array( 155 156 'id' => 'overview', 156 'title' => __( 'Overview' ),157 'title' => __( 'Overview' ), 157 158 'content' => 158 '<p><strong>' . esc_html__( 'Akismet Stats' ) . '</strong></p>' .159 '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .160 '<p>' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' ) . '</p>',159 '<p><strong>' . esc_html__( 'Akismet Stats' ) . '</strong></p>' . 160 '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' . 161 '<p>' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' ) . '</p>', 161 162 ) 162 163 ); … … 167 168 array( 168 169 'id' => 'overview', 169 'title' => __( 'Overview' ),170 'title' => __( 'Overview' ), 170 171 'content' => 171 '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .172 '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .173 '<p>' . esc_html__( 'On this page, you are able to enter/remove an API key, view account information and view spam stats.' ) . '</p>',172 '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' . 173 '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' . 174 '<p>' . esc_html__( 'On this page, you are able to enter/remove an API key, view account information and view spam stats.' ) . '</p>', 174 175 ) 175 176 ); … … 178 179 array( 179 180 'id' => 'settings', 180 'title' => __( 'Settings' ),181 'title' => __( 'Settings' ), 181 182 'content' => 182 '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .183 '<p><strong>' . esc_html__( 'API Key' ) . '</strong> - ' . esc_html__( 'Enter/remove an API key.') . '</p>' .184 '<p><strong>' . esc_html__( 'Delete spam on posts more than a month old' ) . '</strong> - ' . esc_html__( 'Automatically delete spam comments on posts that are older than a month old.') . '</p>' .185 '<p><strong>' . esc_html__( 'Show the number of approved comments beside each comment author' ) . '</strong> - ' . esc_html__( 'Show the number of approved comments beside each comment author in the comments list page.') . '</p>',183 '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' . 184 '<p><strong>' . esc_html__( 'API Key' ) . '</p>' . 185 '<p><strong>' . esc_html__( 'Delete spam on posts more than a month old' ) . '</p>' . 186 '<p><strong>' . esc_html__( 'Show the number of approved comments beside each comment author' ) . '</p>', 186 187 ) 187 188 ); … … 190 191 array( 191 192 'id' => 'account', 192 'title' => __( 'Account' ),193 'title' => __( 'Account' ), 193 194 'content' => 194 '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .195 '<p><strong>' . esc_html__( 'Subscription Type' ) . '</strong> - ' . esc_html__( 'The Akismet subscription plan') . '</p>' .196 '<p><strong>' . esc_html__( 'Status' ) . '</strong> - ' . esc_html__( 'The subscription status - active, cancelled or suspended') . '</p>',195 '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' . 196 '<p><strong>' . esc_html__( 'Subscription Type' ) . '</p>' . 197 '<p><strong>' . esc_html__( 'Status' ) . '</p>', 197 198 ) 198 199 ); … … 202 203 // Help Sidebar 203 204 $current_screen->set_help_sidebar( 204 '<p><strong>' . esc_html__( 'For more information:' ) . '</strong></p>' .205 '<p><a href="https://akismet.com/faq/" target="_blank">' . esc_html__( 'Akismet FAQ' ) . '</a></p>' .206 '<p><a href="https://akismet.com/support/" target="_blank">' . esc_html__( 'Akismet Support' ) . '</a></p>'205 '<p><strong>' . esc_html__( 'For more information:' ) . '</strong></p>' . 206 '<p><a href="https://akismet.com/faq/" target="_blank">' . esc_html__( 'Akismet FAQ' ) . '</a></p>' . 207 '<p><a href="https://akismet.com/support/" target="_blank">' . esc_html__( 'Akismet Support' ) . '</a></p>' 207 208 ); 208 209 } … … 210 211 public static function enter_api_key() { 211 212 if ( function_exists('current_user_can') && !current_user_can('manage_options') ) 212 die(__('Cheatin’ uh?' ));213 die(__('Cheatin’ uh?')); 213 214 214 215 if ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) ) … … 258 259 global $submenu; 259 260 260 echo '<h3>' . esc_html( _x( 'Spam', 'comments' ) ) . '</h3>';261 echo '<h3>' . esc_html( _x( 'Spam', 'comments' ) ) . '</h3>'; 261 262 262 263 echo '<p>'.sprintf( _n( … … 264 265 '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.', 265 266 $count 266 ), 'http://akismet.com/?return=true', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'</p>';267 ), 'http://akismet.com/?return=true', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'</p>'; 267 268 } 268 269 … … 283 284 '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ', 284 285 $count 285 ), 'http://akismet.com/?return=true', number_format_i18n( $count ) );286 ), 'http://akismet.com/?return=true', number_format_i18n( $count ) ); 286 287 } else { 287 $intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. ' ), 'http://akismet.com/?return=true' );288 $intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. '), 'http://akismet.com/?return=true' ); 288 289 } 289 290 … … 294 295 'There are <a href="%2$s">%1$s comments</a> in your spam queue right now.', 295 296 $queue_count 296 ), number_format_i18n( $queue_count ), $link );297 ), number_format_i18n( $queue_count ), $link ); 297 298 } else { 298 $queue_text = sprintf( __( "There’s nothing in your <a href='%s'>spam queue</a> at the moment." ), $link );299 $queue_text = sprintf( __( "There’s nothing in your <a href='%s'>spam queue</a> at the moment." ), $link ); 299 300 } 300 301 … … 312 313 $link = add_query_arg( array( 'page' => 'akismet-admin', 'recheckqueue' => 'true', 'noheader' => 'true' ), admin_url( 'edit-comments.php' ) ); 313 314 314 echo '</div><div class="alignleft"><a class="button-secondary checkforspam" href="' . esc_url( $link ) . '">' . esc_html__('Check for Spam' ) . '</a>';315 echo '</div><div class="alignleft"><a class="button-secondary checkforspam" href="' . esc_url( $link ) . '">' . esc_html__('Check for Spam') . '</a>'; 315 316 echo '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="checkforspam-spinner" />'; 316 317 } … … 356 357 } 357 358 358 Akismet::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s' ), $reporter, $new_status ), 'status-' . $new_status );359 Akismet::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s'), $reporter, $new_status ), 'status-' . $new_status ); 359 360 } 360 361 … … 396 397 update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' ); 397 398 delete_comment_meta( $c['comment_ID'], 'akismet_error' ); 398 Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam' ), 'check-spam' );399 Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam'), 'check-spam' ); 399 400 400 401 } elseif ( 'false' == $response[1] ) { 401 402 update_comment_meta( $c['comment_ID'], 'akismet_result', 'false' ); 402 403 delete_comment_meta( $c['comment_ID'], 'akismet_error' ); 403 Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment' ), 'check-ham' );404 Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment'), 'check-ham' ); 404 405 // abnormal result: error 405 406 } else { 406 407 update_comment_meta( $c['comment_ID'], 'akismet_result', 'error' ); 407 Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)' ), substr($response[1], 0, 50)), 'check-error' );408 Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)'), substr($response[1], 0, 50)), 'check-error' ); 408 409 } 409 410 … … 459 460 $desc = null; 460 461 if ( $akismet_error ) { 461 $desc = __( 'Awaiting spam check' );462 $desc = __( 'Awaiting spam check' ); 462 463 } elseif ( !$user_result || $user_result == $akismet_result ) { 463 464 // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same 464 465 if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' ) 465 $desc = __( 'Flagged as spam by Akismet' );466 $desc = __( 'Flagged as spam by Akismet' ); 466 467 elseif ( $akismet_result == 'false' && $comment_status == 'spam' ) 467 $desc = __( 'Cleared by Akismet' );468 $desc = __( 'Cleared by Akismet' ); 468 469 } else { 469 470 $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true ); 470 471 if ( $user_result == 'true' ) 471 $desc = sprintf( __('Flagged as spam by %s' ), $who );472 $desc = sprintf( __('Flagged as spam by %s'), $who ); 472 473 else 473 $desc = sprintf( __('Un-spammed by %s' ), $who );474 $desc = sprintf( __('Un-spammed by %s'), $who ); 474 475 } 475 476 … … 483 484 || ( $k == 'unspam' && $GLOBALS['wp_version'] >= 3.4 ) 484 485 ) { 485 $b['history'] = '<a href="comment.php?action=editcomment&c='.$comment->comment_ID.'#akismet-status" title="'. esc_attr__( 'View comment history' ) . '"> '. esc_html__('History') . '</a>';486 $b['history'] = '<a href="comment.php?action=editcomment&c='.$comment->comment_ID.'#akismet-status" title="'. esc_attr__( 'View comment history' ') . '</a>'; 486 487 } 487 488 } … … 491 492 492 493 if ( $desc ) 493 echo '<span class="akismet-status" commentid="'.$comment->comment_ID.'"><a href="comment.php?action=editcomment&c='.$comment->comment_ID.'#akismet-status" title="' . esc_attr__( 'View comment history' ) . '">'.esc_html( $desc ).'</a></span>';494 echo '<span class="akismet-status" commentid="'.$comment->comment_ID.'"><a href="comment.php?action=editcomment&c='.$comment->comment_ID.'#akismet-status" title="' . esc_attr__( 'View comment history' ) . '">'.esc_html( $desc ).'</a></span>'; 494 495 495 496 if ( apply_filters( 'akismet_show_user_comments_approved', get_option('akismet_show_user_comments_approved') ) == 'true' ) { 496 497 $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); 497 498 $comment_count = intval( $comment_count ); 498 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 ) ), number_format_i18n( $comment_count ) ) . '</span></span>';499 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 ) ), number_format_i18n( $comment_count ) ) . '</span></span>'; 499 500 } 500 501 … … 509 510 foreach ( $history as $row ) { 510 511 $time = date( 'D d M Y @ h:i:m a', $row['time'] ) . ' GMT'; 511 echo '<div style="margin-bottom: 13px;"><span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago' ), human_time_diff( $row['time'] ) ) . '</span> - ';512 echo '<div style="margin-bottom: 13px;"><span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago'), human_time_diff( $row['time'] ) ) . '</span> - '; 512 513 echo esc_html( $row['message'] ) . '</div>'; 513 514 } … … 518 519 public static function plugin_action_links( $links, $file ) { 519 520 if ( $file == plugin_basename( AKISMET__PLUGIN_URL . '/akismet.php' ) ) { 520 $links[] = '<a href="' . esc_url( self::get_page_url() ) . '">'.esc_html__( 'Settings' ).'</a>';521 $links[] = '<a href="' . esc_url( self::get_page_url() ) . '">'.esc_html__( 'Settings' ).'</a>'; 521 522 } 522 523 … … 578 579 $response = Akismet::http_post( http_build_query( $comment ), 'submit-spam' ); 579 580 if ( $comment->reporter ) { 580 Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam' ), $comment->reporter ), 'report-spam' );581 Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam'), $comment->reporter ), 'report-spam' ); 581 582 update_comment_meta( $comment_id, 'akismet_user_result', 'true' ); 582 583 update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); … … 624 625 $response = Akismet::http_post( http_build_query( $comment ), 'submit-ham' ); 625 626 if ( $comment->reporter ) { 626 Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam' ), $comment->reporter ), 'report-ham' );627 Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam'), $comment->reporter ), 'report-ham' ); 627 628 update_comment_meta( $comment_id, 'akismet_user_result', 'false' ); 628 629 update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); … … 794 795 } 795 796 796 echo '<h2 class="ak-header">'.esc_html__('Akismet' ).'</h2>';797 echo '<h2 class="ak-header">'.esc_html__('Akismet').'</h2>'; 797 798 798 799 self::display_status(); … … 833 834 $total_in_hours = round( $total_in_minutes / 60 ); 834 835 $total_in_days = round( $total_in_hours / 8 ); 835 $cleaning_up = __( 'Cleaning up spam takes time.' );836 $cleaning_up = __( 'Cleaning up spam takes time.' ); 836 837 837 838 if ( $total_in_days > 1 ) 838 $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %s days!' ), number_format_i18n( $total_in_days ) );839 $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %s days!' ), number_format_i18n( $total_in_days ) ); 839 840 elseif ( $total_in_hours > 1 ) 840 $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d hours!' ), $total_in_hours );841 $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d hours!' ), $total_in_hours ); 841 842 elseif ( $total_in_minutes >= 30 ) 842 $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d minutes!' ), $total_in_minutes );843 $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d minutes!' ), $total_in_minutes ); 843 844 } 844 845 -
akismet/trunk/class.akismet-widget.php
r875752 r878668 6 6 7 7 function __construct() { 8 9 8 10 parent::__construct( 9 11 'akismet_widget', 10 __( 'Akismet Widget' ),11 array( 'description' => __( 'Display the number of spam comments Akismet has caught' ) )12 __( 'Akismet Widget' ), 13 array( 'description' => __( 'Display the number of spam comments Akismet has caught' ) ) 12 14 ); 13 15 … … 65 67 } 66 68 else { 67 $title = __( 'Spam Blocked' );69 $title = __( 'Spam Blocked' ); 68 70 } 69 71 ?> 70 72 71 73 <p> 72 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' ); ?></label>74 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' ); ?></label> 73 75 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> 74 76 </p> … … 94 96 95 97 <div class="a-stats"> 96 <a href="http://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count ), number_format_i18n( $count ) ); ?></a>98 <a href="http://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count ), number_format_i18n( $count ) ); ?></a> 97 99 </div> 98 100 -
akismet/trunk/class.akismet.php
r876682 r878668 191 191 && self::$last_comment['comment_author'] == $comment->comment_author 192 192 && self::$last_comment['comment_author_email'] == $comment->comment_author_email ) { 193 194 195 193 196 // normal result: true or false 194 197 if ( self::$last_comment['akismet_result'] == 'true' ) { 195 198 update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' ); 196 self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam' ), 'check-spam' );199 self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam'), 'check-spam' ); 197 200 if ( $comment->comment_approved != 'spam' ) 198 self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s' ), $comment->comment_approved), 'status-changed'.$comment->comment_approved );201 self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s'), $comment->comment_approved), 'status-changed'.$comment->comment_approved ); 199 202 } 200 203 elseif ( self::$last_comment['akismet_result'] == 'false' ) { 201 204 update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' ); 202 self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment' ), 'check-ham' );205 self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment'), 'check-ham' ); 203 206 if ( $comment->comment_approved == 'spam' ) { 204 207 if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) ) 205 self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check' ), 'wp-blacklisted' );208 self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check'), 'wp-blacklisted' ); 206 209 else 207 self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s' ), $comment->comment_approved), 'status-changed-'.$comment->comment_approved );210 self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s'), $comment->comment_approved), 'status-changed-'.$comment->comment_approved ); 208 211 } 209 212 } // abnormal result: error 210 213 else { 211 214 update_comment_meta( $comment->comment_ID, 'akismet_error', time() ); 212 self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.' ), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' );215 self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.'), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' ); 213 216 } 214 217 … … 360 363 361 364 $comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error' LIMIT 100" ); 365 366 362 367 363 368 foreach ( (array) $comment_errors as $comment_id ) { … … 374 379 $msg = ''; 375 380 if ( $status == 'true' ) { 376 $msg = __( 'Akismet caught this comment as spam during an automatic retry.' );381 $msg = __( 'Akismet caught this comment as spam during an automatic retry.' ); 377 382 } elseif ( $status == 'false' ) { 378 $msg = __( 'Akismet cleared this comment during an automatic retry.' );383 $msg = __( 'Akismet cleared this comment during an automatic retry.' ); 379 384 } 380 385 … … 654 659 $$key = $val; 655 660 } 661 662 656 663 657 664 $file = AKISMET__PLUGIN_DIR . 'views/'. $name . '.php'; … … 666 673 public static function plugin_activation() { 667 674 if ( version_compare( $GLOBALS['wp_version'], AKISMET__MINIMUM_WP_VERSION, '<' ) ) { 668 $message = '<strong>'.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' ), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).'</strong> '.sprintf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.'), 'http://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/'); 675 load_theme_textdomain( 'akismet' ); 676 677 $message = '<strong>'.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' , 'akismet'), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).'</strong> '.sprintf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.', 'akismet'), 'http://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/'); 669 678 670 679 Akismet::bail_on_activation( $message ); -
akismet/trunk/views/config.php
r875752 r878668 1 1 <div class="wrap"> 2 2 3 <h2><?php esc_html_e( 'Akismet' );?></h2>3 <h2><?php esc_html_e( 'Akismet' );?></h2> 4 4 5 5 <div class="have-key"> … … 10 10 11 11 <span style="float:right;margin:10px 15px -5px 0px"> 12 <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>" class=""><?php esc_html_e( 'Summaries' );?></a>12 <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>" class=""><?php esc_html_e( 'Summaries' );?></a> 13 13 </span> 14 14 … … 16 16 <ul> 17 17 <li> 18 <h3><?php esc_html_e( 'Past six months' );?></h3>18 <h3><?php esc_html_e( 'Past six months' );?></h3> 19 19 <span><?php echo number_format( $stat_totals['6-months']->spam );?></span> 20 <?php esc_html_e( 'Spam blocked' );?>20 <?php esc_html_e( 'Spam blocked' );?> 21 21 </li> 22 22 <li> 23 <h3><?php esc_html_e( 'All time' );?></h3>23 <h3><?php esc_html_e( 'All time' );?></h3> 24 24 <span><?php echo number_format( $stat_totals['all']->spam );?></span> 25 <?php esc_html_e( 'Spam blocked' );?>25 <?php esc_html_e( 'Spam blocked' );?> 26 26 </li> 27 27 <li> 28 <h3><?php esc_html_e( 'Accuracy' );?></h3>28 <h3><?php esc_html_e( 'Accuracy' );?></h3> 29 29 <span><?php echo $stat_totals['all']->accuracy; ?>%</span> 30 30 <?php printf( 31 31 esc_html( 32 _n( '%s missed spam, %s false positive', '%s missed spam, %s false positives', $stat_totals['all']->false_positives )32 _n( '%s missed spam, %s false positive', '%s missed spam, %s false positives', $stat_totals['all']->false_positives ) 33 33 ), 34 34 number_format( $stat_totals['all']->missed_spam ), … … 58 58 <div id="referrers" class="postbox "> 59 59 <div class="handlediv" title="Click to toggle"><br></div> 60 <h3 class="hndle"><span><?php esc_html_e( 'Settings' );?></span></h3>60 <h3 class="hndle"><span><?php esc_html_e( 'Settings' );?></span></h3> 61 61 <form name="akismet_conf" id="akismet-conf" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST"> 62 62 <div class="inside"> … … 65 65 <?php if ( !defined( 'WPCOM_API_KEY' ) ):?> 66 66 <tr> 67 <th scope="row" align="left" width="10%"><?php esc_html_e('API Key' );?></th>67 <th scope="row" align="left" width="10%"><?php esc_html_e('API Key');?></th> 68 68 <td width="5%"/> 69 69 <td align="left"> … … 77 77 <td> 78 78 <p> 79 <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' ); ?>"><input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="true" type="checkbox" <?php echo get_option('akismet_show_user_comments_approved') == 'true' ? 'checked="checked"':''; ?>> <?php esc_html_e('Show the number of approved comments beside each comment author'); ?></label>79 <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' '); ?></label> 80 80 </p> 81 81 <p> 82 <label for="akismet_discard_month" title="<?php esc_attr_e( 'Auto-detete spam from old posts' ); ?>"><input name="akismet_discard_month" id="akismet_discard_month" value="true" type="checkbox" <?php echo get_option('akismet_discard_month') == 'true' ? 'checked="checked"':''; ?>> <?php esc_html_e('Automatically delete spam from posts older than 30 days'); ?></label><span class="note"><strong><?php esc_html_e('Note:');?></strong> <?php printf( __( 'Spam in the <a href="%s">spam folder</a> older than 15 days is deleted automatically.'), admin_url( 'edit-comments.php?type=spam' ) );?></span><div class="clear"></div>82 <label for="akismet_discard_month" title="<?php esc_attr_e( 'Auto-detete spam from old posts' ), admin_url( 'edit-comments.php?type=spam' ) );?></span><div class="clear"></div> 83 83 </p> 84 84 </td> … … 90 90 <?php if ( !defined( 'WPCOM_API_KEY' ) ):?> 91 91 <div id="delete-action"> 92 <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account' ); ?></a>92 <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account'); ?></a> 93 93 </div> 94 94 <?php endif; ?> … … 96 96 <div id="publishing-action"> 97 97 <input type="hidden" name="action" value="enter-key"> 98 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save Changes' );?>">98 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save Changes');?>"> 99 99 100 100 </div> … … 109 109 <div id="referrers" class="postbox "> 110 110 <div class="handlediv" title="Click to toggle"><br></div> 111 <h3 class="hndle"><span><?php esc_html_e( 'Account' );?></span></h3>111 <h3 class="hndle"><span><?php esc_html_e( 'Account' );?></span></h3> 112 112 <div class="inside"> 113 113 <table cellspacing="0"> 114 114 <tbody> 115 115 <tr> 116 <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' );?></th>116 <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' );?></th> 117 117 <td width="5%"/> 118 118 <td align="left"> … … 121 121 </tr> 122 122 <tr> 123 <th scope="row" align="left"><?php esc_html_e( 'Status' );?></th>123 <th scope="row" align="left"><?php esc_html_e( 'Status' );?></th> 124 124 <td width="5%"/> 125 125 <td align="left"> … … 129 129 <?php if ( $akismet_user->next_billing_date ) : ?> 130 130 <tr> 131 <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' );?></th>131 <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' );?></th> 132 132 <td width="5%"/> 133 133 <td align="left"> … … 141 141 <div id="major-publishing-actions"> 142 142 <div id="publishing-action"> 143 <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' ? __( 'Upgrade' ) : __( 'Change') ), 'redirect' => 'upgrade' ) ); ?>143 <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' ? __( 'Upgrade' ) ), 'redirect' => 'upgrade' ) ); ?> 144 144 </div> 145 145 <div class="clear"></div> -
akismet/trunk/views/notice.php
r877118 r878668 9 9 <div class="aa_button_container" onclick="document.akismet_activate.submit();"> 10 10 <div class="aa_button_border"> 11 <div class="aa_button"><?php esc_html_e('Activate your Akismet account' );?></div>11 <div class="aa_button"><?php esc_html_e('Activate your Akismet account');?></div> 12 12 </div> 13 13 </div> 14 <div class="aa_description"><?php _e('<strong>Almost done</strong> - activate your account and say goodbye to comment spam' );?></div>14 <div class="aa_description"><?php _e('<strong>Almost done</strong> - activate your account and say goodbye to comment spam');?></div> 15 15 </div> 16 16 </form> 17 17 </div> 18 18 <?php elseif ( $type == 'spam-check' ) :?> 19 <div id="akismet-warning" class="updated fade"><p><strong><?php esc_html_e('Akismet has detected a problem.' );?></strong> <?php printf( __('Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation. Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.'), esc_url( Akismet_Admin::get_page_url() ) );?></p></div>19 <div id="akismet-warning" class="updated fade"><p><strong><?php esc_html_e('Akismet has detected a problem.''), esc_url( Akismet_Admin::get_page_url() ) );?></p></div> 20 20 <?php elseif ( $type == 'version' ) :?> 21 <div id="akismet-warning" class="updated fade"><p><strong><?php printf( esc_html__('Akismet %s requires WordPress 3.0 or higher.' ), AKISMET_VERSION);?></strong> <?php printf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.'), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');?></p></div>21 <div id="akismet-warning" class="updated fade"><p><strong><?php printf( esc_html__('Akismet %s requires WordPress 3.0 or higher.''), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');?></p></div> 22 22 <?php elseif ( $type == 'alert' ) :?> 23 23 <div class='error'> 24 <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', $code ) ); ?></strong></p>24 <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', $code ) ); ?></strong></p> 25 25 <p><?php echo esc_html( $msg ); ?></p> 26 26 <p><?php 27 27 28 28 /* translators: the placeholder is a clickable URL that leads to more information regarding an error code. */ 29 printf( esc_html__( 'For more information: %s' ), '<a href="https://akismet.com/errors/' . $code . '">https://akismet.com/errors/' . $code . '</a>' );29 printf( esc_html__( 'For more information: %s' ), '<a href="https://akismet.com/errors/' . $code . '">https://akismet.com/errors/' . $code . '</a>' ); 30 30 31 31 ?> … … 34 34 <?php elseif ( $type == 'missing-functions' ) :?> 35 35 <div class="wrap alert critical"> 36 <h3 class="key-status failed"><?php esc_html_e('Network functions are disabled.' ); ?></h3>37 <p class="description"><?php printf( __('Your web host or server administrator has disabled PHP’s <code>fsockopen</code> or <code>gethostbynamel</code> functions. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet’s system requirements</a>.' ), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>36 <h3 class="key-status failed"><?php esc_html_e('Network functions are disabled.'); ?></h3> 37 <p class="description"><?php printf( __('Your web host or server administrator has disabled PHP’s <code>fsockopen</code> or <code>gethostbynamel</code> functions. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet’s system requirements</a>.'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p> 38 38 </div> 39 39 <?php elseif ( $type == 'servers-be-down' ) :?> 40 40 <div class="wrap alert critical"> 41 <h3 class="key-status failed"><?php esc_html_e("We can’t connect to your site." ); ?></h3>42 <p class="description"><?php printf( __('Your firewall may be blocking us. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.' ), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>41 <h3 class="key-status failed"><?php esc_html_e("We can’t connect to your site."); ?></h3> 42 <p class="description"><?php printf( __('Your firewall may be blocking us. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p> 43 43 </div> 44 44 <?php elseif ( $type == 'overdue' ) :?> 45 45 <div class="wrap alert critical"> 46 <h3 class="key-status"><?php esc_html_e("Please update your payment details." ); ?></h3>47 <p class="description"><?php printf( __('We cannot process your transaction. Please contact your bank for assistance, and <a href="%s" target="_blank">update your payment details</a>.' ), 'https://akismet.com/account/'); ?></p>46 <h3 class="key-status"><?php esc_html_e("Please update your payment details."); ?></h3> 47 <p class="description"><?php printf( __('We cannot process your transaction. Please contact your bank for assistance, and <a href="%s" target="_blank">update your payment details</a>.'), 'https://akismet.com/account/'); ?></p> 48 48 </div> 49 49 <?php elseif ( $type == 'cancelled' ) :?> 50 50 <div class="wrap alert critical"> 51 <h3 class="key-status"><?php esc_html_e("Your subscription is cancelled." ); ?></h3>52 <p class="description"><?php printf( __('Please visit the <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.' ), 'https://akismet.com/account/'); ?></p>51 <h3 class="key-status"><?php esc_html_e("Your subscription is cancelled."); ?></h3> 52 <p class="description"><?php printf( __('Please visit the <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.'), 'https://akismet.com/account/'); ?></p> 53 53 </div> 54 54 <?php elseif ( $type == 'suspended' ) :?> 55 55 <div class="wrap alert critical"> 56 <h3 class="key-status failed"><?php esc_html_e("Your subscription is suspended." ); ?></h3>57 <p class="description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.' ), 'https://akismet.com/contact/'); ?></p>56 <h3 class="key-status failed"><?php esc_html_e("Your subscription is suspended."); ?></h3> 57 <p class="description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.'), 'https://akismet.com/contact/'); ?></p> 58 58 </div> 59 59 <?php elseif ( $type == 'active-notice' && $time_saved ) :?> 60 60 <div class="wrap alert active"> 61 61 <h3 class="key-status"><?php echo esc_html( $time_saved ); ?></h3> 62 <p class="description"><?php printf( __('You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.' ), 'https://akismet.com/account/upgrade/'); ?></p>62 <p class="description"><?php printf( __('You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.'), 'https://akismet.com/account/upgrade/'); ?></p> 63 63 </div> 64 64 <?php elseif ( $type == 'new-key-valid' ) :?> 65 65 <div class="wrap alert active"> 66 <h3 class="key-status"><?php esc_html_e('Your Akismet account has been successfully set up and activated. Happy blogging!' ); ?></h3>66 <h3 class="key-status"><?php esc_html_e('Your Akismet account has been successfully set up and activated. Happy blogging!'); ?></h3> 67 67 </div> 68 68 <?php elseif ( $type == 'new-key-invalid' ) :?> 69 69 <div class="wrap alert critical"> 70 <h3 class="key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' ); ?></h3>70 <h3 class="key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' ); ?></h3> 71 71 </div> 72 72 <?php elseif ( $type == 'new-key-failed' ) :?> 73 73 <div class="wrap alert critical"> 74 <h3 class="key-status"><?php esc_html_e( 'The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.' ); ?></h3>74 <h3 class="key-status"><?php esc_html_e( 'The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.' ); ?></h3> 75 75 </div> 76 76 <?php endif;?> -
akismet/trunk/views/start.php
r875752 r878668 2 2 if ( $akismet_user ) : 3 3 if ( $akismet_user->status == 'active' ) : // ask do they want to use akismet account found using jetpack wpcom connection ?> 4 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.' ); ?></p>4 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.'); ?></p> 5 5 <div class="activate-highlight activate-option"> 6 6 <div class="option-description"> 7 <strong class="small-heading"><?php esc_html_e('Connected via Jetpack' ); ?></strong>7 <strong class="small-heading"><?php esc_html_e('Connected via Jetpack'); ?></strong> 8 8 <?php echo esc_attr( $akismet_user->user_email ); ?> 9 9 </div> … … 12 12 <input type="hidden" name="action" value="enter-key"> 13 13 <?php wp_nonce_field( Akismet_Admin::NONCE ) ?> 14 <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Use this Akismet account' ); ?>"/>14 <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Use this Akismet account' ); ?>"/> 15 15 </form> 16 16 </div> 17 17 <div class="activate-highlight secondary activate-option"> 18 18 <div class="option-description"> 19 <strong><?php esc_html_e('Create a new API key with a different email address' ); ?></strong>20 <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.' ); ?></p>19 <strong><?php esc_html_e('Create a new API key with a different email address'); ?></strong> 20 <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.'); ?></p> 21 21 </div> 22 <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?>22 <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?> 23 23 </div> 24 24 <div class="activate-highlight secondary activate-option"> 25 25 <div class="option-description"> 26 <strong><?php esc_html_e('Manually enter an API key' ); ?></strong>27 <p><?php esc_html_e('If you have another API key you want to use.' ); ?></p>26 <strong><?php esc_html_e('Manually enter an API key'); ?></strong> 27 <p><?php esc_html_e('If you have another API key you want to use.'); ?></p> 28 28 </div> 29 29 <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right"> … … 31 31 <input type="hidden" name="action" value="enter-key"> 32 32 <?php wp_nonce_field( Akismet_Admin::NONCE ) ?> 33 <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key' );?>">33 <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>"> 34 34 </form> 35 35 </div> 36 36 <?php elseif ( $akismet_user->status == 'no-account' ) : //no akismet account, ask do they want to use jetpack wpcom account to create one, then redirect to plans page?> 37 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. Register your email address below to get started.' ); ?></p>37 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. Register your email address below to get started.'); ?></p> 38 38 <div class="activate-highlight activate-option"> 39 39 <div class="option-description"> 40 <strong class="small-heading"><?php esc_html_e('Connected via Jetpack' ); ?></strong>40 <strong class="small-heading"><?php esc_html_e('Connected via Jetpack'); ?></strong> 41 41 <?php echo esc_attr( $akismet_user->user_email ); ?> 42 42 </div> … … 45 45 <input type="hidden" name="auto-connect" value="<?php echo $akismet_user->ID;?>"/> 46 46 <input type="hidden" name="redirect" value="plugin-signup"/> 47 <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Register Akismet' ); ?>"/>47 <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Register Akismet' ); ?>"/> 48 48 </form> 49 49 </div> 50 50 <div class="activate-highlight secondary activate-option"> 51 51 <div class="option-description"> 52 <strong><?php esc_html_e('Create a new API key with a different email address' ); ?></strong>53 <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.' ); ?></p>52 <strong><?php esc_html_e('Create a new API key with a different email address'); ?></strong> 53 <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.'); ?></p> 54 54 </div> 55 <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?>55 <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?> 56 56 </div> 57 57 <div class="activate-highlight secondary activate-option"> 58 58 <div class="option-description"> 59 <strong><?php esc_html_e('Manually enter an API key' ); ?></strong>60 <p><?php esc_html_e('If you have another API key you want to use.' ); ?></p>59 <strong><?php esc_html_e('Manually enter an API key'); ?></strong> 60 <p><?php esc_html_e('If you have another API key you want to use.'); ?></p> 61 61 </div> 62 62 <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right"> … … 64 64 <input type="hidden" name="action" value="enter-key"> 65 65 <?php wp_nonce_field( Akismet_Admin::NONCE ) ?> 66 <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key' );?>">66 <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>"> 67 67 </form> 68 68 </div> 69 69 <?php elseif ( $akismet_user->status == 'suspended' ) : //has an akismet account but the key is suspended, need to upgrade their account to unsuspend key ?> 70 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site.' ); ?></p>70 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site.'); ?></p> 71 71 <div class="activate-highlight centered activate-option"> 72 <strong class="small-heading"><?php esc_html_e( 'Connected via Jetpack' ); ?></strong>73 <h3 class="alert-text" s><?php printf( esc_html__( 'Your subscription for %s is suspended' ), $akismet_user->user_email ); ?></h3>74 <p><?php esc_html_e('No worries! Get in touch and we’ll help sort this out.' ); ?></p>75 <a href="https://akismet.com/contact" class="button button-primary"><?php esc_html_e( 'Contact Akismet support' ); ?></a>72 <strong class="small-heading"><?php esc_html_e( 'Connected via Jetpack' ); ?></strong> 73 <h3 class="alert-text" s><?php printf( esc_html__( 'Your subscription for %s is suspended' ), $akismet_user->user_email ); ?></h3> 74 <p><?php esc_html_e('No worries! Get in touch and we’ll help sort this out.'); ?></p> 75 <a href="https://akismet.com/contact" class="button button-primary"><?php esc_html_e( 'Contact Akismet support' ); ?></a> 76 76 77 77 </div><?php 78 78 endif; 79 79 else :?> 80 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.' ); ?></p>80 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.'); ?></p> 81 81 <div class="activate-highlight activate-option"> 82 82 <div class="option-description"> 83 <strong><?php esc_html_e( 'New to Akismet?' );?></strong>84 <p><?php esc_html_e('Get started now to squash the comment and trackback spam you get.' ); ?></p>83 <strong><?php esc_html_e( 'New to Akismet?' );?></strong> 84 <p><?php esc_html_e('Get started now to squash the comment and trackback spam you get.'); ?></p> 85 85 </div> 86 <?php Akismet::view( 'get', array( 'text' => __( 'Get an Akismet account' ), 'classes' => array( 'right', 'button', 'button-primary' ) ) ); ?>86 <?php Akismet::view( 'get', array( 'text' => __( 'Get an Akismet account' ), 'classes' => array( 'right', 'button', 'button-primary' ) ) ); ?> 87 87 </div> 88 88 <div class="activate-highlight secondary activate-option"> 89 89 <div class="option-description"> 90 <strong><?php esc_html_e('Manually enter an API key' ); ?></strong>91 <p><?php esc_html_e('If you have another API key you want to use.' ); ?></p>90 <strong><?php esc_html_e('Manually enter an API key'); ?></strong> 91 <p><?php esc_html_e('If you have another API key you want to use.'); ?></p> 92 92 </div> 93 93 <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right"> … … 95 95 <input type="hidden" name="action" value="enter-key"> 96 96 <?php wp_nonce_field( Akismet_Admin::NONCE ); ?> 97 <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key' );?>">97 <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>"> 98 98 </form> 99 99 </div><?php -
akismet/trunk/views/stats.php
r874104 r878668 1 1 <div class="wrap"> 2 <h2><?php esc_html_e( 'Akismet Stats' );?><?php if ( !isset( $hide_settings_link ) ): ?> <a href="<?php echo esc_url( Akismet_Admin::get_page_url() );?>" class="add-new-h2"><?php esc_html_e( 'Settings');?></a><?php endif;?></h2>2 <h2><?php esc_html_e( 'Akismet Stats' );?></a><?php endif;?></h2> 3 3 <iframe src="<?php echo esc_url( sprintf( '%s://akismet.com/web/1.0/user-stats.php?blog=%s&api_key=%s', is_ssl()?'https':'http', urlencode( get_bloginfo('url') ), Akismet::get_api_key() ) ); ?>" width="100%" height="2500px" frameborder="0" id="akismet-stats-frame"></iframe> 4 4 </div> -
akismet/trunk/views/strict.php
r873760 r878668 1 1 <tr valign="top"> 2 <th scope="row"><?php esc_html_e('Akismet anti-spam strictness' ); ?></th>3 <td><fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness' ); ?></span></legend>4 <p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Strict: silently discard the worst and most pervasive spam.' ); ?></label></p>5 <p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Safe: always put spam in the Spam folder for review.' ); ?></label></p>2 <th scope="row"><?php esc_html_e('Akismet anti-spam strictness'); ?></th> 3 <td><fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness'); ?></span></legend> 4 <p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Strict: silently discard the worst and most pervasive spam.'); ?></label></p> 5 <p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Safe: always put spam in the Spam folder for review.'); ?></label></p> 6 6 </fieldset></td> 7 7 </tr>
Note: See TracChangeset
for help on using the changeset viewer.