Viewing File: /home/maglabs/2vsa/wp-content/themes/cargohub/inc/backend/customizer.php
<?php
/**
* CargoHub theme customizer
*
* @package CargoHub
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class CargoHub_Customize {
/**
* Customize settings
*
* @var array
*/
protected $config = array();
/**
* The class constructor
*
* @param array $config
*/
public function __construct( $config ) {
$this->config = $config;
if ( ! class_exists( 'Kirki' ) ) {
return;
}
$this->register();
}
/**
* Register settings
*/
public function register() {
/**
* Add the theme configuration
*/
if ( ! empty( $this->config['theme'] ) ) {
Kirki::add_config(
$this->config['theme'], array(
'capability' => 'edit_theme_options',
'option_type' => 'theme_mod',
)
);
}
/**
* Add panels
*/
if ( ! empty( $this->config['panels'] ) ) {
foreach ( $this->config['panels'] as $panel => $settings ) {
Kirki::add_panel( $panel, $settings );
}
}
/**
* Add sections
*/
if ( ! empty( $this->config['sections'] ) ) {
foreach ( $this->config['sections'] as $section => $settings ) {
Kirki::add_section( $section, $settings );
}
}
/**
* Add fields
*/
if ( ! empty( $this->config['theme'] ) && ! empty( $this->config['fields'] ) ) {
foreach ( $this->config['fields'] as $name => $settings ) {
if ( ! isset( $settings['settings'] ) ) {
$settings['settings'] = $name;
}
Kirki::add_field( $this->config['theme'], $settings );
}
}
}
/**
* Get config ID
*
* @return string
*/
public function get_theme() {
return $this->config['theme'];
}
/**
* Get customize setting value
*
* @param string $name
*
* @return bool|string
*/
public function get_option( $name ) {
$default = $this->get_option_default( $name );
return get_theme_mod( $name, $default );
}
/**
* Get default option values
*
* @param $name
*
* @return mixed
*/
public function get_option_default( $name ) {
if ( ! isset( $this->config['fields'][$name] ) ) {
return false;
}
return isset( $this->config['fields'][$name]['default'] ) ? $this->config['fields'][$name]['default'] : false;
}
}
/**
* This is a short hand function for getting setting value from customizer
*
* @param string $name
*
* @return bool|string
*/
function cargohub_get_option( $name ) {
global $cargohub_customize;
if ( empty( $cargohub_customize ) ) {
return false;
}
if ( class_exists( 'Kirki' ) ) {
$value = Kirki::get_option( $cargohub_customize->get_theme(), $name );
} else {
$value = $cargohub_customize->get_option( $name );
}
return apply_filters( 'cargohub_get_option', $value, $name );
}
/**
* Get default option values
*
* @param $name
*
* @return mixed
*/
function cargohub_get_option_default( $name ) {
global $cargohub_customize;
if ( empty( $cargohub_customize ) ) {
return false;
}
return $cargohub_customize->get_option_default( $name );
}
/**
* Move some default sections to `general` panel that registered by theme
*
* @param object $wp_customize
*/
function cargohub_customize_modify( $wp_customize ) {
$wp_customize->get_section( 'title_tagline' )->panel = 'general';
$wp_customize->get_section( 'static_front_page' )->panel = 'general';
}
add_action( 'customize_register', 'cargohub_customize_modify' );
/**
* Customizer register
*/
$cargohub_customize = new CargoHub_Customize(
array(
'theme' => 'cargohub',
'panels' => array(
'general' => array(
'priority' => 10,
'title' => esc_html__( 'General', 'cargohub' ),
),
'typography' => array(
'priority' => 10,
'title' => esc_html__( 'Typography', 'cargohub' ),
),
'styling' => array(
'priority' => 20,
'title' => esc_html__( 'Styling', 'cargohub' ),
),
'layout' => array(
'title' => esc_html__( 'Layout', 'cargohub' ),
'priority' => 30,
),
'header' => array(
'priority' => 200,
'title' => esc_html__( 'Header', 'cargohub' ),
),
'content' => array(
'title' => esc_html__( 'Content', 'cargohub' ),
'priority' => 300,
),
'footer' => array(
'title' => esc_html__( 'Footer', 'cargohub' ),
'description' => '',
'priority' => 350,
'capability' => 'edit_theme_options',
),
),
'sections' => array(
'body_typo' => array(
'title' => esc_html__( 'Body', 'cargohub' ),
'description' => '',
'priority' => 210,
'capability' => 'edit_theme_options',
'panel' => 'typography',
),
'heading_typo' => array(
'title' => esc_html__( 'Heading', 'cargohub' ),
'description' => '',
'priority' => 210,
'capability' => 'edit_theme_options',
'panel' => 'typography',
),
'header_typo' => array(
'title' => esc_html__( 'Header', 'cargohub' ),
'description' => '',
'priority' => 210,
'capability' => 'edit_theme_options',
'panel' => 'typography',
),
'footer_typo' => array(
'title' => esc_html__( 'Footer', 'cargohub' ),
'description' => '',
'priority' => 210,
'capability' => 'edit_theme_options',
'panel' => 'typography',
),
'background' => array(
'title' => esc_html__( 'Background', 'cargohub' ),
'description' => '',
'priority' => 15,
'capability' => 'edit_theme_options',
),
'topbar' => array(
'title' => esc_html__( 'Topbar', 'cargohub' ),
'description' => '',
'priority' => 5,
'capability' => 'edit_theme_options',
'panel' => 'header',
),
'site_layout' => array(
'title' => esc_html__( 'Site Layout', 'cargohub' ),
'description' => '',
'priority' => 10,
'capability' => 'edit_theme_options',
'panel' => 'layout',
),
'color_scheme' => array(
'title' => esc_html__( 'Color Scheme', 'cargohub' ),
'description' => '',
'priority' => 210,
'capability' => 'edit_theme_options',
'panel' => 'styling',
),
'header' => array(
'title' => esc_html__( 'Header', 'cargohub' ),
'description' => '',
'priority' => 10,
'capability' => 'edit_theme_options',
'panel' => 'header',
),
'logo' => array(
'title' => esc_html__( 'Logo', 'cargohub' ),
'description' => '',
'priority' => 15,
'capability' => 'edit_theme_options',
'panel' => 'header',
),
'page_header' => array(
'title' => esc_html__( 'Page Header', 'cargohub' ),
'description' => '',
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'header',
),
'excerpt_length_section' => array(
'title' => esc_html__( 'Excerpt Length', 'cargohub' ),
'description' => '',
'priority' => 5,
'capability' => 'edit_theme_options',
'panel' => 'content',
),
'blog' => array(
'title' => esc_html__( 'Blog', 'cargohub' ),
'description' => '',
'priority' => 10,
'capability' => 'edit_theme_options',
'panel' => 'content',
),
'projects' => array(
'title' => esc_html__( 'Projects', 'cargohub' ),
'description' => '',
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'content',
),
'single_project' => array(
'title' => esc_html__( 'Single Project', 'cargohub' ),
'description' => '',
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'content',
),
'services' => array(
'title' => esc_html__( 'Services', 'cargohub' ),
'description' => '',
'priority' => 30,
'capability' => 'edit_theme_options',
'panel' => 'content',
),
'footer_setting' => array(
'title' => esc_html__( 'Footer Setting', 'cargohub' ),
'description' => '',
'priority' => 350,
'capability' => 'edit_theme_options',
'panel' => 'footer',
),
'footer_layout' => array(
'title' => esc_html__( 'Footer Layout', 'cargohub' ),
'description' => '',
'priority' => 350,
'capability' => 'edit_theme_options',
'panel' => 'footer',
),
'footer_extra' => array(
'title' => esc_html__( 'Footer Extra', 'cargohub' ),
'description' => '',
'priority' => 350,
'capability' => 'edit_theme_options',
'panel' => 'footer',
),
),
'fields' => array(
// Typography
'body_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Body', 'cargohub' ),
'section' => 'body_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Open Sans',
'variant' => '300',
'font-size' => '16px',
'line-height' => '1.6',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#848484',
'text-transform' => 'none',
),
),
'heading1_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Heading 1', 'cargohub' ),
'section' => 'heading_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'font-size' => '36px',
'line-height' => '1.5',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#222222',
'text-transform' => 'none',
),
),
'heading2_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Heading 2', 'cargohub' ),
'section' => 'heading_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'font-size' => '30px',
'line-height' => '1.5',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#222222',
'text-transform' => 'none',
),
),
'heading3_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Heading 3', 'cargohub' ),
'section' => 'heading_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'font-size' => '24px',
'line-height' => '1.5',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#222222',
'text-transform' => 'none',
),
),
'heading4_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Heading 4', 'cargohub' ),
'section' => 'heading_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'font-size' => '18px',
'line-height' => '1.5',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#222222',
'text-transform' => 'none',
),
),
'heading5_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Heading 5', 'cargohub' ),
'section' => 'heading_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'font-size' => '16px',
'line-height' => '1.5',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#222222',
'text-transform' => 'none',
),
),
'heading6_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Heading 6', 'cargohub' ),
'section' => 'heading_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'font-size' => '12px',
'line-height' => '1.5',
'letter-spacing' => '0',
'subsets' => array( 'latin-ext' ),
'color' => '#222222',
'text-transform' => 'none',
),
),
'menu_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Menu', 'cargohub' ),
'section' => 'header_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'subsets' => array( 'latin-ext' ),
'font-size' => '14px',
'color' => '#fff',
'text-transform' => 'none',
),
),
'footer_text_typo' => array(
'type' => 'typography',
'label' => esc_html__( 'Footer Text', 'cargohub' ),
'section' => 'footer_typo',
'priority' => 10,
'default' => array(
'font-family' => 'Open Sans',
'variant' => '300',
'subsets' => array( 'latin-ext' ),
'font-size' => '16px',
),
),
// Background
'404_bg' => array(
'type' => 'image',
'label' => esc_html__( '404 Page', 'cargohub' ),
'description' => esc_html__( 'Background image for not found page', 'cargohub' ),
'section' => 'background',
'default' => '',
'priority' => 10,
),
// Layout
'layout_default' => array(
'type' => 'radio-image',
'label' => esc_html__( 'Default Layout', 'cargohub' ),
'description' => esc_html__( 'Default layout for blog and posts', 'cargohub' ),
'section' => 'site_layout',
'default' => 'no-sidebar',
'priority' => 10,
'choices' => array(
'no-sidebar' => get_template_directory_uri() . '/img/sidebars/empty.png',
'single-left' => get_template_directory_uri() . '/img/sidebars/single-left.png',
'single-right' => get_template_directory_uri() . '/img/sidebars/single-right.png',
),
),
'layout_page' => array(
'type' => 'radio-image',
'label' => esc_html__( 'Page Layout', 'cargohub' ),
'description' => esc_html__( 'Default layout pages', 'cargohub' ),
'section' => 'site_layout',
'default' => 'no-sidebar',
'priority' => 10,
'choices' => array(
'no-sidebar' => get_template_directory_uri() . '/img/sidebars/empty.png',
'single-left' => get_template_directory_uri() . '/img/sidebars/single-left.png',
'single-right' => get_template_directory_uri() . '/img/sidebars/single-right.png',
),
),
'layout_service' => array(
'type' => 'radio-image',
'label' => esc_html__( 'Service Layout', 'cargohub' ),
'description' => esc_html__( 'Default layout service archive and service categories', 'cargohub' ),
'section' => 'site_layout',
'default' => 'no-sidebar',
'priority' => 10,
'choices' => array(
'no-sidebar' => get_template_directory_uri() . '/img/sidebars/empty.png',
'single-left' => get_template_directory_uri() . '/img/sidebars/single-left.png',
'single-right' => get_template_directory_uri() . '/img/sidebars/single-right.png',
),
),
'layout_project' => array(
'type' => 'radio-image',
'label' => esc_html__( 'Project Layout', 'cargohub' ),
'description' => esc_html__( 'Default layout project archive and project categories', 'cargohub' ),
'section' => 'site_layout',
'default' => 'no-sidebar',
'priority' => 10,
'choices' => array(
'no-sidebar' => get_template_directory_uri() . '/img/sidebars/empty.png',
'single-left' => get_template_directory_uri() . '/img/sidebars/single-left.png',
'single-right' => get_template_directory_uri() . '/img/sidebars/single-right.png',
),
),
// Topbar
'topbar_enable' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show topbar', 'cargohub' ),
'section' => 'topbar',
'default' => 1,
'priority' => 10,
),
'topbar_mobile' => array(
'type' => 'toggle',
'label' => esc_html__( 'Hide topbar on mobile', 'cargohub' ),
'section' => 'topbar',
'default' => 1,
'priority' => 15,
),
'topbar_bg_color' => array(
'type' => 'color',
'label' => esc_html__( 'Topbar Background Color', 'cargohub' ),
'description' => esc_html__( 'Background Color for topbar area', 'cargohub' ),
'section' => 'topbar',
'default' => '',
'priority' => 20,
),
// Color Scheme
'color_scheme' => array(
'type' => 'radio-image',
'label' => esc_html__( 'Base Color Scheme', 'cargohub' ),
'default' => '0|0',
'section' => 'color_scheme',
'priority' => 10,
'choices' => array(
'0|0' => get_template_directory_uri() . '/img/color/color-1.png',
'#00baff|#0c1239' => get_template_directory_uri() . '/img/color/color-2.png',
'#ee6012|#202020' => get_template_directory_uri() . '/img/color/color-3.png',
'#f6a604|#0032ab' => get_template_directory_uri() . '/img/color/color-4.png',
),
),
'custom_color_scheme' => array(
'type' => 'toggle',
'label' => esc_html__( 'Custom Color Scheme', 'cargohub' ),
'default' => 0,
'section' => 'color_scheme',
'priority' => 10,
),
'custom_color_1' => array(
'type' => 'color',
'label' => esc_html__( 'Color Primary', 'cargohub' ),
'default' => '',
'section' => 'color_scheme',
'priority' => 10,
'active_callback' => array(
array(
'setting' => 'custom_color_scheme',
'operator' => '==',
'value' => 1,
),
),
),
'custom_color_2' => array(
'type' => 'color',
'label' => esc_html__( 'Color Secondary', 'cargohub' ),
'default' => '',
'section' => 'color_scheme',
'priority' => 10,
'active_callback' => array(
array(
'setting' => 'custom_color_scheme',
'operator' => '==',
'value' => 1,
),
),
),
// Header layout
'header_layout' => array(
'type' => 'select',
'label' => esc_html__( 'Header Layout', 'cargohub' ),
'section' => 'header',
'default' => 'v1',
'priority' => 10,
'choices' => array(
'v1' => esc_html__( 'Header v1', 'cargohub' ),
'v2' => esc_html__( 'Header v2', 'cargohub' ),
'v3' => esc_html__( 'Header v3', 'cargohub' ),
'v4' => esc_html__( 'Header v4', 'cargohub' ),
),
),
'enable_extra_item' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Menu Extra Item', 'cargohub' ),
'default' => 1,
'section' => 'header',
'priority' => 10,
),
'extra_item' => array(
'type' => 'select',
'label' => esc_html__( 'Menu Extra Item', 'cargohub' ),
'section' => 'header',
'default' => 'button',
'priority' => 10,
'choices' => array(
'button' => esc_html__( 'Button', 'cargohub' ),
'search' => esc_html__( 'Search', 'cargohub' ),
),
'active_callback' => array(
array(
'setting' => 'enable_extra_item',
'operator' => '==',
'value' => true,
),
),
),
'header_button_link' => array(
'type' => 'text',
'label' => esc_html__( 'Button Link', 'cargohub' ),
'section' => 'header',
'priority' => 10,
'active_callback' => array(
array(
'setting' => 'extra_item',
'operator' => '==',
'value' => 'button',
),
),
),
'header_button_text' => array(
'type' => 'text',
'label' => esc_html__( 'Button Text', 'cargohub' ),
'section' => 'header',
'priority' => 10,
'active_callback' => array(
array(
'setting' => 'extra_item',
'operator' => '==',
'value' => 'button',
),
),
),
'header_sticky' => array(
'type' => 'toggle',
'label' => esc_html__( 'Sticky Header', 'cargohub' ),
'default' => 0,
'section' => 'header',
'priority' => 40,
),
// Logo
'logo_dark' => array(
'type' => 'image',
'label' => esc_html__( 'Logo', 'cargohub' ),
'section' => 'logo',
'default' => '',
'priority' => 10,
),
'logo_light' => array(
'type' => 'image',
'label' => esc_html__( 'Logo Light', 'cargohub' ),
'section' => 'logo',
'default' => '',
'priority' => 10,
),
'logo_width' => array(
'type' => 'number',
'label' => esc_html__( 'Logo Width', 'cargohub' ),
'section' => 'logo',
'default' => '',
'priority' => 10,
),
'logo_height' => array(
'type' => 'number',
'label' => esc_html__( 'Logo Height', 'cargohub' ),
'section' => 'logo',
'default' => '',
'priority' => 10,
),
'logo_position' => array(
'type' => 'spacing',
'label' => esc_html__( 'Logo Margin', 'cargohub' ),
'section' => 'logo',
'priority' => 10,
'default' => array(
'top' => '0',
'bottom' => '0',
'left' => '0',
'right' => '0',
),
),
// Page header
'page_header_enable' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Page Header', 'cargohub' ),
'section' => 'page_header',
'default' => 1,
'priority' => 10,
),
'show_title' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Title of Page Header', 'cargohub' ),
'section' => 'page_header',
'default' => 1,
'priority' => 10,
),
'show_breadcrumb' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Breadcrumb', 'cargohub' ),
'section' => 'page_header',
'default' => 1,
'priority' => 10,
),
'page_header_social' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Socials Share', 'cargohub' ),
'section' => 'page_header',
'default' => 0,
'priority' => 10,
),
'page_header_bg' => array(
'type' => 'image',
'label' => esc_html__( 'Page Header Image', 'cargohub' ),
'description' => esc_html__( 'The default background image for page header', 'cargohub' ),
'section' => 'page_header',
'default' => '',
'priority' => 10,
),
// Content
'excerpt_length' => array(
'type' => 'number',
'label' => esc_html__( 'Excerpt Length', 'cargohub' ),
'section' => 'excerpt_length_section',
'default' => 20,
'priority' => 10,
),
'blog_layout' => array(
'type' => 'radio',
'label' => esc_html__( 'Blog Layout', 'cargohub' ),
'section' => 'blog',
'default' => 'classic',
'priority' => 20,
'choices' => array(
'classic' => esc_html__( 'Classic', 'cargohub' ),
'grid' => esc_html__( 'Grid', 'cargohub' ),
),
),
'blog_grid_columns' => array(
'type' => 'select',
'label' => esc_html__( 'Blog Grid Columns', 'cargohub' ),
'section' => 'blog',
'default' => '2',
'priority' => 30,
'choices' => array(
'2' => esc_html__( '2 Columns', 'cargohub' ),
'3' => esc_html__( '3 Columns', 'cargohub' ),
'4' => esc_html__( '4 Columns', 'cargohub' ),
),
'active_callback' => array(
array(
'setting' => 'blog_layout',
'operator' => '==',
'value' => 'grid',
),
),
),
'show_author_box' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Author Box', 'cargohub' ),
'section' => 'blog',
'default' => 0,
'priority' => 30,
),
'single_social_share' => array(
'type' => 'toggle',
'label' => esc_html__( 'Social Share', 'cargohub' ),
'description' => esc_html__( 'Show Social Share in Single Post', 'cargohub' ),
'section' => 'blog',
'default' => 0,
'priority' => 30,
),
'entry_meta' => array(
'type' => 'sortable',
'label' => esc_html__( 'Entry Meta', 'cargohub' ),
'description' => esc_html__( 'Drag and drop these fields to re-order the element of entry meta', 'cargohub' ),
'section' => 'blog',
'default' => array( 'author', 'cat', 'comment' ),
'choices' => array(
'author' => esc_html__( 'Author', 'cargohub' ),
'cat' => esc_html__( 'Category', 'cargohub' ),
'comment' => esc_html__( 'Comment', 'cargohub' ),
),
'priority' => 40,
),
'project_per_page' => array(
'type' => 'number',
'label' => esc_html__( 'Project Per Page', 'cargohub' ),
'section' => 'projects',
'default' => 10,
'priority' => 10,
),
'project_columns' => array(
'type' => 'select',
'label' => esc_html__( 'Project Columns', 'cargohub' ),
'section' => 'projects',
'default' => '2',
'priority' => 30,
'choices' => array(
'2' => esc_html__( '2 Columns', 'cargohub' ),
'3' => esc_html__( '3 Columns', 'cargohub' ),
'4' => esc_html__( '4 Columns', 'cargohub' ),
),
),
'project_filter' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Nav Filter', 'cargohub' ),
'section' => 'projects',
'default' => 1,
'priority' => 30,
),
'project_nav_type' => array(
'type' => 'radio',
'label' => esc_html__( 'Navigation Type', 'cargohub' ),
'section' => 'projects',
'priority' => 30,
'default' => 'ajax',
'choices' => array(
'link' => esc_html__( 'Numeric', 'cargohub' ),
'ajax' => esc_html__( 'Ajax', 'cargohub' ),
),
),
'single_project_social' => array(
'type' => 'repeater',
'label' => esc_html__( 'Socials', 'cargohub' ),
'section' => 'single_project',
'priority' => 60,
'default' => array(
array(
'link_url' => 'https://facebook.com/',
),
array(
'link_url' => 'https://twitter.com/',
),
array(
'link_url' => 'https://dribbble.com/',
),
array(
'link_url' => 'https://www.skype.com/en/',
),
array(
'link_url' => 'https://plus.google.com/',
),
),
'fields' => array(
'link_url' => array(
'type' => 'text',
'label' => esc_html__( 'Social URL', 'cargohub' ),
'description' => esc_html__( 'Enter the URL for this social', 'cargohub' ),
'default' => '',
),
),
),
'service_per_page' => array(
'type' => 'number',
'label' => esc_html__( 'Service Per Page', 'cargohub' ),
'section' => 'services',
'default' => 6,
'priority' => 60,
),
// Footer
'back_to_top' => array(
'type' => 'toggle',
'label' => esc_html__( 'Back to Top', 'cargohub' ),
'section' => 'footer_setting',
'default' => 1,
'priority' => 10,
),
'footer_widget' => array(
'type' => 'toggle',
'label' => esc_html__( 'Foot Widgets', 'cargohub' ),
'section' => 'footer_setting',
'default' => 1,
'priority' => 10,
),
'footer_contact' => array(
'type' => 'toggle',
'label' => esc_html__( 'Foot Contact', 'cargohub' ),
'section' => 'footer_setting',
'default' => 1,
'priority' => 10,
),
'footer_copyright' => array(
'type' => 'textarea',
'label' => esc_html__( 'Footer Copyright', 'cargohub' ),
'section' => 'footer_setting',
'default' => esc_html__( 'Copyright @ 2017', 'cargohub' ),
'priority' => 10,
),
'footer_text' => array(
'type' => 'textarea',
'label' => esc_html__( 'Footer Text', 'cargohub' ),
'section' => 'footer_setting',
'default' => '',
'priority' => 10,
),
'footer_widget_columns' => array(
'type' => 'radio-image',
'label' => esc_html__( 'Footer Widget Columns', 'cargohub' ),
'description' => esc_html__( 'How many sidebar you want to show on footer', 'cargohub' ),
'section' => 'footer_setting',
'default' => '4',
'priority' => 10,
'choices' => array(
'1' => get_template_directory_uri() . '/img/footer/one-column.png',
'2' => get_template_directory_uri() . '/img/footer/two-columns.png',
'3' => get_template_directory_uri() . '/img/footer/three-columns.png',
'4' => get_template_directory_uri() . '/img/footer/four-columns.png',
),
),
'footer_widget_bg' => array(
'type' => 'image',
'label' => esc_html__( 'Footer Widget Background', 'cargohub' ),
'description' => esc_html__( 'Background image for footer widget area', 'cargohub' ),
'section' => 'footer_layout',
'default' => '',
'priority' => 15,
),
'footer_widget_bg_color' => array(
'type' => 'color',
'label' => esc_html__( 'Footer Widget Background Color', 'cargohub' ),
'description' => esc_html__( 'Background Color for footer widget area', 'cargohub' ),
'section' => 'footer_layout',
'default' => '#0c1239',
'priority' => 20,
),
'footer_bg_color' => array(
'type' => 'color',
'label' => esc_html__( 'Footer Background Color', 'cargohub' ),
'description' => esc_html__( 'Background Color for footer area', 'cargohub' ),
'section' => 'footer_layout',
'default' => '#232951',
'priority' => 25,
),
'footer_extra_el' => array(
'type' => 'toggle',
'label' => esc_html__( 'Show Footer Extra', 'cargohub' ),
'section' => 'footer_extra',
'default' => 1,
),
'footer_logo' => array(
'type' => 'image',
'label' => esc_html__( 'Footer Logo', 'cargohub' ),
'section' => 'footer_extra',
'default' => '',
),
'footer_extra_address' => array(
'type' => 'textarea',
'label' => esc_html__( 'Footer Extra Address', 'cargohub' ),
'description' => esc_html__( 'Allow Shortcode', 'cargohub' ),
'section' => 'footer_extra',
'default' => '',
),
'footer_extra_phone' => array(
'type' => 'textarea',
'label' => esc_html__( 'Footer Extra Phone', 'cargohub' ),
'description' => esc_html__( 'Allow Shortcode', 'cargohub' ),
'section' => 'footer_extra',
'default' => '',
),
'footer_extra_date' => array(
'type' => 'textarea',
'label' => esc_html__( 'Footer Extra Date', 'cargohub' ),
'description' => esc_html__( 'Allow Shortcode', 'cargohub' ),
'section' => 'footer_extra',
'default' => '',
),
),
)
);
Back to Directory
File Manager