Code cleanup and some fixes from the WP Japan folks.

git-svn-id: https://develop.svn.wordpress.org/trunk@1734 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-10-04 08:03:52 +00:00
parent 1a3c14d8a9
commit 7d277fbd0d
5 changed files with 45 additions and 75 deletions

View File

@@ -34,6 +34,18 @@ $tb_url = $_POST['url'];
$title = $_POST['title'];
$excerpt = $_POST['excerpt'];
$blog_name = $_POST['blog_name'];
$charset = $_POST['charset'];
if ($charset)
$charset = strtoupper( trim($charset) );
else
$charset = 'auto';
if ( function_exists('mb_convert_encoding') ) {
$title = mb_convert_encoding($title, get_settings('blog_charset'), $charset);
$excerpt = mb_convert_encoding($excerpt, get_settings('blog_charset'), $charset);
$blog_name = mb_convert_encoding($blog_name, get_settings('blog_charset'), $charset);
}
if ( is_single() )
$tb_id = $posts[0]->ID;