Make WordPress Core

Ticket #10933: 10933-refresh.diff

File 10933-refresh.diff, 2.4 KB (added by ericmann, 13 years ago)

Refresh patch to match latest version of trunk.

  • wp-includes/class-wp-xmlrpc-server.php

     
    34803480                                'categories' => $categories,
    34813481                                'mt_excerpt' => $postdata['post_excerpt'],
    34823482                                'mt_text_more' => $post['extended'],
     3483                                'wp_more_text' => $post['more_text'],
    34833484                                'mt_allow_comments' => $allow_comments,
    34843485                                'mt_allow_pings' => $allow_pings,
    34853486                                'mt_keywords' => $tagnames,
     
    35963597                                'categories' => $categories,
    35973598                                'mt_excerpt' => $entry['post_excerpt'],
    35983599                                'mt_text_more' => $post['extended'],
     3600                                'wp_more_text' => $post['more_text'],
    35993601                                'mt_allow_comments' => $allow_comments,
    36003602                                'mt_allow_pings' => $allow_pings,
    36013603                                'mt_keywords' => $tagnames,
  • wp-includes/post.php

     
    328328 * 'more'. There can be text or space(s) after the word 'more', but won't be
    329329 * referenced.
    330330 *
    331  * The returned array has 'main' and 'extended' keys. Main has the text before
     331 * The returned array has 'main', 'extended', and 'more_text' keys. Main has the text before
    332332 * the <code><!--more--></code>. The 'extended' key has the content after the
    333  * <code><!--more--></code> comment.
     333 * <code><!--more--></code> comment. The 'more_text' key has the custom "Read More" text.
    334334 *
    335335 * @since 1.0.0
    336336 *
    337337 * @param string $post Post content.
    338  * @return array Post before ('main') and after ('extended').
     338 * @return array Post before ('main'), after ('extended'), and custom readmore ('more_text').
    339339 */
    340340function get_extended($post) {
    341341        //Match the new style more links
    342342        if ( preg_match('/<!--more(.*?)?-->/', $post, $matches) ) {
    343343                list($main, $extended) = explode($matches[0], $post, 2);
     344                $more_text = $matches[1];
    344345        } else {
    345346                $main = $post;
    346347                $extended = '';
     348                $more_text = '';
    347349        }
    348350
    349351        // Strip leading and trailing whitespace
    350352        $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
    351353        $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended);
     354        $more_text = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $more_text);
    352355
    353         return array('main' => $main, 'extended' => $extended);
     356        return array( 'main' => $main, 'extended' => $extended, 'more_text' => $more_text );
    354357}
    355358
    356359/**