WP_Hook::current_priority() WordPress Method

The WP_Hook::current_priority() method is used to get the current priority of a given hook. This is useful for plugin developers who need to know the order in which their hooks are firing.

WP_Hook::current_priority() #

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


Return

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


Top ↑

Source

File: wp-includes/class-wp-hook.php

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

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

Top ↑

Changelog

Changelog
VersionDescription
4.7.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.