From 03bc7a1063e7f9985736f54d1afafbba26e1a18f Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Thu, 6 Oct 2016 18:08:36 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@38741 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-trackback.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-trackback.php b/src/wp-trackback.php index 3d211043eb..f6c8b6813a 100644 --- a/src/wp-trackback.php +++ b/src/wp-trackback.php @@ -82,7 +82,7 @@ if ( is_single() || is_page() ) $tb_id = $posts[0]->ID; if ( !isset($tb_id) || !intval( $tb_id ) ) - trackback_response(1, 'I really need an ID for this to work.'); + trackback_response( 1, __( 'I really need an ID for this to work.' ) ); if (empty($title) && empty($tb_url) && empty($blog_name)) { // If it doesn't look like a trackback at all. @@ -94,7 +94,7 @@ if ( !empty($tb_url) && !empty($title) ) { header('Content-Type: text/xml; charset=' . get_option('blog_charset') ); if ( !pings_open($tb_id) ) - trackback_response(1, 'Sorry, trackbacks are closed for this item.'); + trackback_response( 1, __( 'Sorry, trackbacks are closed for this item.' ) ); $title = wp_html_excerpt( $title, 250, '…' ); $excerpt = wp_html_excerpt( $excerpt, 252, '…' ); @@ -108,7 +108,7 @@ if ( !empty($tb_url) && !empty($title) ) { $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) ); if ( $dupe ) - trackback_response(1, 'We already have a ping from that URL for this post.'); + trackback_response( 1, __( 'We already have a ping from that URL for this post.' ) ); $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');