mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
bfe4032208
commit
6843183228
@ -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