diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-12-12 20:29:44 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-12-12 20:29:55 -0500 |
commit | 73ce9c10188ce4f5014c97ad4c0f8c9f69410113 (patch) | |
tree | ac0b7b2f7cb14a145e2308d705033f89cebc736d /plugins/jetpack/sync/class.jetpack-sync-module-protect.php | |
parent | Update wordpress-mobile-pack 3.2 (diff) | |
download | blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.gz blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.bz2 blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.zip |
Update jetpack 5.6
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/sync/class.jetpack-sync-module-protect.php')
-rw-r--r-- | plugins/jetpack/sync/class.jetpack-sync-module-protect.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-protect.php b/plugins/jetpack/sync/class.jetpack-sync-module-protect.php index 88c13090..d81d3591 100644 --- a/plugins/jetpack/sync/class.jetpack-sync-module-protect.php +++ b/plugins/jetpack/sync/class.jetpack-sync-module-protect.php @@ -1,6 +1,23 @@ <?php + /** - * Deprecated. No longer needed. - * - * @package Jetpack + * logs bruteprotect failed logins via sync */ +class Jetpack_Sync_Module_Protect extends Jetpack_Sync_Module { + + function name() { + return 'protect'; + } + + function init_listeners( $callback ) { + add_action( 'jpp_log_failed_attempt', array( $this, 'maybe_log_failed_login_attempt' ) ); + add_action( 'jetpack_valid_failed_login_attempt', $callback ); + } + + function maybe_log_failed_login_attempt( $ip ) { + $protect = Jetpack_Protect_Module::instance(); + if ( $protect->has_login_ability() ) { + do_action( 'jetpack_valid_failed_login_attempt', $ip ); + } + } +} |