Skip to content

Instantly share code, notes, and snippets.

@dovy
Created April 20, 2015 15:52
Show Gist options
  • Save dovy/afefcd07413d386cb108 to your computer and use it in GitHub Desktop.
Save dovy/afefcd07413d386cb108 to your computer and use it in GitHub Desktop.
This is the complete example config we created in this tutorial.
<?php
Redux::setArgs(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'display_name' => 'Tuts+ Tutorial',
'display_version' => 'Part 2',
'menu_title' => 'Tuts+ Menu Item',
'admin_bar' => 'true',
'page_slug' => 'tuts_plus_page_slug', // Must be one word, no special characters, no spaces
'menu_type' => 'menu', // Menu or submenu
'allow_sub_menu' => true,
)
);
// For more details on sections visit: http://docs.reduxframework.com/core/sections/getting-started-with-sections/
Redux::setSection(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'id' => 'section_example_1',
// Unique identifier for your panel. Must be set and must not contain spaces or special characters
'title' => 'Example Section',
'desc' => 'This is for descriptive text.',
'heading' => 'Setting this overrides the title argument',
'icon' => 'el el-heart',
// http://elusiveicons.com/icons/
//'subsection' => true, Enable this as subsection of a previous section
)
);
Redux::setSection(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'id' => 'subsectionsection_example_1',
// Unique identifier for your panel. Must be set and must not contain spaces or special characters
'title' => 'Subsection Parent',
'icon' => 'el el-magic',
// http://elusiveicons.com/icons/
//'subsection' => true, // Enable this as subsection of a previous section
)
);
Redux::setSection(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'id' => 'subsectionsection_example_2',
// Unique identifier for your panel. Must be set and must not contain spaces or special characters
'title' => 'Subsection 1',
'icon' => 'el el-lines',
// http://elusiveicons.com/icons/
'subsection' => true,
// Enable this as subsection of a previous section
)
);
Redux::setSection(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'id' => 'subsectionsection_example_3',
// Unique identifier for your panel. Must be set and must not contain spaces or special characters
'title' => 'Subsection 2',
'icon' => 'el el-question',
// http://elusiveicons.com/icons/
'subsection' => true,
// Enable this as subsection of a previous section
)
);
Redux::setSection(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'id' => 'subsectionsection_example_4',
// Unique identifier for your panel. Must be set and must not contain spaces or special characters
'title' => 'Subsection 3',
'icon' => 'el el-bulb',
// http://elusiveicons.com/icons/
'subsection' => true,
// Enable this as subsection of a previous section
)
);
Redux::setField(
'tuts_plus_tutorial', // This is your opt_name,
array( // This is your arguments array
'id' => 'section_example_1',
// Unique identifier for your panel. Must be set and must not contain spaces or special characters
'type' => 'Text',
'section_id' => 'section_example_1',
'title' => 'Example Field',
'subtitle' => 'Field Subtitle',
'desc' => 'This is for descriptive text.',
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment