[wp-trac] [WordPress Trac] #50074: Add filter on post/etc action links in the REST API

WordPress Trac noreply at wordpress.org
Sun Dec 27 18:01:42 UTC 2020


#50074: Add filter on post/etc action links in the REST API
----------------------------------------+-----------------------------
 Reporter:  rmccue                      |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  REST API                    |     Version:  4.9.8
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------

Comment (by patopaiar):

 @TimothyBlynJacobs I would like to contribute with this ticket, but I am
 not 100% sure of which links exactly would be the ones that need a filter
 added.

 For your comment it is clearer, in get_schema_links function line 2452,
 instead of


 {{{
 $schema_links = $this->get_schema_links();
 }}}


 We can do


 {{{
 $schema_links = apply_filters( "rest_{$this->post_type}_item_schema_links"
 , $this->get_schema_links() );
 }}}

 But for the action links, how can I figure out which ones to add filters
 to?

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


More information about the wp-trac mailing list