current_action() WordPress Function

The current_action() function is used to get the current action being performed on a Wordpress site. This function is useful for plugin and theme developers who need to know the current action being performed in order to take appropriate action.

current_action() #

Retrieves the name of the current action hook.


Return

(string) Hook name of the current action.


Top ↑

Source

File: wp-includes/plugin.php

function current_action() {
	return current_filter();
}


Top ↑

Changelog

Changelog
VersionDescription
3.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.