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:
parent
4dc60fe8bb
commit
af2d2e6bfa
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user