Add captcha to member login forms
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 11 May 2017 15:18:21 +0000 (11:18 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 11 May 2017 15:18:21 +0000 (11:18 -0400)
Needed to have the member login form work with captcha plugin.

parts/glm-members-only-login-form.php
style.css

index a47937e..cf5def0 100644 (file)
 <div id='glm-member-login-form'>
     <?php 
         update_option('glm_members_database_frontend_login_request', 'true');
-        wp_login_form(1, get_permalink()); 
+                            $args = array(
+                                'echo'    => false,
+                                'form_id' => 'glm_login_form'
+                            );
+                            $loginForm = wp_login_form($args);
+                            $captcha   = apply_filters('cptch_display', '', 'glm_login_form');
+                            $form      = str_replace( '<p class="login-remember">', $captcha . '<p class="login-remember">', $loginForm );
+                            echo $form;
     ?>
 </div>
-<?php get_template_part('parts/glm-members-only-lostpass-form'); ?>
\ No newline at end of file
+<?php get_template_part('parts/glm-members-only-lostpass-form'); ?>
index 57e19e0..9aef591 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: MCDA
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for MCDA
-Version: 1.0.0
+Version: 1.0.2
 */