WordPress at a glance

current_filter() WP 1.0

Retrieve the name of the current filter or action.

Возвращает

String. Hook name of the current filter or action.

1 time = 0.00001s = speed of light | 50000 times = 0.01s = speed of light | PHP 7.1.11, WP 4.9.5

No Hooks.

Usage

current_filter();

Notes

  • Global. Array. $wp_current_filter Stores the list of current filters with the current one last

Список изменений

С версии 2.5.0 Введена.

Code of current_filter() WP 5.5.1

wp-includes/plugin.php
<?php
function current_filter() {
	global $wp_current_filter;
	return end( $wp_current_filter );
}

Related Functions

From tag: Filters (hooks)

More from category: Hooks (actions, filters)

No comments
    Log In . Register