gethostbynamel function. Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet’s system requirements."
msgstr "Ditt webbhotell eller serveradministratör har inaktiverat PHPs funktion gethostbynamel. Akismet kommer inte att fungera korrekt tills att detta är åtgärdat. Vänligen kontakta ditt webbhotell eller brandväggsadministratör och vidarebefordra följande information om Akismets systemkrav."
-#: views/notice.php:44
+#: views/notice.php:50
msgid "Network functions are disabled."
msgstr "Nätverksfunktioner inaktiverade."
-#: views/notice.php:50
+#: views/notice.php:56
msgid "Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to our guide about firewalls."
msgstr "Din brandvägg kanske blockerar Akismet från att kontakta sitt API. Vänligen kontakta ditt webbhotell/serverleverantör och referera till vår guide om brandväggar."
-#: views/notice.php:60
+#: views/notice.php:66
msgid "Please visit your Akismet account page to reactivate your subscription."
msgstr "Vänligen besök Akismets kontosida för att återaktivera din prenumeration."
-#: views/notice.php:65 views/notice.php:75
+#: views/notice.php:71 views/notice.php:81
msgid "Please contact Akismet support for assistance."
msgstr "Vänligen kontakta Akismets support för assistans."
-#: views/notice.php:70
+#: views/notice.php:76
msgid "You can help us fight spam and upgrade your account by contributing a token amount."
msgstr "Du kan hjälpa oss bekämpa skräppost genom att uppgradera ditt konto och bidra med en symbolisk summa."
-#: views/notice.php:74
+#: views/notice.php:80
msgid "There is a problem with your API key."
msgstr "Det är problem med din API-nyckel."
-#: views/notice.php:106
+#: views/notice.php:112
msgid "The key you entered is invalid. Please double-check it."
msgstr "Din nyckel verkar inte vara korrekt. Kontrollera den igen."
-#: views/notice.php:120
+#: views/notice.php:126
msgid "You’re using your Akismet key on more sites than your Pro subscription allows."
msgstr "Du använder din Akismet-nyckel på fler webbplatser än din Pro-prenumeration tillåter."
-#: views/notice.php:127
+#: views/notice.php:133
msgid "You’re using Akismet on far too many sites for your Pro subscription."
msgstr "Du använder Akismet på allt för många webbplatser för din Pro-prenumeration."
-#: views/start.php:47
-msgid "Connected via Jetpack"
-msgstr "Ansluten via Jetpack"
-
-#: views/start.php:41
-msgid "Reactivate Akismet"
-msgstr "Återaktivera Akismet"
-
-#: views/start.php:43
+#. translators: %s is the WordPress.com email address
+#: views/connect-jp.php:36
msgid "Your subscription for %s is cancelled."
msgstr "Din prenumeration för %s är avslutad."
-#: views/start.php:48
+#. translators: %s is the WordPress.com email address
+#: views/connect-jp.php:44
msgid "Your subscription for %s is suspended."
msgstr "Din prenumeration för %s är suspenderad"
-#: views/start.php:49
+#: views/connect-jp.php:45
msgid "No worries! Get in touch and we’ll sort this out."
msgstr "Oroa dig inte! Kontakta oss så hjälper vi dig att ordna detta."
-#: views/start.php:50
+#: views/connect-jp.php:39
msgid "Contact Akismet support"
msgstr "Kontakta Akismets support"
-#: views/start.php:75
-msgid "Activate Akismet"
-msgstr "Aktivera Akismet"
-
-#: views/start.php:77
-msgid "Get your API key"
-msgstr "Få din API-nyckel"
+#: views/enter.php:2
+msgid "Manually enter an API key"
+msgstr "Ange en API-nyckel manuellt"
#. Plugin URI of the plugin
msgid "https://akismet.com/"
@@ -891,10 +864,10 @@ msgstr "https://automattic.com/wordpress-plugins/"
msgid "Automattic"
msgstr "Automattic"
-#: class.akismet-admin.php:146
+#: class.akismet-admin.php:153
msgid "Remove this URL"
msgstr "Ta bort denna URL"
-#: class.akismet-admin.php:84
+#: class.akismet-admin.php:91
msgid "Comment History"
-msgstr "Kommentarshistorik"
+msgstr "Kommentarshistorik"
\ No newline at end of file
diff --git a/wp-content/plugins/akismet/_inc/akismet.css b/wp-content/plugins/akismet/_inc/akismet.css
index bc56f0610..fea4eb7ba 100644
--- a/wp-content/plugins/akismet/_inc/akismet.css
+++ b/wp-content/plugins/akismet/_inc/akismet.css
@@ -546,6 +546,44 @@ table.comments td.comment p a:after {
margin-top: 1.5rem;
}
+.akismet-box-header {
+ max-width: 700px;
+ margin: 0 auto 40px auto;
+ line-height: 1.5;
+}
+
+.akismet-box-header h2 {
+ margin: 1.5rem 10% 0;
+ font-size: 1.375rem;
+ font-weight: 700;
+ color: #000;
+}
+
+.akismet-box .centered {
+ text-align: center;
+}
+
+.akismet-enter-api-key-box {
+ margin: 1.5rem 0;
+}
+
+.akismet-box .enter-api-key {
+ display: none;
+ margin-top: 1.5rem;
+}
+
+.akismet-box .akismet-toggles {
+ margin: 3rem 0;
+}
+
+.akismet-box .akismet-ak-connect, .akismet-box .toggle-jp-connect {
+ display: none;
+}
+
+.akismet-box .enter-api-key p {
+ padding: 0 1.5rem;
+}
+
.akismet-button, .akismet-button:hover, .akismet-button:visited {
background: white;
border-color: #c8d7e1;
diff --git a/wp-content/plugins/akismet/_inc/akismet.js b/wp-content/plugins/akismet/_inc/akismet.js
index 6cb85e6cd..3445a0940 100644
--- a/wp-content/plugins/akismet/_inc/akismet.js
+++ b/wp-content/plugins/akismet/_inc/akismet.js
@@ -169,6 +169,8 @@ jQuery( function ( $ ) {
function akismet_check_for_spam(offset, limit) {
var check_for_spam_buttons = $( '.checkforspam' );
+ var nonce = check_for_spam_buttons.data( 'nonce' );
+
// We show the percentage complete down to one decimal point so even queues with 100k
// pending comments will show some progress pretty quickly.
var percentage_complete = Math.round( ( recheck_count / check_for_spam_buttons.data( 'pending-comment-count' ) ) * 1000 ) / 10;
@@ -181,9 +183,16 @@ jQuery( function ( $ ) {
{
'action': 'akismet_recheck_queue',
'offset': offset,
- 'limit': limit
+ 'limit': limit,
+ 'nonce': nonce
},
function(result) {
+ if ( 'error' in result ) {
+ // An error is only returned in the case of a missing nonce, so we don't need the actual error message.
+ window.location.href = check_for_spam_buttons.data( 'failure-url' );
+ return;
+ }
+
recheck_count += result.counts.processed;
spam_count += result.counts.spam;
@@ -282,27 +291,64 @@ jQuery( function ( $ ) {
/**
* Sets the comment form privacy notice display to hide when one clicks Core's dismiss button on the related admin notice.
*/
- $( '#akismet-privacy-notice-admin-notice' ).on( 'click', '.notice-dismiss', function(){
- $.ajax({
- url: './options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=hide',
- });
+ $( '#akismet-privacy-notice-admin-notice' ).on( 'click', '.notice-dismiss', function () {
+ $.ajax( {
+ url: './options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=hide',
+ } );
});
- $( ".akismet-could-be-primary" ).each( function () {
+ $( '.akismet-could-be-primary' ).each( function () {
var form = $( this ).closest( 'form' );
form.data( 'initial-state', form.serialize() );
form.on( 'change keyup', function () {
var self = $( this );
- var submit_button = self.find( ".akismet-could-be-primary" );
+ var submit_button = self.find( '.akismet-could-be-primary' );
if ( self.serialize() != self.data( 'initial-state' ) ) {
- submit_button.addClass( "akismet-is-primary" );
+ submit_button.addClass( 'akismet-is-primary' );
}
else {
- submit_button.removeClass( "akismet-is-primary" );
+ submit_button.removeClass( 'akismet-is-primary' );
}
} );
} );
+
+ /**
+ * Shows the Enter API key form
+ */
+ $( '.akismet-enter-api-key-box a' ).on( 'click', function ( e ) {
+ e.preventDefault();
+
+ var div = $( '.enter-api-key' );
+ div.show( 500 );
+ div.find( 'input[name=key]' ).focus();
+
+ $( this ).hide();
+ } );
+
+ /**
+ * Hides the Connect with Jetpack form | Shows the Activate Akismet Account form
+ */
+ $( 'a.toggle-ak-connect' ).on( 'click', function ( e ) {
+ e.preventDefault();
+
+ $( '.akismet-ak-connect' ).slideToggle('slow');
+ $( 'a.toggle-ak-connect' ).hide();
+ $( '.akismet-jp-connect' ).hide();
+ $( 'a.toggle-jp-connect' ).show();
+ } );
+
+ /**
+ * Shows the Connect with Jetpack form | Hides the Activate Akismet Account form
+ */
+ $( 'a.toggle-jp-connect' ).on( 'click', function ( e ) {
+ e.preventDefault();
+
+ $( '.akismet-jp-connect' ).slideToggle('slow');
+ $( 'a.toggle-jp-connect' ).hide();
+ $( '.akismet-ak-connect' ).hide();
+ $( 'a.toggle-ak-connect' ).show();
+ } );
});
diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php
index 49608e5a6..538a7dbc6 100644
--- a/wp-content/plugins/akismet/akismet.php
+++ b/wp-content/plugins/akismet/akismet.php
@@ -6,7 +6,7 @@
Plugin Name: Akismet Anti-Spam
Plugin URI: https://akismet.com/
Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
-Version: 4.1.2
+Version: 4.1.3
Author: Automattic
Author URI: https://automattic.com/wordpress-plugins/
License: GPLv2 or later
@@ -37,7 +37,7 @@ if ( !function_exists( 'add_action' ) ) {
exit;
}
-define( 'AKISMET_VERSION', '4.1.2' );
+define( 'AKISMET_VERSION', '4.1.3' );
define( 'AKISMET__MINIMUM_WP_VERSION', '4.0' );
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'AKISMET_DELETE_LIMIT', 100000 );
diff --git a/wp-content/plugins/akismet/class.akismet-admin.php b/wp-content/plugins/akismet/class.akismet-admin.php
index f0766ebee..b5e2ef8e4 100644
--- a/wp-content/plugins/akismet/class.akismet-admin.php
+++ b/wp-content/plugins/akismet/class.akismet-admin.php
@@ -80,6 +80,13 @@ class Akismet_Admin {
}
public static function admin_init() {
+ if ( get_option( 'Activated_Akismet' ) ) {
+ delete_option( 'Activated_Akismet' );
+ if ( ! headers_sent() ) {
+ wp_redirect( add_query_arg( array( 'page' => 'akismet-key-config', 'view' => 'start' ), class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'options-general.php' ) ) );
+ }
+ }
+
load_plugin_textdomain( 'akismet' );
add_meta_box( 'akismet-status', __('Comment History', 'akismet'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' );
@@ -396,8 +403,10 @@ class Akismet_Admin {
href="' . esc_url( $link ) . '"
data-active-label="' . esc_attr( __( 'Checking for Spam', 'akismet' ) ) . '"
data-progress-label-format="' . esc_attr( __( '(%1$s%)', 'akismet' ) ) . '"
- data-success-url="' . esc_attr( remove_query_arg( 'akismet_recheck', add_query_arg( array( 'akismet_recheck_complete' => 1, 'recheck_count' => urlencode( '__recheck_count__' ), 'spam_count' => urlencode( '__spam_count__' ) ) ) ) ) . '"
+ 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' ) ) . '"
>';
echo '';
echo '';
@@ -414,6 +423,13 @@ class Akismet_Admin {
if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) {
return;
}
+
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'akismet_check_for_spam' ) ) {
+ wp_send_json( array(
+ 'error' => __( "You don't have permission to do that."),
+ ));
+ return;
+ }
$result_counts = self::recheck_queue_portion( empty( $_POST['offset'] ) ? 0 : $_POST['offset'], empty( $_POST['limit'] ) ? 100 : $_POST['limit'] );
@@ -1061,6 +1077,9 @@ class Akismet_Admin {
echo '' . esc_html( $message ) . '
' . esc_html( __( 'Akismet could not recheck your comments for spam.', 'akismet' ) ) . '