Ticket #10933: 10933-refresh.diff
File 10933-refresh.diff, 2.4 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
3480 3480 'categories' => $categories, 3481 3481 'mt_excerpt' => $postdata['post_excerpt'], 3482 3482 'mt_text_more' => $post['extended'], 3483 'wp_more_text' => $post['more_text'], 3483 3484 'mt_allow_comments' => $allow_comments, 3484 3485 'mt_allow_pings' => $allow_pings, 3485 3486 'mt_keywords' => $tagnames, … … 3596 3597 'categories' => $categories, 3597 3598 'mt_excerpt' => $entry['post_excerpt'], 3598 3599 'mt_text_more' => $post['extended'], 3600 'wp_more_text' => $post['more_text'], 3599 3601 'mt_allow_comments' => $allow_comments, 3600 3602 'mt_allow_pings' => $allow_pings, 3601 3603 'mt_keywords' => $tagnames, -
wp-includes/post.php
328 328 * 'more'. There can be text or space(s) after the word 'more', but won't be 329 329 * referenced. 330 330 * 331 * The returned array has 'main' and 'extended' keys. Main has the text before331 * The returned array has 'main', 'extended', and 'more_text' keys. Main has the text before 332 332 * 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. 334 334 * 335 335 * @since 1.0.0 336 336 * 337 337 * @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'). 339 339 */ 340 340 function get_extended($post) { 341 341 //Match the new style more links 342 342 if ( preg_match('/<!--more(.*?)?-->/', $post, $matches) ) { 343 343 list($main, $extended) = explode($matches[0], $post, 2); 344 $more_text = $matches[1]; 344 345 } else { 345 346 $main = $post; 346 347 $extended = ''; 348 $more_text = ''; 347 349 } 348 350 349 351 // Strip leading and trailing whitespace 350 352 $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main); 351 353 $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended); 354 $more_text = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $more_text); 352 355 353 return array( 'main' => $main, 'extended' => $extended);356 return array( 'main' => $main, 'extended' => $extended, 'more_text' => $more_text ); 354 357 } 355 358 356 359 /**