mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 04:25:07 +00:00
<!--more--> regex fixes. Props Nazgul. fixes #3698
git-svn-id: http://svn.automattic.com/wordpress/trunk@5244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b6c49e3023
commit
43c0541e81
@ -80,7 +80,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
|
|||||||
$page = count($pages); // give them the highest numbered page that DOES exist
|
$page = count($pages); // give them the highest numbered page that DOES exist
|
||||||
|
|
||||||
$content = $pages[$page-1];
|
$content = $pages[$page-1];
|
||||||
if ( preg_match('/<!--more(.+?)?-->/', $content, $matches) ) {
|
if ( preg_match('/<!--more(.*?)?-->/', $content, $matches) ) {
|
||||||
$content = explode($matches[0], $content, 2);
|
$content = explode($matches[0], $content, 2);
|
||||||
if ( !empty($matches[1]) && !empty($more_link_text) )
|
if ( !empty($matches[1]) && !empty($more_link_text) )
|
||||||
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
|
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
|
||||||
|
@ -74,7 +74,7 @@ function &get_children($args = '', $output = OBJECT) {
|
|||||||
// get extended entry info (<!--more-->)
|
// get extended entry info (<!--more-->)
|
||||||
function get_extended($post) {
|
function get_extended($post) {
|
||||||
//Match the new style more links
|
//Match the new style more links
|
||||||
if ( preg_match('/<!--more(.*?)-->/', $post, $matches) ) {
|
if ( preg_match('/<!--more(.*?)?-->/', $post, $matches) ) {
|
||||||
list($main, $extended) = explode($matches[0], $post, 2);
|
list($main, $extended) = explode($matches[0], $post, 2);
|
||||||
} else {
|
} else {
|
||||||
$main = $post;
|
$main = $post;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user