Make WordPress Core

Opened 21 years ago

Closed 20 years ago

Last modified 20 years ago

#63 closed defect (bug) (fixed)

calling of user functions change

Reported by: billzeller's profile billzeller Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: minor Version:
Component: Administration Keywords:
Focuses: Cc:

Description

On line 1093 on wp-includes/functions.php in function apply_filters, the line

$string = $function($string);

should be

$string = call_user_func($function, $string);

This would allow actions to be set as either
add_action('publish_post', 'myFunction');
or
add_action('publish_post', array('MyClass', 'myFunction'));

Existing plugins would work with this change.

Change History (3)

#2 @ryan
20 years ago

  • Owner changed from anonymous to rboren
  • Resolution changed from 10 to 20
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.