]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/plugins/akismet/class.akismet-admin.php
WordPress 4.0
[autoinstalls/wordpress.git] / wp-content / plugins / akismet / class.akismet-admin.php
index 7a62ccbd6453cba7350954deb1cee08b20cf6c79..a1c712e01aa7a5e681b4b6659a24cb10292b93de 100644 (file)
@@ -367,7 +367,8 @@ class Akismet_Admin {
 
                        add_comment_meta( $c['comment_ID'], 'akismet_rechecking', true );
 
-                       $response = Akismet::http_post( build_query( $c ), 'comment-check' );
+                       $response = Akismet::http_post( Akismet::build_query( $c ), 'comment-check' );
+                       
                        if ( 'true' == $response[1] ) {
                                wp_set_comment_status( $c['comment_ID'], 'spam' );
                                update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' );
@@ -625,7 +626,7 @@ class Akismet_Admin {
        }
        
        public static function get_akismet_user( $api_key ) {
-               $akismet_user = Akismet::http_post( build_query( array( 'key' => $api_key ) ), 'get-subscription' );
+               $akismet_user = Akismet::http_post( Akismet::build_query( array( 'key' => $api_key ) ), 'get-subscription' );
 
                if ( ! empty( $akismet_user[1] ) )
                        $akismet_user = json_decode( $akismet_user[1] );
@@ -639,7 +640,7 @@ class Akismet_Admin {
                $stat_totals = array();
 
                foreach( array( '6-months', 'all' ) as $interval ) {
-                       $response = Akismet::http_post( build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' );
+                       $response = Akismet::http_post( Akismet::build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' );
 
                        if ( ! empty( $response[1] ) ) {
                                $stat_totals[$interval] = json_decode( $response[1] );
@@ -649,7 +650,7 @@ class Akismet_Admin {
        }
        
        public static function verify_wpcom_key( $api_key, $user_id, $token = '' ) {
-               $akismet_account = Akismet::http_post( build_query( array(
+               $akismet_account = Akismet::http_post( Akismet::build_query( array(
                        'user_id'          => $user_id,
                        'api_key'          => $api_key,
                        'token'            => $token,
@@ -674,11 +675,11 @@ class Akismet_Admin {
 
        public static function display_spam_check_warning() {
                Akismet::fix_scheduled_recheck();
-               
-               $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) );
 
-               if ( self::get_number_spam_waiting() > 0 && wp_next_scheduled('akismet_schedule_cron_recheck') > time() )
+               if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::get_number_spam_waiting() > 0 ) {
+                       $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) );
                        Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) );
+               }
        }
 
        public static function display_invalid_version() {