Eliminate unecessary preg_replace. Props bernzilla, Denis-de-Bernardy. fixes #5624

git-svn-id: http://svn.automattic.com/wordpress/trunk@11024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-20 22:15:14 +00:00
parent bfe4032208
commit 6843183228
1 changed files with 1 additions and 3 deletions

View File

@ -934,9 +934,7 @@ function make_url_footnote( $content ) {
function xmlrpc_getposttitle( $content ) {
global $post_default_title;
if ( preg_match( '/<title>(.+?)<\/title>/is', $content, $matchtitle ) ) {
$post_title = $matchtitle[0];
$post_title = preg_replace( '/<title>/si', '', $post_title );
$post_title = preg_replace( '/<\/title>/si', '', $post_title );
$post_title = $matchtitle[1];
} else {
$post_title = $post_default_title;
}