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
This commit is contained in:
Rachel Baker 2016-10-06 18:09:29 +00:00
parent 4ca1385b60
commit 6cab59e945
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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');