WordPress.org

Make WordPress Core

Ticket #2991: we_do_mores_for_xmlrpc_too.diff

File we_do_mores_for_xmlrpc_too.diff, 708 bytes (added by westi, 7 years ago)

<!--more xmlrpc needs to cope with the new style <!--more--> too-->

  • wp-includes/post.php

     
    5454 
    5555// get extended entry info (<!--more-->) 
    5656function get_extended($post) { 
    57         list($main,$extended) = explode('<!--more-->', $post, 2); 
    58  
     57        //Match the new style more links 
     58        if (preg_match('/<!--more(.+?)?-->/', $post, $matches)) { 
     59                list($main,$extended) = explode($matches[0],$post,2); 
     60        } else { 
     61                $main = $post; 
     62                $extended = ''; 
     63        } 
     64         
    5965        // Strip leading and trailing whitespace 
    6066        $main = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$main); 
    6167        $extended = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$extended);