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

WordPress Trac noreply at wordpress.org
Fri Oct 16 18:17:20 UTC 2015


#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 MikeSchinkel):

 In order to illustrate how beneficial this hook can be ,'''I've
 implemented a plugin as a proof-of-concept in the following Gist''' that
 virtualizes the results of the API found at http://apps.usa.gov/apps-
 gallery/api/registrations.json :

 - https://gist.github.com/mikeschinkel/f70c9298a9e71d029c6f

 The plugin does not fully handle all aspects that a robust solution would
 handle, but it works well enough to show why this hook would be
 beneficial.

 To see how it works just drop in any WordPress site and navigate to the
 URL:

 - `/wp-admin/edit.php?post_type=vp_fed_mob_apps`.

 From there click forward through the next pages and notice how it loads
 the results from the API into the database as if a post type.  If you
 click back to earlier pages you notice it doesn't need to reload. Also
 notice that if it has been 15 minutes since a post has been updated it
 uses the `'make_post_instance'` hook to reload the data from the API when
 you view a specific post.

 Now imagine how much easier it would be for a themer who is not a strong
 PHP developer to access an API by treating it like a post type assuming
 someone has developed a plugin that presents the API as a post type.

 If we get this functionality we'd like to implement the APIs that are
 found here:  http://www.cdata.com/cloud/ which include Salesforce, Gmail,
 Facebook, QuickBooks, Google AdWords, Xero Accounting, Hubspot, Marketo,
 MailChimp and more.

 But we can't without this hook.

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


More information about the wp-trac mailing list