Formatting cleanups. Props Viper007Bond. fixes #8703

git-svn-id: https://develop.svn.wordpress.org/trunk@11062 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-22 22:56:52 +00:00
parent c43d9ccbdc
commit cd7a5b36b1
1 changed files with 43 additions and 45 deletions

View File

@ -940,7 +940,7 @@ function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $ex
$title = apply_filters('the_title', $title, $post);
$link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
$link .= $title;
$link .= attribute_escape( $title );
$link .= "' href='" . get_permalink($post) . "' />\n";
$adjacent = $previous ? 'previous' : 'next';
@ -1003,7 +1003,7 @@ function prev_post_rel_link($title = '%title', $in_same_cat = false, $excluded_c
function get_boundary_post($in_same_cat = false, $excluded_categories = '', $start = true) {
global $post, $wpdb;
if( empty($post) || !is_single() || is_attachment() )
if ( empty($post) || !is_single() || is_attachment() )
return null;
$cat_array = array();
@ -1016,14 +1016,12 @@ function get_boundary_post($in_same_cat = false, $excluded_categories = '', $sta
if ( !empty($excluded_categories) ) {
$excluded_categories = array_map('intval', explode(',', $excluded_categories));
if ( !empty($cat_array) ) {
if ( !empty($cat_array) )
$excluded_categories = array_diff($excluded_categories, $cat_array);
}
$inverse_cats = array();
foreach ( $excluded_categories as $excluded_category) {
foreach ( $excluded_categories as $excluded_category)
$inverse_cats[] = $excluded_category * -1;
}
$excluded_categories = $inverse_cats;
}
}
@ -1066,7 +1064,7 @@ function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $ex
$title = apply_filters('the_title', $title, $post);
$link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
$link .= $title;
$link .= attribute_escape($title);
$link .= "' href='" . get_permalink($post) . "' />\n";
$boundary = $start ? 'start' : 'end';
@ -1129,7 +1127,7 @@ function get_parent_post_rel_link($title = '%title') {
$title = apply_filters('the_title', $title, $post);
$link = "<link rel='up' title='";
$link .= $title;
$link .= attribute_escape( $title );
$link .= "' href='" . get_permalink($post) . "' />\n";
return apply_filters( "parent_post_rel_link", $link );