I do use WordPress 6.0 with PHP 7.4 and this little plugin still works – but I keep getting a ton of Notices:
PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in XXX/wp-content/plugins/reorder-my-sites/reorder-my-sites.php on line 39 … and line 44
I just replaced the { } braces with [ ] brackets in these lines and everything seems to be fine.
I hope that is a valid solution. Maybee someone wants to fix the plugin?
Or maybee this is helpful for others?
I upgraded PHP through cPanel yesterday to v.7.2 and today I noticed that our list of websites under the My Sites button in WordPress Multisite are no longer alphabetized. Also it appears that your plugin has not been tested with newer versions of WordPress. This is a wonderful and helpful plugin and I hope that you will be able to update it soon! Thank you!
]]>https://gist.github.com/youri–/29aa1ad44db1bfe7000a
There were some curly braces used where normal ones were needed, and also the Dashboard -> My Sites page is now alphabetically sorted, with main/primary blog on top.
]]>If the site admin user is not added to the main site, it shows an empty field on the top row, but it is able to open up dashboard, plugin, themes of the current site.
I think if the plugin detects that the site admin isn’t added to the main site, you should just completely remove the first row (with the empty field), as it’s confusing for site admins.
]]>Hello my friend.
I found a bug in the way your plugin is reordering the names of the sites: it is not considering upper/lower case. So it is ordering names like this:
Site A
Site C
site B
site D
To fix this, I modified line 25 and now looks like this:
$blog_names[$site_id] = strtoupper($site->blogname);
and it did the trick:
Site A
site B
Site C
site D
Hope you can merge it to a new update.
Thanks!