summaryrefslogtreecommitdiffstats
path: root/wp-includes/link-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-09 15:17:25 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-09 15:17:25 +0000
commit492aa4ee7086ed94cb2f37a2bce3b52905841659 (patch)
tree825b6d0ae66246bae7a65c1f610a65b59789a6b5 /wp-includes/link-template.php
parent359223a4711934ea6ec20e4c7613832e1f1132b5 (diff)
downloadwordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.tar.gz
wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.tar.xz
wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.zip
WP Merge to rev 5007
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@909 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/link-template.php')
-rw-r--r--wp-includes/link-template.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index 16f6b58..65a502a 100644
--- a/wp-includes/link-template.php
+++ b/wp-includes/link-template.php
@@ -70,7 +70,7 @@ function get_permalink($id = 0) {
$unixtime = strtotime($post->post_date);
$category = '';
- if ( strstr($permalink, '%category%') ) {
+ if (strpos($permalink, '%category%') !== false) {
$cats = get_the_category($post->ID);
$category = $cats[0]->category_nicename;
if ( $parent=$cats[0]->category_parent )
@@ -158,12 +158,12 @@ 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 (! strstr($parentlink, '?') )
+ if (strpos($parentlink, '?') === false)
$link = trim($parentlink, '/') . '/' . $object->post_name . '/';
}
if (! $link ) {
- $link = get_bloginfo('home') . "/?attachment_id=$id";
+ $link = get_bloginfo('url') . "/?attachment_id=$id";
}
return apply_filters('attachment_link', $link, $id);