Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post format displays all formats, even if it's limited in theme support #6296

Closed
divpusher opened this issue Apr 19, 2018 · 2 comments
Closed
Labels
Core REST API Task Task for Core REST API efforts [Feature] Document Settings Document settings experience

Comments

@divpusher
Copy link

Issue Overview

The post format select option lists all post formats, even if it's limited in theme support.

Steps to Reproduce (for bugs)

  1. Add a few post format support via add_theme_support() function in your theme's function.php file.
function my_theme_setup(){

    add_theme_support( 'post-formats', array( 'link', 'image', 'gallery' ) );
    
}
add_action( 'after_setup_theme', 'my_theme_setup' );
  1. Check classic editor, it displays only those few formats properly.
  2. Check Gutenberg, it displays all possible formats.

I'm using Chrome Version 65.0.3325.181 (Official Build) (64-bit) on Win 10.
Gutenberg version: 2.7.0

Expected Behavior

Gutenberg should list only those post formats which are defined in theme support.

Current Behavior

Gutenberg lists all post formats.

Screenshots / Video

formats

@pento
Copy link
Member

pento commented Apr 20, 2018

Thank you for the bug report, @divpshr!

The REST API doesn't expose the post formats the the current post type supports, but we can add this in and filter the list appropriately.

@pento pento added [Feature] Document Settings Document settings experience Core REST API Task Task for Core REST API efforts labels Apr 20, 2018
@danielbachhuber danielbachhuber added this to the Merge Proposal: REST API milestone Apr 24, 2018
@danielbachhuber
Copy link
Member

🔨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core REST API Task Task for Core REST API efforts [Feature] Document Settings Document settings experience
Projects
None yet
Development

No branches or pull requests

3 participants