WordPress.org

Make WordPress Core

Ticket #17862: 17862.4.diff

File 17862.4.diff, 1.3 KB (added by markjaquith, 5 months ago)

simplest version, for non-conflict with #25699 patches

  • src/wp-includes/pluggable.php

     
    10051005 * @since 1.0.0 
    10061006 * 
    10071007 * @param int $comment_id Comment ID 
    1008  * @param string $comment_type Optional. The comment type either 'comment' (default), 'trackback', or 'pingback' 
     1008 * @param string $deprecated Not used 
    10091009 * @return bool False if user email does not exist. True on completion. 
    10101010 */ 
    1011 function wp_notify_postauthor( $comment_id, $comment_type = '' ) { 
     1011function wp_notify_postauthor( $comment_id, $deprecated = '' ) { 
     1012        if ( null !== $deprecated ) { 
     1013                _deprecated_argument( __FUNCTION__, '3.8' ); 
     1014        } 
     1015 
    10121016        $comment = get_comment( $comment_id ); 
    10131017        if ( empty( $comment ) ) 
    10141018                return false; 
     
    10381042        // we want to reverse this for the plain text arena of emails. 
    10391043        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); 
    10401044 
    1041         if ( empty( $comment_type ) ) $comment_type = 'comment'; 
    1042  
    1043         switch ( $comment_type ) { 
     1045        switch ( $comment->comment_type ) { 
    10441046                case 'trackback': 
    10451047                        $notify_message  = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n"; 
    10461048                        /* translators: 1: website name, 2: author IP, 3: author domain */