[wp-trac] [WordPress Trac] #34399: WP API 1.2 endpoints don't work with latest WP core master

WordPress Trac noreply at wordpress.org
Fri Oct 23 00:17:42 UTC 2015


#34399: WP API 1.2 endpoints don't work with latest WP core master
--------------------------+------------------------------
 Reporter:  mnelson4      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by mnelson4):

 Adding this code snippet instead worked to keep WP API 1.2 running:
 {{{
 add_filter( 'rest_url_prefix', 'wp_api_change_url_prefix' );
 function wp_api_change_url_prefix( $prefix ) {
         return 'wp-rest';
 }
 }}}
 Has anyone ever suggested using 'wp-rest' as the default prefix in WP API
 v2 and what's in WP core now? It seems to me that would totally remove
 compatibility issues with v1 and would be better name for the rest api's
 endpoints. I suspect 'wp-json' is just a leftover from v1

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


More information about the wp-trac mailing list