Changeset 2430
- Timestamp:
- 03/11/2005 12:57:34 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2421 r2430 898 898 899 899 if($accepted_args == 1) { 900 $ args = array($string);900 $the_args = array($string); 901 901 } elseif ($accepted_args > 1) { 902 $ args = array_slice($all_args, 0, $accepted_args);902 $the_args = array_slice($all_args, 0, $accepted_args); 903 903 } elseif($accepted_args == 0) { 904 $ args = NULL;904 $the_args = NULL; 905 905 } else { 906 $ args = $all_args;906 $the_args = $all_args; 907 907 } 908 908 909 $string = call_user_func_array($function_name, $ args);909 $string = call_user_func_array($function_name, $the_args); 910 910 } 911 911 } … … 953 953 global $wp_filter; 954 954 $extra_args = array_slice(func_get_args(), 2); 955 if ( is_array($arg) )956 $args = array_merge($arg, $extra_args);955 if ( is_array($arg) ) 956 $args = array_merge($arg, $extra_args); 957 957 else 958 958 $args = array_merge(array($arg), $extra_args); … … 967 967 foreach($functions as $function) { 968 968 969 $all_args = array_merge(array($string), $args);970 969 $function_name = $function['function']; 971 970 $accepted_args = $function['accepted_args']; 972 971 973 972 if($accepted_args == 1) { 974 $args = array($string); 973 if ( is_array($arg) ) 974 $the_args = $arg; 975 else 976 $the_args = array($arg); 975 977 } elseif ($accepted_args > 1) { 976 $ args = array_slice($all_args, 0, $accepted_args);978 $the_args = array_slice($args, 0, $accepted_args); 977 979 } elseif($accepted_args == 0) { 978 $ args = NULL;980 $the_args = NULL; 979 981 } else { 980 $ args = $all_args;982 $the_args = $args; 981 983 } 982 984 983 $string = call_user_func_array($function_name, $ args);985 $string = call_user_func_array($function_name, $the_args); 984 986 } 985 987 }
Note: See TracChangeset
for help on using the changeset viewer.