diff --git a/CHANGELOG.md b/CHANGELOG.md index 244c46c5..1638559d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/). +## [5.1.3] + +### Fixed + +- Do not show the form in the admin settings link if the user is missing cap. + ## [5.1.2] ### Fixed @@ -692,6 +698,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a - Initial production release. +[5.1.3]: https://github.com/infinum/eightshift-forms/compare/5.1.2...5.1.3 [5.1.2]: https://github.com/infinum/eightshift-forms/compare/5.1.1...5.1.2 [5.1.1]: https://github.com/infinum/eightshift-forms/compare/5.1.0...5.1.1 [5.1.0]: https://github.com/infinum/eightshift-forms/compare/5.0.10...5.1.0 diff --git a/eightshift-forms.php b/eightshift-forms.php index 11dddaf8..498e7f8c 100644 --- a/eightshift-forms.php +++ b/eightshift-forms.php @@ -6,7 +6,7 @@ * Description: Eightshift Forms is a complete form builder plugin that utilizes modern Block editor features with multiple third-party integrations, bringing your project to a new level. * Author: WordPress team @Infinum * Author URI: https://eightshift.com/ - * Version: 5.1.2 + * Version: 5.1.3 * Text Domain: eightshift-forms * * @package EightshiftForms diff --git a/src/AdminMenus/FormListingAdminSubMenu.php b/src/AdminMenus/FormListingAdminSubMenu.php index 5f333d84..e8796658 100644 --- a/src/AdminMenus/FormListingAdminSubMenu.php +++ b/src/AdminMenus/FormListingAdminSubMenu.php @@ -183,6 +183,10 @@ protected function processAttributes($attr): array */ public function addCustomLinkIntoAppearanceMenu(): void { + if (!\current_user_can(FormAdminMenu::ADMIN_MENU_CAPABILITY)) { + return; + } + global $submenu; // phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited