From 0dac8f0764c068b5228d9b9a46752f0dcdeb1e12 Mon Sep 17 00:00:00 2001 From: jordan_bauer Date: Thu, 13 Jun 2019 11:17:10 -0500 Subject: [PATCH] added construction_hook_name to settings_menu (#5384) --- CHANGELOG.txt | 1 + CONTRIBUTORS.rst | 1 + docs/reference/hooks.rst | 8 ++++++++ docs/releases/2.6.rst | 1 + wagtail/admin/menu.py | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 45fad34d14..129eb891a4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -34,6 +34,7 @@ Changelog * Added screen reader labels for page privacy toggle, edit lock, status tag in page explorer & edit views (Helen Chapman, Katie Locke) * Added screen-reader labels for dashboard summary cards (Helen Chapman, Katie Locke) * Added screen-reader labels for privacy toggle of collections (Helen Chapman, Katie Locke) + * Added `construct_settings_menu` hook (Jordan Bauer, Quadric) * Fix: ModelAdmin no longer fails when filtering over a foreign key relation (Jason Dilworth, Matt Westcott) * Fix: The Wagtail version number is now visible within the Settings menu (Kevin Howbrook) * Fix: Scaling images now rounds values to an integer so that images render without errors (Adrian Brunyate) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index fe7ca06a8c..a5c74fa4e7 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -379,6 +379,7 @@ Contributors * Eric Dyken * Jordan Bauer * Fidel Ramos +* Quadric Translators =========== diff --git a/docs/reference/hooks.rst b/docs/reference/hooks.rst index 2d7c233f81..3714a36d05 100644 --- a/docs/reference/hooks.rst +++ b/docs/reference/hooks.rst @@ -212,6 +212,14 @@ Hooks for building new areas of the admin interface (alongside pages, images, do As ``register_admin_menu_item``, but registers menu items into the 'Settings' sub-menu rather than the top-level menu. +.. _construct_settings_menu: + +``construct_settings_menu`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + As ``construct_main_menu``, but modifies the 'Settings' sub-menu rather than the top-level menu. + + .. _register_admin_search_area: ``register_admin_search_area`` diff --git a/docs/releases/2.6.rst b/docs/releases/2.6.rst index d2527e75d5..98938bb070 100644 --- a/docs/releases/2.6.rst +++ b/docs/releases/2.6.rst @@ -73,6 +73,7 @@ Other features * Improve performance of Pages for Moderation panel (Fidel Ramos) * Added ``process_child_object`` and ``exclude_fields`` arguments to ``Page.copy()`` to make it easier for third-party apps to customise copy behavior (Karl Hobley) * Added ``Page.with_content_json()``, allowing revision content loading behaviour to be customised on a per-model basis (Karl Hobley) + * Added ``construct_settings_menu`` hook (Jordan Bauer, Quadric) Bug fixes ~~~~~~~~~ diff --git a/wagtail/admin/menu.py b/wagtail/admin/menu.py index 3da47ed24e..a252fa8b06 100644 --- a/wagtail/admin/menu.py +++ b/wagtail/admin/menu.py @@ -115,4 +115,4 @@ class SubmenuMenuItem(MenuItem): admin_menu = Menu(register_hook_name='register_admin_menu_item', construct_hook_name='construct_main_menu') -settings_menu = Menu(register_hook_name='register_settings_menu_item') +settings_menu = Menu(register_hook_name='register_settings_menu_item', construct_hook_name='construct_settings_menu')