darrenjacoby / intervention

WordPress plugin to configure wp-admin and application state using a single config file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature idea: add theme supports

huubl opened this issue · comments

commented

I came across: https://github.com/roots/sage/pull/2189/files and thought it can be useful for Intervention. What do you think about adding an option for setting theme supports?

// Add theme supports
collect(config('theme.add_theme_support'))->each(function ($options, $feature) {
    $options
        ? add_theme_support($feature, $options)
        : add_theme_support($feature);
});
[..]
    'theme' => [
        'add_theme_support' => [


            /*
            |--------------------------------------------------------------------------
            | Add Title Tag Support
            |--------------------------------------------------------------------------
            |
            | Enable plugins to manage the document title
            |
            | @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag
            |
            */

            'title',


            /*
            |--------------------------------------------------------------------------
            | Enable post thumbnails
            |--------------------------------------------------------------------------
            |
            | Featured images (also sometimes called Post Thumbnails) are images that
            | represent an individual Post, Page, or Custom Post Type.
            |
            | @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
            |
            */

            'post-thumbnails',


            /*
            |--------------------------------------------------------------------------
            | Enable HTML5 markup support
            |--------------------------------------------------------------------------
            |
            | This feature allows the use of HTML5 markup for the search forms,
            | comment forms, comment lists, gallery, and caption.
            |
            | @link https://developer.wordpress.org/reference/functions/add_theme_support/#html5
            |
            */

            'html5' => ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form'],


            /*
            |--------------------------------------------------------------------------
            | Enable customizer selective refresh
            |--------------------------------------------------------------------------
            |
            | Enable selective refresh for widgets in customizer
            |
            | @link https://developer.wordpress.org/themes/customize-api/
            |
            */

            'customize-selective-refresh-widgets',
        ]
[..]

Hey @huubl,

Been meaning to respond here, expanding an option for theme has been on my radar for some time. However, I would first like to add an interface for admin. I'm going to close for now, but will likely revisit once I wrap up the interface.

Hey @darrenjacoby,

Is this the time to take an other look at this?