WP_Hook::current_priority()publicWP 4.7.0

Return the current priority level of the currently running iteration of the hook.

Метод класса: WP_Hook{}

Хуков нет.

Возвращает

int|false. If the hook is running, return the current priority level. If it isn't running, return false.

Использование

$WP_Hook = new WP_Hook();
$WP_Hook->current_priority();

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

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

Код WP_Hook::current_priority() WP 6.5.2

public function current_priority() {
	if ( false === current( $this->iterations ) ) {
		return false;
	}

	return current( current( $this->iterations ) );
}