function popmake_alm_ajax_recovery_modal_shortcode($atts) { global $popmake_login_modal, $popmake_registration_modal, $popmake_recovery_modal, $user_email, $user_login; get_currentuserinfo(); $atts = shortcode_atts(array(), $atts); ob_start(); $ajax_recovery = popmake_get_popup_ajax_recovery($popmake_recovery_modal); include popmake_get_template_part('ajax-recovery-form', null, false); return ob_get_clean(); }
public function popup_data_attr($data_attr, $popup_id) { global $popmake_login_modal, $popmake_registration_modal, $popmake_recovery_modal; if (!in_array($popup_id, array($popmake_login_modal, $popmake_registration_modal, $popmake_recovery_modal))) { return $data_attr; } if ($popmake_login_modal == $popup_id) { $data_attr['meta']['ajax_login'] = popmake_get_popup_ajax_login($popup_id); if (popmake_get_popup_ajax_login($popup_id, 'force_login')) { $data_attr['meta']['close']['esc_press'] = false; $data_attr['meta']['close']['overlay_click'] = false; } } if ($popmake_registration_modal == $popup_id) { $data_attr['meta']['ajax_registration'] = popmake_get_popup_ajax_registration($popup_id); } if ($popmake_recovery_modal == $popup_id) { $data_attr['meta']['ajax_recovery'] = popmake_get_popup_ajax_recovery($popup_id); } return $data_attr; }
function popmake_alm_footer_links($which = array()) { global $popmake_login_modal, $popmake_registration_modal, $popmake_recovery_modal; if (empty($which)) { return; } ob_start(); ?> <ul class='popmake-alm-footer-links'><?php foreach ($which as $key) { switch ($key) { case 'login': if (popmake_get_popup_ajax_login($popmake_login_modal, 'enabled')) { ?> <li><?php _e('Already have an account?', 'popup-maker-ajax-login-modals'); ?> <a href="<?php echo wp_login_url(); ?> " class="popmake-<?php echo $popmake_login_modal; ?> popswitch-login"><?php _e('Log in'); ?> </a></li><?php } break; case 'registration': $register = wp_register('', '', false); if (popmake_get_popup_ajax_registration($popmake_registration_modal, 'enabled') && !empty($register)) { ?> <li><?php _e('Don\'t have an account?', 'popup-maker-ajax-login-modals'); ?> <?php echo $register; ?> </li><?php } break; case 'recovery': if (popmake_get_popup_ajax_recovery($popmake_recovery_modal, 'enabled')) { ?> <li><?php _e('Lost your password?'); ?> <a href='<?php echo wp_lostpassword_url(); ?> ' class='popmake-<?php echo $popmake_recovery_modal; ?> popswitch-recovery'><?php _e('Click here', 'popup-maker-ajax-login-modals'); ?> </a></li><?php } break; } } do_action('popmake_alm_footer_links'); ?> </ul><?php return ob_get_clean(); }
public function recovery_redirect_url($popup_id) { ?> <tr class="ajax_recovery_enabled ajax_recovery_redirect_enabled"> <th scope="row"> <label for="popup_ajax_recovery_redirect_url"> <?php _e('Recovery Redirect URL', 'popup-maker-ajax-login-modals'); ?> </label> </th> <td> <input type="text" class="regular-text" name="popup_ajax_recovery_redirect_url" id="popup_ajax_recovery_redirect_url" value="<?php esc_attr_e(popmake_get_popup_ajax_recovery($popup_id, 'redirect_url')); ?> "/> <p class="description"><?php _e('If you want to redirect to another page after password recovery enter the url here. Leaving blank will keep user on the same page.', 'popup-maker-ajax-login-modals'); ?> </p> </td> </tr><?php }