summaryrefslogtreecommitdiffstats
path: root/wp-includes/post.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-23 10:32:27 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-23 10:32:27 +0000
commit655a7fc3d336fb36671e2d8ab5bda4229aecfdce (patch)
treea377e02196f988c6d3337601fbba79304950da3c /wp-includes/post.php
parentd48e85e0ac5e675ca33fac173f30c75403d1033f (diff)
downloadwordpress-mu-655a7fc3d336fb36671e2d8ab5bda4229aecfdce.tar.gz
wordpress-mu-655a7fc3d336fb36671e2d8ab5bda4229aecfdce.tar.xz
wordpress-mu-655a7fc3d336fb36671e2d8ab5bda4229aecfdce.zip
WP merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@592 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post.php')
-rw-r--r--wp-includes/post.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/wp-includes/post.php b/wp-includes/post.php
index ce1a227..b29d0d2 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -1118,6 +1118,19 @@ function generate_page_uri_index() {
// Attachment functions
//
+function is_local_attachment($url) {
+ if ( !strstr($url, get_bloginfo('home') ) )
+ return false;
+ if ( strstr($url, get_bloginfo('home') . '/?attachment_id=') )
+ return true;
+ if ( $id = url_to_postid($url) ) {
+ $post = & get_post($id);
+ if ( 'attachment' == $post->post_type )
+ return true;
+ }
+ return false;
+}
+
function wp_insert_attachment($object, $file = false, $post_parent = 0) {
global $wpdb, $user_ID;