From 45f6fbcbe759d9243d9d918f9b7412af4bee65bf Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Fri, 11 Aug 2023 13:38:02 +0100 Subject: [PATCH] MDL-78974 themes: define removedprimarynavitems theme config property. All configurable theme config properties must be defined at the class level, lest PHP 8.2 complain about creation of dynamic properties. --- lib/outputlib.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/outputlib.php b/lib/outputlib.php index a1d73f9cbbb..37dc3c47eb3 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -714,6 +714,12 @@ class theme_config { */ public $haseditswitch = false; + /** + * Allows a theme to customise primary navigation by specifying the list of items to remove. + * @var array + */ + public $removedprimarynavitems = []; + /** * Load the config.php file for a particular theme, and return an instance * of this class. (That is, this is a factory method.) @@ -784,6 +790,7 @@ class theme_config { $baseconfig = $config; } + // Ensure that each of the configurable properties defined below are also defined at the class level. $configurable = [ 'parents', 'sheets', 'parents_exclude_sheets', 'plugins_exclude_sheets', 'usefallback', 'javascripts', 'javascripts_footer', 'parents_exclude_javascripts',