Commit f5db4250 authored by Drew Jaynes's avatar Drew Jaynes
Browse files

Docs: Fix minor formatting for inline docs in `WP_Hook` following its introduction in [38571].

See #17817.

Built from https://develop.svn.wordpress.org/trunk@38573


git-svn-id: http://core.svn.wordpress.org/trunk@38516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 7e811d71
...@@ -58,7 +58,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -58,7 +58,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
* *
* @since 4.7.0 * @since 4.7.0
* @access private * @access private
* @var boolean * @var bool
*/ */
private $doing_action = false; private $doing_action = false;
...@@ -101,8 +101,10 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -101,8 +101,10 @@ final class WP_Hook implements Iterator, ArrayAccess {
* @since 4.7.0 * @since 4.7.0
* @access private * @access private
* *
* @param bool|int $new_priority The priority of the new filter being added. Default false, for no priority being added. * @param bool|int $new_priority Optional. The priority of the new filter being added. Default false,
* @param bool $priority_existed Flag for whether the priority already existed before the new filter was added. * for no priority being added.
* @param bool $priority_existed Optional. Flag for whether the priority already existed before the new
* filter was added. Default false.
*/ */
private function resort_active_iterations( $new_priority = false, $priority_existed = false ) { private function resort_active_iterations( $new_priority = false, $priority_existed = false ) {
$new_priorities = array_keys( $this->callbacks ); $new_priorities = array_keys( $this->callbacks );
...@@ -138,8 +140,10 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -138,8 +140,10 @@ final class WP_Hook implements Iterator, ArrayAccess {
// If we have a new priority that didn't exist, but ::apply_filters() or ::do_action() thinks it's the current priority... // If we have a new priority that didn't exist, but ::apply_filters() or ::do_action() thinks it's the current priority...
if ( $new_priority === $this->current_priority[ $index ] && ! $priority_existed ) { if ( $new_priority === $this->current_priority[ $index ] && ! $priority_existed ) {
// ... and the new priority is the same as what $this->iterations thinks is the previous priority, /*
// We need to move back to it. * ... and the new priority is the same as what $this->iterations thinks is the previous
* priority, we need to move back to it.
*/
if ( false === current( $iteration ) ) { if ( false === current( $iteration ) ) {
// If we've already moved off the end of the array, go back to the last element. // If we've already moved off the end of the array, go back to the last element.
...@@ -195,8 +199,8 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -195,8 +199,8 @@ final class WP_Hook implements Iterator, ArrayAccess {
* @access public * @access public
* *
* @param callable|bool $function_to_check Optional. The callback to check for. Default false. * @param callable|bool $function_to_check Optional. The callback to check for. Default false.
* @param string $tag Optional. The name of the filter hook. Default empty. * @param string $tag Optional. The name of the filter hook. Used for building
* Used for building the callback ID when SPL is not available. * the callback ID when SPL is not available. Default empty.
* @return bool|int The priority of that hook is returned, or false if the function is not attached. * @return bool|int The priority of that hook is returned, or false if the function is not attached.
*/ */
public function has_filter( $tag = '', $function_to_check = false ) { public function has_filter( $tag = '', $function_to_check = false ) {
...@@ -224,7 +228,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -224,7 +228,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
* *
* @return bool True if callbacks have been registered for the current hook, false otherwise. * @return bool True if callbacks have been registered for the current hook, otherwise false.
*/ */
public function has_filters() { public function has_filters() {
foreach ( $this->callbacks as $callbacks ) { foreach ( $this->callbacks as $callbacks ) {
...@@ -348,7 +352,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -348,7 +352,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
} }
/** /**
* Normalizes filters setup before WordPress has initialized to WP_Hook objects. * Normalizes filters set up before WordPress has initialized to WP_Hook objects.
* *
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
...@@ -445,7 +449,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -445,7 +449,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
} }
/** /**
* Return the current element * Returns the current element.
* *
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
...@@ -459,7 +463,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -459,7 +463,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
} }
/** /**
* Move forward to the next element * Moves forward to the next element.
* *
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
...@@ -473,7 +477,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -473,7 +477,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
} }
/** /**
* Return the key of the current element * Returns the key of the current element.
* *
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
...@@ -487,7 +491,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -487,7 +491,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
} }
/** /**
* Checks if current position is valid * Checks if current position is valid.
* *
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
...@@ -501,7 +505,7 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -501,7 +505,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
} }
/** /**
* Rewind the Iterator to the first element * Rewinds the Iterator to the first element.
* *
* @since 4.7.0 * @since 4.7.0
* @access public * @access public
...@@ -512,5 +516,4 @@ final class WP_Hook implements Iterator, ArrayAccess { ...@@ -512,5 +516,4 @@ final class WP_Hook implements Iterator, ArrayAccess {
reset( $this->callbacks ); reset( $this->callbacks );
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-alpha-38572'; $wp_version = '4.7-alpha-38573';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment