WordPress.org

Make WordPress Core

Opened 6 weeks ago

Closed 4 weeks ago

Last modified 8 days ago

#43739 closed enhancement (fixed)

Include 'viewable' attribute on Post Type resource for 'edit' context

Reported by: danielbachhuber Owned by: pento
Milestone: 4.9.6 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch has-unit-tests commit fixed-major
Focuses: rest-api Cc:

Description (last modified by danielbachhuber)

We need to include a 'viewable' attribute on the Post Type resource in order for REST API clients to know whether they should display a 'Preview' button.

Previously: https://github.com/WordPress/gutenberg/issues/5749

Attachments (3)

43739.1.diff (3.0 KB) - added by danielbachhuber 6 weeks ago.
43739.1.2.diff (3.0 KB) - added by danielbachhuber 6 weeks ago.
43739.3.diff (3.1 KB) - added by danielbachhuber 6 weeks ago.
Change attribute to 'viewable'; explicit true test for Posts and Pages

Download all attachments as: .zip

Change History (11)

#1 @danielbachhuber
6 weeks ago

  • Keywords commit added
  • Owner set to pento
  • Status changed from new to assigned

#2 @danielbachhuber
6 weeks ago

43739.1.2.diff is what we want. I missed the trailing period in the first patch.

@danielbachhuber
6 weeks ago

Change attribute to 'viewable'; explicit true test for Posts and Pages

#3 @danielbachhuber
6 weeks ago

  • Description modified (diff)
  • Summary changed from Include 'previewable' attribute on Post Type resource for 'edit' context to Include 'viewable' attribute on Post Type resource for 'edit' context

#4 @danielbachhuber
4 weeks ago

  • Milestone changed from 5.0 to 4.9.6

@pento Let's land this in 4.9.6 too.

#5 @pento
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 43007:

REST API: Include viewable attribute on Post Type resource for edit context

For the block editor to be able to expose the Preview button correctly, it needs to know the is_post_type_viewable() setting, this change adds it to the Post Type response.

Props danielbachhuber.
Fixes #43739.

#6 @pento
4 weeks ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for backport.

#7 @SergeyBiryukov
4 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43038:

REST API: Include viewable attribute on Post Type resource for edit context.

For the block editor to be able to expose the Preview button correctly, it needs to know the is_post_type_viewable() setting, this change adds it to the Post Type response.

Props danielbachhuber.
Merges [43007] to the 4.9 branch.
Fixes #43739.

This ticket was mentioned in Slack in #core-restapi by desrosj. View the logs.


8 days ago

Note: See TracTickets for help on using tickets.