### Eclipse Workspace Patch 1.0
#P wordpress-trunk bare
|
|
|
|
| 3494 | 3494 | |
| 3495 | 3495 | $currentday = mysql2date('d.m.y', $post->post_date, false); |
| 3496 | 3496 | $currentmonth = mysql2date('m', $post->post_date, false); |
| 3497 | | $numpages = 1; |
| 3498 | 3497 | $page = get_query_var('page'); |
| 3499 | 3498 | if ( !$page ) |
| 3500 | 3499 | $page = 1; |
| 3501 | 3500 | if ( is_single() || is_page() || is_feed() ) |
| 3502 | 3501 | $more = 1; |
| 3503 | 3502 | $content = $post->post_content; |
| 3504 | | if ( strpos( $content, '<!--nextpage-->' ) ) { |
| | 3503 | $marker = '<!--nextpage-->'; |
| | 3504 | $has_marker = (bool) ( false !== strpos( $content, $marker ) ); |
| | 3505 | $multipage = (int) $has_marker; |
| | 3506 | if ( $has_marker ) { |
| 3505 | 3507 | if ( $page > 1 ) |
| 3506 | 3508 | $more = 1; |
| 3507 | | $multipage = 1; |
| 3508 | | $content = str_replace("\n<!--nextpage-->\n", '<!--nextpage-->', $content); |
| 3509 | | $content = str_replace("\n<!--nextpage-->", '<!--nextpage-->', $content); |
| 3510 | | $content = str_replace("<!--nextpage-->\n", '<!--nextpage-->', $content); |
| 3511 | | $pages = explode('<!--nextpage-->', $content); |
| 3512 | | $numpages = count($pages); |
| | 3509 | $content = str_replace(array("\n{$marker}", "{$marker}\n"), $marker, $content); |
| | 3510 | $pages = explode($marker, $content); |
| 3513 | 3511 | } else { |
| 3514 | | $pages = array( $post->post_content ); |
| 3515 | | $multipage = 0; |
| | 3512 | $pages = array( $content ); |
| 3516 | 3513 | } |
| | 3514 | $numpages = count($pages); |
| 3517 | 3515 | |
| 3518 | 3516 | do_action_ref_array('the_post', array(&$post)); |
| 3519 | 3517 | |