Make WordPress Core

Changeset 11024


Ignore:
Timestamp:
04/20/2009 10:15:14 PM (16 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r11020 r11024  
    935935    global $post_default_title;
    936936    if ( preg_match( '/<title>(.+?)<\/title>/is', $content, $matchtitle ) ) {
    937         $post_title = $matchtitle[0];
    938         $post_title = preg_replace( '/<title>/si', '', $post_title );
    939         $post_title = preg_replace( '/<\/title>/si', '', $post_title );
     937        $post_title = $matchtitle[1];
    940938    } else {
    941939        $post_title = $post_default_title;
Note: See TracChangeset for help on using the changeset viewer.