Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 18539)
+++ wp-includes/link-template.php	(working copy)
@@ -1410,9 +1410,25 @@
 }
 
 /**
+ * Get previous post link that is adjacent to the current post.
+ *
+ * @since 3.3.0
+ *
+ * @param string $format Optional. Link anchor format.
+ * @param string $link Optional. Link permalink format.
+ * @param bool $in_same_cat Optional. Whether link should be in same category.
+ * @param string $excluded_categories Optional. Excluded categories IDs.
+ * @return string
+ */
+function get_previous_post_link($format='&laquo; %link', $link='%title', $in_same_cat = false, $excluded_categories = '') {
+	return get_adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, true);
+}
+
+/**
  * Display previous post link that is adjacent to the current post.
  *
  * @since 1.5.0
+ * @uses get_previous_post_link()
  *
  * @param string $format Optional. Link anchor format.
  * @param string $link Optional. Link permalink format.
@@ -1420,13 +1436,29 @@
  * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
  */
 function previous_post_link($format='&laquo; %link', $link='%title', $in_same_cat = false, $excluded_categories = '') {
-	adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, true);
+	echo get_previous_post_link($format, $link, $in_same_cat, $excluded_categories);
 }
 
 /**
+ * Get previous post link that is adjacent to the current post.
+ *
+ * @since 3.3.0
+ *
+ * @param string $format Optional. Link anchor format.
+ * @param string $link Optional. Link permalink format.
+ * @param bool $in_same_cat Optional. Whether link should be in same category.
+ * @param string $excluded_categories Optional. Excluded categories IDs.
+ * @return string
+ */
+function get_next_post_link($format='&laquo; %link', $link='%title', $in_same_cat = false, $excluded_categories = '') {
+	return get_adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, false);
+}
+
+/**
  * Display next post link that is adjacent to the current post.
  *
  * @since 1.5.0
+ * @uses get_next_post_link()
  *
  * @param string $format Optional. Link anchor format.
  * @param string $link Optional. Link permalink format.
@@ -1434,23 +1466,24 @@
  * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
  */
 function next_post_link($format='%link &raquo;', $link='%title', $in_same_cat = false, $excluded_categories = '') {
-	adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, false);
+	echo get_next_post_link($format, $link, $in_same_cat, $excluded_categories);
 }
 
 /**
- * Display adjacent post link.
+ * Get adjacent post link.
  *
  * Can be either next post link or previous.
  *
- * @since 2.5.0
+ * @since 3.3.0
  *
  * @param string $format Link anchor format.
  * @param string $link Link permalink format.
  * @param bool $in_same_cat Optional. Whether link should be in same category.
  * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
  * @param bool $previous Optional, default is true. Whether display link to previous post.
+ * @return string
  */
-function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
+function get_adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
 	if ( $previous && is_attachment() )
 		$post = & get_post($GLOBALS['post']->post_parent);
 	else
@@ -1479,7 +1512,26 @@
 	echo apply_filters( "{$adjacent}_post_link", $format, $link );
 }
 
+
 /**
+ * Display adjacent post link.
+ *
+ * Can be either next post link or previous.
+ *
+ * @since 2.5.0
+ * @uses get_adjacent_post_link()
+ *
+ * @param string $format Link anchor format.
+ * @param string $link Link permalink format.
+ * @param bool $in_same_cat Optional. Whether link should be in same category.
+ * @param string $excluded_categories Optional. Excluded categories IDs.
+ * @param bool $previous Optional, default is true. Whether display link to previous post.
+ */
+function adjacent_post_link( $format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
+	echo get_adjacent_post_link( $format, $link, $in_same_cat, $excluded_categories, $previous );
+}
+
+/**
  * Retrieve get links for page numbers.
  *
  * @since 1.5.0
