diff --git a/composer.json b/composer.json index a020ff80..79437032 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.8", + "version": "2.2.9", "authors": [ { "name": "Alexander Schneider", diff --git a/package.json b/package.json index 97e0fdce..f201afdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "user-access-manager", - "version": "2.2.8", + "version": "2.2.9", "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 9522d13e..571b194b 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.8 +Stable tag: 2.2.9 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.9 2021/02/24 Type fixes for Yoast seo plugin. + Fix some other type issues. + 2.2.8 2021/02/21 Some cleanup. Type fixes for the short controller. Fix some possible php notices and warnings. diff --git a/src/Controller/Backend/SetupController.php b/src/Controller/Backend/SetupController.php index 0671b84e..efcb690b 100644 --- a/src/Controller/Backend/SetupController.php +++ b/src/Controller/Backend/SetupController.php @@ -195,7 +195,7 @@ public function repairDatabaseAction() public function deleteDatabaseBackupAction() { $this->verifyNonce(self::SETUP_DELETE_BACKUP_NONCE); - $version = $this->getRequestParameter('uam_delete_backup'); + $version = (string) $this->getRequestParameter('uam_delete_backup'); if ($this->setupHandler->getDatabaseHandler()->deleteBackup($version) === true) { $this->setUpdateMessage(TXT_UAM_DELETE_DATABASE_BACKUP_SUCCESS); diff --git a/src/Controller/Backend/TermObjectController.php b/src/Controller/Backend/TermObjectController.php index aa0f2002..4d5a4641 100644 --- a/src/Controller/Backend/TermObjectController.php +++ b/src/Controller/Backend/TermObjectController.php @@ -41,13 +41,13 @@ public function addTermColumnsHeader(array $defaults): array /** * The function for the manage_categories_custom_column action. - * @param string $content Content for the column. Multiple filter calls are possible, so we need to append. + * @param string|null $content Content for the column. Multiple filter calls are possible, so we need to append. * @param string $columnName The column name. * @param int|string $id The id. - * @return string $content with content appended for self::COLUMN_NAME column + * @return string|null $content with content appended for self::COLUMN_NAME column * @throws UserGroupTypeException */ - public function addTermColumn(string $content, string $columnName, $id): string + public function addTermColumn(?string $content, string $columnName, $id): ?string { if ($columnName === self::COLUMN_NAME) { $term = $this->objectHandler->getTerm($id); diff --git a/src/Controller/Frontend/FrontendController.php b/src/Controller/Frontend/FrontendController.php index 7ab96228..33799043 100644 --- a/src/Controller/Frontend/FrontendController.php +++ b/src/Controller/Frontend/FrontendController.php @@ -126,14 +126,14 @@ public function showAncestors(array $ancestors, $objectId, string $objectType): /** * Filter for Yoast SEO Plugin - * Hides the url from the site map if the user has no access - * @param string $url The url to check + * Hides the url from the site map if the user has no access + * @param string|array $url The url to check * @param string $type The object type * @param object $object The object - * @return false|string + * @return false|string * @throws UserGroupTypeException */ - public function getWpSeoUrl(string $url, string $type, object $object) + public function getWpSeoUrl($url, string $type, object $object) { return ($this->accessHandler->checkObjectAccess($type, $object->ID) === true) ? $url : false; } diff --git a/src/UserAccessManager.php b/src/UserAccessManager.php index 5541d7d4..5bd73ac2 100644 --- a/src/UserAccessManager.php +++ b/src/UserAccessManager.php @@ -50,7 +50,7 @@ */ class UserAccessManager { - const VERSION = '2.2.8'; + const VERSION = '2.2.9'; const DB_VERSION = '1.6.1'; /** diff --git a/user-access-manager.php b/user-access-manager.php index c37dcf0d..616f0255 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.8 + * Version: 2.2.9 * Author: Alexander Schneider * Description: Manage the access to your posts, pages, categories and files. * Text Domain: user-access-manager