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

WordPress Trac noreply at wordpress.org
Tue Aug 24 09:52:38 UTC 2021


#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:  good-first-bug has-patch  |     Focuses:
--------------------------------------+-----------------------------

Comment (by muhammadfaizanhaidar):

 @TimothyBlynJacobs I would like to contribute with this ticket.
 For your comment it is clearer, in get_schema_links() function line 2522
 wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php, instead
 of

 {{{#!php
 <?php
 $schema_links = $this->get_schema_links();

 // I have added.

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

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


More information about the wp-trac mailing list