X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/849f15aeed7a5e39314057bdc0064d8edd60dd7d..5e031ad59895b5682d1509675cafe9f2c5081c12:/wp-includes/plugin.php diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 27a65ee1..331633c4 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -11,7 +11,7 @@ * {@link http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'} * type are valid. * - * Also see the {@link http://codex.wordpress.org/Plugin_API Plugin API} for + * Also see the {@link https://codex.wordpress.org/Plugin_API Plugin API} for * more information and examples on how to use a lot of these functions. * * @package WordPress @@ -325,10 +325,10 @@ function remove_all_filters( $tag, $priority = false ) { global $wp_filter, $merged_filters; if ( isset( $wp_filter[ $tag ]) ) { - if ( false !== $priority && isset( $wp_filter[ $tag ][ $priority ] ) ) { - $wp_filter[ $tag ][ $priority ] = array(); - } else { + if ( false === $priority ) { $wp_filter[ $tag ] = array(); + } elseif ( isset( $wp_filter[ $tag ][ $priority ] ) ) { + $wp_filter[ $tag ][ $priority ] = array(); } } @@ -479,7 +479,7 @@ function do_action($tag, $arg = '') { $args[] =& $arg[0]; else $args[] = $arg; - for ( $a = 2; $a < func_num_args(); $a++ ) + for ( $a = 2, $num = func_num_args(); $a < $num; $a++ ) $args[] = func_get_arg($a); // Sort @@ -839,7 +839,7 @@ function _wp_call_all_hook($args) { * Build Unique ID for storage and retrieval. * * The old way to serialize the callback caused issues and this function is the - * solution. It works by checking for objects and creating an a new property in + * solution. It works by checking for objects and creating a new property in * the class to keep track of the object and new objects of the same class that * need to be added. * @@ -900,7 +900,7 @@ function _wp_filter_build_unique_id($tag, $function, $priority) { return $obj_idx; } - } else if ( is_string($function[0]) ) { + } elseif ( is_string( $function[0] ) ) { // Static Calling return $function[0] . '::' . $function[1]; }