diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index a85e0f5866540..fa6235ab4affd 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -4957,6 +4957,8 @@ class action_menu_link extends action_link implements renderable { /** * The number of instances of this action menu link (and its subclasses). + * + * @deprecated since Moodle 4.4. * @var int */ protected static $instance = 1; @@ -4985,7 +4987,6 @@ public function __construct(moodle_url $url, ?pix_icon $icon, $text, $primary = */ public function export_for_template(renderer_base $output) { $data = parent::export_for_template($output); - $data->instance = self::$instance++; // Ignore what the parent did with the attributes, except for ID and class. $data->attributes = []; diff --git a/lib/templates/action_menu_link.mustache b/lib/templates/action_menu_link.mustache index 55143816d2aff..12ac0367650c4 100644 --- a/lib/templates/action_menu_link.mustache +++ b/lib/templates/action_menu_link.mustache @@ -27,12 +27,12 @@ } }} {{^disabled}} - + {{#icon}} {{#pix}}{{key}}, {{component}}, {{title}}{{/pix}} {{/icon}} {{#showtext}} - {{{text}}} + {{{text}}} {{/showtext}} {{/disabled}} diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 4edcb7ae6e42d..686c058ac936a 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -38,6 +38,7 @@ information provided here is intended especially for developers. - `\core\deprecation::emit_deprecation_if_present([self::class, 'some_method']);` * Added missing deprecation for PARAM_CLEANFILE which was deprecated in Moodle 2.0. * Login can now utilise new param 'loginredirect' to indicate when to use value set for $CFG->alternateloginurl. +* \action_menu_link::$instance has been deprecated as it is no longer used. === 4.3 ===