diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-21 09:24:59 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-21 09:24:59 +0000 |
| commit | ca9480281cb3cb331788f8475b1e080bff59ec8d (patch) | |
| tree | 03c3457f2c0be80543aec170ff2781087b532b62 /wp-inst/wp-includes/functions-post.php | |
| parent | efcb857423cc3556d2283152cc1de82f6c56cc74 (diff) | |
| download | wordpress-mu-ca9480281cb3cb331788f8475b1e080bff59ec8d.tar.gz wordpress-mu-ca9480281cb3cb331788f8475b1e080bff59ec8d.tar.xz wordpress-mu-ca9480281cb3cb331788f8475b1e080bff59ec8d.zip | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@442 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/functions-post.php')
| -rw-r--r-- | wp-inst/wp-includes/functions-post.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/wp-inst/wp-includes/functions-post.php b/wp-inst/wp-includes/functions-post.php index 872c029..517f735 100644 --- a/wp-inst/wp-includes/functions-post.php +++ b/wp-inst/wp-includes/functions-post.php @@ -742,13 +742,8 @@ function generate_page_rewrite_rules() { } } -function get_post_status($post = false) { - global $wpdb, $posts; - - if ( false === $post ) - $post = $posts[0]; - elseif ( (int) $post ) - $post = get_post($post, OBJECT); +function get_post_status($ID = '') { + $post = get_post($ID); if ( is_object($post) ) { if ( ('attachment' == $post->post_status) && $post->post_parent && ($post->ID != $post->post_parent) ) @@ -759,4 +754,15 @@ function get_post_status($post = false) { return false; } + +// Takes a post ID, returns its mime type. +function get_post_mime_type($ID = '') { + $post = & get_post($ID); + + if ( is_object($post) ) + return $post->post_mime_type; + + return false; +} + ?> |
