From 765654ae84457f6d90caa112935b17ae84c81675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20V=C3=A4nttinen?= Date: Mon, 24 Jun 2024 10:51:10 +0300 Subject: [PATCH 1/2] TMS-1054: Remove hero overlay-toggle from single page editor --- CHANGELOG.MD | 2 ++ lib/ACF/AlterPageSettingsFields.php | 42 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lib/ACF/AlterPageSettingsFields.php diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 462a80c..68b9043 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- TMS-1054: Remove hero overlay-toggle from single page editor + ## [1.2.6] - 2024-06-04 - TMS-1044: Accordion style changes diff --git a/lib/ACF/AlterPageSettingsFields.php b/lib/ACF/AlterPageSettingsFields.php new file mode 100644 index 0000000..95cd9b6 --- /dev/null +++ b/lib/ACF/AlterPageSettingsFields.php @@ -0,0 +1,42 @@ +get_key() === 'fg_page_settings' ) { + $group->remove_field( 'fg_page_settings_remove_overlay' ); + } + } + catch ( Exception $e ) { + ( new Logger() )->error( $e->getMessage(), $e->getTrace() ); + } + + return $group; + } +} + +( new AlterPageSettingsFields() ); From 6595b48c4fa14cdd6dda4c41093db7dcb8f00982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20V=C3=A4nttinen?= Date: Mon, 24 Jun 2024 11:27:43 +0300 Subject: [PATCH 2/2] TMS-1054: Param comment fix --- lib/ACF/AlterPageSettingsFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ACF/AlterPageSettingsFields.php b/lib/ACF/AlterPageSettingsFields.php index 95cd9b6..7a4c503 100644 --- a/lib/ACF/AlterPageSettingsFields.php +++ b/lib/ACF/AlterPageSettingsFields.php @@ -21,7 +21,7 @@ public function __construct() { /** * Remove overlay TrueFalse-field from page settings * - * @param Field\Group[] $fields Array of settings. + * @param Field\Group $group Group-object of settings. * * @return array */