summaryrefslogtreecommitdiffstats
path: root/wp-includes/link-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-24 11:45:39 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-24 11:45:39 +0000
commitcf9f85dc8121a359d550ffa3b735fb48859eee88 (patch)
tree9f90be15fc46163f5656f019f2a2866414b7c9f2 /wp-includes/link-template.php
parentf10f9f5b05e23ce4c07479b094bd3ff4bbfd86d0 (diff)
downloadwordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.tar.gz
wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.tar.xz
wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.zip
Merged with WP 2.5, revision 7806
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/link-template.php')
-rw-r--r--wp-includes/link-template.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index 23bfbf7..74da3e7 100644
--- a/wp-includes/link-template.php
+++ b/wp-includes/link-template.php
@@ -80,13 +80,13 @@ function get_permalink($id = 0, $leavename=false) {
$category = $cats[0]->slug;
if ( $parent=$cats[0]->parent )
$category = get_category_parents($parent, FALSE, '/', TRUE) . $category;
- }
- // show default category in permalinks, without
- // having to assign it explicitly
- if ( empty($category) ) {
- $default_category = get_category( get_option( 'default_category' ) );
- $category = is_wp_error( $default_category)? '' : $default_category->slug;
+ // show default category in permalinks, without
+ // having to assign it explicitly
+ if ( empty($category) ) {
+ $default_category = get_category( get_option( 'default_category' ) );
+ $category = is_wp_error( $default_category ) ? '' : $default_category->slug;
+ }
}
$author = '';
@@ -179,7 +179,7 @@ function get_attachment_link($id = false) {
$parentlink = _get_page_link( $object->post_parent ); // Ignores page_on_front
else
$parentlink = get_permalink( $object->post_parent );
- if ( ctype_digit($object->post_name) || false !== strpos(get_option('permalink_structure'), '%category%') )
+ if ( is_numeric($object->post_name) || false !== strpos(get_option('permalink_structure'), '%category%') )
$name = 'attachment/' . $object->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker
else
$name = $object->post_name;
@@ -554,7 +554,7 @@ function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $pre
}
if ( !empty($excluded_categories) ) {
- $posts_in_ex_cats_sql = " AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')';
+ $posts_in_ex_cats_sql = " AND tt.taxonomy = 'category' AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')';
}
}
}