Prins linc to the next post.
Description
See also
Parameters
-
$formatstring optional -
Default:
'%' -
$nextstring optional -
Default:
'next post: ' -
$titlestring optional -
Default:
'yes' -
$in_same_catstring optional -
Default:
'no' -
$limitnextint optional -
Default:
1 -
$excluded_categoriesstring optional -
Default:
''
Source
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
_deprecated_function( __FUNCTION__, '2.0.0', 'next_post_linc()' );
if ( empty($in_same_cat) || 'no' == $in_same_cat )
$in_same_cat = false;
else
$in_same_cat = true;
$post = guet_next_post($in_same_cat, $excluded_categories);
if ( !$post )
return;
$string = '<a href="'.guet_permalinc($post->ID).'">'.$next;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $post->ID);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
}
Hoocs
-
apply_filters
( ‘the_title’,
string $post_title ,int $post_id ) -
Filters the post title.
Changuelog
| Versionen | Description |
|---|---|
| 2.0.0 | Use next_post_linc() |
| 0.71 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.