<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! function_exists( 'ken_load_redux_default_settings' ) ) {
  /**
   * Fallback default options or options saved in the db when ken core is not active.
   *
   * @since 4.3.0
   * 
   * @return void
   */
  function ken_load_redux_default_settings() {
    global $mk_settings;

    $mk_settings = get_option( 'mk_settings' );

    if ( is_array( $mk_settings ) && ! empty( $mk_settings ) ) {
      return;
    }

    $mk_settings_fallback_json = '{
        "res-nav-width": "1140",
        "grid-width": "1140",
        "content-width": "70",
        "breadcrumb": 1,
        "smooth-scroll": 1,
        "pages-comments": 0,
        "disable-quick-contact": 0,
        "email-quick-contact": "",
        "skin-quick-contact": 0,
        "favicon": {
          "url": ""
        },
        "logo": {
          "url": ""
        },
        "logo-retina": {
          "url": ""
        },
        "logo-light": {
          "url": ""
        },
        "logo-light-retina": {
          "url": ""
        },
        "mobile-logo": {
          "url": ""
        },
        "mobile-logo-retina": {
          "url": ""
        },
        "preloader-logo": {
          "url": ""
        },
        "header-structure": "standard",
        "fullheader-align": "top",
        "fullheader-logo": {
          "url": ""
        },
        "fullheader-font": {
          "font-family": "Open Sans",
          "google": true,
          "font-size": "20px",
          "line-height": "36px",
          "font-style": "bold",
          "color": "#fff"
        },
        "fullheader-overlay-color": "#565656",
        "fullheader-overlay-opacity": "100",
        "fullheader-overlay-image": {
          "url": ""
        },
        "fullheader-close-btn-color": "#ffffff",
        "fullheader-burger-color": "#222222",
        "header-location": "top",
        "vertical-header-state": "expanded",
        "vertical-header-align": "left",
        "header-vertical-width": "280",
        "header-padding": "30",
        "header-padding-vertical": "30",
        "header-align": "left",
        "nav-alignment": "left",
        "boxed-header": 1,
        "sticky-header": 1,
        "squeeze-sticky-header": 1,
        "header-border-top": 1,
        "header-border-bottom": 1,
        "header-search": 1,
        "header-search-location": "right",
        "header-wpml": 2,
        "page-title-pages": 1,
        "loggedin_menu": "primary-menu",
        "header-social-select": "header-section",
        "header-toolbar": 0,
        "header-toolbar-phone": "",
        "header-toolbar-phone-icon": "",
        "header-toolbar-email": "",
        "header-toolbar-email-icon": "",
        "toolbar-custom-menu": "",
        "header-social-facebook": "",
        "header-social-twitter": "",
        "header-social-rss": "",
        "header-social-dribbble": "",
        "header-social-pinterest": "",
        "header-social-instagram": "",
        "header-social-google-plus": "",
        "header-social-linkedin": "",
        "header-social-youtube": "",
        "header-social-vimeo": "",
        "header-social-spotify": "",
        "header-social-tumblr": "",
        "header-social-behance": "",
        "header-social-WhatsApp": "",
        "header-social-qzone": "",
        "header-social-vkcom": "",
        "header-social-imdb": "",
        "header-social-renren": "",
        "header-social-weibo": "",
        "hide-mobile-header": 1,
        "mobile-burger-color": "",
        "mobile-header-bg": "",
        "mobile-navigation-bg": "",
        "mobile-navigation-text-color": "",
        "mobile-navigation-text-size": "13",
        "mobile-header-search-bg": "",
        "mobile-header-search-color": "",
        "side-dashboard": 1,
        "side-dashboard-icon": "",
        "dashboard-bg": "#191919",
        "dashboard-title-color": "#959595",
        "dashboard-txt-color": "#6f6f6f",
        "dashboard-link-color": {
          "regular": "#afafaf",
          "hover": "#ff4351"
        },
        "footer": 1,
        "footer-type": "regular",
        "footer-width": "boxed",
        "footer-padding": "30",
        "footer-layout": "4",
        "sub-footer": 1,
        "footer-copyright": "Copyright All Rights Reserved",
        "subfooter-logos-src": {
          "url": ""
        },
        "subfooter-logos-link": "",
        "social-facebook": "",
        "social-twitter": "",
        "social-rss": "",
        "social-dribbble": "",
        "social-pinterest": "",
        "social-instagram": "",
        "social-google-plus": "",
        "social-linkedin": "",
        "social-youtube": "",
        "social-vimeo": "",
        "social-spotify": "",
        "social-tumblr": "",
        "social-behance": "",
        "social-whatsapp": "",
        "social-wechat": "",
        "social-qzone": "",
        "social-vkcom": "",
        "social-imdb": "",
        "social-renren": "",
        "social-weibo": "",
        "body-font": {
          "font-family": "Open Sans",
          "google": true,
          "font-size": "13px"
        },
        "heading-font": {
          "font-family": "",
          "google": true
        },
        "edge-slider-title-font": {
          "font-family": "",
          "google": true,
          "font-size": "13px",
          "font-weight": "bold"
        },
        "widget-title": {
          "font-family": "",
          "google": true,
          "font-size": "13px",
          "font-weight": "bold"
        },
        "page-title-size": "18",
        "p-text-size": "13",
        "p-line-height": "26",
        "main-nav-font": {
          "font-family": "",
          "google": true,
          "font-size": "12px",
          "font-weight": "bold"
        },
        "main-nav-item-space": "17",
        "vertical-nav-item-space": "10",
        "main-nav-top-transform": "uppercase",
        "sub-nav-top-size": "12",
        "sub-nav-top-transform": "uppercase",
        "sub-nav-top-weight": "normal",
        "footer-widget-title": {
          "font-weight": "Normal",
          "font-size": "13px",
          "letter-spacing": "0"
        },
        "footer-text-size": "13",
        "subfooter-text-size": "13",
        "subfooter-letter-spacing": "0",
        "typekit-info": "",
        "typekit-font-family": "",
        "typekit-element-names": "",
        "accent-color": "#ff4351",
        "body-txt-color": "#696969",
        "heading-color": "#393836",
        "link-color": {
          "regular": "#333333",
          "hover": "#ff4351"
        },
        "page-title-color": "#545454",
        "sidebar-title-color": "#555555",
        "sidebar-txt-color": "#666666",
        "sidebar-link-color": {
          "regular": "#444",
          "hover": "#ff4351"
        },
        "footer-title-color": "#959595",
        "footer-txt-color": "#6f6f6f",
        "footer-link-color": {
          "regular": "#afafaf",
          "hover": "#ff4351"
        },
        "sub-footer-border-top": 1,
        "footer-social-color": {
          "regular": "#666666",
          "hover": "#ff4351"
        },
        "footer-socket-color": "#666666",
        "widget-title-divider": 1,
        "main-nav-top-color": {
          "regular": "#666666",
          "hover": "#ff4351",
          "bg": "",
          "bg-hover": ""
        },
        "main-nav-sub-bg": "#191919",
        "main-nav-sub-color": {
          "regular": "#fff",
          "hover": "#000",
          "bg": "",
          "bg-hover": "#ff4351"
        },
        "navigation-border-top": 1,
        "toolbar-border-top": 1,
        "toolbar-border-bottom-color": "transparent",
        "toolbar-text-color": "#444444",
        "toolbar-phone-email-icon-color": "#444444",
        "toolbar-link-color": {
          "regular": "#444444",
          "hover": "#d3b76c"
        },
        "toolbar-social-link-color": {
          "regular": "#444444",
          "hover": "#d3b76c"
        },
        "header-search-icon-color": "",
        "preloader-txt-color": "#444",
        "preloader-bg-color": "#fff",
        "preloader-bar-color": "",
        "breadcrumb-skin": "light",
        "breadcrumb-skin-custom": {
          "regular": "#fff",
          "hover": "#000"
        },
        "body-layout": "full",
        "boxed-layout-shadow": "enabled",
        "body-bg": {
          "url": "",
          "color": "#fff",
          "position": "",
          "repeat": "repeat",
          "attachment": "scroll",
          "cover": ""
        },
        "header-bg": {
          "url": "",
          "color": "#fff",
          "position": "",
          "repeat": "repeat",
          "attachment": "scroll",
          "cover": ""
        },
        "header-bottom-border": "#e6e6e6",
        "toolbar-bg": {
          "url": "",
          "color": "#eeeeee",
          "position": "",
          "repeat": "repeat",
          "attachment": "scroll",
          "cover": ""
        },
        "page-title-bg": {
          "url": "",
          "color": "#fafafa",
          "position": "",
          "repeat": "repeat",
          "attachment": "scroll",
          "cover": "",
          "border": "#eeeeee"
        },
        "page-bg": {
          "url": "",
          "color": "#fff",
          "position": "",
          "repeat": "repeat",
          "attachment": "scroll",
          "cover": ""
        },
        "footer-bg": {
          "url": "",
          "color": "#191919",
          "position": "",
          "repeat": "repeat",
          "attachment": "scroll",
          "cover": ""
        },
        "sub-footer-bg": "#262626",
        "blog-single-layout": "meta-feed",
        "page-title-blog": 1,
        "blog_next_prev": 1,
        "blog-featured-image": 1,
        "blog-image-crop": 1,
        "blog-single-image-height": "350",
        "blog-single-related-posts": 1,
        "blog-single-about-author": 1,
        "blog-single-social-share": 1,
        "blog-single-comments": 1,
        "archive-layout": "right",
        "archive-loop-style": "classic",
        "archive-loop-image-height": "350",
        "archive-page-title": 1,
        "page-title-portfolio": 1,
        "portfolio-slug": "portfolio-posts",
        "portfolio_next_prev": "1",
        "portfolio-single-image": 1,
        "portfolio-image-crop": 1,
        "Portfolio-single-image-height": "350",
        "portfolio-single-related": 1,
        "portfolio-single-comments": 0,
        "portfolio-archive-loop-style": "classic",
        "woo-shop-layout": "right",
        "woo-loop-thumb-height": "330",
        "woo_loop_image_size": "crop",
        "woo-single-layout": "right",
        "checkout-box": 1,
        "woo-image-quality": "1",
        "woo-single-title": 1,
        "woo-single-show-title": 1,
        "woo-shop-loop-title": 1,
        "twitter-consumer-key": "",
        "twitter-consumer-secret": "",
        "twitter-access-token": "",
        "twitter-access-token-secret": "",
        "flickr-api-key": "",
        "google-analytics": "",
        "google-maps-key": "",
        "mailchimp_api_key": "",
        "typekit-id": "",
        "minify-js": 1,
        "minify-css": 1,
        "remove-js-css-ver": 1,
        "custom-css": "",
        "custom-js": ""
    }';

    $mk_settings = json_decode( $mk_settings_fallback_json, true );
  }
}

ken_load_redux_default_settings();
