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

Change the `add_theme_support` feature name for wide images #4113

Closed
justnorris opened this Issue Dec 20, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@justnorris
Copy link

justnorris commented Dec 20, 2017

Currently to add wide-image support theme developers have to do this:

    add_theme_support(
        'gutenberg',
        array(
            'wide-images' => true,
        )
    );

That should probably be renamed to something like:

add_theme_support('align-wide')
// or
add_theme_support('wide-alignments')

cc @youknowriad, @jasmussen

@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Dec 20, 2017

Two reasons behind this:

  • Avoid the "gutenberg" code name in production
  • The "wide-images" option is not only for images but all blocks supporting wide alignments.
@justnorris

This comment has been minimized.

Copy link

justnorris commented Dec 20, 2017

Thanks for the clarification 👍

@Luehrsen

This comment has been minimized.

Copy link
Contributor

Luehrsen commented Dec 20, 2017

Just to add to the conversation:

There are a lot of cases, where the availability of wide-alignments cannot be set globally. Sometimes we provide extra Page Templates for that functionality, sometimes it's special post types.

So having the ability to narrow availability down would be great.

@maddisondesigns

This comment has been minimized.

Copy link

maddisondesigns commented Dec 21, 2017

I also mentioned something similar in #2823 a few months ago, that it would be a good idea to rename these, as it's confusing that 'adding support' for 'wide-images' also does the same thing for tables as well.

getsource added a commit to getsource/gutenberg that referenced this issue Dec 22, 2017

Rename theme support for wide images to `align-wide`
Changes theme support for wide images from being within the `gutenberg`
theme support array with a `wide-images` bool to adding it with:
`add_theme_support( 'align-wide' );`

Additionally, updates documentation and variable names to match.

See: WordPress#4113

getsource added a commit to getsource/gutenberg that referenced this issue Jan 3, 2018

Rename theme support for wide images to `align-wide`
Changes theme support for wide images from being within the `gutenberg`
theme support array with a `wide-images` bool to adding it with:
`add_theme_support( 'align-wide' );`

Additionally, updates documentation and variable names to match.

See: WordPress#4113

getsource added a commit to getsource/gutenberg that referenced this issue Jan 4, 2018

Rename theme support for wide images to `align-wide`
Changes theme support for wide images from being within the `gutenberg`
theme support array with a `wide-images` bool to adding it with:
`add_theme_support( 'align-wide' );`

Additionally, updates documentation and variable names to match.

See: WordPress#4113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment