Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_image_path ($post_id = null) {
- if ($post_id == null) {
- global $post;
- $post_id = $post->ID;
- }
- $theImageSrc = get_post_meta($post_id, 'Image', true);
- if ( is_multisite() && $blog_id > 0) {
- $imageParts = explode('/blogs.dir/', $theImageSrc );
- if (isset($imageParts[1])) {
- $theImageSrc = network_site_url('/wp-content/blogs.dir/' . $imageParts[1]);
- }
- }
- return $theImageSrc;
- }
Advertisement
RAW Paste Data
Copied
Advertisement