alfred-ta / docs

Documentation for Redux Framework, the most powerful WordPress interface framework.
https://docs.redux.io
MIT License
0 stars 0 forks source link

Technical Debt: Options in Image Select #7

Open alfred-ta opened 5 years ago

alfred-ta commented 5 years ago
'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"}'
        ),
    )
alfred-ta commented 5 years ago

Other Technical Debt: Args in Editor field https://docs.redux.io/core-fields/editor.html#wp-editor-options

alfred-ta commented 5 years ago

Other Technical Debt: Options in Color RGBA It has a lot of items as you can see from the page https://docs.redux.io/core-fields/color-rgba.html#color-picker-options It involves variety of types, like Bool, Text, Number and Even Array. This should be considered how to get managed.