Skip to content

Actions

Jory Hogeveen edited this page Apr 2, 2018 · 19 revisions

Action order


vaa_view_admin_as_modules_loaded

Since: 1.6.2
Modules loaded. Hook is used for other modules related to View Admin As.
This hook is run before vaa_view_admin_as_init and any user validation.
Do not use this hook for functionality that should only be enabled for a validated user.

@param  VAA_View_Admin_As  $this  The main View Admin As object.

vaa_view_admin_as_db_update

Since: 1.6
Fired after main update is finished, hook used to update modules.


vaa_view_admin_as_pre_init

Since: 1.8
Runs after the update and compatibility strings are initialized but before any views are applied. This action is only fired when the user is validated and has access to the plugin. It should only be used by any functionality that requires user access validation but needs to initialize functionality before any views are applied. It is also used by the VAA core view types.

@param  VAA_View_Admin_As  $this  The main View Admin As object.

vaa_view_admin_as_do_view

Since: 1.6.3
Fired after main view is set, hook used for modules.

@param  array  Current view data

Temporary modifications to the current user are set on priority 99.


vaa_view_admin_as_modify_user

(previously: vaa_view_admin_as_modify_current_user)
Since: 1.6.3
Since: 1.6.4 Changed to vaa_view_admin_as_modify_user
Fired after main changes to the current/selected user is finished, hook used for modules.

@param  WP_User  $user        The modified user object.
@param  bool     $accessible  Are the needed WP_User properties and methods accessible?

vaa_view_admin_as_init

Since: 1.5
Runs after the main class is initialized and run. This action is only fired when the user is validated and has access to the plugin. It should be used by any functionality that requires user access validation.

@param  VAA_View_Admin_As  $this  The main View Admin As object.

Admin bar

Since: 1.5

  • vaa_admin_bar_menu_before Add items at the beginning of the VAA admin bar node
  • vaa_admin_bar_menu Add items to the VAA admin bar node
  • vaa_admin_bar_info_before Add items at the beginning of the info group
  • vaa_admin_bar_info_after Add items at the end of the info group
  • vaa_admin_bar_settings_before Add items at the beginning of the settings group
  • vaa_admin_bar_settings_after Add items at the end of the settings group
  • vaa_admin_bar_modules Add items to the modules group
  • vaa_admin_bar_languages_before Add items at the beginning of the languages group
  • vaa_admin_bar_languages_after Add items at the end of the languages group
  • vaa_admin_bar_caps_before Add items at the beginning of the capabilities group
  • vaa_admin_bar_caps_manager_before Add items at the before of the caps selection options
  • vaa_admin_bar_caps_actions_before Add items at the before of the caps actions
  • vaa_admin_bar_caps_actions_after Add items at the after of the caps actions
  • vaa_admin_bar_caps_after Add items at the end of the capabilities group
  • vaa_admin_bar_roles_before Add items at the beginning of the roles group
  • vaa_admin_bar_roles_after Add items at the end of the roles group
  • vaa_admin_bar_users_before Add items at the beginning of the users group
  • vaa_admin_bar_users_after Add items at the end of the users group

All admin bar actions can be used like the regular admin_bar_menu hook and have 3 parameters:

@param  object  WP_Admin_Bar.
@param  string  Current root/parent item.
@param  string  Main VAA root item (can be the same as the current root).

vaa_toolbar_menu

Since: 1.6
Add nodes to our custom toolbar menu (used like the WP Admin Bar and also activates the hooks above)