[wp-trac] [WordPress Trac] #12955: Add get_post filter

WordPress Trac noreply at wordpress.org
Thu Jun 9 04:24:18 UTC 2016


#12955: Add get_post filter
------------------------------------+-----------------------------
 Reporter:  JohnLamansky            |       Owner:
     Type:  feature request         |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Posts, Post Types       |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------

Comment (by westonruter):

 @boonebgorges I will note that a `get_post` filter would seem to offer
 parity with other functions and filters in core:

 * The `get_comment` filter applies when the `get_comment()` function is
 called
 * The `get_term` filter applies when the `get_term()` function is called.
 * The `get_{$meta_type}_metadata` applies when `get_{$meta_type}_meta()`
 is called.
 * The filters `pre_option_{$option}`, `default_option_{$option}`,
 and`option_{$option}` apply when `get_option()` is called.

 From an API consistency perspective, the lack of a `get_post` filter seems
 to be a hole.

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


More information about the wp-trac mailing list