[wp-trac] [WordPress Trac] #61639: REST API: Posts/Pages endpoint prefixes private pages titles.

WordPress Trac noreply at wordpress.org
Fri Jul 12 08:38:24 UTC 2024


#61639: REST API: Posts/Pages endpoint prefixes private pages titles.
--------------------------+------------------------------
 Reporter:  youknowriad   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+------------------------------
Description changed by youknowriad:

Old description:

> Discovered in https://github.com/WordPress/gutenberg/issues/56154
>
> When using the /posts or /pages, REST API, for private posts or pages,
> you get the following title property:
>
> ```
> title: { raw: "Some title", rendered: "Private: Some title" }
> ```
>
> I would like to understand more why did we decide to prefix the rendered
> titles here knowing that we already have the information about the status
> separately.
>
> Maybe I'm misunderstanding what "rendered" property is about, but IMO we
> should consider removing these prefixes as REST API clients should have
> access to the rendered title without it (like the linked example above:
> render the title in the list views)

New description:

 Discovered in https://github.com/WordPress/gutenberg/issues/56154

 When using the /posts or /pages, REST API, for private posts or pages, you
 get the following title property:


 {{{
 title: { raw: "Some title", rendered: "Private: Some title" }
 }}}

 I would like to understand more why did we decide to prefix the rendered
 titles here knowing that we already have the information about the status
 separately.

 Maybe I'm misunderstanding what "rendered" property is about, but IMO we
 should consider removing these prefixes as REST API clients should have
 access to the rendered title without it (like the linked example above:
 render the title in the list views)

--

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


More information about the wp-trac mailing list