mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
More more for xmlrpc. fixes #2991
git-svn-id: http://svn.automattic.com/wordpress/trunk@4074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3a2d71fb91
commit
dadd248a93
@ -54,7 +54,13 @@ 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);
|
||||
|
Loading…
Reference in New Issue
Block a user