Plugin Directory

Changeset 3076504


Ignore:
Timestamp:
04/24/2024 01:53:08 PM (21 months ago)
Author:
dwc
Message:

Update to support PHP 7/8 constructors and current WordPress error message

Location:
network-username-restrictions-override/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • network-username-restrictions-override/trunk/network-username-restrictions-override.php

    r560903 r3076504  
    22/*
    33Plugin Name: Network Username Restrictions Override
    4 Version: 1.2
    5 Plugin URI: http://danieltwc.com/2011/network-username-restrictions-override-1-0/
     4Version: 1.3
     5Plugin URI: https://danieltwc.com/2011/network-username-restrictions-override-1-0/
    66Description: Override some of the built-in restrictions in WordPress network usernames. Similar to the <a href="http://wordpress.org/extend/plugins/wpmu-blog-name-restrictions-override/">Blog Name Restrictions Override</a> plugin.
    77Author: Daniel Westermann-Clark
    8 Author URI: http://danieltwc.com/
     8Author URI: https://danieltwc.com/
    99*/
    1010
     
    2323    );
    2424
    25     function NetworkUsernameRestrictionsOverridePlugin() {
     25    function __construct() {
    2626        add_action('init', array($this, 'init'));
    2727    }
     
    6464            if ($code == 'user_name') {
    6565                foreach ($messages as $message) {
    66                     if ($message == __('Only lowercase letters (a-z) and numbers are allowed.')) {
     66                    if ($message == __('Usernames can only contain lowercase letters (a-z) and numbers.')) {
    6767                        // Check if we allow email addresses; otherwise, check against character overrides
    6868
  • network-username-restrictions-override/trunk/readme.txt

    r560903 r3076504  
    33Tags: admin, authentication, network, wpmu, multisite
    44Requires at least: 3.4
    5 Tested up to: 3.4
    6 Stable tag: 1.2
     5Tested up to: 6.5.2
     6Stable tag: 1.3
    77
    88Override restrictions on WordPress network usernames.
     
    4848== Changelog ==
    4949
     50= 1.3
     51* Add PHP 7/8 compatibility by updating constructor to use __construct
     52* Update username check to match current WordPress error messages
     53
    5054= 1.2 =
    5155* Remove use of call-time pass by reference to avoid warnings on PHP 5.3 and newer
Note: See TracChangeset for help on using the changeset viewer.