Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Skip to content
- Search…
- All gists
- GitHub
- Sign up for a GitHub account Sign in
- Create a gist now
- Instantly share code, notes, and snippets.
- Star 0 Fork 0 @raziul1raziul1/Theme Option Fremwork Secret
- Created 5 months ago
- Embed
- <script src="https://gist.github.com/raziul1/15942ca4c629c318c1286ad4d66bb70e.js"></script>
- Download ZIP
- Code Revisions 1
- Raw
- Theme Option Fremwork
- // stock Theme Option framework
- function stock_theme_option( $options ) {
- $options = array(); // remove old options
- $options[] = array(
- 'name' => 'stock_header_setting',
- 'title' => 'Header Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'header_icon_box',
- 'type' => 'group',
- 'title' => 'Header Icon Box',
- 'button_title' => 'Add New',
- 'accordion_title' => 'Add New Box',
- 'fields' => array(
- array(
- 'id' => 'title',
- 'type' => 'text',
- 'title' => 'Title',
- ),
- array(
- 'id' => 'icon',
- 'type' => 'icon',
- 'title' => 'Icon',
- ),
- ),
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_social_link',
- 'title' => 'stock Social Links',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'social_links',
- 'type' => 'group',
- 'title' => 'Social links',
- 'button_title' => 'Add New',
- 'accordion_title' => 'Add New Social links',
- 'fields' => array(
- array(
- 'id' => 'icon',
- 'type' => 'icon',
- 'title' => 'Icon',
- ),
- array(
- 'id' => 'link',
- 'type' => 'text',
- 'title' => 'Links',
- ),
- ),
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_header_logo_setting',
- 'title' => 'Header Logo Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'enable_logo_image',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Enable Logo Image',
- ),
- array(
- 'id' => 'logo_image',
- 'type' => 'image',
- 'title' => 'Logo Image',
- 'dependency' => array('enable_logo_image', '==', 'true'),
- ),
- array(
- 'id' => 'logo_text',
- 'type' => 'text',
- 'title' => 'Logo text',
- 'dependency' => array('enable_logo_image', '==', 'false'),
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_typography_setting',
- 'title' => 'Typographyo Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'body_font',
- 'type' => 'typography',
- 'title' => 'Body Font',
- 'default' => array(
- 'family' => 'Titillium Web',
- 'variant' => '700',
- 'font' => 'google',
- ),
- ),
- array(
- 'id' => 'heading_font',
- 'type' => 'typography',
- 'title' => 'Heading Font',
- 'default' => array(
- 'family' => 'Roboto',
- 'variant' => '700',
- 'font' => 'google',
- ),
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_styling_setting',
- 'title' => 'Styling Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'enable_preloader',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Enable Preloader',
- ),
- array(
- 'id' => 'enable_box_layout',
- 'type' => 'switcher',
- 'default' => false,
- 'title' => 'Enable Box Layout',
- ),
- array(
- 'id' => 'body_bg',
- 'type' => 'image',
- 'title' => 'Body Background Image',
- 'dependency'=> array('enable_box_layout', '==', 'true')
- ),
- array(
- 'id' => 'body_bg_repeat',
- 'type' => 'select',
- 'title' => 'Body Background Repeat',
- 'default' => 'repeat',
- 'options' => array(
- 'repeat' => 'Repeat',
- 'no-repeat' => 'No Repeat',
- 'cover' => 'Cover',
- ),
- 'dependency'=> array('enable_box_layout', '==', 'true')
- ),
- array(
- 'id' => 'body_bg_attachment',
- 'type' => 'select',
- 'title' => 'Body Background Attachment',
- 'default' => 'scroll',
- 'options' => array(
- 'scroll' => 'Scroll',
- 'fixed' => 'Fixed',
- ),
- 'dependency'=> array('enable_box_layout', '==', 'true')
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_blog_setting',
- 'title' => 'Blog Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'display_post_by',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Display Post By?',
- ),
- array(
- 'id' => 'display_post_date',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Display Post Date?',
- ),
- array(
- 'id' => 'display_post_commetn_count',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Display Comment Count?',
- ),
- array(
- 'id' => 'display_post_category',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Display Post Category?',
- ),
- array(
- 'id' => 'display_post_tag',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Display Post Tag?',
- ),
- array(
- 'id' => 'display_post_nav',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => 'Enable next Pre link?',
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_footer_setting',
- 'title' => 'Footer Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'footer_bg_color',
- 'type' => 'color_picker',
- 'default' => '#131313',
- 'title' => 'Footer background Color',
- ),
- array(
- 'id' => 'footer_text_color',
- 'type' => 'color_picker',
- 'default' => '#9d9d9d',
- 'title' => 'Footer Text Color',
- ),
- array(
- 'id' => 'footer_heading_color',
- 'type' => 'color_picker',
- 'default' => '#ffffff',
- 'title' => 'Footer Text Color',
- ),
- array(
- 'id' => 'footer_copyright_text',
- 'type' => 'textarea',
- 'default' => 'Copyright © 2016, All Rights Reserved',
- 'title' => 'Footer Copyright text',
- ),
- )
- );
- $options[] = array(
- 'name' => 'stock_script_setting',
- 'title' => 'Script Setting',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'head_script',
- 'type' => 'textarea',
- 'sanitize' => false,
- 'title' => 'Head Script',
- 'desc' => 'Scripts Goes before closing </ head >',
- ),
- array(
- 'id' => 'body_start_script',
- 'type' => 'textarea',
- 'sanitize' => false,
- 'title' => 'Body Start Script',
- 'desc' => 'Scripts Goes after closing < body >',
- ),
- array(
- 'id' => 'body_end_script',
- 'type' => 'textarea',
- 'sanitize' => false,
- 'title' => 'Body End Script',
- 'desc' => 'Scripts Goes before closing </ body >',
- ),
- )
- );
- return $options;
- }
- add_filter( 'cs_framework_options', 'stock_theme_option' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement