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
This commit is contained in:
parent
9dd9880600
commit
03bc7a1063
@ -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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user