* {@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
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();
}
}
$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
* 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.
*
return $obj_idx;
}
- } else if ( is_string($function[0]) ) {
+ } elseif ( is_string( $function[0] ) ) {
// Static Calling
return $function[0] . '::' . $function[1];
}