Changeset 697763
- Timestamp:
- 04/15/2013 11:11:08 AM (13 years ago)
- Location:
- sexy-login
- Files:
-
- 25 added
- 12 edited
-
tags/2.1 (added)
-
tags/2.1/img (added)
-
tags/2.1/img/ajax-loader.gif (added)
-
tags/2.1/inc (added)
-
tags/2.1/inc/activation.php (added)
-
tags/2.1/inc/admin (added)
-
tags/2.1/inc/admin/class-sexy-login-admin.php (added)
-
tags/2.1/inc/ajax.php (added)
-
tags/2.1/inc/class-sexy-login-attempts.php (added)
-
tags/2.1/inc/class-sexy-login-widget.php (added)
-
tags/2.1/inc/lib (added)
-
tags/2.1/inc/lib/recaptchalib.php (added)
-
tags/2.1/js (added)
-
tags/2.1/js/admin.js (added)
-
tags/2.1/js/jquery.blockUI.js (added)
-
tags/2.1/js/sexy-login.js (added)
-
tags/2.1/lang (added)
-
tags/2.1/lang/sl-domain-es_ES.mo (added)
-
tags/2.1/lang/sl-domain-es_ES.po (added)
-
tags/2.1/readme.txt (added)
-
tags/2.1/screenshot-1.png (added)
-
tags/2.1/sexy-login-init.php (added)
-
tags/2.1/sl-config.php (added)
-
tags/2.1/style.css (added)
-
tags/2.1/uninstall.php (added)
-
trunk/inc/activation.php (modified) (1 diff)
-
trunk/inc/admin/class-sexy-login-admin.php (modified) (6 diffs)
-
trunk/inc/ajax.php (modified) (6 diffs)
-
trunk/inc/class-sexy-login-widget.php (modified) (5 diffs)
-
trunk/js/admin.js (modified) (1 diff)
-
trunk/js/sexy-login.js (modified) (7 diffs)
-
trunk/lang/sl-domain-es_ES.mo (modified) (previous)
-
trunk/lang/sl-domain-es_ES.po (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/sexy-login-init.php (modified) (5 diffs)
-
trunk/sl-config.php (modified) (1 diff)
-
trunk/style.css (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sexy-login/trunk/inc/activation.php
r672961 r697763 27 27 'redirect_login_url' => '', 28 28 'redirect_logout' => 'current', 29 'redirect_logout_url' => '' 29 'redirect_logout_url' => '', 30 'registration_enabled' => TRUE, 31 'lostpwd_enabled' => TRUE 30 32 ); 31 33 $old_options = get_option( 'sl_options' ); -
sexy-login/trunk/inc/admin/class-sexy-login-admin.php
r672961 r697763 2 2 class Sexy_Login_Admin { 3 3 4 private $page_hook; 5 4 6 public function __construct() { 5 7 6 add_action( 'admin_init', array( $this, 'sl_options_init' ) ); 7 add_action( 'admin_menu', array( $this, 'sl_options_add_page' ) ); 8 9 } 10 11 function sl_options_init(){ 8 $this->upgrade(); 9 10 add_action( 'admin_menu', array( $this, 'add_to_menu' ) ); 11 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 12 13 } 14 15 function add_to_menu() { 16 12 17 register_setting( 'sl_options', 'sl_options', array( $this, 'sl_options_validate' ) ); 13 } 14 15 function sl_options_add_page() { 16 add_options_page( __( 'Sexy Login Options', 'sl-domain' ), __( 'Sexy Login Options', 'sl-domain' ), 'manage_options', 'sl_options', array( $this, 'sl_options_do_page' ) ); 18 $this->page_hook = add_options_page( __( 'Sexy Login Options', 'sl-domain' ), __( 'Sexy Login Options', 'sl-domain' ), 'manage_options', 'sl_options', array( $this, 'sl_options_do_page' ) ); 19 20 } 21 22 function enqueue_scripts( $hook ) { 23 24 if( $hook != $this->page_hook ) 25 return; 26 27 wp_register_script( 'sl-admin-js', SL_PLUGIN_ROOT_URL . 'js/admin.js', array( 'jquery' ), '1.0' ); 28 wp_enqueue_script( 'sl-admin-js' ); 29 17 30 } 18 31 … … 21 34 $sl_options = get_option( 'sl_options' ); 22 35 $captcha_enabled = ( $sl_options['enable_captcha'] ) ? 'block' : 'none'; 23 $login_custom_url = ( $sl_options['redirect_login'] == 'current' ) ? 'none;' : 'block;' ;24 $logout_custom_url = ( $sl_options['redirect_logout'] == 'current' ) ? 'none;' : 'block;' ;25 36 $uri = parse_url( get_option( 'siteurl' ) ); 26 37 ?> … … 30 41 <div id="icon-tools" class="icon32"></div> 31 42 32 < p><h2>Sexy Login Options</h2></p>43 <h2>Sexy Login Options</h2> 33 44 34 45 <form method="post" action="options.php"> … … 36 47 <?php settings_fields( 'sl_options' ); ?> 37 48 38 <p> 39 <table class="widefat" style="width:700px !important;"> 40 <thead> 41 <th colspan="2"><?php echo esc_html( 'ReCaptcha' ); ?></th> 42 </thead> 43 <tbody> 44 <tr> 45 <td style="width:150px;"> 46 <label for="enable-captcha"><?php esc_html_e( 'Enable Captcha', 'sl-domain' ); ?></label> 47 </td> 48 <td> 49 <input type="checkbox" name="sl_options[enable_captcha]" id="enable-captcha" value="1" <?php checked( '1', $sl_options['enable_captcha'] ); ?> onClick="slShowCaptchaOptions( this.form );"/> 50 </td> 51 </tr> 52 <tr class="captcha-options" style="display: <?php echo esc_attr( $captcha_enabled ); ?>;"> 53 <td colspan="2" > 54 <p><?php esc_html_e( 'The next keys are required before you are able to use ReCaptcha. You can get the keys in', 'sl-domain' ); ?> <a href="<?php echo recaptcha_get_signup_url( $uri['host'], 'sexy-login' );?>" ><?php echo recaptcha_get_signup_url( $uri['host'], 'sexy-login' ); ?></a></p> 55 <p><?php esc_html_e( 'Note: the keys are not interchangeable.', 'sl-domain' ); ?></p> 56 </td> 57 </tr> 58 <tr class="captcha-options" style="display: <?php echo esc_attr( $captcha_enabled ); ?>;"> 59 <td style="width:150px;"> 60 <label for="recaptcha_public_key"><?php esc_html_e( 'Public Key' ); ?></label> 61 </td> 62 <td> 63 <input type="text" name="sl_options[recaptcha_public_key]" id="recaptcha_public_key" size="90" value="<?php echo esc_attr( $sl_options['recaptcha_public_key'] )?>" /> 64 </td> 65 </tr> 66 <tr class="captcha-options" style="display: <?php echo esc_attr( $captcha_enabled ); ?>;"> 67 <td style="width:150px;"> 68 <label for="recaptcha_private_key"><?php esc_html_e( 'Private Key' ); ?></label> 69 </td> 70 <td> 71 <input type="text" name="sl_options[recaptcha_private_key]" id="recaptcha_private_key" size="90" value="<?php echo esc_attr( $sl_options['recaptcha_private_key'] )?>" /> 72 </td> 73 </tr> 74 </tbody> 75 </table> 76 </p> 77 78 <p> 79 <table class="widefat" style="width:700px!important;"> 80 <thead> 81 <th colspan="2"><?php esc_html_e( 'Sexy Login Wrap', 'sl-domain' ); ?></th> 82 </thead> 83 <tr> 84 <td style="width:150px;"> 85 <label for="wrap_width"><?php esc_html_e( 'Width' ); ?></label> 86 </td> 87 <td> 88 <input type="number" min="140" max="240" name="sl_options[wrap_width]" id="wrap_width" value="<?php echo esc_attr( $sl_options['wrap_width'] );?>" /> 89 </td> 90 </tr> 91 </table> 92 </p> 93 94 <p> 95 <table class="widefat" style="width:700px!important;"> 96 <thead> 97 <th colspan="2"><?php esc_html_e( 'General Options', 'sl-domain' ); ?></th> 98 </thead> 99 <tr> 100 <td style="width:150px;"> 101 <label for="show_avatar"><?php esc_html_e( 'Show Avatar', 'sl-domain' ); ?></label> 102 </td> 103 <td > 104 <input type="checkbox" name="sl_options[show_avatar]" id="show_avatar" value="1" <?php checked( '1', $sl_options['show_avatar'] ); ?> /> 105 </td> 49 <h3><?php esc_html_e( 'General Options', 'sl-domain' ); ?></h3> 50 51 <table class="form-table"> 52 <tbody> 53 54 <tr valign="top"> 55 <th scope="row"><?php esc_html_e( 'Avatar', 'sl-domain' ); ?></th> 56 <td> 57 <fieldset> 58 <legend class="screen-reader-text"><span><?php esc_html_e( 'Avatar', 'slp-domain' ); ?></span></legend> 59 60 <input type="checkbox" name="sl_options[show_avatar]" id="show_avatar" value="1" <?php checked( '1', $sl_options['show_avatar'] ); ?> /> 61 <label for="show_avatar"><?php esc_html_e( 'Show Avatar', 'sl-domain' ); ?></label> 62 <br /> 63 <input type="number" min="0" max="9999" maxlength="4" size="5" name="sl_options[avatar_size]" id="avatar_size" value="<?php echo esc_attr( $sl_options['avatar_size'] );?>" /> 64 <label for="avatar_size"><?php esc_html_e( 'Max Avatar Size', 'sl-domain' ); ?></label> 65 </fieldset> 66 </td> 67 </tr> 68 69 <tr valign="top"> 70 <th scope="row"><?php esc_html_e( 'User Buttons', 'sl-domain' ); ?></th> 71 <td> 72 <fieldset> 73 <legend class="screen-reader-text"><span><?php esc_html_e( 'User Buttons', 'slp-domain' ); ?></span></legend> 74 75 <input type="checkbox" name="sl_options[show_nickname]" id="show_nickname" value="1" <?php checked( '1', $sl_options['show_nickname'] ); ?> /> 76 <label for="show_nickname"><?php esc_html_e( 'Show Nickname', 'sl-domain' ); ?></label> 77 <br /> 78 <input type="checkbox" name="sl_options[show_dashboard]" id="show_dashboard" value="1" <?php checked( '1', $sl_options['show_dashboard'] ); ?> /> 79 <label for="show_dashboard"><?php esc_html_e( 'Show "Dashboard"', 'sl-domain' ); ?></label> 80 <br /> 81 <input type="checkbox" name="sl_options[show_profile]" value="1" id="show_profile" <?php checked( '1', $sl_options['show_profile'] ); ?> /> 82 <label for="show_profile"><?php esc_html_e( 'Show "Edit My Profile"', 'sl-domain' ); ?></label> 83 </fieldset> 84 </td> 85 </tr> 86 87 <tr valign="top"> 88 <th scope="row"><?php esc_html_e( 'Wrap', 'sl-domain' ); ?></th> 89 <td> 90 <input type="number" min="140" max="9999" maxlength="4" size="5" name="sl_options[wrap_width]" id="wrap_width" value="<?php echo esc_attr( $sl_options['wrap_width'] );?>" /> 91 <label for="wrap_width"><?php esc_html_e( 'Max-Width', 'sl-domain' ); ?></label> 92 </td> 93 </tr> 94 <tr valign="top"> 95 <th scope="row"><?php esc_html_e( 'Registration Settings', 'sl-domain' ); ?></th> 96 <td> 97 <input type="checkbox" name="sl_options[registration_enabled]" value="1" id="sl-registration-enabled" <?php checked( '1', $sl_options['registration_enabled'] ); ?> /> 98 <label for="sl-registration-enabled"><?php esc_html_e( 'Enable Registration Form', 'sl-domain' );?></label> 99 </td> 100 </tr> 101 <tr valign="top"> 102 <th scope="row"><?php esc_html_e( 'Lost Password Settings', 'sl-domain' ); ?></th> 103 <td> 104 <input type="checkbox" name="sl_options[lostpwd_enabled]" value="1" id="sl-lostpwd-enabled" <?php checked( '1', $sl_options['lostpwd_enabled'] ); ?> /> 105 <label for="sl-lostpwd-enabled"><?php esc_html_e( 'Enable Lost Password Form', 'sl-domain' );?></label> 106 </td> 107 </tr> 108 </tbody> 109 </table> 110 111 <h3><?php esc_html_e( 'Redirects', 'sl-domain' ); ?></h3> 112 113 <table class="form-table"> 114 <tbody> 115 116 <tr valign="top"> 117 <th scope="row"><?php esc_html_e( 'Login Redirection', 'sl-domain' ); ?></th> 118 <td> 119 <fieldset> 120 <legend class="screen-reader-text"><span><?php esc_html_e( 'Login Redirection', 'slp-domain' ); ?></span></legend> 121 122 <input type="radio" name="sl_options[redirect_login]" <?php checked( $sl_options['redirect_login'], 'current' ); ?> value="current" id="sl-redirect-login-current" /><label for="sl-redirect-login-current"><?php esc_html_e( 'Current URL', 'sl-domain' ); ?></label> 123 <br /> 124 <input type="radio" name="sl_options[redirect_login]" <?php checked( $sl_options['redirect_login'], 'custom' ); ?> value="custom" id="sl-redirect-login-custom" /><label for="sl-redirect-login-custom"><?php esc_html_e( 'Custom URL', 'sl-domain' ); ?></label> 125 <br /> 126 <input id="sl-redirect-login-url" type="text" name="sl_options[redirect_login_url]" size="55" value="<?php echo esc_url_raw( $sl_options['redirect_login_url'] ); ?>" placeholder="<?php esc_attr_e( 'Custom URL to go after login.', 'sl-domain' ); ?>"/> 127 </fieldset> 128 </td> 129 </tr> 130 131 <tr valign="top"> 132 <th scope="row"><?php esc_html_e( 'Logout Redirection', 'sl-domain' ); ?></th> 133 <td> 134 <fieldset> 135 <legend class="screen-reader-text"><span><?php esc_html_e( 'Logout Redirection', 'sl-domain' ); ?></span></legend> 136 137 <input type="radio" name="sl_options[redirect_logout]" <?php checked( $sl_options['redirect_logout'], 'current' ); ?> value="current" id="sl-redirect-logout-current" /><label for="sl-redirect-logout-current"><?php esc_html_e( 'Current URL', 'sl-domain' ); ?></label> 138 <br /> 139 <input type="radio" name="sl_options[redirect_logout]" <?php checked( $sl_options['redirect_logout'], 'custom' ); ?> value="custom" id="sl-redirect-logout-custom" /><label for="sl-redirect-logout-custom"><?php esc_html_e( 'Custom URL', 'sl-domain' ); ?></label> 140 <br /> 141 <input id="sl-redirect-logout-url" type="text" name="sl_options[redirect_logout_url]" size="55" value="<?php echo esc_url_raw( $sl_options['redirect_logout_url'] ); ?>" placeholder="<?php esc_attr_e( 'Custom URL to go after log out.', 'sl-domain' ); ?>"/> 142 </fieldset> 143 </td> 144 </tr> 145 146 </tbody> 147 </table> 148 149 <h3><?php echo esc_html( 'ReCaptcha' ); ?></h3> 150 151 <input type="checkbox" name="sl_options[enable_captcha]" id="enable-captcha" value="1" <?php checked( '1', $sl_options['enable_captcha'] ); ?> /> 152 <label for="enable-captcha"><?php esc_html_e( 'Enable Captcha', 'sl-domain' ); ?></label> 106 153 107 </tr> 108 <tr> 109 <td style="width:150px;"> 110 <label for="avatar_size"><?php esc_html_e( 'Avatar Size', 'sl-domain' ); ?></label> 111 </td> 112 <td> 113 <input type="number" min="1" max="220" name="sl_options[avatar_size]" id="avatar_size" value="<?php echo esc_attr( $sl_options['avatar_size'] );?>" /> 114 </td> 115 </tr> 116 <tr> 117 <td style="width:150px;"> 118 <label for="show_nickname"><?php esc_html_e( 'Show Nickname', 'sl-domain' ); ?></label> 119 </td> 120 <td> 121 <input type="checkbox" name="sl_options[show_nickname]" id="show_nickname" value="1" <?php checked( '1', $sl_options['show_nickname'] ); ?> /> 122 </td> 123 </tr> 124 <tr> 125 <td style="width:150px;"> 126 <label for="show_dashboard"><?php esc_html_e( 'Show "Dashboard"', 'sl-domain' ); ?></label> 127 </td> 128 <td > 129 <input type="checkbox" name="sl_options[show_dashboard]" id="show_dashboard" value="1" <?php checked( '1', $sl_options['show_dashboard'] ); ?> /> 130 </td> 131 </tr> 132 <tr> 133 <td style="width:150px;"> 134 <label for="show_profile"><?php esc_html_e( 'Show "Edit My Profile"', 'sl-domain' ); ?></label> 135 </td> 136 <td> 137 <input type="checkbox" name="sl_options[show_profile]" value="1" id="show_profile" <?php checked( '1', $sl_options['show_profile'] ); ?> /> 138 </td> 139 </tr> 140 </table> 141 </p> 142 <p> 143 <table class="widefat" style="width:700px!important;"> 144 <thead> 145 <th colspan="3"><?php esc_html_e( 'Redirect', 'sl-domain' ); ?></th> 146 </thead> 147 <tr> 148 <td style="width:150px;"> 149 <label for="sl-redirect-login"><?php esc_html_e( 'Login redirect to', 'sl-domain' ); ?></label> 150 </td> 151 <td> 152 <select id="sl-redirect-login" name="sl_options[redirect_login]" onChange="slShowCustomUrl( this.id, this.form )"> 153 <option value="current" <?php selected( $sl_options['redirect_login'], 'current' ); ?> ><?php esc_html_e( 'Current URL', 'sl-domain' ); ?></option> 154 <option value="custom" <?php selected( $sl_options['redirect_login'], 'custom' ); ?> ><?php esc_html_e( 'Custom URL', 'sl-domain' ); ?></option> 155 </select> 156 </td> 157 <td> 158 <input id="sl-redirect-login-url" style="display: <?php echo esc_attr( $login_custom_url ); ?>;" type="text" name="sl_options[redirect_login_url]" size="65" value="<?php echo $sl_options['redirect_login_url']?>" /> 159 </td> 160 </tr> 161 <tr> 162 <td style="width:150px;"> 163 <label for="sl-redirect-logout"><?php esc_html_e( 'Logout redirect to', 'sl-domain' ); ?></label> 164 </td> 165 <td> 166 <select id="sl-redirect-logout" name="sl_options[redirect_logout]" onChange="slShowCustomUrl( this.id, this.form )"> 167 <option value="current" <?php selected( $sl_options['redirect_logout'], 'current' ); ?> ><?php esc_html_e( 'Current URL', 'sl-domain' ); ?></option> 168 <option value="custom" <?php selected( $sl_options['redirect_logout'], 'custom' ); ?> ><?php esc_html_e( 'Custom URL', 'sl-domain' ); ?></option> 169 </select> 170 </td> 171 <td> 172 <input id="sl-redirect-logout-url" style="display: <?php echo esc_attr( $logout_custom_url ); ?>;" type="text" name="sl_options[redirect_logout_url]" size="65" value="<?php echo $sl_options['redirect_logout_url']?>" /> 173 </td> 174 </tr> 175 </table> 176 </p> 154 <span id="captcha-options" style="display: <?php echo esc_attr( $captcha_enabled ); ?>;"> 155 <p><?php esc_html_e( 'The next keys are required before you are able to use ReCaptcha. You can get the keys in', 'sl-domain' ); ?> <a href="<?php echo recaptcha_get_signup_url( $uri['host'], 'sexy-login' );?>" target="_blank"><?php echo recaptcha_get_signup_url( $uri['host'], 'sexy-login' ); ?></a> 156 <br /> 157 <strong><?php esc_html_e( 'Note: the keys are not interchangeable.', 'sl-domain' ); ?></strong></p> 158 159 <p><label for="recaptcha_public_key"><?php esc_html_e( 'Public Key' ); ?>: </label> 160 <input type="text" name="sl_options[recaptcha_public_key]" id="recaptcha_public_key" size="90" value="<?php echo esc_attr( $sl_options['recaptcha_public_key'] )?>" /></p> 161 162 <p><label for="recaptcha_private_key"><?php esc_html_e( 'Private Key' ); ?>: </label> 163 <input type="text" name="sl_options[recaptcha_private_key]" id="recaptcha_private_key" size="90" value="<?php echo esc_attr( $sl_options['recaptcha_private_key'] )?>" /></p> 164 </span> 165 177 166 <p class="submit"> 178 167 <input type="submit" class="button-primary" value="<?php _e( 'Save Changes' ) ?>" /> 179 168 </p> 169 180 170 </form> 171 181 172 </div> 182 <?php 173 <?php 174 183 175 } 184 176 185 177 function sl_options_validate( $input ) { 186 187 $input['enable_captcha'] = ( 1 == $input['enable_captcha'] ? 1 : 0 ); 188 $input['show_dashboard'] = ( 1 == $input['show_dashboard'] ? 1 : 0 ); 189 $input['show_profile'] = ( 1 == $input['show_profile'] ? 1 : 0 ); 190 $input['show_avatar'] = ( 1 == $input['show_avatar'] ? 1 : 0 ); 191 $input['show_nickname'] = ( 1 == $input['show_nickname'] ? 1 : 0 ); 192 $input['redirect_login'] = esc_html( $input['redirect_login'] ); 193 $input['redirect_logout'] = esc_html( $input['redirect_logout'] ); 194 $input['redirect_login_url'] = esc_url( $input['redirect_login_url'] ); 195 $input['redirect_logout_url'] = esc_url( $input['redirect_logout_url'] ); 196 $input['recaptcha_public_key'] = esc_html( $input['recaptcha_public_key'] ); 197 $input['recaptcha_private_key'] = esc_html( $input['recaptcha_private_key'] ); 198 199 $input['avatar_size'] = ( ( $input['avatar_size'] <= 220 && is_numeric( $input['avatar_size'] ) ) ? esc_html( $input['avatar_size'] ) : 220 ); 200 $input['wrap_width'] = ( ( $input['wrap_width'] <= 240 && is_numeric( $input['wrap_width'] ) ) ? esc_html( $input['wrap_width'] ) : 240 ); 201 202 if ( $input['enable_captcha'] == 1 && ( empty( $input['recaptcha_public_key'] ) || empty( $input['recaptcha_private_key'] ) ) ){ 178 179 $input['enable_captcha'] = ( 1 == $input['enable_captcha'] ) ? 1 : 0; 180 $input['show_dashboard'] = ( 1 == $input['show_dashboard'] ) ? 1 : 0; 181 $input['show_profile'] = ( 1 == $input['show_profile'] ) ? 1 : 0; 182 $input['show_avatar'] = ( 1 == $input['show_avatar'] ) ? 1 : 0; 183 $input['registration_enabled'] = ( 1 == $input['registration_enabled'] ) ? 1 : 0; 184 $input['show_nickname'] = ( 1 == $input['show_nickname'] ) ? 1 : 0; 185 $input['lostpwd_enabled'] = ( 1 == $input['lostpwd_enabled'] ) ? 1 : 0; 186 $input['redirect_login'] = ( $input['redirect_login'] == 'custom' && empty( $input['redirect_login_url'] ) ) ? 'current' : $input['redirect_login']; 187 $input['redirect_logout'] = ( $input['redirect_logout'] == 'custom' && empty( $input['redirect_logout_url'] ) ) ? 'current' : $input['redirect_logout']; 188 $input['redirect_login_url'] = esc_url_raw( $input['redirect_login_url'] ); 189 $input['redirect_logout_url'] = esc_url_raw( $input['redirect_logout_url'] ); 190 $input['recaptcha_public_key'] = sanitize_text_field( $input['recaptcha_public_key'] ); 191 $input['recaptcha_private_key'] = sanitize_text_field( $input['recaptcha_private_key'] ); 192 193 $input['avatar_size'] = ( ctype_digit( $input['avatar_size'] ) && $input['avatar_size'] >= 0 ) ? $input['avatar_size'] : 220; 194 $input['wrap_width'] = ( ctype_digit( $input['wrap_width'] ) && $input['wrap_width'] >= 140 ) ? $input['wrap_width'] : 240 ; 195 196 if ( $input['enable_captcha'] == 1 && ( empty( $input['recaptcha_public_key'] ) || empty( $input['recaptcha_private_key'] ) ) ) { 203 197 204 198 $input['enable_captcha'] = 0; 205 199 $update_message = __( 'ReCaptcha was disabled because you have not entered any key', 'sl-domain' ); 206 add_settings_error( 'general', ' settings_updated', $update_message, 'error');200 add_settings_error( 'general', 'recaptcha', $update_message, 'error'); 207 201 208 202 } 209 203 210 204 return $input; 205 211 206 } 212 207 … … 214 209 215 210 $config = get_option( 'sl_config' ); 216 $current_version = isset( $config['version'] ) ? $config['version'] : '1.0';211 $current_version = isset( $config['version'] ) ? $config['version'] : '1.0'; 217 212 218 213 if ( version_compare( $current_version, SL_VERSION, '==' ) ) … … 264 259 265 260 } // END < 2.1 261 262 if ( version_compare( $current_version, '2.2', '<' ) ) { 263 264 $options = get_option( 'sl_options' ); 265 $options['registration_enabled'] = TRUE; 266 $options['lostpwd_enabled'] = TRUE; 267 268 update_option( 'sl_options', $options ); 269 270 } // END < 2.2 266 271 267 272 $config = get_option( 'sl_config' ); -
sexy-login/trunk/inc/ajax.php
r671843 r697763 2 2 function sexy_login_ajax() { 3 3 4 check_ajax_referer( 'nonce', SL_NONCE_SECURITY);4 check_ajax_referer( SL_NONCE_SECURITY, 'nonce' ); 5 5 6 6 $redirect_to = $_REQUEST['redirect_to']; … … 30 30 $creds['user_password'] = $_REQUEST['pwd']; 31 31 $creds['remember'] = ( isset( $_REQUEST['rememberme'] ) ) ? $_REQUEST['rememberme'] : false; 32 $secure_cookie = ( force_ssl_admin() ) ? true : false;32 $secure_cookie = ( force_ssl_admin() || ( 0 === strpos( $redirect_to, 'https' ) ) ) ? true : false; 33 33 34 34 if ( ! $secure_cookie ) { … … 42 42 } 43 43 44 if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) )45 $secure_cookie = false;46 47 44 $login = wp_signon($creds, $secure_cookie); 48 45 … … 54 51 55 52 } else { 56 57 $result['error'] = ( $login->errors ) ? $login->get_error_message() : '<strong>ERROR</strong>: ' . esc_html__( 'Please enter your username and password to login.', 'sl-domain' );53 $to_search = array( '?', '¿' ); 54 $result['error'] = ( $login->errors ) ? str_replace( $to_search, '', eregi_replace( "<a[^>]*>.*</a>", '', $login->get_error_message() ) ) : '<strong>ERROR</strong>: ' . esc_html__( 'Please enter your username and password to login.', 'sl-domain' ); 58 55 $result['captcha'] = ( $sl_options['enable_captcha'] && $attempts->update_attempts() >= SL_LOGIN_ATTEMPTS ) ? true : false; 59 56 … … 70 67 } 71 68 72 function sexy_regist er_ajax() {73 74 check_ajax_referer( 'nonce', SL_NONCE_SECURITY);69 function sexy_registration_ajax() { 70 71 check_ajax_referer( SL_NONCE_SECURITY, 'nonce' ); 75 72 76 73 $result = array(); … … 159 156 function sexy_lostpwd_ajax() { 160 157 161 check_ajax_referer( 'nonce', SL_NONCE_SECURITY);158 check_ajax_referer( SL_NONCE_SECURITY, 'nonce' ); 162 159 163 160 $result = array(); -
sexy-login/trunk/inc/class-sexy-login-widget.php
r672961 r697763 68 68 } else { 69 69 70 $attempts = new Sexy_Login_Attempts(); 71 $login_captcha = ( $sl_options['enable_captcha'] && $attempts->get_attempts() >= SL_LOGIN_ATTEMPTS ) ? 'block' : 'none'; 72 $redirect_to = ( $sl_options['redirect_login'] == 'custom' ) ? $sl_options['redirect_login_url'] : $this->current_url(); 73 $can_register = get_option('users_can_register'); 70 $attempts = new Sexy_Login_Attempts(); 71 $login_captcha = ( $sl_options['enable_captcha'] && $attempts->get_attempts() >= SL_LOGIN_ATTEMPTS ) ? 'block' : 'none'; 72 $redirect_to = ( $sl_options['redirect_login'] == 'custom' ) ? $sl_options['redirect_login_url'] : $this->current_url(); 73 $can_register = get_option('users_can_register'); 74 $show_registration = $sl_options['registration_enabled']; 75 $show_lostpwd = $sl_options['lostpwd_enabled']; 76 $login_tab_width = ( ! $can_register || ! $show_registration ) ? '100' : '50'; 74 77 ?> 75 78 <div id="sexy-login-tabs"> 76 79 77 <a class="sexy-login-tab selected" name="sl-tab-login" href="#" <?php if ( ! $can_register ) echo 'style="width: 100%;"'; ?>><?php esc_html_e( 'Log in' ) ?></a>78 79 <?php if ( $can_register ): ?>80 <a class="sexy-login-tab" style="border-left: 1px solid #ccc; margin-left: -1px;" name="sl-tab-regist er" href="<?php echo esc_url( site_url( 'wp-login.php?action=register' ) ); ?>" ><?php esc_html_e( 'Register' ) ?></a>80 <a class="sexy-login-tab selected" name="sl-tab-login" href="#" style="width: <?php echo esc_attr( $login_tab_width ); ?>%;" ><?php esc_html_e( 'Log in' ) ?></a> 81 82 <?php if ( $can_register && $show_registration ): ?> 83 <a class="sexy-login-tab" style="border-left: 1px solid #ccc; margin-left: -1px;" name="sl-tab-registration" href="<?php echo esc_url( site_url( 'wp-login.php?action=register' ) ); ?>" ><?php esc_html_e( 'Register' ) ?></a> 81 84 <?php endif;?> 82 85 … … 84 87 85 88 <div id="sexy-login-content-tab"> 86 87 <div id="sexy-login-register-form" class="sexy-login-form-wrap"> 88 89 <form id="sl-register-form" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post"> 90 <p> 91 <!--[if IE ]><label for="user_login"><?php esc_html_e( 'Username' ); ?>: </label><![endif]--> 92 <input type="text" name="user_login" size="20" id="user_login" placeholder="<?php esc_attr_e( 'Username' ); ?>" tabindex="1"/> 93 </p> 94 <p> 95 <!--[if IE ]><label for="user_email"><?php esc_html_e( 'E-mail' ); ?>: </label><![endif]--> 96 <input type="text" name="user_email" size="25" id="user_email" placeholder="<?php esc_attr_e( 'E-mail' ); ?>" tabindex="2"/> 97 </p> 98 <p> 99 <div id="sexy-register-recaptcha" class="sexy-div-captcha" style="display: <?php echo ( $sl_options['enable_captcha'] ) ? esc_attr( 'block' ) : esc_attr( 'none' );?>;"></div> 100 <input type="submit" name="user-submit" value="<?php esc_html_e( 'Register' ); ?>" /> 101 <?php wp_nonce_field( 'nonce', SL_NONCE_SECURITY ); ?> 89 90 <?php if ( $can_register && $show_registration ): ?> 91 92 <div id="sexy-login-registration-form" class="sexy-login-form-wrap"> 93 94 <form id="sl-registration-form" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post"> 95 <p> 96 <!--[if lte IE 9]><label for="sl-first-input-registration"><?php esc_html_e( 'Username' ); ?>: </label><![endif]--> 97 <input type="text" name="user_login" size="20" class="sl-input" id="sl-first-input-registration" placeholder="<?php esc_attr_e( 'Username' ); ?>" tabindex="421" required/> 98 </p> 99 <p> 100 <!--[if lte IE 9]><label for="user_email"><?php esc_html_e( 'E-mail' ); ?>: </label><![endif]--> 101 <input type="email" name="user_email" class="sl-input" id="sl-user-email" size="25" placeholder="<?php esc_attr_e( 'E-mail' ); ?>" tabindex="422" required/> 102 </p> 103 <p> 104 <div id="sexy-registration-recaptcha" class="sexy-div-captcha" style="display: <?php echo ( $sl_options['enable_captcha'] ) ? esc_attr( 'block' ) : esc_attr( 'none' );?>;"></div> 105 <input type="submit" name="user-submit" value="<?php esc_attr_e( 'Register' ); ?>" tabindex="424"/> 106 <?php wp_nonce_field( SL_NONCE_SECURITY, 'nonce' ); ?> 102 107 <input type="hidden" name="url" value="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" /> 103 <input type="hidden" name="redirect_to" value=" " />108 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 104 109 </p> 105 110 </form> … … 107 112 </div> 108 113 114 <?php endif;?> 115 116 <?php if ( $show_lostpwd ): ?> 117 109 118 <div id="sexy-login-lostpwd-form" class="sexy-login-form-wrap"> 110 119 … … 115 124 <form id="sl-lostpwd-form" method="post" action="<?php echo site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ?>"> 116 125 <p> 117 <input type="text" name="user_login" size="20" id="user_login" placeholder="<?php esc_attr_e( 'Username or E-mail' ); ?>"/>118 </p> 119 <p> 120 <input type="submit" name="user-submit" value="<?php esc_attr_e( 'Get New Password' ); ?>" />121 <?php wp_nonce_field( 'nonce', SL_NONCE_SECURITY); ?>122 <input type="hidden" name="redirect_to" value=" " />126 <input type="text" name="user_login" size="20" class="sl-input" id="sl-first-input-lostpwd" placeholder="<?php esc_attr_e( 'Username or E-mail' ); ?>" required tabindex="421"/> 127 </p> 128 <p> 129 <input type="submit" name="user-submit" value="<?php esc_attr_e( 'Get New Password' ); ?>" tabindex="422"/> 130 <?php wp_nonce_field( SL_NONCE_SECURITY, 'nonce' ); ?> 131 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 123 132 <p> 124 133 </form> … … 126 135 </div> 127 136 137 <?php endif;?> 138 128 139 <div id="sexy-login-login-form" class="sexy-login-form-wrap" style="display: block;"> 129 140 130 141 <form id="sl-login-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"> 131 142 <p> 132 <!--[if IE ]><label for="user_login"><?php esc_html_e( 'Username' ); ?>:</label><![endif]-->133 <input type="text" name="log" id=" user_login" size="20" placeholder="<?php esc_attr_e( 'Username' ); ?>" tabindex="1"/>134 </p> 135 <p> 136 <!--[if IE ]><label for="user_pass"><?php esc_html_e( 'Password' ); ?>:</label><![endif]-->137 <input type="password" name="pwd" id=" user_pass" size="20" placeholder="<?php esc_attr_e( 'Password' ); ?>" tabindex="2"/>143 <!--[if lte IE 9]><label for="sl-first-input-login"><?php esc_html_e( 'Username' ); ?>:</label><![endif]--> 144 <input type="text" name="log" id="sl-first-input-login" size="20" placeholder="<?php esc_attr_e( 'Username' ); ?>" tabindex="421" required /> 145 </p> 146 <p> 147 <!--[if lte IE 9]><label for="sl-user-pass-login"><?php esc_html_e( 'Password' ); ?>:</label><![endif]--> 148 <input type="password" name="pwd" id="sl-user-pass-login" size="20" placeholder="<?php esc_attr_e( 'Password' ); ?>" tabindex="422" required /> 138 149 </p> 139 150 140 151 <div id="sexy-login-recaptcha" class="sexy-div-captcha" style="display: <?php echo esc_attr( $login_captcha ); ?>;"></div> 141 152 142 <input type="submit" name="wp-submit" id="wp-submit" class="submit-button" value="<?php esc_attr_e( 'Log In' ); ?>">143 144 <input type="hidden" name="rememberme" id="rememberme"value="forever" />153 <input type="submit" name="wp-submit" class="submit-button" value="<?php esc_attr_e( 'Log In' ); ?>" tabindex="424"> 154 155 <input type="hidden" name="rememberme" value="forever" /> 145 156 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 146 <?php wp_nonce_field( 'nonce', SL_NONCE_SECURITY); ?>157 <?php wp_nonce_field( SL_NONCE_SECURITY, 'nonce' ); ?> 147 158 148 159 </form> 149 160 150 <a name="sl-tab-lostpwd" href="<?php echo esc_url( site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" title="<?php esc_attr_e( 'Lost your password?' ); ?>" ><?php esc_html_e( 'Lost your password?' ) ?></a> 161 <?php if ( $show_lostpwd ): ?> 162 <a name="sl-tab-lostpwd" href="<?php echo esc_url( site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" title="<?php esc_attr_e( 'Lost your password?' ); ?>" tabindex="425" ><?php esc_html_e( 'Lost your password?' ) ?></a> 163 <?php endif;?> 151 164 152 165 </div> -
sexy-login/trunk/js/admin.js
r671843 r697763 1 function slShowCustomUrl( thisId, thisForm ) { 1 jQuery( function() { 2 3 jQuery( '#enable-captcha' ).change(function() { 2 4 3 if ( thisId == 'sl-redirect-logout' ) var displayCustom = jQuery( '#sl-redirect-logout-url', thisForm ); 4 else var displayCustom = jQuery( '#sl-redirect-login-url', thisForm ); 5 var captchaOptions = jQuery( '#captcha-options' ); 6 7 if( jQuery( '#enable-captcha' ).is( ':checked' ) ) 8 captchaOptions.show(); 9 else 10 captchaOptions.hide(); 11 12 }); 5 13 6 if ( jQuery( '#' + thisId, thisForm ).val() == 'custom' ) displayCustom.show(); 7 else displayCustom.hide(); 8 9 } 10 11 function slShowCaptchaOptions( thisForm ) { 12 13 var captchaOptions = jQuery( '.captcha-options', thisForm ); 14 if( jQuery( '#enable-captcha' ).is( ':checked' ) ) captchaOptions.show(); 15 else captchaOptions.hide(); 16 17 } 14 }); -
sexy-login/trunk/js/sexy-login.js
r671843 r697763 11 11 '</div>' + 12 12 '<!--[if IE ]><label for="recaptcha_response_field">' + sexy_loginl_data.captcha_enter + ':</label><![endif]-->' + 13 '<input type="text" id="recaptcha_response_field" tabindex=" 3" name="recaptcha_response_field" placeholder="' + sexy_loginl_data.captcha_enter + '..."/>' +13 '<input type="text" id="recaptcha_response_field" tabindex="423" name="recaptcha_response_field" placeholder="' + sexy_loginl_data.captcha_enter + '..." required/>' + 14 14 '</div>' 15 15 ); … … 41 41 if ( tab != 'lostpwd' && jQuery( '#sexy-' + tab + '-recaptcha' ).css( 'display' ) == 'block' ) 42 42 slRecaptchaCreate( tab ); 43 44 jQuery( '#sl-first-input-' + tab ).focus(); 45 jQuery( '.sl-input' ).val(''); 43 46 44 47 } … … 90 93 }); 91 94 92 jQuery('a[name=sl-tab-regist er]').click( function(e) {93 94 e.preventDefault(); 95 slTabChange( 'regist er' );95 jQuery('a[name=sl-tab-registration]').click( function(e) { 96 97 e.preventDefault(); 98 slTabChange( 'registration' ); 96 99 97 100 }); … … 156 159 }); // END sl-login-form submit. 157 160 158 jQuery('.sexy_login_widget #sl-regist er-form').submit( function( e ) {161 jQuery('.sexy_login_widget #sl-registration-form').submit( function( e ) { 159 162 160 163 e.preventDefault(); … … 163 166 164 167 url: sexy_loginl_data.ajaxurl, 165 data: jQuery( this ).serialize() + '&action=sexy_regist er_hook',168 data: jQuery( this ).serialize() + '&action=sexy_registration_hook', 166 169 type: 'POST', 167 170 dataType: 'json', … … 188 191 errorDiv.html(result.error); 189 192 190 if ( jQuery( '#sexy-regist er-recaptcha' ).css( 'display' ) == 'block' )193 if ( jQuery( '#sexy-registration-recaptcha' ).css( 'display' ) == 'block' ) 191 194 Recaptcha.reload(); 192 195 … … 205 208 }); 206 209 207 }); // END sl-regist er-form210 }); // END sl-registration-form 208 211 209 212 jQuery('.sexy_login_widget #sl-lostpwd-form').submit( function( e ) { -
sexy-login/trunk/lang/sl-domain-es_ES.po
r672961 r697763 2 2 msgstr "" 3 3 "Project-Id-Version: Sexy Login 1.0\n" 4 "POT-Creation-Date: 2013-0 2-25 11:48+0100\n"5 "PO-Revision-Date: 2013-0 2-25 12:42+0100\n"4 "POT-Creation-Date: 2013-04-15 12:38+0100\n" 5 "PO-Revision-Date: 2013-04-15 12:44+0100\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: optimaldevs.com <[email protected]>\n" … … 27 27 msgstr "Obtener otro Captcha" 28 28 29 #: inc/ajax.php:23 inc/ajax.php:86 29 #: sexy-login-init.php:115 30 msgid "Settings" 31 msgstr "" 32 33 #: inc/ajax.php:23 inc/ajax.php:83 30 34 msgid "Invalid Captcha: Try again." 31 35 msgstr "Captcha Incorrecto: Intentalo otra vez." 32 36 33 #: inc/ajax.php:5 737 #: inc/ajax.php:54 34 38 msgid "Please enter your username and password to login." 35 39 msgstr "Porfavor introduce tu nombre de usuario y tu contraseña para loguearte" 36 40 37 #: inc/ajax.php:9 841 #: inc/ajax.php:95 38 42 msgid "<strong>ERROR</strong>: Please enter a username." 39 43 msgstr "" 40 44 41 #: inc/ajax.php: 10045 #: inc/ajax.php:97 42 46 msgid "" 43 47 "<strong>ERROR</strong>: This username is invalid because it uses illegal " … … 45 49 msgstr "" 46 50 47 #: inc/ajax.php:10 351 #: inc/ajax.php:100 48 52 msgid "" 49 53 "<strong>ERROR</strong>: This username is already registered. Please choose " … … 51 55 msgstr "" 52 56 53 #: inc/ajax.php:10 857 #: inc/ajax.php:105 54 58 msgid "<strong>ERROR</strong>: Please type your e-mail address." 55 59 msgstr "" 56 60 61 #: inc/ajax.php:107 62 msgid "<strong>ERROR</strong>: The email address isn’t correct." 63 msgstr "" 64 57 65 #: inc/ajax.php:110 58 msgid "<strong>ERROR</strong>: The email address isn’t correct."59 msgstr ""60 61 #: inc/ajax.php:11362 66 msgid "" 63 67 "<strong>ERROR</strong>: This email is already registered, please choose " … … 65 69 msgstr "" 66 70 67 #: inc/ajax.php:1 3271 #: inc/ajax.php:129 68 72 #, php-format 69 73 msgid "" … … 72 76 msgstr "" 73 77 74 #: inc/ajax.php:14 378 #: inc/ajax.php:140 75 79 msgid "Registration complete. Please check your e-mail." 76 80 msgstr "Registro completado. Porfavor comprueba tu e-mail" 77 81 78 #: inc/ajax.php:1 7082 #: inc/ajax.php:167 79 83 msgid "<strong>ERROR</strong>: Enter a username or e-mail address." 80 84 msgstr "" 81 85 82 #: inc/ajax.php:17 486 #: inc/ajax.php:171 83 87 msgid "" 84 88 "<strong>ERROR</strong>: There is no user registered with that email address." 85 89 msgstr "" 86 90 87 #: inc/ajax.php:1 9191 #: inc/ajax.php:188 88 92 msgid "<strong>ERROR</strong>: Invalid username or e-mail." 89 93 msgstr "" 90 94 91 #: inc/ajax.php:20 895 #: inc/ajax.php:205 92 96 msgid "Password reset is not allowed for this user" 93 97 msgstr "" 94 98 95 #: inc/ajax.php:2 2299 #: inc/ajax.php:219 96 100 msgid "Before requesting a new password must wait" 97 101 msgstr "Antes de solicitar una nueva contraseña debe esperar" 98 102 99 #: inc/ajax.php:2 22103 #: inc/ajax.php:219 100 104 msgid "minutes" 101 105 msgstr "minutos" 102 106 103 #: inc/ajax.php:23 6107 #: inc/ajax.php:233 104 108 msgid "Someone requested that the password be reset for the following account:" 105 109 msgstr "" 106 110 107 #: inc/ajax.php:23 8111 #: inc/ajax.php:235 108 112 #, php-format 109 113 msgid "Username: %s" 110 114 msgstr "" 111 115 112 #: inc/ajax.php:23 9116 #: inc/ajax.php:236 113 117 msgid "If this was a mistake, just ignore this email and nothing will happen." 114 118 msgstr "" 115 119 116 #: inc/ajax.php:2 40120 #: inc/ajax.php:237 117 121 msgid "To reset your password, visit the following address:" 118 122 msgstr "" 119 123 120 #: inc/ajax.php:2 50124 #: inc/ajax.php:247 121 125 #, php-format 122 126 msgid "[%s] Password Reset" 123 127 msgstr "" 124 128 125 #: inc/ajax.php:25 8129 #: inc/ajax.php:255 126 130 msgid "The e-mail could not be sent." 127 131 msgstr "El email no se ha podido enviar." 128 132 129 #: inc/ajax.php:25 8133 #: inc/ajax.php:255 130 134 msgid "Possible reason: your host may have disabled the mail() function..." 131 135 msgstr "" 132 136 133 #: inc/ajax.php:26 3137 #: inc/ajax.php:260 134 138 msgid "Check your e-mail for your new password." 135 139 msgstr "Recibirás una nueva contraseña, comprueba tu correo." 136 140 137 #: inc/class-sexy-login-widget.php: 77141 #: inc/class-sexy-login-widget.php:80 138 142 msgid "Log in" 139 143 msgstr "" 140 144 141 #: inc/class-sexy-login-widget.php:8 0 inc/class-sexy-login-widget.php:100145 #: inc/class-sexy-login-widget.php:83 inc/class-sexy-login-widget.php:105 142 146 msgid "Register" 143 147 msgstr "" 144 148 145 #: inc/class-sexy-login-widget.php:9 1 inc/class-sexy-login-widget.php:92146 #: inc/class-sexy-login-widget.php:1 32 inc/class-sexy-login-widget.php:133149 #: inc/class-sexy-login-widget.php:96 inc/class-sexy-login-widget.php:97 150 #: inc/class-sexy-login-widget.php:143 inc/class-sexy-login-widget.php:144 147 151 msgid "Username" 148 152 msgstr "" 149 153 150 #: inc/class-sexy-login-widget.php: 95 inc/class-sexy-login-widget.php:96154 #: inc/class-sexy-login-widget.php:100 inc/class-sexy-login-widget.php:101 151 155 msgid "E-mail" 152 156 msgstr "" 153 157 154 #: inc/class-sexy-login-widget.php:1 11 inc/class-sexy-login-widget.php:150158 #: inc/class-sexy-login-widget.php:120 inc/class-sexy-login-widget.php:162 155 159 msgid "Lost your password?" 156 160 msgstr "" 157 161 158 #: inc/class-sexy-login-widget.php:1 13162 #: inc/class-sexy-login-widget.php:122 159 163 msgid "" 160 164 "Please enter your username or email address. You will receive a link to " … … 162 166 msgstr "" 163 167 164 #: inc/class-sexy-login-widget.php:1 17168 #: inc/class-sexy-login-widget.php:126 165 169 msgid "Username or E-mail" 166 170 msgstr "" 167 171 168 #: inc/class-sexy-login-widget.php:12 0172 #: inc/class-sexy-login-widget.php:129 169 173 msgid "Get New Password" 170 174 msgstr "" 171 175 172 #: inc/class-sexy-login-widget.php:1 36 inc/class-sexy-login-widget.php:137176 #: inc/class-sexy-login-widget.php:147 inc/class-sexy-login-widget.php:148 173 177 msgid "Password" 174 178 msgstr "" 175 179 176 #: inc/class-sexy-login-widget.php:1 42180 #: inc/class-sexy-login-widget.php:153 177 181 msgid "Log In" 178 182 msgstr "" 179 183 180 #: inc/class-sexy-login-widget.php:1 79184 #: inc/class-sexy-login-widget.php:192 181 185 msgid "Title" 182 186 msgstr "" 183 187 184 #: inc/admin/class-sexy-login-admin.php:1 6188 #: inc/admin/class-sexy-login-admin.php:18 185 189 msgid "Sexy Login Options" 186 190 msgstr "Opciones Sexy Login" 187 191 188 #: inc/admin/class-sexy-login-admin.php:46 192 #: inc/admin/class-sexy-login-admin.php:49 193 msgid "General Options" 194 msgstr "Opciones Generales" 195 196 #: inc/admin/class-sexy-login-admin.php:55 197 #: inc/admin/class-sexy-login-admin.php:58 198 msgid "Avatar" 199 msgstr "Avatar" 200 201 #: inc/admin/class-sexy-login-admin.php:61 202 msgid "Show Avatar" 203 msgstr "Mostrar Avatar" 204 205 #: inc/admin/class-sexy-login-admin.php:64 206 msgid "Max Avatar Size" 207 msgstr "Tamaño Máximo del Avatar" 208 209 #: inc/admin/class-sexy-login-admin.php:70 210 #: inc/admin/class-sexy-login-admin.php:73 211 msgid "User Buttons" 212 msgstr "Botones de Usuario" 213 214 #: inc/admin/class-sexy-login-admin.php:76 215 msgid "Show Nickname" 216 msgstr "Mostrar Alias" 217 218 #: inc/admin/class-sexy-login-admin.php:79 219 msgid "Show \"Dashboard\"" 220 msgstr "Mostrar \"Escritorio\"" 221 222 #: inc/admin/class-sexy-login-admin.php:82 223 msgid "Show \"Edit My Profile\"" 224 msgstr "Mostrar \"Editar Mi Perfil\"" 225 226 #: inc/admin/class-sexy-login-admin.php:88 227 msgid "Wrap" 228 msgstr "Contenedor" 229 230 #: inc/admin/class-sexy-login-admin.php:91 231 msgid "Max-Width" 232 msgstr "Ancho Máximo" 233 234 #: inc/admin/class-sexy-login-admin.php:95 235 msgid "Registration Settings" 236 msgstr "Ajustes de Registro" 237 238 #: inc/admin/class-sexy-login-admin.php:98 239 msgid "Enable Registration Form" 240 msgstr "Activar Formulario de Registro" 241 242 #: inc/admin/class-sexy-login-admin.php:102 243 msgid "Lost Password Settings" 244 msgstr "Ajustes de Recuperar Contraseña" 245 246 #: inc/admin/class-sexy-login-admin.php:105 247 msgid "Enable Lost Password Form" 248 msgstr "Activar Formulario de Recuperar Contraseña" 249 250 #: inc/admin/class-sexy-login-admin.php:111 251 msgid "Redirects" 252 msgstr "Redirecciones" 253 254 #: inc/admin/class-sexy-login-admin.php:117 255 #: inc/admin/class-sexy-login-admin.php:120 256 msgid "Login Redirection" 257 msgstr "Redirección al iniciar sesión" 258 259 #: inc/admin/class-sexy-login-admin.php:122 260 #: inc/admin/class-sexy-login-admin.php:137 261 msgid "Current URL" 262 msgstr "URL Actual" 263 264 #: inc/admin/class-sexy-login-admin.php:124 265 #: inc/admin/class-sexy-login-admin.php:139 266 msgid "Custom URL" 267 msgstr "URL Personalizada" 268 269 #: inc/admin/class-sexy-login-admin.php:126 270 msgid "Custom URL to go after login." 271 msgstr "URL a redireccionar tras inicio sesión." 272 273 #: inc/admin/class-sexy-login-admin.php:132 274 #: inc/admin/class-sexy-login-admin.php:135 275 msgid "Logout Redirection" 276 msgstr "Redirección al cerrar sesión" 277 278 #: inc/admin/class-sexy-login-admin.php:141 279 msgid "Custom URL to go after log out." 280 msgstr "URL a redireccionar tras cerrar sesión." 281 282 #: inc/admin/class-sexy-login-admin.php:152 189 283 msgid "Enable Captcha" 190 284 msgstr "Activar Captcha" 191 285 192 #: inc/admin/class-sexy-login-admin.php: 54286 #: inc/admin/class-sexy-login-admin.php:155 193 287 msgid "" 194 288 "The next keys are required before you are able to use ReCaptcha. You can get " … … 198 292 "puedes obtener en" 199 293 200 #: inc/admin/class-sexy-login-admin.php: 55294 #: inc/admin/class-sexy-login-admin.php:157 201 295 msgid "Note: the keys are not interchangeable." 202 296 msgstr "Nota: las claves no son intercambiables." 203 297 204 #: inc/admin/class-sexy-login-admin.php: 60298 #: inc/admin/class-sexy-login-admin.php:159 205 299 msgid "Public Key" 206 300 msgstr "" 207 301 208 #: inc/admin/class-sexy-login-admin.php: 68302 #: inc/admin/class-sexy-login-admin.php:162 209 303 msgid "Private Key" 210 304 msgstr "" 211 305 212 #: inc/admin/class-sexy-login-admin.php:81 213 msgid "Sexy Login Wrap" 214 msgstr "Contenedor de Sexy Login" 215 216 #: inc/admin/class-sexy-login-admin.php:85 217 msgid "Width" 218 msgstr "" 219 220 #: inc/admin/class-sexy-login-admin.php:98 221 msgid "General Options" 222 msgstr "Opciones Generales" 223 224 #: inc/admin/class-sexy-login-admin.php:102 225 msgid "Show Avatar" 226 msgstr "Mostrar Avatar" 227 228 #: inc/admin/class-sexy-login-admin.php:111 229 msgid "Avatar Size" 230 msgstr "Tamaño del Avatar" 231 232 #: inc/admin/class-sexy-login-admin.php:119 233 msgid "Show Nickname" 234 msgstr "Mostrar Alias" 235 236 #: inc/admin/class-sexy-login-admin.php:127 237 msgid "Show \"Dashboard\"" 238 msgstr "Mostrar \"Escritorio\"" 239 240 #: inc/admin/class-sexy-login-admin.php:135 241 msgid "Show \"Edit My Profile\"" 242 msgstr "Mostrar \"Editar Mi Perfil\"" 243 244 #: inc/admin/class-sexy-login-admin.php:146 245 msgid "Redirect" 246 msgstr "Redirección" 247 248 #: inc/admin/class-sexy-login-admin.php:150 249 msgid "Login redirect to" 250 msgstr "Redirección al loguearse" 251 252 #: inc/admin/class-sexy-login-admin.php:154 253 #: inc/admin/class-sexy-login-admin.php:168 254 msgid "Current URL" 255 msgstr "URL Actual" 256 257 #: inc/admin/class-sexy-login-admin.php:155 258 #: inc/admin/class-sexy-login-admin.php:169 259 msgid "Custom URL" 260 msgstr "URL Personalizada" 261 262 #: inc/admin/class-sexy-login-admin.php:164 263 msgid "Logout redirect to" 264 msgstr "Redirección al cerrar sesión" 265 266 #: inc/admin/class-sexy-login-admin.php:179 306 #: inc/admin/class-sexy-login-admin.php:167 267 307 msgid "Save Changes" 268 308 msgstr "" 269 309 270 #: inc/admin/class-sexy-login-admin.php: 206310 #: inc/admin/class-sexy-login-admin.php:199 271 311 msgid "ReCaptcha was disabled because you have not entered any key" 272 312 msgstr "ReCaptcha ha sido desactivado porque no has introducido las key." 273 313 274 #~ msgid "Buttons" 275 #~ msgstr "Botones" 314 #~ msgid "Max Avatar Size ( max allowed: 220 )" 315 #~ msgstr "Tamaño Máximo del Avatar (máximo permitido: 220 )" 316 317 #~ msgid "Max-Width ( max allowed: 240 )" 318 #~ msgstr "Ancho Máximo (máximo permitido: 240 )" 319 320 #~ msgid "Sexy Login Wrap" 321 #~ msgstr "Contenedor de Sexy Login" 276 322 277 323 #~ msgid "ReCaptcha" -
sexy-login/trunk/readme.txt
r672961 r697763 1 1 === Plugin Name === 2 Contributors: OptimalDevs 2 Contributors: OptimalDevs, Alejandro Galvez, Andy Hernandez 3 3 Donate link: http://optimaldevs.com/ 4 4 Tags: login, register, sexy, ajax, authentication, captcha, sidebar, widget, user, ssl, secury, admin bar, ReCaptcha, cross browser, lost password 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.1 7 Stable tag: 2. 17 Stable tag: 2.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 33 33 * Languages: the same of your WordPress! (It’s multi-language). English or spanish in back-end. 34 34 35 [Try Demo](http://optimaldevs.com/demo/ "Try Sexy Login demo.") 35 [Try Demo](http://optimaldevs.com/demo/ "Try Sexy Login demo.") 36 36 37 Note: A new pro version is coming stay tune in http://optimaldevs.com/ 37 38 … … 56 57 Check that you've correctly entered both private and public keys in the "Sexy Login" plugin options. 57 58 59 = I have problems with the Sexy Login redirects and i use a cache system plugin. = 60 61 That's one of the problems of cache systems. We can't modify third party plugins. 62 58 63 == Changelog == 64 65 = 2.2 = 66 * Registration form is optional. 67 * Lost Password form is optional. 68 * Added verification of form fields with HTML5. 69 * Improved a few details of style. 70 * New design on admin side. 71 * Improved the focus on forms. 72 * Removed maximum limit for the width of the widget. 73 * Removed maximum and minimum limit for the width of the Avatar. 74 * Improved SSL (Special thanks to jason102178). 59 75 60 76 = 2.1 = -
sexy-login/trunk/sexy-login-init.php
r672961 r697763 3 3 Plugin Name: Sexy Login 4 4 Plugin URI: http://wordpress.org/extend/plugins/sexy-login/ 5 Description: The sexiest widget loginfor Wordpress!6 Version: 2. 15 Description: The sexiest login widget for Wordpress! 6 Version: 2.2 7 7 Author: OptimalDevs 8 8 Author URI: http://optimaldevs.com/ … … 20 20 load_plugin_textdomain( 'sl-domain', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); 21 21 22 require_once('inc/class-sexy-login-attempts.php' );23 require_once('inc/class-sexy-login-widget.php' );22 sl_import_class( 'Sexy_Login_Attempts', 'inc/class-sexy-login-attempts.php' ); 23 sl_import_class( 'Sexy_Login_Widget', 'inc/class-sexy-login-widget.php' ); 24 24 25 25 register_widget( 'Sexy_Login_Widget' ); … … 34 34 add_action( 'wp_ajax_nopriv_sexy_login_hook', 'sexy_login_ajax' ); 35 35 36 add_action( 'wp_ajax_sexy_regist er_hook', 'sexy_register_ajax' );37 add_action( 'wp_ajax_nopriv_sexy_regist er_hook', 'sexy_register_ajax' );36 add_action( 'wp_ajax_sexy_registration_hook', 'sexy_registration_ajax' ); 37 add_action( 'wp_ajax_nopriv_sexy_registration_hook', 'sexy_registration_ajax' ); 38 38 39 39 add_action( 'wp_ajax_sexy_lostpwd_hook', 'sexy_lostpwd_ajax' ); … … 97 97 98 98 if ( is_admin() ) { 99 100 wp_register_script( 'sl-admin-js', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery' ), '1.0' );101 wp_enqueue_script( 'sl-admin-js' );102 99 103 require_once('inc/admin/class-sexy-login-admin.php' );100 sl_import_class( 'Sexy_Login_Admin', 'inc/admin/class-sexy-login-admin.php' ); 104 101 105 102 if ( ! function_exists( 'recaptcha_get_html' ) ) … … 107 104 108 105 $admin_init = new Sexy_Login_Admin(); 109 $admin_init->upgrade(); 106 107 add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'sexy_login_settings_link' ); 110 108 111 109 } // END is_admin() 112 110 113 111 } 112 113 function sexy_login_settings_link( $links ) { 114 115 $settings_link = '<a href="options-general.php?page=sl_options">' . esc_html__( 'Settings' ) . '</a>'; 116 array_unshift( $links, $settings_link ); 117 return $links; 118 119 } 120 121 function sl_import_class( $class, $file ) { 122 123 if ( ! class_exists( $class ) ) 124 require_once( $file ); 125 126 } 114 127 ?> -
sexy-login/trunk/sl-config.php
r672961 r697763 7 7 define( 'SL_LOGIN_ATTEMPTS_LAPSE', 10 ); 8 8 define( 'SL_LOSTPWD_TIME_LAPSE', 10 ); 9 define( 'SL_VERSION', '2.1' ); 9 define( 'SL_VERSION', '2.2' ); 10 define( 'SL_PLUGIN_ROOT_URL', plugin_dir_url( __FILE__ ) ); 10 11 11 12 ?> -
sexy-login/trunk/style.css
r672961 r697763 43 43 #sexy-login-wrap #sexy-login-tabs { 44 44 width: 100%; 45 margin: 0 0 5px;45 margin: 0; 46 46 border-bottom: 1px solid #c6c6c6; 47 47 height: auto; … … 98 98 } 99 99 100 #sexy-login-content-tab input[type="text"], #sexy-login-content-tab input[type="password"] {100 #sexy-login-content-tab input[type="text"], #sexy-login-content-tab input[type="password"], #sexy-login-content-tab input[type="email"] { 101 101 color: #555; 102 102 font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif; … … 113 113 } 114 114 115 #sexy-login-content-tab input[type="text"]:hover, #sexy-login-content-tab input[type="password"]:hover {115 #sexy-login-content-tab input[type="text"]:hover, #sexy-login-content-tab input[type="password"]:hover, #sexy-login-content-tab input[type="email"]:hover { 116 116 border: 1px solid #999; 117 117 } … … 127 127 #sexy-login-content-tab input[type="submit"], #sexy-login-user a, #sexy-recaptcha-container a { 128 128 width: 100%; 129 margin-bottom: 4px;130 129 text-align: center; 131 130 text-decoration: none;
Note: See TracChangeset
for help on using the changeset viewer.