Ticket #1955: 1955.diff
| File 1955.diff, 1.3 KB (added by majelbstoat, 6 years ago) |
|---|
-
wp-trackback.php
30 30 $tb_id = intval( $tb_id[ count($tb_id) - 1 ] ); 31 31 } 32 32 33 if ( is_single() || is_page() ) 34 $tb_id = $posts[0]->ID; 35 36 if ( !intval( $tb_id ) ) 37 trackback_response(1, 'I really need an ID for this to work.'); 38 33 39 $tb_url = $_POST['url']; 34 40 $title = $_POST['title']; 35 41 $excerpt = $_POST['excerpt']; … … 41 47 else 42 48 $charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS'; 43 49 50 $charset = apply_filters('trackback_charset', $charset); 51 44 52 if ( function_exists('mb_convert_encoding') ) { // For international trackbacks 45 53 $title = mb_convert_encoding($title, get_option('blog_charset'), $charset); 46 54 $excerpt = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset); 47 55 $blog_name = mb_convert_encoding($blog_name, get_option('blog_charset'), $charset); 48 56 } 49 57 50 if ( is_single() || is_page() )51 $tb_id = $posts[0]->ID;52 53 if ( !intval( $tb_id ) )54 trackback_response(1, 'I really need an ID for this to work.');55 56 58 if (empty($title) && empty($tb_url) && empty($blog_name)) { 57 59 // If it doesn't look like a trackback at all... 58 60 wp_redirect(get_permalink($tb_id));
