WebVIEP Plugin

AdminMenu

Registers WebVIEP admin menu, dashboard, and submenu highlighting.

Table of Contents

Constants

PARENT_SLUG  = 'webviep_dashboard'

Methods

addMenus()  : void
Register main menu and submenus for plugin screens.
forceMenuHighlight()  : void
Force WordPress to mark the correct submenu as current when navigating custom screens.
hideDashboardSubmenu()  : void
Hide the duplicated dashboard submenu; the top-level menu remains accessible.
highlightParentForTopics()  : string|false
Keep WebVIEP menu highlighted on all plugin-related screens.
highlightSubmenuForTopics()  : string|false
Highlight the matching submenu entry for plugin-related screens.
register()  : void
Hook menus and highlighting filters.
renderDashboard()  : void
Render dashboard landing page.
collectAccessibleSubmenus()  : array<int, array<string, string>>
Collect WebVIEP submenus that the current user can access.
iconForSlug()  : string
Map submenu slugs to dashicons for nicer tiles.
submenuHighlightMap()  : array<string, string>
Map admin pages to the submenu slug that should be highlighted.

Constants

PARENT_SLUG

private mixed PARENT_SLUG = 'webviep_dashboard'

Methods

addMenus()

Register main menu and submenus for plugin screens.

public static addMenus() : void

forceMenuHighlight()

Force WordPress to mark the correct submenu as current when navigating custom screens.

public static forceMenuHighlight(WP_Screen $screen) : void
Parameters
$screen : WP_Screen

hideDashboardSubmenu()

Hide the duplicated dashboard submenu; the top-level menu remains accessible.

public static hideDashboardSubmenu() : void

highlightParentForTopics()

Keep WebVIEP menu highlighted on all plugin-related screens.

public static highlightParentForTopics(string|false $parentFile) : string|false
Parameters
$parentFile : string|false
Return values
string|false

highlightSubmenuForTopics()

Highlight the matching submenu entry for plugin-related screens.

public static highlightSubmenuForTopics(string|false $submenuFile) : string|false
Parameters
$submenuFile : string|false
Return values
string|false

register()

Hook menus and highlighting filters.

public static register() : void

renderDashboard()

Render dashboard landing page.

public static renderDashboard() : void

collectAccessibleSubmenus()

Collect WebVIEP submenus that the current user can access.

private static collectAccessibleSubmenus() : array<int, array<string, string>>
Return values
array<int, array<string, string>>

iconForSlug()

Map submenu slugs to dashicons for nicer tiles.

private static iconForSlug(string $slug) : string
Parameters
$slug : string
Return values
string

submenuHighlightMap()

Map admin pages to the submenu slug that should be highlighted.

private static submenuHighlightMap() : array<string, string>
Return values
array<string, string>

        
On this page

Search results