Ticket #10933: patch-core-10933.diff
| File patch-core-10933.diff, 2.1 KB (added by , 15 years ago) |
|---|
-
wp-includes/post.php
319 319 * 'more'. There can be text or space(s) after the word 'more', but won't be 320 320 * referenced. 321 321 * 322 * The returned array has 'main' and 'extended' keys. Main has the text before322 * The returned array has 'main', 'extended', and 'more_text' keys. Main has the text before 323 323 * the <code><!--more--></code>. The 'extended' key has the content after the 324 * <code><!--more--></code> comment. 324 * <code><!--more--></code> comment. The 'more_text' key has the custom "Read more text". 325 325 * 326 326 * @since 1.0.0 327 327 * 328 328 * @param string $post Post content. 329 * @return array Post before ('main') and after ('extended') .329 * @return array Post before ('main') and after ('extended'), and custom readmore text ('more_text') 330 330 */ 331 331 function get_extended($post) { 332 332 //Match the new style more links 333 333 if ( preg_match('/<!--more(.*?)?-->/', $post, $matches) ) { 334 334 list($main, $extended) = explode($matches[0], $post, 2); 335 $more_text = $matches[1]; 335 336 } else { 336 337 $main = $post; 337 338 $extended = ''; 339 $more_text = ''; 338 340 } 339 341 340 342 // Strip leading and trailing whitespace 341 343 $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main); 342 344 $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended); 345 $more_text = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $more_text); 343 346 344 return array('main' => $main, 'extended' => $extended );347 return array('main' => $main, 'extended' => $extended, 'more_text' => $more_text); 345 348 } 346 349 347 350 /** -
wp-includes/class-wp-xmlrpc-server.php
2757 2757 'categories' => $categories, 2758 2758 'mt_excerpt' => $postdata['post_excerpt'], 2759 2759 'mt_text_more' => $post['extended'], 2760 'wp_more_text' => $post['more_text'], 2760 2761 'mt_allow_comments' => $allow_comments, 2761 2762 'mt_allow_pings' => $allow_pings, 2762 2763 'mt_keywords' => $tagnames,