Skip to content

Instantly share code, notes, and snippets.

@dovy
Last active December 22, 2015 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dovy/6478841 to your computer and use it in GitHub Desktop.
Save dovy/6478841 to your computer and use it in GitHub Desktop.
Example folding for the Redux Framework.
<?php
array(
'id'=>'switch-custom',
'type' => 'switch',
'title' => __('Switch - Custom Titles', 'redux-framework'),
'subtitle'=> __('Look, it\'s on! Also hidden child elements!', 'redux-framework'),
"default" => 0,
'on' => 'Enabled',
'off' => 'Disabled',
),
array(
'id'=>'switch-fold',
'type' => 'switch',
'fold' => array('switch-custom'),
'title' => __('Switch - With Hidden Items (NESTED!)', 'redux-framework'),
'subtitle'=> __('Also called a "fold" parent.', 'redux-framework'),
'desc' => __('Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'redux-framework'),
'default' => 0,
),
array(
'id'=>'patterns',
'type' => 'image_select',
'tiles' => true,
'fold' => array('switch-fold'=>0),
'title' => __('Images Option (with pattern=>true)', 'redux-framework'),
'subtitle'=> __('Select a background pattern.', 'redux-framework'),
'default' => 0,
'options' => array(
'1' => array('alt' => '1 Column', 'img' => REDUX_URL.'assets/img/1col.png'),
'2' => array('alt' => '2 Column Left', 'img' => REDUX_URL.'assets/img/2cl.png'),
'3' => array('alt' => '2 Column Right', 'img' => REDUX_URL.'assets/img/2cr.png'),
'4' => array('alt' => '3 Column Middle', 'img' => REDUX_URL.'assets/img/3cm.png'),
'5' => array('alt' => '3 Column Left', 'img' => REDUX_URL.'assets/img/3cl.png'),
'6' => array('alt' => '3 Column Right', 'img' => REDUX_URL.'assets/img/3cr.png')
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment