Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#19996 closed enhancement (wontfix)

New function get_blog_metadata for ms-functions.php

Reported by: _dorsvenabili's profile _DorsVenabili 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)

get_blog_metadata.txt (738 bytes) - added by _DorsVenabili 12 years ago.
get_blog_metadata()

Download all attachments as: .zip

Change History (2)

@_DorsVenabili
12 years ago

get_blog_metadata()

#1 @jeremyfelt
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.

Note: See TracTickets for help on using tickets.