Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

How to use tab option type to handle build-in option in shortcode creating

Open uxdesignit opened this issue 10 years ago • 2 comments

hi, when we create shortcode with multi build in option [E.g: title, author, color, layout... ], we need something like a tab or group to place each options look as group [in Add new / edit mode]. We try to use tab option type to handle this case but it seem not work for build in option [just work for post / page Taxonomy option...]

Context: when we create new shortcode for my theme, we need few tabs, Eg: Basic, Layout, Color to place short code option to each corresponding tab. It is friendly and easy in use....How i can do it ? Can you tell me how i can use Tab option type or something like that ?

Thank in Advances

uxdesignit avatar Dec 29 '15 07:12 uxdesignit

I created {theme}/framework-customizations/extensions/shortcodes/shortcodes/section/options.php with

$options = array(
    't-1' => array(
        'type' => 'tab',
        'title' => __('Tab 1', 'fw'),
        'options' => array(
            'o-1' => array('type' => 'text'),
        ),
    ),
    't-2' => array(
        'type' => 'tab',
        'title' => __('Tab 2', 'fw'),
        'options' => array(
            'o-2' => array('type' => 'text'),
        ),
    ),
);

and it works fine


I hope I understood your question. If not, please give more details: screenshots, code samples, steps to reproduce

ghost avatar Dec 29 '15 18:12 ghost

great, did the same but it not work because my fail

Thank you in advances, moldcraft

uxdesignit avatar Dec 30 '15 02:12 uxdesignit