Skip to content

Technical Debt: Options in Image Select #7

@alfred-ta

Description

@alfred-ta
'options'  => array(
        '1'      => array(
            'alt'   => '1 Column', 
            'img'   => ReduxFramework::$_url.'assets/img/1col.png'
        ),
        '2'      => array(
            'alt'   => '2 Column Left', 
            'img'   => ReduxFramework::$_url.'assets/img/2cl.png'
        ),
        '3'      => array(
            'alt'   => '2 Column Right', 
            'img'  => ReduxFramework::$_url.'assets/img/2cr.png'
        ),
        '4'      => array(
            'alt'   => '3 Column Middle', 
            'img'   => ReduxFramework::$_url.'assets/img/3cm.png'
        ),
        '5'      => array(
            'alt'   => '3 Column Left', 
            'img'   => ReduxFramework::$_url.'assets/img/3cl.png'
        ),
        '6'      => array(
            'alt'  => '3 Column Right', 
            'img'  => ReduxFramework::$_url.'assets/img/3cr.png'
        )
    ),

With a new introduction of MultiArrayFormatter, Image Select / Output is basically managed, but special attention required for Palette.

   'options'  => array(
        // Array of preset options
        '1'      => array(
            'alt'   => 'Preset 1', 
            'img'   => ReduxFramework::$_url.'../sample/presets/preset1.png', 
            'presets'   => array(
                'switch-on'     => 1,
                'switch-off'    => 1, 
                'switch-custom' => 1
            )
        ),
        // JSON string of preset options
        '2'       => array(
            'alt'     => 'Preset 2', 
            'img'     => ReduxFramework::$_url.'../sample/presets/preset2.png', 
            'presets' => '{"slider1":"1", "slider2":"0", "switch-on":"0"}'
        ),
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions