[gentoo-commits] proj/blogs-gentoo:master commit in: plugins/akismet/, plugins/akismet/views/, plugins/akismet/_inc/

2018-06-08 Thread Anthony G. Basile
commit: 7ca0ec095e0c737d2f181e015cc01b1bd9463f4c
Author: Anthony G. Basile  gentoo  org>
AuthorDate: Fri Jun  8 14:07:37 2018 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Fri Jun  8 14:07:37 2018 +
URL:https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=7ca0ec09

Update akismet 4.0.7

 plugins/akismet/_inc/akismet.css|  6 +++-
 plugins/akismet/_inc/akismet.js | 11 ++-
 plugins/akismet/akismet.php |  4 +--
 plugins/akismet/class.akismet-admin.php | 54 -
 plugins/akismet/class.akismet.php   | 35 -
 plugins/akismet/readme.txt  | 29 --
 plugins/akismet/views/config.php| 13 +++-
 plugins/akismet/views/notice.php| 10 --
 8 files changed, 151 insertions(+), 11 deletions(-)

diff --git a/plugins/akismet/_inc/akismet.css b/plugins/akismet/_inc/akismet.css
index 85f3c5e..bf40fb1 100644
--- a/plugins/akismet/_inc/akismet.css
+++ b/plugins/akismet/_inc/akismet.css
@@ -417,6 +417,10 @@ table.comments td.comment p a:after {
padding: 1.5rem;
 }
 
+.akismet-lower .notice {
+   margin-bottom: 2rem;
+}
+
 .akismet-card {
margin-top: 1rem;
margin-bottom: 0;
@@ -583,4 +587,4 @@ table.comments td.comment p a:after {
 
 .akismet-section-header__actions {
line-height: 1.75rem;
-}
\ No newline at end of file
+}

diff --git a/plugins/akismet/_inc/akismet.js b/plugins/akismet/_inc/akismet.js
index cac4d57..b5df186 100644
--- a/plugins/akismet/_inc/akismet.js
+++ b/plugins/akismet/_inc/akismet.js
@@ -273,4 +273,13 @@ jQuery( function ( $ ) {
var img = new Image();
img.src = akismet_mshot_url( linkUrl );
}
-});
\ No newline at end of file
+
+   /**
+* 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_comment_form_privacy_notice=hide',
+   });
+   });
+});

diff --git a/plugins/akismet/akismet.php b/plugins/akismet/akismet.php
index a8ea4a1..e16f888 100644
--- a/plugins/akismet/akismet.php
+++ b/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.0.3
+Version: 4.0.7
 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.0.3' );
+define( 'AKISMET_VERSION', '4.0.7' );
 define( 'AKISMET__MINIMUM_WP_VERSION', '4.0' );
 define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
 define( 'AKISMET_DELETE_LIMIT', 10 );

diff --git a/plugins/akismet/class.akismet-admin.php 
b/plugins/akismet/class.akismet-admin.php
index 42e884f..1e80617 100644
--- a/plugins/akismet/class.akismet-admin.php
+++ b/plugins/akismet/class.akismet-admin.php
@@ -32,6 +32,10 @@ class Akismet_Admin {
if ( isset( $_POST['action'] ) && $_POST['action'] == 
'enter-key' ) {
self::enter_api_key();
}
+
+   if ( ! empty( $_GET['akismet_comment_form_privacy_notice'] ) && 
empty( $_GET['settings-updated']) ) {
+   self::set_form_privacy_notice_option( 
$_GET['akismet_comment_form_privacy_notice'] );
+   }
}
 
public static function init_hooks() {
@@ -65,11 +69,23 @@ class Akismet_Admin {
add_filter( 'wxr_export_skip_commentmeta', array( 
'Akismet_Admin', 'exclude_commentmeta_from_export' ), 10, 3 );

add_filter( 'all_plugins', array( 'Akismet_Admin', 
'modify_plugin_description' ) );
+
+   if ( class_exists( 'Jetpack' ) ) {
+   add_filter( 
'akismet_comment_form_privacy_notice_url_display',  array( 'Akismet_Admin', 
'jetpack_comment_form_privacy_notice_url' ) );
+   add_filter( 
'akismet_comment_form_privacy_notice_url_hide', array( 'Akismet_Admin', 
'jetpack_comment_form_privacy_notice_url' ) );
+   }
}
 
public static function admin_init() {
load_plugin_textdomain( 'akismet' );
add_meta_box( 'akismet-status', __('Comment History', 
'akismet'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 
'normal' );
+
+   if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
+   

[gentoo-commits] proj/blogs-gentoo:master commit in: plugins/akismet/, plugins/akismet/views/, plugins/akismet/_inc/

2017-09-01 Thread Anthony G. Basile
commit: 05952b31eb58ff8cd2da3923cc86d78aca6aec06
Author: Anthony G. Basile  gentoo  org>
AuthorDate: Sat Sep  2 00:12:26 2017 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Sat Sep  2 00:12:26 2017 +
URL:https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=05952b31

Update akismet 3.3.4

Signed-off-by: Anthony G. Basile  gentoo.org>

 plugins/akismet/_inc/akismet.js  |  54 ++--
 plugins/akismet/akismet.php  |   4 +-
 plugins/akismet/class.akismet-admin.php  |  40 +
 plugins/akismet/class.akismet-widget.php |   2 +-
 plugins/akismet/class.akismet.php|  28 --
 plugins/akismet/readme.txt   |  20 -
 plugins/akismet/views/config.php | 110 +++
 plugins/akismet/views/notice.php |   4 +-
 plugins/akismet/views/start.php  | 147 ---
 9 files changed, 249 insertions(+), 160 deletions(-)

diff --git a/plugins/akismet/_inc/akismet.js b/plugins/akismet/_inc/akismet.js
index b7ff719..c1ddc8b 100644
--- a/plugins/akismet/_inc/akismet.js
+++ b/plugins/akismet/_inc/akismet.js
@@ -3,6 +3,8 @@ jQuery( function ( $ ) {
var mshotSecondTryTimer = null
var mshotThirdTryTimer = null

+   var mshotEnabledLinkSelector = 'a[id^="author_comment_url"], 
tr.pingback td.column-author a:first-of-type, td.comment p a';
+   
$('.akismet-status').each(function () {
var thisId = $(this).attr('commentid');
$(this).prependTo('#comment-' + thisId + ' .column-comment');
@@ -82,7 +84,7 @@ jQuery( function ( $ ) {
});
 
// Show a preview image of the hovered URL. Applies to author URLs and 
URLs inside the comments.
-   $( '#the-comment-list' ).on( 'mouseover', 'a[id^="author_comment_url"], 
tr.pingback td.column-author a:first-of-type, td.comment p a', function () {
+   $( '#the-comment-list' ).on( 'mouseover', mshotEnabledLinkSelector, 
function () {
clearTimeout( mshotRemovalTimer );
 
if ( $( '.akismet-mshot' ).length > 0 ) {
@@ -99,9 +101,9 @@ jQuery( function ( $ ) {
clearTimeout( mshotSecondTryTimer );
clearTimeout( mshotThirdTryTimer );
 
-   var thisHref = encodeURIComponent( $( this ).attr( 'href' ) );
+   var thisHref = $( this ).attr( 'href' );
 
-   var mShot = $( '' );
+   var mShot = $( '' );
mShot.data( 'link', this );
 
var offset = $( this ).offset();
@@ -111,12 +113,15 @@ jQuery( function ( $ ) {
top: offset.top + ( $( this ).height() / 2 ) - 101 // 
101 = top offset of the arrow plus the top border thickness
} );
 
+   // These retries appear to be superfluous if .mshot-image has 
already loaded, but it's because mShots
+   // can return a "Generating thumbnail..." image if it doesn't 
have a thumbnail ready, so we need
+   // to retry to see if we can get the newly generated thumbnail.
mshotSecondTryTimer = setTimeout( function () {
-   mShot.find( '.mshot-image' ).attr( 'src', 
'//s0.wordpress.com/mshots/v1/'+thisHref+'?w=450=2' );
+   mShot.find( '.mshot-image' ).attr( 'src', 
akismet_mshot_url( thisHref, 2 ) );
}, 6000 );
 
mshotThirdTryTimer = setTimeout( function () {
-   mShot.find( '.mshot-image' ).attr( 'src', 
'//s0.wordpress.com/mshots/v1/'+thisHref+'?w=450=3' );
+   mShot.find( '.mshot-image' ).attr( 'src', 
akismet_mshot_url( thisHref, 3 ) );
}, 12000 );
 
$( 'body' ).append( mShot );
@@ -127,6 +132,18 @@ jQuery( function ( $ ) {
 
$( '.akismet-mshot' ).remove();
}, 200 );
+   } ).on( 'mouseover', 'tr', function () {
+   // When the mouse hovers over a comment row, begin preloading 
mshots for any links in the comment or the comment author.
+   var linksToPreloadMshotsFor = $( this ).find( 
mshotEnabledLinkSelector );
+   
+   linksToPreloadMshotsFor.each( function () {
+   // Don't attempt to preload an mshot for a single link 
twice. Browser caching should cover this, but in case of
+   // race conditions, save a flag locally when we've 
begun trying to preload one.
+   if ( ! $( this ).data( 'akismet-mshot-preloaded' ) ) {
+   akismet_preload_mshot( $( this ).attr( 'href' ) 
);
+   $( this ).data( 'akismet-mshot-preloaded', true 
);
+   }
+   } );
} );
 
$('.checkforspam:not(.button-disabled)').click( function(e) {
@@ -223,4 +240,31 @@ jQuery( function ( $ ) {
}
});
}
+ 

[gentoo-commits] proj/blogs-gentoo:master commit in: plugins/akismet/, plugins/akismet/views/, plugins/akismet/_inc/img/, ...

2017-03-07 Thread Yury German
commit: 1f38dbdf035b1f008eddfe052d3a17c66240ed8a
Author: Yury German  gentoo  org>
AuthorDate: Wed Mar  8 02:01:02 2017 +
Commit: Yury German  gentoo  org>
CommitDate: Wed Mar  8 02:01:02 2017 +
URL:https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=1f38dbdf

Upgrade Akismet to 3.3

 plugins/akismet/_inc/akismet.css  | 508 ++
 plugins/akismet/_inc/akismet.js   |  35 +-
 plugins/akismet/_inc/img/logo-full-2x.png | Bin 4970 -> 7570 bytes
 plugins/akismet/akismet.php   |   8 +-
 plugins/akismet/class.akismet-admin.php   | 184 ---
 plugins/akismet/class.akismet.php |  18 +-
 plugins/akismet/readme.txt|  17 +-
 plugins/akismet/views/config.php  | 402 +++
 plugins/akismet/views/get.php |   2 +-
 plugins/akismet/views/notice.php  | 108 ---
 plugins/akismet/views/start.php   | 184 ++-
 plugins/akismet/views/stats.php   |  13 +-
 plugins/akismet/views/strict.php  |  17 -
 plugins/akismet/wrapper.php   |   2 +-
 14 files changed, 872 insertions(+), 626 deletions(-)

diff --git a/plugins/akismet/_inc/akismet.css b/plugins/akismet/_inc/akismet.css
index d38e14b..53495bb 100644
--- a/plugins/akismet/_inc/akismet.css
+++ b/plugins/akismet/_inc/akismet.css
@@ -1,3 +1,6 @@
+.wp-admin.jetpack_page_akismet-key-config, 
.wp-admin.settings_page_akismet-key-config {
+   background-color:#f3f6f8;
+}
 
 #submitted-on {
 position: relative;
@@ -73,136 +76,37 @@ table.comments td.comment p a:after {
 height: 338px;
 width: 450px;
 }
-h2.ak-header {
-padding: 30px;
-background: #649316 url('img/logo-full-2x.png') no-repeat 20px center;
-background-size: 185px 33px;
-height: 33px;
-text-indent: -em;
-margin-right: 10px;
-}
 .checkforspam {
 display: inline-block !important;
 }
-.checkforspam-spinner {
-display: inline-block;
-margin-top: 7px;
-}
-
-.config-wrap {
-   margin-top: 2em;
-max-width: 700px;
-}
-
-.activate-option {
-background: #e3e3e3;
-border-radius: 3px;
-margin-bottom: 30px;
-overflow: hidden;
-padding: 20px;
-}
-.activate-option.clicked {
-   background: #649316;
-   color: #fff;
-}
-.activate-option.clicked:hover {
-   background: #68802E;
-   color: #fff;
-}
-
-.activate-option .button.button-secondary {
-   margin: 15px 0;
-}
-
-.activate-option p {
-   margin: 10px 0 10px;
-}
-
-.activate-highlight {
-   background: #fff;
-   padding: 30px;
-   margin-right: 10px;
+.checkforspam-progress {
+   padding-left: 1ex;
+   display: none;
 }
-
-.activate-highlight.secondary {
-   background: #ddd;
-   padding: 20px 30px;
+.checkforspam.button-disabled .checkforspam-progress {
+   display: inline;
 }
 
-.activate-highlight h3 {
-   margin: 0 0 0.3em;
-}
-.activate-highlight p {
-   color: #777;
-}
-.activate-highlight .button-primary {
-   margin-top: 15px;
+.checkforspam-spinner {
+display: inline-block;
+margin-top: 7px;
 }
 
-#akismet-enter-api-key .regular-text {
-   width: 18em;
-   margin-top: 15px;
+.akismet-right {
+   float: right;
 }
 
-.right {
-   float: right;
+.akismet-card .akismet-right {
+   margin: 1em 0;
 }
 
-.alert-text {
+.akismet-alert-text {
color: #dd3d36;
+   font-weight: bold;
+   font-size: 120%;
+   margin-top: .5rem;
 }
-.success {
-   color: #649316;
-}
-.option-description {
-float: left;
-font-size: 16px;
-}
-.option-description span {
-color: #666;
-display: block;
-font-size: 14px;
-margin-top: 5px;
-}
-.option-action {
-float: right;
-}
-.key-config-link {
-font-size: 14px;
-margin-left: 20px;
-}
-.jetpack-account {
-float: left;
-font-size: 18px;
-margin-right: 40px;
-}
-.small-heading {
-color: #777;
-display: block;
-font-size: 12px;
-font-weight: bold;
-margin-bottom: 5px;
-text-transform: uppercase;
-}
-.inline-label {
-background: #ddd;
-border-radius: 3px;
-font-size: 11px;
-padding: 3px 8px;
-text-transform: uppercase;
-}
-.inline-label.alert {
-background: #e54747;
-color: #fff;
-}
-.jetpack-account .inline-label {
-margin-left: 5px;
-}
-.option-action .manual-key {
-margin-top: 7px;
-}
-
-.alert {
+.akismet-alert {
border: 1px solid #e5e5e5;
padding: 0.4em 1em 1.4em 1em;
 border-radius: 3px;
@@ -211,49 +115,45 @@ h2.ak-header {
 border-style: solid;
 }
 
-.alert h3.key-status {
+.akismet-alert h3.akismet-key-status {
color: #fff;
margin: 1em 0 0.5em 0;
 }
 
-.alert.critical {
+.akismet-alert.akismet-critical {
background-color: #993300;
 }
 
-.alert.active {
+.akismet-alert.akismet-active {
background-color: #649316;
 }
 
-.alert p.key-status {
+.akismet-alert p.akismet-key-status {

[gentoo-commits] proj/blogs-gentoo:master commit in: plugins/akismet/, plugins/akismet/views/, plugins/akismet/_inc/

2016-05-18 Thread Anthony G. Basile
commit: d7ae460ed642e717f79ab028c27f13e5f1b71167
Author: Anthony G. Basile  gentoo  org>
AuthorDate: Wed May 18 11:31:37 2016 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Wed May 18 11:31:37 2016 +
URL:https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=d7ae460e

Update plugin akismet to 3.1.11

 plugins/akismet/.htaccess|  4 ++--
 plugins/akismet/_inc/akismet.js  |  3 ++-
 plugins/akismet/akismet.php  | 10 +-
 plugins/akismet/class.akismet-admin.php  | 13 +++--
 plugins/akismet/class.akismet-widget.php |  2 +-
 plugins/akismet/class.akismet.php| 20 ++--
 plugins/akismet/readme.txt   | 16 
 plugins/akismet/views/notice.php |  8 
 8 files changed, 51 insertions(+), 25 deletions(-)

diff --git a/plugins/akismet/.htaccess b/plugins/akismet/.htaccess
index f271986..49d72d7 100644
--- a/plugins/akismet/.htaccess
+++ b/plugins/akismet/.htaccess
@@ -12,7 +12,7 @@
 
 
 # Akismet CSS and JS
-
+

Allow from all

@@ -23,7 +23,7 @@
 
 
 # Akismet images
-
+

Allow from all


diff --git a/plugins/akismet/_inc/akismet.js b/plugins/akismet/_inc/akismet.js
index 101db40..246c858 100644
--- a/plugins/akismet/_inc/akismet.js
+++ b/plugins/akismet/_inc/akismet.js
@@ -181,7 +181,8 @@ jQuery( function ( $ ) {
window.location.reload();
}
else {
-   akismet_check_for_spam(offset + limit, 
limit);
+   // Account for comments that were 
caught as spam and moved out of the queue.
+   akismet_check_for_spam(offset + limit - 
result.counts.spam, limit);
}
}
);

diff --git a/plugins/akismet/akismet.php b/plugins/akismet/akismet.php
index a4807c9..a65a0d6 100644
--- a/plugins/akismet/akismet.php
+++ b/plugins/akismet/akismet.php
@@ -4,11 +4,11 @@
  */
 /*
 Plugin Name: Akismet
-Plugin URI: http://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: 1) Click the "Activate" link to 
the left of this description, 2) http://akismet.com/get/;>Sign up for 
an Akismet plan to get an API key, and 3) Go to your Akismet configuration 
page, and save your API key.
-Version: 3.1.10
+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: 1) Click the "Activate" link to 
the left of this description, 2) https://akismet.com/get/;>Sign up for 
an Akismet plan to get an API key, and 3) Go to your Akismet configuration 
page, and save your API key.
+Version: 3.1.11
 Author: Automattic
-Author URI: http://automattic.com/wordpress-plugins/
+Author URI: https://automattic.com/wordpress-plugins/
 License: GPLv2 or later
 Text Domain: akismet
 */
@@ -37,7 +37,7 @@ if ( !function_exists( 'add_action' ) ) {
exit;
 }
 
-define( 'AKISMET_VERSION', '3.1.10' );
+define( 'AKISMET_VERSION', '3.1.11' );
 define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' );
 define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
 define( 'AKISMET_DELETE_LIMIT', 10 );

diff --git a/plugins/akismet/class.akismet-admin.php 
b/plugins/akismet/class.akismet-admin.php
index 08d6770..c9e82eb 100644
--- a/plugins/akismet/class.akismet-admin.php
+++ b/plugins/akismet/class.akismet-admin.php
@@ -366,6 +366,12 @@ class Akismet_Admin {
}
$moderation = $wpdb->get_results( "SELECT * FROM 
{$wpdb->comments} WHERE comment_approved = '0'{$paginate}", ARRAY_A );
 
+   $result_counts = array(
+   'spam' => 0,
+   'ham' => 0,
+   'error' => 0,
+   );
+
foreach ( (array) $moderation as $c ) {
$c['user_ip']  = $c['comment_author_IP'];
$c['user_agent']   = $c['comment_agent'];
@@ -392,14 +398,15 @@ class Akismet_Admin {
delete_comment_meta( $c['comment_ID'], 
'akismet_error' );
delete_comment_meta( $c['comment_ID'], 
'akismet_delayed_moderation_email' );
Akismet::update_comment_history( 
$c['comment_ID'], '', 'recheck-spam' );
-
+   ++$result_counts['spam'];
} elseif ( 'false' == $response[1] ) {
update_comment_meta( $c['comment_ID'], 
'akismet_result', 'false' );
delete_comment_meta(