Default Hooks
When the WP-Next Admin Dashboard is initialized, a set of default hooks are created under the _wp/hooks
folder.
These hooks can be customized or extended later as needed.
Frontend Hooks
MenuBlogHook
and MenuSiteHook
-
MenuBlogHook
: Defines the sidebar menu for the Admin Dashboard.
Used in both single-site and multi-site modes.
Includes menus such as Posts, Pages, and Media. -
MenuSiteHook
: Used only in multi-site mode.
Defines menus such as Users, Sites, and Blogs.
ThemesHook
- Defines the Material UI theme used by MUI components.
- Applies the WP‑Next specific theme.
- Both theme layers are configurable via this hook and can be extended or overridden.
Backend Hooks
AdminMediaHook
- Handles uploaded files and stores them.
- Extracts and returns metadata such as width and height for media files.
NextAuthProvidersHook
- Defines external login providers (OAuth2) based on credentials from the
.env
file. - Currently supports:
- GitHub
- WordPress
NotificationsHook
- Constructs and sends email notifications.
- Triggered for events such as:
- New user registration
- Password reset requests