Ticket #3698: post.patch
| File post.patch, 962 bytes (added by , 19 years ago) |
|---|
-
wp-includes/post.php
74 74 // get extended entry info (<!--more-->) 75 75 function get_extended($post) { 76 76 //Match the new style more links 77 if ( preg_match('/<!--more(.+?)?-->/', $post, $matches)) {78 list($main, $extended) = explode($matches[0],$post,2);77 if ( preg_match('/<!--more(.*?)-->/', $post, $matches) ) { 78 list($main, $extended) = explode($matches[0], $post, 2); 79 79 } else { 80 80 $main = $post; 81 81 $extended = ''; 82 82 } 83 83 84 84 // Strip leading and trailing whitespace 85 $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1',$main);86 $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1',$extended);85 $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main); 86 $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended); 87 87 88 88 return array('main' => $main, 'extended' => $extended); 89 89 }