From 5d85222e5e869c0a6bab718359768e6051ba7494 Mon Sep 17 00:00:00 2001 From: Alexander Schneider Date: Sat, 13 Feb 2021 23:22:11 +0100 Subject: [PATCH] Bump version 2.2.4 --- README.md | 2 +- composer.json | 2 +- package.json | 2 +- readme.txt | 5 ++++- src/Controller/Backend/UserObjectController.php | 8 ++++---- src/UserAccessManager.php | 2 +- src/Wrapper/Wordpress.php | 11 ++++------- user-access-manager.php | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 9710a692..3915d231 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # User Access Manager Plugin for Wordpress -[![Build Status](https://travis-ci.org/GM-Alex/user-access-manager.svg)](https://travis-ci.org/GM-Alex/user-access-manager) +![Tests](https://github.com/GM-Alex/user-access-manager/workflows/Tests/badge.svg) If you are a normal user please visit https://wordpress.org/plugins/user-access-manager/ diff --git a/composer.json b/composer.json index 9782670c..0c1defd2 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "User Access Manager plugin for Wordpress", "type": "wordpress-plugin", "license": "GPL-2.0", - "version": "2.2.3", + "version": "2.2.4", "authors": [ { "name": "Alexander Schneider", diff --git a/package.json b/package.json index 40e5da83..7b50e51f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "user-access-manager", - "version": "2.2.3", + "version": "2.2.4", "description": "[![Build Status](https://travis-ci.org/GM-Alex/user-access-manager.svg)](https://travis-ci.org/GM-Alex/user-access-manager)", "main": "index.js", "directories": { diff --git a/readme.txt b/readme.txt index 2d87c273..bb19639e 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Tags: admin, access, member area, members, member, member access, page, pages, post, posts, private, privacy, restrict, user, user access manager, user management Requires at least: 4.7 Tested up to: 5.6 -Stable tag: 2.2.3 +Stable tag: 2.2.4 With the "User Access Manager"-plugin you can manage the access to your posts, pages and files. @@ -59,6 +59,9 @@ Here you found the changes in each version. Version Date Changes + 2.2.4 2021/02/13 Fix type error for user object controller. + Fix type error for the wordpress wrapper. + 2.2.3 2021/02/13 Fix warning at settings page. Fix type error for user group handler. diff --git a/src/Controller/Backend/UserObjectController.php b/src/Controller/Backend/UserObjectController.php index fc4d8f2a..0e7489ee 100644 --- a/src/Controller/Backend/UserObjectController.php +++ b/src/Controller/Backend/UserObjectController.php @@ -40,14 +40,14 @@ public function addUserColumnsHeader(array $defaults): array /** * The function for the manage_users_custom_column action. - * @param string $return The normal return value. + * @param null|string $return The normal return value. * @param string $columnName The column name. * @param integer $id The id. * @return string|null * @throws UserGroupTypeException * @throws UserGroupTypeException */ - public function addUserColumn(string $return, string $columnName, int $id): ?string + public function addUserColumn(?string $return, string $columnName, int $id): ?string { if ($columnName === self::COLUMN_NAME) { $this->setObjectInformation(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $id); @@ -82,9 +82,9 @@ public function saveUserData(int $userId) /** * The function for the delete_user action. - * @param integer $userId The user id. + * @param int|string $userId The user id. */ - public function removeUserData(int $userId) + public function removeUserData($userId) { $this->removeObjectData(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId); } diff --git a/src/UserAccessManager.php b/src/UserAccessManager.php index d5ca957e..2b5c258b 100644 --- a/src/UserAccessManager.php +++ b/src/UserAccessManager.php @@ -50,7 +50,7 @@ */ class UserAccessManager { - const VERSION = '2.2.3'; + const VERSION = '2.2.4'; const DB_VERSION = '1.6.1'; /** diff --git a/src/Wrapper/Wordpress.php b/src/Wrapper/Wordpress.php index bc401074..85957d33 100644 --- a/src/Wrapper/Wordpress.php +++ b/src/Wrapper/Wordpress.php @@ -202,11 +202,11 @@ public function getPost($id, $output = OBJECT, $filter = 'raw') } /** - * @param string $postType + * @param int|string $postType * @return null|WP_Post_Type * @see \get_post_type_object() */ - public function getPostTypeObject(string $postType): ?WP_Post_Type + public function getPostTypeObject($postType): ?WP_Post_Type { return get_post_type_object($postType); } @@ -234,9 +234,6 @@ public function getTerm($id, string $taxonomy = '', string $output = OBJECT, str public function dbDelta($queries = '', $execute = true): array { if (function_exists('\dbDelta') === false) { - /** - * @noinspection PhpIncludeInspection - */ require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); } @@ -245,10 +242,10 @@ public function dbDelta($queries = '', $execute = true): array /** * @param integer $blogId - * @return int|true + * @return int|string * @see \switch_to_blog() */ - public function switchToBlog(int $blogId) + public function switchToBlog($blogId) { if (function_exists('\switch_to_blog') === true) { return switch_to_blog($blogId); diff --git a/user-access-manager.php b/user-access-manager.php index dc287491..efdae7ad 100644 --- a/user-access-manager.php +++ b/user-access-manager.php @@ -3,7 +3,7 @@ * Plugin Name: User Access Manager * Plugin URI: https://wordpress.org/plugins/user-access-manager/ * Author URI: https://twitter.com/GM_Alex - * Version: 2.2.3 + * Version: 2.2.4 * Author: Alexander Schneider * Description: Manage the access to your posts, pages, categories and files. * Text Domain: user-access-manager