-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Publish button as anchor for AMP Preview button
The post Publish/Update button is rendered early on (contrary to post Preview button) and so it's safer to use it to imperatively add an AMP Preview button to the block editor markup. Also, the `viewable` property of a post type get defined late, similarly to when the post Preview button gets added. That's why we assume a post type is viewable and show the AMP Preview button initially. Only if we learn that a post type is not viewable, we hide the AMP Preview button.
- Loading branch information
Showing
2 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters