Plugin Directory

Changeset 1053784


Ignore:
Timestamp:
12/25/2014 03:19:42 AM (11 years ago)
Author:
convissor
Message:

Squash for release 0.50.0.

Location:
login-security-solution/trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • login-security-solution/trunk/login-security-solution.php

    r1022699 r1053784  
    77 *
    88 * Plugin URI: https://wordpress.org/plugins/login-security-solution/
    9  * Version: 0.49.0
     9 * Version: 0.50.0
    1010 *         (Remember to change the VERSION constant, below, as well!)
    1111 * Author: Daniel Convissor
     
    4646     * This plugin's version
    4747     */
    48     const VERSION = '0.49.0';
     48    const VERSION = '0.50.0';
    4949
    5050    /**
     
    256256                array(&$this, 'user_profile_update_errors'), 999, 3);
    257257
    258         add_action('login_form_resetpass', array(&$this, 'pw_policy_establish'));
    259         add_action('validate_password_reset', array(&$this, 'pw_policy_establish'));
     258        if (version_compare($GLOBALS['wp_version'], '4.1', '<')) {
     259            add_action('login_form_resetpass', array(&$this, 'pw_policy_establish'));
     260            add_action('validate_password_reset', array(&$this, 'pw_policy_establish'));
     261            add_action('personal_options', array(&$admin, 'pw_policy_establish'));
     262            add_action('user_new_form_tag', array(&$admin, 'pw_policy_establish'));
     263        } else {
     264            add_filter('password_hint', array(&$this, 'password_hint'));
     265        }
    260266
    261267        add_filter('xmlrpc_enabled', array(&$this, 'xmlrpc_enabled'));
     
    294300            add_action('admin_init', array(&$admin, 'admin_init'));
    295301            add_filter($plugin_action_links, array(&$admin, 'plugin_action_links'));
    296             add_action('personal_options', array(&$admin, 'pw_policy_establish'));
    297             add_action('user_new_form_tag', array(&$admin, 'pw_policy_establish'));
    298302
    299303            if ($this->options['disable_logins']) {
     
    720724
    721725    /**
     726     * For WP >= 4.1, replaces WP's password policy text with ours
     727     *
     728     * NOTE: This method is automatically called by WordPress'
     729     * password_hint filter in wp_get_password_hint().
     730     *
     731     * @param string $hint  the output from earlier password_hint filters
     732     * @return string
     733     *
     734     * @uses login_security_solution::$options  for the pw_length and
     735     *       pw_complexity_exemption_length values
     736     */
     737    public function password_hint($hint = '') {
     738        $this->load_plugin_textdomain();
     739        return $this->hsc_utf8(sprintf(__("The password should either be: A) at least %d characters long and contain upper and lower case letters (except languages that only have one case) plus numbers and punctuation, or B) at least %d characters long. The password can not contain words related to you or this website.", self::ID), $this->options['pw_length'], $this->options['pw_complexity_exemption_length']));
     740    }
     741
     742    /**
    722743     * Conveys the password change information to the user's metadata
    723744     *
     
    775796
    776797    /**
    777      * Replaces WP's password policy text with ours
     798     * For WP < 4.1, replaces WP's password policy text with ours
    778799     *
    779800     * NOTE: This method is automatically called by WordPress during gettext
     
    794815
    795816        if (in_array($original,$policy)) {
    796             $this->load_plugin_textdomain();
    797             $translated = $this->hsc_utf8(sprintf(__("The password should either be: A) at least %d characters long and contain upper and lower case letters (except languages that only have one case) plus numbers and punctuation, or B) at least %d characters long. The password can not contain words related to you or this website.", self::ID), $this->options['pw_length'], $this->options['pw_complexity_exemption_length']));
     817            $translated = $this->password_hint();
    798818        }
    799819
  • login-security-solution/trunk/readme.txt

    r1022699 r1053784  
    44Tags: login, password, passwords, strength, strong, strong passwords, password strength, idle, timeout, maintenance, security, attack, hack, lock, lockdown, ban, brute force, brute, force, authentication, xml-rpc, auth, cookie, users
    55Requires at least: 3.3
    6 Tested up to: 4.0
     6Tested up to: 4.1
    77Stable tag: trunk
    88
     
    119119* Deutsche, Deutschland (German, Germany) (de_DE) by Christian Foellmann
    120120* Français, français (French, France) (fr_FR) by [mermouy](https://profiles.wordpress.org/mermouy) and and Fx Bénard
     121* Italiano, Italia (Italian, Italy) (it_IT) by Daniele Passalacqua
    121122* 日本語, 日本国 (Japanese, Japan) (ja_JP) by [motoyamayuki](https://profiles.wordpress.org/motoyamayuki/)
    122123* Nederlands, Nederland (Dutch, Netherlands) (nl_NL) by Friso van Wieringen
     
    507508
    508509== Changelog ==
     510
     511= 0.50.0 (2014-12-25) =
     512* Take advantage of WP 4.1's new password_hint filter
     513* Add Italian translation
    509514
    510515= 0.49.0 (2014-11-10) =
Note: See TracChangeset for help on using the changeset viewer.