Make WordPress Core

Ticket #15422: wp_transition_comment_status.patch

File wp_transition_comment_status.patch, 603 bytes (added by johnjamesjacoby, 15 years ago)

Variable parsing improvements

  • comment.php

     
    10961096        // Call the hooks
    10971097        if ( $new_status != $old_status ) {
    10981098                do_action('transition_comment_status', $new_status, $old_status, $comment);
    1099                 do_action("comment_${old_status}_to_$new_status", $comment);
     1099                do_action("comment_{$old_status}_to_{$new_status}", $comment);
    11001100        }
    1101         do_action("comment_${new_status}_$comment->comment_type", $comment->comment_ID, $comment);
     1101        do_action("comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment);
    11021102}