Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#43739 closed enhancement (fixed)

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

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

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 9 years ago.
43739.1.2.diff​ (3.0 KB ) - added by danielbachhuber 9 years ago.
43739.3.diff​ (3.1 KB ) - added by danielbachhuber 9 years ago.
Change attribute to 'viewable'; explicit true test for Posts and Pages

Download all attachments as: .zip

Change History (11)

#1 @danielbachhuber
9 years ago

  • Keywords commit added
  • Owner set to pento
  • Status new → assigned

#2 @danielbachhuber
9 years ago

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

@danielbachhuber
9 years ago

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

#3 @danielbachhuber
9 years ago

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

#4 @danielbachhuber
8 years ago

  • Milestone 5.0 → 4.9.6

@pento Let's land this in 4.9.6 too.

#5 @pento
8 years ago

  • Resolution → fixed
  • Status assigned → 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
8 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closed → reopened

Reopen for backport.

#7 @SergeyBiryukov
8 years ago

  • Resolution → fixed
  • Status reopened → 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 years ago

Note: See TracTickets for help on using tickets.