[wp-trac] [WordPress Trac] #30970: setup_postdata should be able to accept a Post ID, currently requires full WP Post object

WordPress Trac noreply at wordpress.org
Thu Mar 19 19:25:33 UTC 2015


#30970: setup_postdata should be able to accept a Post ID, currently requires full
WP Post object
----------------------------------------+-----------------------------
 Reporter:  sc0ttkclark                 |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Posts, Post Types           |     Version:  1.5
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+-----------------------------

Comment (by mordauk):

 Modifying the global `$post` was breaking tests and, in hindsight, is
 probably really dangerous, so
 [https://core.trac.wordpress.org/attachment/ticket/30970/30970.2.patch
 30970.2.patch] is an updated version that does not modify `$post`.

 [https://core.trac.wordpress.org/attachment/ticket/30970/30970-tests.patch
 30970-tests.patch] includes some simple unit tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30970#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list