Created
January 3, 2015 10:27
-
-
Save mcguffin/97d7f442ee3e92b7412e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WP reCaptcha comment form fix | |
Plugin URI: https://gist.github.com/mcguffin/97d7f442ee3e92b7412e | |
Description: Will bring back reCaptcha to comment form | |
Author: Jörn Lund | |
Author URI: http://github.org/mcguffin | |
Version: 0.0.1 | |
*/ | |
function recaptcha_comments_init() { | |
if ( class_exists( 'WP_reCaptcha' ) ) { | |
$rec = WP_reCaptcha::instance(); | |
if ( $rec->is_required() ) | |
add_action( 'comment_form_after_fields' , array( $rec , 'print_recaptcha_html' ) , 10 , 0 ); | |
} | |
} | |
add_action('init','recaptcha_comments_init'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Developer,
Could you integrate this fix in your plugin?
Thank you!