From 25dc21206793386928c29b9cb1b26f18d9bca6f8 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 2 Mar 2006 03:31:43 +0000 Subject: [PATCH] Actually move these this time. #2520 git-svn-id: https://develop.svn.wordpress.org/trunk@3590 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/deprecated.php | 42 ++++++++++++++++++++++++ wp-includes/template-functions-links.php | 42 ------------------------ 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 66bc27c770..9cb93257dc 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -64,6 +64,48 @@ function the_category_head($before='', $after='') { } } +// Deprecated. Use previous_post_link(). +function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') { + + if ( empty($in_same_cat) || 'no' == $in_same_cat ) + $in_same_cat = false; + else + $in_same_cat = true; + + $post = get_previous_post($in_same_cat, $excluded_categories); + + if ( !$post ) + return; + + $string = ''.$previous; + if ( 'yes' == $title ) + $string .= apply_filters('the_title', $post->post_title, $post); + $string .= ''; + $format = str_replace('%', $string, $format); + echo $format; +} + +// Deprecated. Use next_post_link(). +function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { + + 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 = ''.$next; + if ( 'yes' == $title ) + $string .= apply_filters('the_title', $post->post_title, $nextpost); + $string .= ''; + $format = str_replace('%', $string, $format); + echo $format; +} + // // These are deprecated. Use current_user_can(). // diff --git a/wp-includes/template-functions-links.php b/wp-includes/template-functions-links.php index 7d5ce38fe3..0e0984cbba 100644 --- a/wp-includes/template-functions-links.php +++ b/wp-includes/template-functions-links.php @@ -492,46 +492,4 @@ function posts_nav_link($sep=' — ', $prelabel='« Previous Page', $nx } } -// Deprecated. Use previous_post_link(). -function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') { - - if ( empty($in_same_cat) || 'no' == $in_same_cat ) - $in_same_cat = false; - else - $in_same_cat = true; - - $post = get_previous_post($in_same_cat, $excluded_categories); - - if ( !$post ) - return; - - $string = ''.$previous; - if ( 'yes' == $title ) - $string .= apply_filters('the_title', $post->post_title, $post); - $string .= ''; - $format = str_replace('%', $string, $format); - echo $format; -} - -// Deprecated. Use next_post_link(). -function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { - - 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 = ''.$next; - if ( 'yes' == $title ) - $string .= apply_filters('the_title', $post->post_title, $nextpost); - $string .= ''; - $format = str_replace('%', $string, $format); - echo $format; -} - ?>