More more for xmlrpc. fixes #2991

git-svn-id: https://develop.svn.wordpress.org/trunk@4074 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-08-05 04:11:51 +00:00
parent cb85958cb6
commit 624746bcf1
1 changed files with 8 additions and 2 deletions

View File

@ -54,8 +54,14 @@ function &get_children($post = 0, $output = OBJECT) {
// get extended entry info (<!--more-->)
function get_extended($post) {
list($main,$extended) = explode('<!--more-->', $post, 2);
//Match the new style more links
if (preg_match('/<!--more(.+?)?-->/', $post, $matches)) {
list($main,$extended) = explode($matches[0],$post,2);
} else {
$main = $post;
$extended = '';
}
// Strip leading and trailing whitespace
$main = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$main);
$extended = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$extended);