*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
-function the_content($more_link_text = null, $stripteaser = 0, $more_file = '') {
- $content = get_the_content($more_link_text, $stripteaser, $more_file);
+function the_content($more_link_text = null, $stripteaser = 0) {
+ $content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;
if ( null === $more_link_text )
global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;
if ( null === $more_link_text )
if ( $page > count($pages) ) // if the requested page doesn't exist
$page = count($pages); // give them the highest numbered page that DOES exist
if ( $page > count($pages) ) // if the requested page doesn't exist
$page = count($pages); // give them the highest numbered page that DOES exist
$output = $post->post_excerpt;
if ( post_password_required($post) ) {
$output = __('There is no excerpt because this is a protected post.');
$output = $post->post_excerpt;
if ( post_password_required($post) ) {
$output = __('There is no excerpt because this is a protected post.');
* 'link_before' - Default is '' (string). The html or text to prepend to each
* Pages link inside the <a> tag.
* 'link_after' - Default is '' (string). The html or text to append to each
* 'link_before' - Default is '' (string). The html or text to prepend to each
* Pages link inside the <a> tag.
* 'link_after' - Default is '' (string). The html or text to append to each
'link_before' => '', 'link_after' => '',
'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
'previouspagelink' => __('Previous page'), 'pagelink' => '%',
'link_before' => '', 'link_after' => '',
'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
'previouspagelink' => __('Previous page'), 'pagelink' => '%',
);
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
global $post, $page, $numpages, $multipage, $more, $pagenow;
);
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
global $post, $page, $numpages, $multipage, $more, $pagenow;
'child_of' => 0, 'exclude' => '',
'title_li' => __('Pages'), 'echo' => 1,
'authors' => '', 'sort_column' => 'menu_order, post_title',
'child_of' => 0, 'exclude' => '',
'title_li' => __('Pages'), 'echo' => 1,
'authors' => '', 'sort_column' => 'menu_order, post_title',
// sanitize, mostly to keep spaces out
$r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);
// sanitize, mostly to keep spaces out
$r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);
- // Allow plugins to filter an array of excluded pages
- $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));
+ // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array)
+ $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array();
+ $r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) );
// If the front page is a page, add it to the exclude list
if (get_option('show_on_front') == 'page') {
if ( !empty( $list_args['exclude'] ) ) {
// If the front page is a page, add it to the exclude list
if (get_option('show_on_front') == 'page') {
if ( !empty( $list_args['exclude'] ) ) {