';
public static $default_leapin_feature_hb_href;
/**
* Widget
*/
public static $default_leapin_widget_post_border_radius = '4';
public static $default_leapin_widget_thumb_border_radius = '0';
public static $upgrade_desc_leapin_widget_post_animation;
/**
* Analysis
*/
public static $default_leapin_analysis_type = 'tag_manager';
public static $upgrade_desc_leapin_tracking_id;
/**
* Primary Menu
*/
public static $upgrade_desc_leapin_header_menu_background_gradient;
/**
* Mobile Menu
*/
public static $default_leapin_mobile_menu_button_display = '1030';
public static $choice_leapin_mobile_menu_button_display;
public static $upgrade_desc_leapin_mobile_menu_bg_color_gradient;
public static $default_leapin_mobile_menu_type = 'drawer';
/**
* Seconcary Menu
*/
public static $default_leapin_secondary_menu_type = 'simple';
public static $choice_leapin_secondary_menu_type;
public static $upgrade_desc_leapin_secondary_menu;
/**
* AMP
*/
public static $upgrade_desc_leapin_amp_active;
/**
* Single
*/
public static $default_leapin_single_author_name_type = 'Nickname';
public static $default_leapin_single_sns_message_label;
public static $default_leapin_single_default_image;
public static $default_leapin_single_header_style = 'default';
public static $default_leapin_single_headlines_style = 'headline-blog';
public static $choice_leapin_single_header_style;
public static $choice_leapin_single_headlines_style;
public static $upgrade_desc_leapin_single_header_style;
/**
* Sidebar
*/
public static $choice_leapin_sidebar_widget_title_type;
public static $default_leapin_sidebar_widget_title_type = 'tile';
public static $default_leapin_widget_post_read_more_label;
public static $default_leapin_sidebar_widget_title_border_radius = '4';
public static $default_leapin_sidebar_widget_border_radius = '4';
/**
* Copyright
*/
public static $default_leapin_copyright_text;
/**
* Footer Widget
*/
public static $default_leapin_footer_widget_columns = '4-columns';
public static $choice_leapin_footer_widget_columns;
public static $default_leapin_footer_type = 'simple';
public static $choice_leapin_footer_type;
public static $default_leapin_footer_h_align = 'center';
public static $choice_leapin_footer_h_align;
public static $default_leapin_footer_v_align = 'top';
public static $choice_leapin_footer_v_align;
/**
* SNS
*/
public static $choice_leapin_sns_btns_design;
public static $default_leapin_sns_btns_design = 'tile';
public static $upgrade_desc_leapin_sns_btns_design;
public static $value_leapin_sns_btns_shadow = '4px 4px 20px 0px rgba(0, 0, 0, .2);';
public static $default_leapin_sns_btns_visible_template = 'all_pages';
public static $choice_leapin_sns_btns_visible_template;
public static $default_leapin_sns_message_label;
/**
* Wordpress Defaults
*/
public static $default_leapin_custom_header_mobile_height = 500;
public static $default_leapin_custom_header_height = 900;
/**
* constructor.
*/
private function __construct()
{
$this->refresh();
$this->init_statics();
}
/**
* init variables
*/
private function init_statics()
{
self::$choice_leapin_layouts_general = [
'col-2_columns_right' => __('2 Columns Right (Default)', 'pjax-blog'),
'col-2_columns_left' => __('2 Columns Left', 'pjax-blog')
];
self::$choice_leapin_layouts_home = [
'inherit' => __('Inherit General Layout (Default)', 'pjax-blog'),
'col-1_column' => __('1 Column Layout', 'pjax-blog'),
'col-1_column_full_width' => __('1 Column Layout (Full Width)', 'pjax-blog'),
'col-2_columns_right' => __('2 Columns Right', 'pjax-blog'),
'col-2_columns_left' => __('2 Columns Left', 'pjax-blog')
];
self::$choice_leapin_layouts_each_page = ['default' => '--',
'col-1_column' => __('1 Column Layout', 'pjax-blog'),
'col-1_column_full_width' => __('1 Column Layout (Full Width)', 'pjax-blog')
];
self::$choice_leapin_layouts_drop_shadow = [
'none' => __('--', 'pjax-blog'),
'border' => __('Border', 'pjax-blog'),
'float' => __('Float', 'pjax-blog')
];
self::$choice_leapin_secondary_menu_type = [
'simple' => __('Normal', 'pjax-blog'),
'rich' => __('With Image', 'pjax-blog')
];
self::$choice_leapin_mobile_menu_button_display = [
// '768' => __('Smaller than portrait tablet (~768px)', 'pjax-blog'),
'1030' => __('Smaller than landscape tablet (~1030px)', 'pjax-blog'),
'1240' => __('Smaller than small desktop (~1240px)', 'pjax-blog'),
'all' => __('All Media', 'pjax-blog'),
];
if (leapin_is_pro()) {
self::$choice_leapin_single_header_style = LEAPIN_Theme_Grade::$header_style;
}
self::$choice_leapin_single_headlines_style = [
'headline-simple' => __('Simple', 'pjax-blog'),
'headline-blog' => __('Blog', 'pjax-blog')
];
self::$choice_leapin_footer_widget_columns = [
'1-columns' => __('1 Column', 'pjax-blog'),
'2-columns' => __('2 Columns', 'pjax-blog'),
'3-columns' => __('3 Columns', 'pjax-blog'),
'4-columns' => __('4 Columns', 'pjax-blog'),
];
self::$default_leapin_copyright_text = '© ' . date('Y') . ' ' . get_bloginfo('name') . '.';
self::$choice_leapin_sns_btns_visible_template = [
'all_pages' => __('All Pages (Default)', 'pjax-blog'),
'post_and_page' => __('Posts and Pages', 'pjax-blog'),
'not_home' => __('All Pages but Home', 'pjax-blog'),
'never' => __('No Page', 'pjax-blog'),
];
self::$choice_leapin_sns_btns_design = class_exists('LEAPIN_Theme_Grade') ? LEAPIN_Theme_Grade::$choice_leapin_sns_btns_design : [];
self::$choice_leapin_sidebar_widget_title_type = [
'tile' => __('Tile', 'pjax-blog'),
'line' => __('Line', 'pjax-blog'),
'underline' => __('Underline', 'pjax-blog')
];
self::$choice_leapin_footer_type = [
'simple' => __('Simple', 'pjax-blog'),
'v_line' => __('Vertical Line', 'pjax-blog'),
'h_line' => __('Line Below Title', 'pjax-blog')
];
self::$choice_leapin_footer_h_align = [
'center' => __('Center', 'pjax-blog'),
'left' => __('Left', 'pjax-blog'),
'right' => __('Right', 'pjax-blog')
];
self::$choice_leapin_footer_v_align = [
'center' => __('Center', 'pjax-blog'),
'top' => __('Top', 'pjax-blog'),
'bottom' => __('Bottom', 'pjax-blog')
];
self::$default_leapin_feature_hb_href = leapin_get_customizer_sec_url('leapin_features_section');
self::$default_leapin_sns_message_label = __('Share', 'pjax-blog');
self::$default_leapin_single_sns_message_label = __('Share', 'pjax-blog');
self::$default_leapin_single_default_image = get_template_directory_uri() . '/library/images/noimage.png';
self::$default_leapin_widget_post_read_more_label = __('More', 'pjax-blog');
$pjax_replace_tag = "title\nlink[name='author']\nlink[name='publisher']\nlink[rel='amphtml']\nlink[rel='canonical']\nlink[rel='shortlink']\nlink[rel='alternate']\nlink[rel='prev']\nlink[rel='next']\nlink[rel='EditURI']\nmeta[name='description']\nmeta[property^='og']\nmeta[name^='twitter']\nmeta[name='robots']\nscript#wp-embed\nstyle#siteorigin-panels-layouts-head\nlink#siteorigin-panels-front\nscript#crayon_js\nlink#crayon";
self::$default_leapin_pjax_replace_tags_in_head = apply_filters('leapin_default_pjax_replace_tags_in_head', $pjax_replace_tag);
self::$upgrade_desc_leapin_sns_btns_design = self::get_upgrade_description(__('Upgrade to unlock SNS button design.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2286');
self::$upgrade_desc_leapin_pjax_transition = self::get_upgrade_description(__('Upgrade to unlock more kinds of Pjax Transition.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/555');
self::$upgrade_desc_leapin_secondary_menu = self::get_upgrade_description(__('Upgrade to unlock secondary menu.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2287');
self::$upgrade_desc_leapin_amp_active = self::get_upgrade_description(__('Upgrade to unlock AMP Auto-Generator.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/1031');
self::$upgrade_desc_leapin_header_menu_background_gradient = self::get_upgrade_description(__('Upgrade to unlock Gradient Background Color Option.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2292');
self::$upgrade_desc_leapin_mobile_menu_bg_color_gradient = self::get_upgrade_description(__('Upgrade to unlock Gradient Background Color Option.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2292');
self::$upgrade_desc_leapin_layouts_drop_shadow = self::get_upgrade_description(__('Upgrade to unlock drop shadow design option.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2291');
self::$upgrade_desc_leapin_layouts_hover_float = self::get_upgrade_description(__('Upgrade to unlock float-up animation to elements when mouse hovering.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2291');
self::$upgrade_desc_leapin_single_header_style = self::get_upgrade_description(__('Upgrade to unlock more header style.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2303');
self::$upgrade_desc_leapin_widget_post_animation = self::get_upgrade_description(__('Upgrade to unlock fade-in animation to blog posts.', 'pjax-blog')
);
self::$upgrade_desc_leapin_pjax_prefetch_enable = self::get_upgrade_description(__('Upgrade to unlock Prefetch function to make page transition much faster.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2285');
self::$upgrade_desc_leapin_typography_body = self::get_upgrade_description(__('Upgrade to unlock webfont for body, heading and logo so as to make your website more beautiful. Choose from 600+ Fonts! See font samples from detail button.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/582');
self::$upgrade_desc_leapin_tracking_id = self::get_upgrade_description(__('Upgrade to unlock tracking setting to analyze and get more traffic to your website.', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/2288');
self::$upgrade_desc_leapin_seamless_transition = self::get_upgrade_description(__('Upgrade to unlock seamless transition to make your website more unique and sophisticated!', 'pjax-blog')
, 'https://demo.leap-in.com/pjax-blog-1/565');
}
public static function get_upgrade_description($desc, $detail_href = false)
{
$description = '' . $desc . '';
if ($detail_href) {
$detail_link = '' . __('Detail', 'pjax-blog') . '';
} else {
$detail_link = '';
}
$upgrade_link = '' . __('Upgrade', 'pjax-blog') . '';
return $description . $detail_link . $upgrade_link;
}
/**
* get singleton instance
*
* @return LEAPIN_Theme_Mod
*/
public static function get_instance()
{
if (empty($instance)) {
self::$instance = new LEAPIN_Theme_Mod();
}
return self::$instance;
}
/**
* refresh values of theme mods
*
* @return array|void
*/
public function refresh()
{
$this->MODs = get_theme_mods();
return $this->MODs;
}
/**
* get value of theme mods
*
* @param $key
* @param bool $default
* @return bool|string
*/
public function get($key, $default = false)
{
// if preview
if (array_key_exists('customize_messenger_channel', $_GET)
&& isset($_GET['customize_messenger_channel'])) {
$rtn = get_theme_mod($key);
return $rtn ? $rtn : $default;
} else {
/** @since v1.6.9 */
if (!empty($key) && !empty($this->MODs) && array_key_exists($key, $this->MODs)) {
return $this->MODs[$key];
} else {
/** @since v 1.9.0 */
if (isset($default)) {
return $default;
} else {
return false;
}
}
}
}
/**
* get script values set in customize panel
*
* @param bool $tag ture - add ', $dependency);
}
return trim($dependency);
}
/**
* Return true if custom option isn't needed in AMP page
*
* @param $id
* @return bool
* @since 1.9.0
*/
public function not_include_in_amp($id)
{
$bool = false;
// grouping
if (preg_match('/^leapin_pjax_.+/', $id)
|| preg_match('/^leapin_widget_.+/', $id)
|| preg_match('/^leapin_mobile_menu_.+/', $id)
|| preg_match('/^leapin_secondary_menu_.+/', $id)
|| preg_match('/^leapin_footer_.+/', $id)
|| preg_match('/^leapin_sns_.+/', $id)
|| preg_match('/^leapin_sidebar_widget_.+/', $id)
|| preg_match('/^leapin_sidebar_widgets_.+/', $id)
) {
$bool = true;
}
// individual
return $bool;
}
/**
* get styles set in customize panel
*
* @param bool $tag true when adding ', $css);
}
return trim($css);
}
public function get_style_obj()
{
self::$STYLE_MODs = LEAPIN_IDs::get_css_selector();
/**
* Layout
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_layouts_bg_color][0][] = $this->get(LEAPIN_IDs::$leapin_layouts_bg_color);
/**
* Typography
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_typography_link_color][0][] = $this->get(LEAPIN_IDs::$leapin_typography_link_color, '#27b3b9');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_typography_link_color_hover][0][] = $this->get(LEAPIN_IDs::$leapin_typography_link_color_hover, '#1a767a');
/**
* Pjax
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_pjax_transition_bg_color][0][] = $this->get(LEAPIN_IDs::$leapin_pjax_transition_bg_color, '#333');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_pjax_transition_overlay_color][0][] = $this->get(LEAPIN_IDs::$leapin_pjax_transition_overlay_color, 'rgba(0,0,0,.5)');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_pjax_transition_loading_color][0][] = leapin_hex2rgba($this->get(LEAPIN_IDs::$leapin_pjax_transition_loading_color, '#fff'), 0.9);
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_pjax_transition_loading_color][1][] = leapin_hex2rgba($this->get(LEAPIN_IDs::$leapin_pjax_transition_loading_color, '#fff'), 0.8);
/**
* Widget
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_widget_post_border_radius][0][] = $this->get(LEAPIN_IDs::$leapin_widget_post_border_radius, LEAPIN_Theme_Mod::$default_leapin_widget_post_border_radius) . 'px';
self::$STYLE_MODs[LEAPIN_IDs::$leapin_widget_thumb_border_radius][0][] = $this->get(LEAPIN_IDs::$leapin_widget_thumb_border_radius, LEAPIN_Theme_Mod::$default_leapin_widget_thumb_border_radius) . 'px';
self::$STYLE_MODs[LEAPIN_IDs::$leapin_widget_above_container_bg][0][] = $this->get(LEAPIN_IDs::$leapin_widget_above_container_bg, '#eaeaea');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_widget_below_container_bg][0][] = $this->get(LEAPIN_IDs::$leapin_widget_below_container_bg, '#e2e2e2');
/**
* Branding
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_logo_typo_color][0][] = $this->get(LEAPIN_IDs::$leapin_logo_typo_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_logo_typo_color_hover][0][] = $this->get(LEAPIN_IDs::$leapin_logo_typo_color_hover);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_logo_des_color][0][] = $this->get(LEAPIN_IDs::$leapin_logo_des_color);
/**
* Primary Menu
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_header_menu_background][0][] = $this->get(LEAPIN_IDs::$leapin_header_menu_background, '#000');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_primary_menu_link_color][0][] = $this->get(LEAPIN_IDs::$leapin_primary_menu_link_color, '#fff');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_primary_menu_link_color_hover][0][] = $this->get(LEAPIN_IDs::$leapin_primary_menu_link_color_hover, '#fff');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_primary_menu_desc_color][0][] = $this->get(LEAPIN_IDs::$leapin_primary_menu_desc_color, '#fff');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_primary_menu_accent_color][0][] = $this->get(LEAPIN_IDs::$leapin_primary_menu_accent_color, '#33bad2');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_primary_menu_border_bottom_color][0][] =
$this->get(LEAPIN_IDs::$leapin_primary_menu_border_bottom_color) ? sprintf('%s .5px solid;', $this->get(LEAPIN_IDs::$leapin_primary_menu_border_bottom_color)) : false;
self::$STYLE_MODs[LEAPIN_IDs::$leapin_header_menu_bg_gradient][0][]
= $this->get(LEAPIN_IDs::$leapin_header_menu_bg_gradient)
? sprintf('linear-gradient(160deg, %s, %s)', $this->get(LEAPIN_IDs::$leapin_header_menu_background, '#000'), $this->get(LEAPIN_IDs::$leapin_header_menu_bg_gradient)) : false;
/**
* Seconcary Menu
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_secondary_menu_link_color][0][] = $this->get(LEAPIN_IDs::$leapin_secondary_menu_link_color, '#000');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_secondary_menu_link_color_hover][0][] = $this->get(LEAPIN_IDs::$leapin_secondary_menu_link_color_hover, '#ccc');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_secondary_menu_bg_color][0][] = $this->get(LEAPIN_IDs::$leapin_secondary_menu_bg_color, '#fff');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_secondary_menu_accent_color][0][] = $this->get(LEAPIN_IDs::$leapin_secondary_menu_accent_color, 'black');
/**
* Mobile Menu
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_button_color][0][] = $this->get(LEAPIN_IDs::$leapin_mobile_menu_button_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_link_color][0][] = $this->get(LEAPIN_IDs::$leapin_mobile_menu_link_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_link_color_hover][0][] = $this->get(LEAPIN_IDs::$leapin_mobile_menu_link_color_hover, '#fff');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_bg_color][0][] = $this->get(LEAPIN_IDs::$leapin_mobile_menu_bg_color, 'rgba(38,59,73,0.95)');
if ($this->get(LEAPIN_IDs::$leapin_mobile_menu_type, LEAPIN_Theme_Mod::$default_leapin_mobile_menu_type) == LEAPIN_Theme_Mod::$default_leapin_mobile_menu_type) {
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_bg_color][1][] = "10px 10px 30px -10px rgba(0,0,0,.5);";
}
$on_blur = !empty($this->get(LEAPIN_IDs::$leapin_mobile_menu_blur)) ? "blur(5px)" : false;
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_blur][0][] = $on_blur;
$mobile_bg_image = $this->get(LEAPIN_IDs::$leapin_mobile_menu_bg_image);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_mobile_menu_bg_image][0][] = !empty($mobile_bg_image) ? "url($mobile_bg_image)" : false;
/**
* Features
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_feature_hb_font_color][0][] = $this->get(LEAPIN_IDs::$leapin_feature_hb_font_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_feature_hb_bg_color][0][] = $this->get(LEAPIN_IDs::$leapin_feature_hb_bg_color, self::$default_leapin_feature_hb_bg_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_feature_hb_bg_color_gradient][0][]
= $this->get(LEAPIN_IDs::$leapin_feature_hb_bg_color_gradient)
? sprintf('linear-gradient(45deg, %s,%s)',
$this->get(LEAPIN_IDs::$leapin_feature_hb_bg_color, self::$default_leapin_feature_hb_bg_color),
$this->get(LEAPIN_IDs::$leapin_feature_hb_bg_color_gradient, self::$default_leapin_feature_hb_bg_color_gradient))
: false;
/**
* Single
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_single_title_bg_color][0][] = $this->get(LEAPIN_IDs::$leapin_single_title_bg_color, 'rgba(0,0,0,.75)');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_single_title_bg_color][1][] = $this->get(LEAPIN_IDs::$leapin_single_title_bg_color, 'rgba(0,0,0,.75)');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_typography_text_color][0][] = $this->get(LEAPIN_IDs::$leapin_typography_text_color);
/**
* Sidebar Widget
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widgets_hover_underline_color][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widgets_hover_underline_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widgets_hover_underline_color][1][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widgets_hover_underline_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widgets_hover_underline_color][2][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widgets_hover_underline_color);
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widgets_background][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widgets_background, '#fff');
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_color][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_title_border_color][0][] =
$this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_border_color) ? sprintf('%s .5px solid;', $this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_border_color)) : false;
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_title_border_radius][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_border_radius, LEAPIN_Theme_Mod::$default_leapin_widget_post_border_radius) . 'px';
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_border_radius][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_border_radius, LEAPIN_Theme_Mod::$default_leapin_widget_post_border_radius) . 'px';
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_links_color][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_links_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_links_color_hover][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_links_color_hover);
$sidebar_widget_title_type = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_type, LEAPIN_Theme_Mod::$default_leapin_sidebar_widget_title_type);
if ($sidebar_widget_title_type == LEAPIN_Theme_Mod::$default_leapin_sidebar_widget_title_type) {
// tile
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_title_color][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_color, '#fff');
} else { // line
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_title_color][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_color, '#252525');
}
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_border_radius][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_border_radius, LEAPIN_Theme_Mod::$default_leapin_sidebar_widget_border_radius) . 'px';
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sidebar_widget_title_border_radius][0][] = $this->get(LEAPIN_IDs::$leapin_sidebar_widget_title_border_radius, LEAPIN_Theme_Mod::$default_leapin_sidebar_widget_title_border_radius) . 'px';
/**
* Copyright
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_copyright_color][0][] = $this->get(LEAPIN_IDs::$leapin_copyright_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_copyright_background][0][] = $this->get(LEAPIN_IDs::$leapin_copyright_background, '#000');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_copyright_links][0][] = $this->get(LEAPIN_IDs::$leapin_copyright_links);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_copyright_links_hover][0][] = $this->get(LEAPIN_IDs::$leapin_copyright_links_hover);
/**
* Footer Widget
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_color][0][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_color, '#000');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_title_color][0][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_title_color, '#23282d');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_title_color][1][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_title_color, '#23282d');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_background][0][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_background, '#8a8a8a');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_color_links][0][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_color_links, '#000');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_color_links_hover][0][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_color_links_hover, '#000');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_border_color][0][] = $this->get(LEAPIN_IDs::$leapin_footer_widget_border_color, '#484848');
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_footer_widget_columns][0][] = LEAPIN_Footer::get_flex_basis();
/**
* SNS
*/
if (!empty($this->get(LEAPIN_IDs::$leapin_sns_btns_shadow))) {
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sns_btns_shadow][0][] = self::$value_leapin_sns_btns_shadow;
}
if (empty($this->get(LEAPIN_IDs::$leapin_sns_btns_border))) {
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sns_btns_border][0][] = 'none';
}
if ($this->get(LEAPIN_IDs::$leapin_sns_btns_design, LEAPIN_Theme_Mod::$default_leapin_sns_btns_design) == 'circle-mono') {
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sns_circle_mono_color][0][] = $this->get(LEAPIN_IDs::$leapin_sns_circle_mono_color, '#636363');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sns_circle_mono_color][1][] = $this->get(LEAPIN_IDs::$leapin_sns_circle_mono_color, '#636363');
self::$STYLE_MODs[LEAPIN_IDs::$leapin_sns_circle_mono_color][2][] = $this->get(LEAPIN_IDs::$leapin_sns_circle_mono_color, '#636363');
}
/**
* Other
*/
self::$STYLE_MODs[LEAPIN_IDs::$leapin_other_loading_dots_color][0][] = $this->get(LEAPIN_IDs::$leapin_other_loading_dots_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_other_slide_overlay_color][0][] = $this->get(LEAPIN_IDs::$leapin_other_slide_overlay_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_other_third_party_color][0][] = $this->get(LEAPIN_IDs::$leapin_other_third_party_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_other_third_party_color][1][] = leapin_adjust_color_brightness($this->get(LEAPIN_IDs::$leapin_other_third_party_color, "#a46497"), -30);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_other_third_party_color][2][] = $this->get(LEAPIN_IDs::$leapin_other_third_party_color);
/**
* WP default
*/
if (!empty($this->get(LEAPIN_IDs::$wp_custom_background_color))) {
self::$STYLE_MODs[LEAPIN_IDs::$wp_custom_background_color][0][] = '#' . $this->get(LEAPIN_IDs::$wp_custom_background_color);
}
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_mobile_height][0][] = $this->get(LEAPIN_IDs::$leapin_custom_header_mobile_height, LEAPIN_Theme_Mod::$default_leapin_custom_header_mobile_height) . 'px';
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_height][0][] = $this->get(LEAPIN_IDs::$leapin_custom_header_height, LEAPIN_Theme_Mod::$default_leapin_custom_header_height) . 'px';
$header_overlay_color = $this->get(LEAPIN_IDs::$leapin_custom_header_overlay_color);
if (!empty($header_overlay_color)) {
self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_overlay_color][0][] = $header_overlay_color;
self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_overlay_color][1][] = "0 0 150px 100px $header_overlay_color";
}
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_text_color][0][] = $this->get(LEAPIN_IDs::$leapin_custom_header_text_color);
self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_link_color][0][] = $this->get(LEAPIN_IDs::$leapin_custom_header_link_color);
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_link_color][1][] = $this->get(LEAPIN_IDs::$leapin_custom_header_link_color);
// self::$STYLE_MODs[LEAPIN_IDs::$leapin_custom_header_separator_color][0][] = $this->get(LEAPIN_IDs::$leapin_custom_header_separator_color);
return self::$STYLE_MODs;
}
/**
* CSS constructor
*
* @param $identifier
* @param $attrib
* @param $value
* @return string
*/
public static function applyCSS($identifier, $attrib, $value)
{
if (empty($value) || empty($attrib) || empty($identifier)) {
return '';
}
$css = trim(sprintf("%1s { %2s: %3s; }", $identifier, $attrib, $value));
return $css;
}
public static function get_upgrade_label()
{
return "Upgrade";
}
}
LEAPIN_Theme_Mod::get_instance();
do_action('leapin_theme_mod_loaded');