Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability. See #48303. Built from https://develop.svn.wordpress.org/trunk@47122 git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -80,7 +80,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
'accepted_args' => $accepted_args,
|
||||
);
|
||||
|
||||
// if we're adding a new priority to the list, put them back in sorted order
|
||||
// If we're adding a new priority to the list, put them back in sorted order.
|
||||
if ( ! $priority_existed && count( $this->callbacks ) > 1 ) {
|
||||
ksort( $this->callbacks, SORT_NUMERIC );
|
||||
}
|
||||
@@ -135,7 +135,7 @@ 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 ( $new_priority === $this->current_priority[ $index ] && ! $priority_existed ) {
|
||||
/*
|
||||
* ... and the new priority is the same as what $this->iterations thinks is the previous
|
||||
* ...and the new priority is the same as what $this->iterations thinks is the previous
|
||||
* priority, we need to move back to it.
|
||||
*/
|
||||
|
||||
@@ -280,7 +280,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
$args[0] = $value;
|
||||
}
|
||||
|
||||
// Avoid the array_slice if possible.
|
||||
// Avoid the array_slice() if possible.
|
||||
if ( $the_['accepted_args'] == 0 ) {
|
||||
$value = call_user_func( $the_['function'] );
|
||||
} elseif ( $the_['accepted_args'] >= $num_args ) {
|
||||
|
||||
Reference in New Issue
Block a user