[wp-trac] [WordPress Trac] #50241: Cannot publish the post using Gutenberg after changing REST URL prefix

WordPress Trac noreply at wordpress.org
Mon May 25 17:06:10 UTC 2020


#50241: Cannot publish the post using Gutenberg after changing REST URL prefix
-------------------------------------+-------------------------------------
 Reporter:  ibachal                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  REST API                 |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots          |     Focuses:  administration, rest-
  reporter-feedback                  |  api
-------------------------------------+-------------------------------------

Comment (by ibachal):

 Hi @TimothyBlynJacobs

 Thank you for looking into this. I am using the following code to change
 the REST URL prefix:


 {{{
 add_filter( 'rest_url_prefix', 'custom_rest_url_prefix' );
 function custom_rest_url_prefix( $prefix ) {
  return 'api';
 }
 }}}

 It changes default "wp-json" prefix to "api"

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


More information about the wp-trac mailing list