Opened 12 years ago
Closed 10 years ago
#19996 closed enhancement (wontfix)
New function get_blog_metadata for ms-functions.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Multisite | Keywords: | |
Focuses: | Cc: |
Description
Hi!
I think that the ms-functions are very useful for WP multisite developers, for example: get_blog_post where you can select the blog_id and post_id to return the post info of a blog.
But I'm missing an important one: get_blog_post_metadata. With the function that I'm proposing, you can select the blog_id, the post_id and the meta_key and the function will return the metadata for those values.
I have attached in the file get_blog_metadata.txt the function that I have made and I think it would be very useful to have it in the core.
Cheers! :)
Attachments (1)
Change History (2)
#1
@
10 years ago
- Keywords has-patch removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
It's probably cleaner to use switch_to_blog( $blog_id ); get_post_meta( $post_id, 'meta_key' ); restore_current_blog();
in the moment to grab custom post meta data rather than maintaining another function for this.
get_blog_metadata()