Skip to content

Commit 8436f35

Browse files
authored
Merge pull request #385 from GM-Alex/next
Bump version 2.2.23
2 parents a976acd + 68ee412 commit 8436f35

9 files changed

+24
-21
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "User Access Manager plugin for Wordpress",
44
"type": "wordpress-plugin",
55
"license": "GPL-2.0",
6-
"version": "2.2.22",
6+
"version": "2.2.23",
77
"authors": [
88
{
99
"name": "Alexander Schneider",

includes/language.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// --- Error Messages ---
1717
define('TXT_UAM_PHP_VERSION_TO_LOW', __('Sorry you need at least PHP version 7.2 to use the User Access Manager. Your current PHP version is %s. See <a href="https://github.com/GM-Alex/user-access-manager/wiki/Troubleshoot">https://github.com/GM-Alex/user-access-manager/wiki/Troubleshoot</a> for more information.', 'user-access-manager'));
18-
define('TXT_UAM_WORDPRESS_VERSION_TO_LOW', __('Sorry you need at least Wordpress version 3.0 to use the User Access Manager. Your current Wordpress version is %s.', 'user-access-manager'));
18+
define('TXT_UAM_WORDPRESS_VERSION_TO_LOW', __('Sorry you need at least WordPress version 3.0 to use the User Access Manager. Your current WordPress version is %s.', 'user-access-manager'));
1919
/** @noinspection HtmlUnknownTarget */
2020
define('TXT_UAM_NEED_DATABASE_UPDATE', __('Please update the database of the User Access Manager. <a href="%s">Click here to proceed</a>', 'user-access-manager'));
2121
define('TXT_UAM_ERROR', __('The following error occurred: %s', 'user-access-manager'));
@@ -44,7 +44,7 @@
4444
define('TXT_UAM_HIDE_DEFAULT_TITLE', __('Hide title', 'user-access-manager'));
4545
define('TXT_UAM_HIDE_DEFAULT_TITLE_DESC', __('Selecting "Yes" will show the text which is defined at "Title" if user has no access.', 'user-access-manager'));
4646
define('TXT_UAM_DEFAULT_CONTENT', __('Content', 'user-access-manager'));
47-
define('TXT_UAM_DEFAULT_CONTENT_DESC', __('Content displayed if user has no access. You can add an login-form by adding the keyword <strong>[LOGIN_FORM]</strong>. This form will shown on single %s, otherwise a link will shown.', 'user-access-manager'));
47+
define('TXT_UAM_DEFAULT_CONTENT_DESC', __('Content displayed if user has no access. You can add a login-form by adding the keyword <strong>[LOGIN_FORM]</strong>. This form will be shown on single %s, otherwise a link will be shown.', 'user-access-manager'));
4848
define('TXT_UAM_HIDE_DEFAULT', __('Hide complete', 'user-access-manager'));
4949
define('TXT_UAM_HIDE_DEFAULT_DESC', __('Selecting "Yes" will hide %s if the user has no access.', 'user-access-manager'));
5050
define('TXT_UAM_DEFAULT_COMMENT_CONTENT', __('Comment text', 'user-access-manager'));
@@ -54,7 +54,7 @@
5454
define('TXT_UAM_DEFAULT_COMMENTS_LOCKED', __('Lock comments', 'user-access-manager'));
5555
define('TXT_UAM_DEFAULT_COMMENTS_LOCKED_DESC', __('Selecting "yes" allows users to comment even if the content is locked', 'user-access-manager'));
5656
define('TXT_UAM_SHOW_DEFAULT_CONTENT_BEFORE_MORE', __('Show content before &lt;!--more--&gt; tag', 'user-access-manager'));
57-
define('TXT_UAM_SHOW_DEFAULT_CONTENT_BEFORE_MORE_DESC', __('Shows the content before the &lt;!--more--&gt; tag and after that the defined text at "%s content". If no &lt;!--more--&gt; is set the defined text at "%s content" will shown.', 'user-access-manager')); //TODO
57+
define('TXT_UAM_SHOW_DEFAULT_CONTENT_BEFORE_MORE_DESC', __('Shows the content before the &lt;!--more--&gt; tag and after that the defined text at "%s content". If no &lt;!--more--&gt; is set the defined text at "%s content" will be shown.', 'user-access-manager')); //TODO
5858
define('TXT_UAM_OBJECT_USE_DEFAULT', __('Use default settings for %s', 'user-access-manager'));
5959
define('TXT_UAM_OBJECT_USE_DEFAULT_DESC', __('If selected the settings form the default type will be used.', 'user-access-manager'));
6060
define('TXT_UAM_OBJECT_SETTING', __('%s settings', 'user-access-manager'));
@@ -64,7 +64,7 @@
6464
define('TXT_UAM_HIDE_OBJECT_TITLE', __('Hide %s title', 'user-access-manager'));
6565
define('TXT_UAM_HIDE_OBJECT_TITLE_DESC', __('Selecting "Yes" will show the text which is defined at "%s title" if user has no access.', 'user-access-manager'));
6666
define('TXT_UAM_OBJECT_CONTENT', __('%s content', 'user-access-manager'));
67-
define('TXT_UAM_OBJECT_CONTENT_DESC', __('Content displayed if user has no access. You can add an login-form by adding the keyword <strong>[LOGIN_FORM]</strong>. This form will shown on single %s, otherwise a link will shown.', 'user-access-manager'));
67+
define('TXT_UAM_OBJECT_CONTENT_DESC', __('Content displayed if user has no access. You can add a login-form by adding the keyword <strong>[LOGIN_FORM]</strong>. This form will be shown on single %s, otherwise a link will be shown.', 'user-access-manager'));
6868
define('TXT_UAM_HIDE_OBJECT', __('Hide complete %s', 'user-access-manager'));
6969
define('TXT_UAM_HIDE_OBJECT_DESC', __('Selecting "Yes" will hide %s if the user has no access.', 'user-access-manager'));
7070
define('TXT_UAM_OBJECT_COMMENT_CONTENT', __('%s comment text', 'user-access-manager'));
@@ -90,8 +90,8 @@
9090
define('TXT_UAM_CUSTOM_FILE_HANDLING_FILE_DESC', __('Edit this content if you are using the custom file handling file setting.', 'user-access-manager'));
9191
define('TXT_UAM_LOCK_FILE_DESC', __('If you select "Yes" all files will locked by a .htaccess file and only users with access can download files. <br/><strong style="color:red;">Note: If you activate this option the plugin will overwrite a \'.htaccess\' file at the upload folder, if you use already one to protect your files. Also if you have no permalinks activated your upload dir will protect by a \'.htaccess\' with a random password and all old media files insert in a previous post/page will not work anymore. You have to update your posts/pages (not necessary if you have permalinks activated).</strong>', 'user-access-manager'));
9292
define('TXT_UAM_LOCKED_DIRECTORY_TYPE', __('Locked directory type', 'user-access-manager'));
93-
define('TXT_UAM_LOCKED_DIRECTORY_TYPE_DESC', __('"Wordpress" will only lock files handled by the wordpress media manager (recommended), "All" will lock all files at the upload directory, "Custom" will use a custom string.', 'user-access-manager'));
94-
define('TXT_UAM_LOCKED_DIRECTORY_TYPE_WORDPRESS', __('Wordpress', 'user-access-manager'));
93+
define('TXT_UAM_LOCKED_DIRECTORY_TYPE_DESC', __('"WordPress" will only lock files handled by the WordPress media manager (recommended), "All" will lock all files at the upload directory, "Custom" will use a custom string.', 'user-access-manager'));
94+
define('TXT_UAM_LOCKED_DIRECTORY_TYPE_WORDPRESS', __('WordPress', 'user-access-manager'));
9595
define('TXT_UAM_LOCKED_DIRECTORY_TYPE_ALL', __('All', 'user-access-manager'));
9696
define('TXT_UAM_LOCKED_DIRECTORY_TYPE_CUSTOM', __('Custom', 'user-access-manager'));
9797
define('TXT_UAM_LOCK_FILE_TYPES', __('Locked file types', 'user-access-manager'));
@@ -167,7 +167,7 @@
167167
define('TXT_UAM_BLOG_ADMIN_HINT_TEXT', __('Admin hint text', 'user-access-manager'));
168168
define('TXT_UAM_BLOG_ADMIN_HINT_TEXT_DESC', __('The text which will shown behind the post/page.', 'user-access-manager'));
169169
define('TXT_UAM_BLOG_ADMIN_HINT', __('Show admin hint at Posts', 'user-access-manager'));
170-
define('TXT_UAM_BLOG_ADMIN_HINT_DESC', sprintf(__('Selecting "Yes" will show the defined text at "%s" behind the post/page to an logged in admin to show him which posts/pages are locked if he visits his blog.', 'user-access-manager'), TXT_UAM_BLOG_ADMIN_HINT_TEXT));
170+
define('TXT_UAM_BLOG_ADMIN_HINT_DESC', sprintf(__('Selecting "Yes" will show the defined text at "%s" behind the post/page to a logged in admin to show him which posts/pages are locked if he visits his blog.', 'user-access-manager'), TXT_UAM_BLOG_ADMIN_HINT_TEXT));
171171
define('TXT_UAM_SHOW_ASSIGNED_GROUPS', __('Show assigned groups', 'user-access-manager'));
172172
define('TXT_UAM_SHOW_ASSIGNED_GROUPS_DESC', __('Show assigned groups next to the edit link', 'user-access-manager'));
173173
define('TXT_UAM_HIDE_EDIT_LINK_ON_NO_ACCESS', __('Hide edit link on no access', 'user-access-manager'));

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "user-access-manager",
3-
"version": "2.2.22",
3+
"version": "2.2.23",
44
"description": "[![Build Status](https://travis-ci.org/GM-Alex/user-access-manager.svg)](https://travis-ci.org/GM-Alex/user-access-manager)",
55
"main": "index.js",
66
"directories": {

readme.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: GM_Alex
33
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1947052
44
Tags: admin, access, member area, members, member, member access, page, pages, post, posts, private, privacy, restrict, user, user access manager, user management
55
Requires at least: 4.7
6-
Tested up to: 6.2
7-
Stable tag: 2.2.22
6+
Tested up to: 6.3
7+
Stable tag: 2.2.23
88

99
With the "User Access Manager"-plugin you can manage the access to your posts, pages and files.
1010

@@ -63,6 +63,9 @@ Here you found the changes in each version.
6363

6464
Version Date Changes
6565

66+
2.2.23 2023/05/26 Fix typos
67+
Fix version_compare
68+
6669
2.2.22 2023/05/26 Minor change
6770

6871
2.2.21 2023/05/25 Adjust database compatibility #368

src/Database/Database.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function getCharset(): string
304304
{
305305
$charsetCollate = '';
306306

307-
$mySlqVersion = $this->getVariable('SELECT VERSION() as mysql_version');
307+
$mySlqVersion = (string) $this->getVariable('SELECT VERSION() as mysql_version');
308308

309309
if (version_compare($mySlqVersion, '4.1.0', '>=')) {
310310
if (!empty($this->wpDatabase->charset)) {

src/Setup/Database/DatabaseHandler.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,14 @@ public function isDatabaseUpdateNecessary(): bool
329329
$currentDbVersion = $this->database->getVariable($select);
330330

331331
if ($currentDbVersion !== null
332-
&& version_compare($currentDbVersion, UserAccessManager::DB_VERSION, '<') === true
332+
&& version_compare((string) $currentDbVersion, UserAccessManager::DB_VERSION, '<') === true
333333
) {
334334
return true;
335335
}
336336
}
337337
}
338338

339-
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
339+
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');
340340
return version_compare($currentDbVersion, UserAccessManager::DB_VERSION, '<');
341341
}
342342

@@ -346,7 +346,7 @@ public function isDatabaseUpdateNecessary(): bool
346346
*/
347347
public function backupDatabase(): bool
348348
{
349-
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
349+
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');
350350

351351
if (empty($currentDbVersion) === true
352352
|| version_compare($currentDbVersion, '1.2', '<') === true
@@ -486,7 +486,7 @@ private function getOrderedDatabaseUpdates(): array
486486
*/
487487
public function updateDatabase(): bool
488488
{
489-
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
489+
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');
490490

491491
if (empty($currentDbVersion) === true) {
492492
return false;

src/Setup/SetupHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function install($networkWide = false)
139139
*/
140140
public function update(): bool
141141
{
142-
$uamVersion = $this->wordpress->getOption('uam_version', '0');
142+
$uamVersion = (string) $this->wordpress->getOption('uam_version', '0');
143143

144144
if (version_compare($uamVersion, '1.0', '<') === true) {
145145
$this->wordpress->deleteOption('allow_comments_locked');

src/UserAccessManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*/
5151
class UserAccessManager
5252
{
53-
const VERSION = '2.2.22';
53+
const VERSION = '2.2.23';
5454
const DB_VERSION = '1.6.2';
5555

5656
/**

user-access-manager.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: User Access Manager
44
* Plugin URI: https://wordpress.org/plugins/user-access-manager/
55
* Author URI: https://twitter.com/GM_Alex
6-
* Version: 2.2.22
6+
* Version: 2.2.23
77
* Requires PHP: 7.2
88
* Author: Alexander Schneider
99
* Description: Manage the access to your posts, pages, categories and files.
@@ -39,7 +39,7 @@
3939
//--- Check requirements ---
4040

4141
//Check php version
42-
if (version_compare(phpversion(), '7.2') === -1) {
42+
if (version_compare((string) phpversion(), '7.2') === -1) {
4343
add_action(
4444
'admin_notices',
4545
function () {
@@ -55,7 +55,7 @@ function () {
5555
//Check wordpress version
5656
global $wp_version;
5757

58-
if (version_compare($wp_version, '4.6') === -1) {
58+
if (version_compare((string) $wp_version, '4.6') === -1) {
5959
add_action(
6060
'admin_notices',
6161
function () use ($wp_version) {

0 commit comments

Comments
 (0)