'Theme settings',
'menu_type' => 'add_theme_page',
'menu_slug' => 'cs-framework',
'ajax_save' => false,
);
// ===============================================================================================
// -----------------------------------------------------------------------------------------------
// FRAMEWORK OPTIONS
// -----------------------------------------------------------------------------------------------
// ===============================================================================================
$options = array();
// ----------------------------------------
// a option section for logo -
// ----------------------------------------
$admin_logo_id = cs_get_option( 'admin_logo' );
$admin_logo = wp_get_attachment_image_src( $admin_logo_id, 'full' );
$options[] = array(
'name' => 'logo-option',
'title' => 'Logo',
'icon' => 'fa fa-picture-o',
'fields' => array(
array(
'id' => 'logo',
'type' => 'upload',
'title' => 'Upload Logo',
'before' => '.')
',
'default' => get_template_directory_uri() . '/images/logo.png',
),
array(
'id' => 'flogo',
'type' => 'upload',
'title' => 'Upload Footer Logo',
'before' => '
',
'default' => get_template_directory_uri() . '/images/logo.png',
),
array(
'id' => 'favicon',
'type' => 'upload',
'title' => 'Upload favicon',
'before' => '
',
'default' => get_template_directory_uri() . '/images/favicon.png',
),
array(
'id' => 'admin_logo',
'type' => 'upload',
'title' => 'Upload admin logo',
'before' => '
',
'default' => get_template_directory_uri() . '/images/logoAdmin.png',
),
)
);
// ----------------------------------------
// a option section for home slider -
// ----------------------------------------
$options[] = array(
'name' => 'home-slider-option',
'title' => 'Home slider',
'icon' => 'fa fa-sliders',
'fields' => array(
array(
'id' => 'home_slider_group',
'type' => 'group',
'title' => 'Home slider',
'button_title' => 'Add New recipe',
'accordion_title' => 'Add New recipe',
'fields' => array(
array(
'id' => 'slider_post_name',
'type' => 'text',
'title' => 'Name',
),
array(
'id' => 'slider_post',
'type' => 'select',
'title' => 'Select Recipes',
'options' => 'posts',
'query_args' => array(
'post_type' => 'recipes',
'posts_per_page' => -1
),
'default_option' => 'Select recipe'
),
)
),
)
);
// ----------------------------------------
// a option section for Hot recipe -
// ----------------------------------------
$options[] = array(
'name' => 'hot_recipe-slider-option',
'title' => 'Hot Recipe',
'icon' => 'fa fa-fire',
'fields' => array(
array(
'id' => 'hot_recipe_title',
'type' => 'text',
'title' => 'Title',
),
array(
'id' => 'hot_recipe_slider_group',
'type' => 'group',
'title' => 'Hot Recipe',
'button_title' => 'Add New recipe',
'accordion_title' => 'Add New recipe',
'fields' => array(
array(
'id' => 'hot_recipe_post_name',
'type' => 'text',
'title' => 'Name',
),
array(
'id' => 'hot_recipe_post',
'type' => 'select',
'title' => 'Select recipe',
'options' => 'posts',
'query_args' => array(
'post_type' => 'recipes',
'posts_per_page' => -1
),
'default_option' => 'Select recipe'
),
)
),
)
);
// ----------------------------------------
// a option section for social -
// ----------------------------------------
$options[] = array(
'name' => 'social',
'title' => 'Social',
'icon' => 'fa fa-share-square-o',
// begin: fields
'fields' => array(
array(
'id' => 'home_social_group',
'type' => 'group',
'title' => 'Social',
'button_title' => 'Add New link',
'accordion_title' => 'Add New link',
'fields' => array(
array(
'id' => 'social_icon',
'type' => 'icon',
'title' => 'Social Icon',
),
array(
'id' => 'social_link',
'type' => 'text',
'title' => 'Social link',
),
)
),
), // end: fields
);
// ----------------------------------------
// a option section for style -
// ----------------------------------------
$options[] = array(
'name' => 'style',
'title' => 'Style',
'icon' => 'fa fa-paint-brush',
'fields' => array(
array(
'id' => 'body_font',
'type' => 'typography',
'title' => 'Body Font',
'default' => array(
'family' => 'Roboto',
'font' => 'google', // this is helper for output ( google, websafe, custom )
'variant' => 'regular',
),
),
array(
'id' => 'body_font_size',
'type' => 'number',
'title' => 'Body Font size',
'default' => '12',
),
array(
'id' => 'background_theme',
'type' => 'background',
'title' => 'Background Field with Default',
'default' => array(
'image' => esc_url(home_url()) . '/wp-content/themes/bigrecipe/images/table_back.jpg',
'repeat' => 'repeat-y',
'position' => 'center center',
'attachment' => 'fixed',
'color' => '#383838',
),
),
),
);
// ----------------------------------------
// a option section for footer -
// ----------------------------------------
$options[] = array(
'name' => 'footer',
'title' => 'Footer',
'icon' => 'fa fa-cogs',
'fields' => array(
array(
'id' => 'copyright_text',
'type' => 'text',
'title' => 'Copyright',
),
),
);
// ----------------------------------------
// a option section for custom code -
// ----------------------------------------
$options[] = array(
'name' => 'custom_code',
'title' => 'Custom code',
'icon' => 'fa fa-code',
'fields' => array(
array(
'id' => 'custom_css',
'type' => 'textarea',
'title' => 'Custom css',
'desc' => 'code inside < style>',
),
array(
'id' => 'custom_head_js',
'type' => 'textarea',
'title' => 'Custom head js',
'desc' => 'code inside < script>',
),
array(
'id' => 'custom_before_body_js',
'type' => 'textarea',
'title' => 'Custom before body js',
'desc' => 'code inside < script>',
),
array(
'id' => 'custom_footer_js',
'type' => 'textarea',
'title' => 'Custom footer js',
'desc' => 'code inside < script>',
),
),
);
// ----------------------------------------
// a option section for contact page -
// ----------------------------------------
$options[] = array(
'name' => 'contact_page',
'title' => 'Contact page',
'icon' => 'fa fa-phone',
'fields' => array(
array(
'id' => 'contact_form_email',
'type' => 'text',
'title' => 'Contact form email',
),
array(
'id' => 'recaptcha_site_key',
'type' => 'text',
'title' => 'Recaptcha site key',
),
array(
'id' => 'recaptcha_secret_key',
'type' => 'text',
'title' => 'Recaptcha secret key',
),
),
);
// ------------------------------
// donate -
// ------------------------------
$options[] = array(
'name' => 'donate_section',
'title' => 'Documentation',
'icon' => 'fa fa-book',
'fields' => array(
array(
'type' => 'heading',
'content' => 'You Guys!'
),
array(
'type' => 'content',
'content' => '
',
),
)
);
CSFramework::instance($settings, $options);