Skip to content

Make it easier for widgets to opt-in to live previews #67

@westonruter

Description

@westonruter

Right now the method is:

add_filter( 'customizer_widget_live_previewable_{id_base}', '__return_true' );

But it would be nice if there was a way to supply this in the arguments supplied to the widget constructor:

class Lightbox_Widget extends WP_Widget {
    function __construct() {
        parent::__construct(
            'lightbox',
            __( 'Lightbox', 'lightbox-widget' ),
            array( 
                'description' => __( 'Displays a button which opens a lightbox to show the supplied content.', 'lightbox-widget' ),
                'customizer_support' => true,
            )
        );
...

See also comment on wordpress-dev by Nacin.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions