From 6cab59e94573a21bc48ba03ba5c9fe06c0907705 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Thu, 6 Oct 2016 18:09:29 +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. Built from https://develop.svn.wordpress.org/trunk@38741 git-svn-id: http://core.svn.wordpress.org/trunk@38684 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-trackback.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 8c7944b055..afa91bf48c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38740'; +$wp_version = '4.7-alpha-38741'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-trackback.php b/wp-trackback.php index 3d211043eb..f6c8b6813a 100644 --- a/wp-trackback.php +++ b/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');