Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
- define( 'CS_ACTIVE_FRAMEWORK', true ); // Code star framework on
- define( 'CS_ACTIVE_METABOX', true ); // code star metabox on
- define( 'CS_ACTIVE_TAXONOMY', false ); // code star taxonomy off
- define( 'CS_ACTIVE_SHORTCODE', false ); // code star shortcode off
- define( 'CS_ACTIVE_CUSTOMIZE', false ); // code star coztomizer off
- define( 'CS_ACTIVE_LIGHT_THEME', true ); // Enable Light Theme for codestar framework
- // Theme Options (CSF Framework) Fields
- if(class_exists('CSFramework')) {
- // Ration Theme Option panel config
- function ration_cs_framework_options() {
- $ration_setting = array(
- 'menu_title' => __('Ration Options', 'ration'),
- 'menu_type' => 'menu',
- 'menu_slug' => 'ration_theme_options_panel',
- 'framework_title' => __('Ration Theme Options', 'ration'),
- 'ajax_save' => true,
- 'show_reset_all' => false
- );
- CSFramework::instance($ration_setting, array());
- }
- add_action('init', 'ration_cs_framework_options');
- // ration theme options panel fields
- function ration_theme_options_panel_fields($options) {
- $options[] = array(
- 'name' => 'ration_header_section_options',
- 'title' => __('Header', 'ration'),
- 'fields' => array(
- array(
- 'id' => 'ration_header_email',
- 'title' => __('Contact Email', 'ration'),
- 'type' => 'text',
- 'desc' => __('Input your contact email address.', 'ration'),
- ),
- array(
- 'id' => 'ration_header_office_time',
- 'title' => __('Office Time', 'ration'),
- 'type' => 'text',
- 'desc' => __('Write your office/delivery time here', 'ration'),
- 'default' => __('Mom-Sat 8.00- 18.00', 'ration'),
- ),
- array(
- 'id' => 'ration_header_socials',
- 'type' => 'group',
- 'title' => __('Social Profiles', 'ration'),
- 'button_title' => 'Add Profile',
- 'accordion_title' => 'Add New Profile',
- 'fields' => array(
- array(
- 'id' => 'ration_header_social_icon',
- 'type' => 'text',
- 'title' => __('Social Icon Name', 'ration'),
- ),
- array(
- 'id' => 'ration_header_social_url',
- 'type' => 'text',
- 'title' => __('Social profile url', 'ration'),
- ),
- ),
- ),
- ),
- );
- $options[] = array(
- 'name' => 'ration_genaral_section_options',
- 'title' => __('Genaral', 'ration'),
- 'fields' => array(
- array(
- 'id' => 'ration_second_logo',
- 'title' => __('Second Logo', 'ration'),
- 'type' => 'image',
- 'desc' => __('Upload Your second logo here, recommended dimensions width 223px, height: 60px', 'ration'),
- 'add_title' => 'Add Logo',
- ),
- ),
- );
- $options[] = array(
- 'name' => 'ration_slider_section_options',
- 'title' => __('Slider', 'ration'),
- 'fields' => array(
- array(
- 'id' => 'ration_one_off',
- 'title' => __('Slider Switch', 'ration'),
- 'type' => 'switcher',
- 'desc' => __('You can switch your front page slider', 'ration'),
- ),
- array(
- 'id' => 'ration_main_slider_count',
- 'title' => __('Slider Count', 'ration'),
- 'type' => 'text',
- 'desc' => __('How much slider will be show in front page?', 'ration'),
- ),
- array(
- 'id' => 'ration_slider_bg',
- 'title' => __('Slider Background', 'ration'),
- 'type' => 'image',
- 'desc' => __('Upload Your slider background image here, recommended dimensions width 1920px, height: 1000px', 'ration'),
- 'add_title' => __('Upload Slider Image', 'ration'),
- ),
- ),
- );
- return $options;
- }
- add_filter( 'cs_framework_options', 'ration_theme_options_panel_fields' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement