File: /home/awaldron/_domains/waldroninteractive.com/wp-content/themes/minione/includes/theme-options.php
<?php
if ( ! class_exists( 'OT_Loader' )){
function ot_get_option() {
return false;
}
function get_option_tree() {
return false;
}
}
/**
* Initialize the custom theme options.
*/
add_action( 'admin_init', 'custom_theme_options' );
/**
* Build the custom settings & update OptionTree.
*/
function custom_theme_options() {
/**
* Get a copy of the saved settings array.
*/
$saved_settings = get_option( 'option_tree_settings', array() );
/**
* Custom settings array that will eventually be
* passes to the OptionTree Settings API Class.
*/
$custom_settings = array(
'contextual_help' => array(
'sidebar' => ''
),
'sections' => array(
array(
'id' => 'general',
'title' => esc_html__('General Config','minione'),
),
array(
'id' => 'color_settings',
'title' => esc_html__('Color Settings','minione'),
),
array(
'id' => 'blog_settings',
'title' => esc_html__('Blog Settings','minione'),
),
array(
'id' => 'google_fonts',
'title' => esc_html__('Google Fonts','minione'),
),
array(
'id' => 'typography',
'title' => esc_html__('Typography','minione'),
),
array(
'id' => 'social',
'title' => esc_html__('Social','minione'),
),
array(
'id' => 'map_settings',
'title' => esc_html__('Map Settings','minione'),
),
array(
'id' => 'copyright',
'title' => esc_html__('Footer / Copyright','minione'),
)
),
'settings' => array(
array(
'label' => esc_html__( 'Logo', 'minione' ),
'id' => 'tab_logo',
'type' => 'tab',
'section' => 'general'
),
array(
'id' => 'minione_logo',
'label' => 'Logo Image',
'desc' => esc_html__('Upload your own logo.','minione'),
'std' => '',
'type' => 'upload',
'section' => 'general',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
),
array(
'id' => 'minione_logotext',
'label' => esc_html__('Logo Text','minione'),
'desc' => esc_html__('Add Logo Text','minione'),
'std' => '',
'type' => 'text',
'section' => 'general',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
),
array(
'id' => 'minione_main_color',
'label' => esc_html__('Main Color','minione'),
'desc' => esc_html__('Set a color for the main color of the theme.','minione'),
'std' => '#ffd504',
'type' => 'colorpicker',
'section' => 'color_settings',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
),
array(
'label' => esc_html__( 'Layouts', 'minione' ),
'id' => 'tab_layouts',
'type' => 'tab',
'section' => 'blog_settings'
),
array(
'id' => 'layout_set',
'label' => esc_html__( 'Blog Layout', 'minione' ),
'desc' => esc_html__( ' Left Sidebar - Right Sidebar - Full Width', 'minione' ),
'std' => 'right-sidebar',
'type' => 'radio-image',
'section' => 'blog_settings',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'id' => 'body_google_fonts',
'label' => esc_html__('Google Fonts','minione' ),
'desc' => esc_html__('Add Google Font and after the save settings follow these steps Dashboard > Appearance > Theme Options > Typography','minione' ),
'std' => '',
'type' => 'google-fonts',
'section' => 'google_fonts',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'General', 'minione' ),
'id' => 'tab_general',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'tipigrof',
'label' => esc_html__( 'Body Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'H1 Title', 'minione' ),
'id' => 'tab_h1title',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'h1_tipigrof',
'label' => esc_html__( 'H1 Title Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'H2 Title', 'minione' ),
'id' => 'tab_h2title',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'h2_tipigrof',
'label' => esc_html__( 'H2 Title Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'H3 Title', 'minione' ),
'id' => 'tab_h3title',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'h3_tipigrof',
'label' => esc_html__( 'H3 Title Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'H4 Title', 'minione' ),
'id' => 'tab_h4title',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'h4_tipigrof',
'label' => esc_html__( 'H4 Title Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'H5 Title', 'minione' ),
'id' => 'tab_h5title',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'h5_tipigrof',
'label' => esc_html__( 'H5 Title Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'H6 Title', 'minione' ),
'id' => 'tab_h6title',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'h6_tipigrof',
'label' => esc_html__( 'H6 Title Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'label' => esc_html__( 'P(Content)', 'minione' ),
'id' => 'tab_pcontent',
'type' => 'tab',
'section' => 'typography'
),
array(
'id' => 'p_tipigrof',
'label' => esc_html__( 'P(Content) Typography', 'minione' ),
'desc' => esc_html__('The Typography option type is for adding typography styles to your site.','minione' ),
'std' => '',
'type' => 'typography',
'section' => 'typography',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'id' => 'minione_socialicons',
'label' => esc_html__('Set Social Icon','minione' ),
'desc' => esc_html__('Create Social Icons','minione' ),
'std' => '',
'type' => 'list-item',
'section' => 'social',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => '',
'settings' => array(
array(
'id' => 'minione_sociallink',
'label' => esc_html__('Link','minione' ),
'desc' => esc_html__('Add Your Link','minione' ),
'std' => '',
'type' => 'text',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
),
array(
'id' => 'minione_socialicon',
'label' => esc_html__('Icon Name','minione' ),
'desc' => esc_html__('Add Your Icon : facebook','minione' ),
'std' => '',
'type' => 'text',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
)
)
),
array(
'id' => 'minione_mapapi',
'label' => esc_html__('Google Map Api Key','minione' ),
'desc' => esc_html__('Add your google map api key','minione' ),
'std' => '',
'type' => 'text',
'section' => 'map_settings',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
),
array(
'id' => 'minione_copyright',
'label' => esc_html__('Footer Copyright','minione' ),
'desc' => esc_html__('Footer Copyright','minione' ),
'std' => esc_html__('Copyright 2020.KlbTheme . All rights reserved','minione' ),
'type' => 'text',
'section' => 'copyright',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => ''
),
)
);
/* allow settings to be filtered before saving */
$custom_settings = apply_filters( 'option_tree_settings_args', $custom_settings );
/* settings are not the same update the DB */
if ( $saved_settings !== $custom_settings ) {
update_option( 'option_tree_settings', $custom_settings );
}
}