[wp-trac] [WordPress Trac] #46641: Add blog_id to post object

WordPress Trac noreply at wordpress.org
Mon Mar 25 14:07:42 UTC 2019


#46641: Add blog_id to post object
--------------------------------+-----------------------------
 Reporter:  Spidlace            |      Owner:  (none)
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  5.1
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 Hi,

 I work on a multisite, where each website can get all posts (from one post
 type or not).
 It seem interesting to add new line in object response (get_post() for
 example) : "blog_id" (where blog_id is an int)

 - blog_id is 1 per default (if no multisite)

 {{{
 WP_Post Object
 (
     [ID] =>
     [post_author] =>
     [post_date] =>
     [post_date_gmt] =>
     [post_content] =>
     [post_title] =>
     [post_excerpt] =>
     [post_status] =>
     [comment_status] =>
     [ping_status] =>
     [post_password] =>
     [post_name] =>
     [to_ping] =>
     [pinged] =>
     [post_modified] =>
     [post_modified_gmt] =>
     [post_content_filtered] =>
     [post_parent] =>
     [guid] =>
     [menu_order] =>
     [post_type] =>
     [post_mime_type] =>
     [comment_count] =>
     [filter] =>
     [blog_id] =>
 )
 }}}

 If this feature is good for some people, I can make this change and submit
 here

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46641>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list