WordPress at a glance
function is not described

next_post() WP 0.71

Deprecated in 2.0.0. It is no longer supported and can be removed in future releases. Use next_post_link() instead.

Prints link to the next post.

  • See: next_post_link()
Hooks in function
Return

Nothing (null).

Usage

next_post( $format, $next, $title, $in_same_cat, $limitnext, $excluded_categories );
$format(string)

Default: '%'
$next(string)

Default: 'next post: '
$title(string)

Default: 'yes'
$in_same_cat(string)

Default: 'no'
$limitnext(int)

Default: 1
$excluded_categories(string)

Default: ''

Code of next post: wp-includes/deprecated.php VER 5.0.3

<?php
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_link()' );

	if ( empty($in_same_cat) || 'no' == $in_same_cat )
		$in_same_cat = false;
	else
		$in_same_cat = true;

	$post = get_next_post($in_same_cat, $excluded_categories);

	if ( !$post	)
		return;

	$string = '<a href="'.get_permalink($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;
}