WordPress at Your Fingertips

current_filter() WP 1.0

Retrieve the name of the current filter or action.

1 time — 0.00001 sec (speed of light) | 50000 times — 0.01 sec (speed of light) | PHP 7.1.11, WP 4.9.5

No Hooks.

Return

String. Hook name of the current filter.

Usage

current_filter();

Notes

  • Global. String[]. $wp_current_filter Stores the list of current filters with the current one last

Changelog

Since 2.5.0 Introduced.

Code of current_filter() WP 5.8.1

function current_filter() {
	global $wp_current_filter;

	return end( $wp_current_filter );
}

Filters (hooks)

Hooks (actions, filters)

No comments
    Log In