Make WordPress Core


Ignore:
Timestamp:
11/19/2004 07:37:18 AM (22 years ago)
Author:
saxmatt
Message:

Actions shouldn't change around what they're passed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r1849 r1867  
    12341234// Filters: these are the core of WP's plugin architecture
    12351235
    1236 function apply_filters($tag, $string) {
     1236function apply_filters($tag, $string, $filter = true) {
    12371237        global $wp_filter;
    12381238        if (isset($wp_filter['all'])) {
    … …  
    12521252                        if (!is_null($functions)) {
    12531253                                foreach($functions as $function) {
    1254                                         $string = call_user_func($function, $string);
     1254                                        if ($filter)
     1255                                                $string = call_user_func($function, $string);
     1256                                        else
     1257                                                call_user_func($function, $string);
    12551258                                }
    12561259                        }
    … …  
    12861289
    12871290function do_action($tag, $string) {
    1288         return apply_filters($tag, $string);
     1291        apply_filters($tag, $string, false);
     1292        return $string;
    12891293}
    12901294
Note: See TracChangeset for help on using the changeset viewer.