]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/plugin.php
WordPress 4.2
[autoinstalls/wordpress.git] / wp-includes / plugin.php
index 27a65ee1b598f42780ebe6ad2e4ded8a124e451c..331633c45c41b6869faa8386d6ddcab110de97ba 100644 (file)
@@ -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];
        }