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

git-svn-id: https://develop.svn.wordpress.org/trunk@11024 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-20 22:15:14 +00:00
parent 4dc60fe8bb
commit af2d2e6bfa
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;
}