From ea52da4dd0e51950b153cef3ee260edeb6d3608d Mon Sep 17 00:00:00 2001 From: Ammar Abdulhamid Date: Sat, 25 Jul 2020 02:46:02 +0100 Subject: [PATCH] Remove VectorAfterToolbox hook Bug: T258814 Change-Id: I56c7efec0df021b3af3205ba80ea33b8fa470880 --- hooks.txt | 12 ------------ includes/VectorTemplate.php | 15 +++------------ includes/templates/Menu.mustache | 2 -- stories/types.js | 2 -- 4 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 hooks.txt diff --git a/hooks.txt b/hooks.txt deleted file mode 100644 index eb14caae..00000000 --- a/hooks.txt +++ /dev/null @@ -1,12 +0,0 @@ -Hooks provided by the Vector skin. - -'VectorAfterToolbox': Called after rendering the toolbox portlet (#p-tb). -You can use this to inject items (such as ads or a hit counter, for example) -from an extension. -This is the Vector counterpart to the MonoBookAfterToolbox hook in the MonoBook -skin. - -'VectorBeforeFooter': Called before the footer (#footer) is output, but after -#mw-navigation has been closed. -You can use this to inject items (such as ads or a hit counter, for example) -from an extension. diff --git a/includes/VectorTemplate.php b/includes/VectorTemplate.php index aff7a367..6e56aa5c 100644 --- a/includes/VectorTemplate.php +++ b/includes/VectorTemplate.php @@ -305,22 +305,13 @@ class VectorTemplate extends BaseTemplate { case 'SEARCH': break; case 'TOOLBOX': - $portal = $this->getMenuData( - 'tb', $content, self::MENU_TYPE_PORTAL + $props[] = $this->getMenuData( + 'tb', $content, self::MENU_TYPE_PORTAL ); - // Run deprecated hook. - // Use SidebarBeforeOutput instead. - ob_start(); - Hooks::run( 'VectorAfterToolbox', [], '1.35' ); - $props[] = $portal + [ - 'html-hook-vector-after-toolbox' => ob_get_clean(), - ]; break; case 'LANGUAGES': $portal = $this->getMenuData( - 'lang', - $content, - self::MENU_TYPE_PORTAL + 'lang', $content, self::MENU_TYPE_PORTAL ); // The language portal will be added provided either // languages exist or there is a value in html-after-portal diff --git a/includes/templates/Menu.mustache b/includes/templates/Menu.mustache index 281278d0..55114dfb 100644 --- a/includes/templates/Menu.mustache +++ b/includes/templates/Menu.mustache @@ -20,5 +20,3 @@ {{{html-after-portal}}} -{{! Note: html-hook-vector-after-toolbox is deprecated. }} -{{{html-hook-vector-after-toolbox}}} diff --git a/stories/types.js b/stories/types.js index cd52d20c..3aa5d146 100644 --- a/stories/types.js +++ b/stories/types.js @@ -59,7 +59,5 @@ * @property {string} list-classes of the unordered list element inside the menu * @property {string} [html-user-language-attributes] * @property {boolean} [is-dropdown] - * @property {string} [html-hook-vector-after-toolbox] Deprecated and used - * by the toolbox portal menu. * @property {string} [html-after-portal] Additional HTML specific to portal menus. */