Skip to content

Instantly share code, notes, and snippets.

@jawinn
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save jawinn/11169205 to your computer and use it in GitHub Desktop.

Select an option

Save jawinn/11169205 to your computer and use it in GitHub Desktop.
Bare bones Redux config starting point
<?php
// ACTUAL DECLARATION OF SECTIONS
$this->sections[] = array(
'icon' => 'el-icon-cogs',
'title' => __('General Settings', 'YOURTHEME'),
'fields' => array(
array(
'id' => 'opt-social-facebook',
'type' => 'text',
'title' => __('Facebook Link', 'YOURTHEME'),
'subtitle' => __('Full URL for your Facebook page.', 'YOURTHEME')
),
array(
'id' => 'opt-social-twitter',
'type' => 'text',
'title' => __('Twitter Link', 'YOURTHEME'),
'subtitle' => __('Full URL for your Twitter profile.', 'YOURTHEME')
),
array(
'id' => 'opt-footertext',
'type' => 'editor',
'title' => __('Footer Text', 'YOURTHEME'),
'subtitle' => __('You can use the following shortcodes in your footer text: [wp-url] [site-url] [theme-url] [login-url] [logout-url] [site-title] [site-tagline] [current-year]', 'YOURTHEME'),
'default' => 'Default footer text here',
)
)
);
// IMPORT/EXPORT
$this->sections[] = array(
'title' => __('Import / Export', 'YOURTHEME'),
'desc' => __('Import and Export your Redux Framework settings from file, text or URL.', 'YOURTHEME'),
'icon' => 'el-icon-refresh',
'fields' => array(
array(
'id' => 'opt-import-export',
'type' => 'import_export',
'title' => 'Import Export',
'subtitle' => 'Save and restore your Redux options',
'full_width' => false,
),
),
);
$this->sections[] = array(
'type' => 'divide',
);
// THEME INFO
$this->sections[] = array(
'icon' => 'el-icon-info-sign',
'title' => __('Theme Information', 'YOURTHEME'),
'desc' => __('<p class="description">This is the Description. Again HTML is allowed</p>', 'YOURTHEME'),
'fields' => array(
array(
'id' => 'opt-raw-info',
'type' => 'raw',
'content' => $item_info,
)
),
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment