Make WordPress Core

Changeset 38741


Ignore:
Timestamp:
10/06/2016 06:08:36 PM (8 years ago)
Author:
rachelbaker
Message:

Trackbacks: Allow the error message strings passed to trackback_response() to be translatable.

Localize the error messages in wp-trackback.php.

Props websupporter.
Fixes #38214.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-trackback.php

    r30662 r38741  
    8383
    8484if ( !isset($tb_id) || !intval( $tb_id ) )
    85     trackback_response(1, 'I really need an ID for this to work.');
     85    trackback_response( 1, __( 'I really need an ID for this to work.' ) );
    8686
    8787if (empty($title) && empty($tb_url) && empty($blog_name)) {
     
    9595
    9696    if ( !pings_open($tb_id) )
    97         trackback_response(1, 'Sorry, trackbacks are closed for this item.');
     97        trackback_response( 1, __( 'Sorry, trackbacks are closed for this item.' ) );
    9898
    9999    $title =  wp_html_excerpt( $title, 250, '…' );
     
    109109    $dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) );
    110110    if ( $dupe )
    111         trackback_response(1, 'We already have a ping from that URL for this post.');
     111        trackback_response( 1, __( 'We already have a ping from that URL for this post.' ) );
    112112
    113113    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
Note: See TracChangeset for help on using the changeset viewer.