function raindrops_embed_css() { global $post, $raindrops_fluid_or_fixed, $raindrops_fluid_minimum_width, $raindrops_wp_version, $raindrops_current_theme_name, $raindrops_page_width, $raindrops_base_font_size, $raindrops_custom_header_width, $raindrops_custom_header_height, $raindrops_current_column, $raindrops_setting_type, $raindrops_use_transient, $raindrops_automatic_color; $css = apply_filters('raindrops_embed_css_pre', ''); $css .= '/* raindrops_embed_css */'; //preload $css_rule_set = 'body:after{display:none; content: url(%1$s);}'; $css .= "\n" . sprintf($css_rule_set, get_header_image()); //#header-image $css .= "\n" . raindrops_header_image('css') . "\n"; //#header-image bounse issue fixed $css_rule_set = '#header-imge{ width:%1$spx;height:%2$spx;}'; $css .= "\n" . sprintf($css_rule_set, $raindrops_custom_header_width, apply_filters('raindrops_header_image_height', $raindrops_custom_header_height)); //site-title $raindrops_text_color = get_theme_mod('header_textcolor', 'dddddd'); if ($raindrops_text_color !== 'blank' && display_header_text() == true && false == raindrops_has_indivisual_notation() && false == $raindrops_automatic_color) { $css .= "\n#site-title a{color:#" . $raindrops_text_color . ';}'; } //page type if (isset($raindrops_fluid_or_fixed) && !empty($raindrops_fluid_or_fixed) && ('doc' == raindrops_warehouse_clone("raindrops_page_width") || 'doc2' == raindrops_warehouse_clone("raindrops_page_width") || 'custom-doc' == raindrops_warehouse_clone("raindrops_page_width") || 'doc4' == raindrops_warehouse_clone("raindrops_page_width"))) { $css .= raindrops_is_fixed(); } elseif (isset($raindrops_fluid_minimum_width) && !empty($raindrops_fluid_minimum_width) || 'doc5' == raindrops_warehouse_clone("raindrops_page_width")) { $css .= raindrops_is_fluid(); } //#hd $uploads = wp_upload_dir(); $header_image_uri = $uploads['url'] . '/' . raindrops_warehouse('raindrops_header_image'); if ('raindrops' !== $raindrops_current_theme_name && 'header.png' == raindrops_warehouse('raindrops_header_image')) { $header_image_uri = str_replace($raindrops_current_theme_name, 'raindrops', $header_image_uri); } $css .= "\n#hd{" . raindrops_upload_image_parser($header_image_uri, 'inline', '#hd') . '}'; //#ft $footer_image_uri = $uploads['url'] . '/' . raindrops_warehouse('raindrops_footer_image'); if ('raindrops' !== $raindrops_current_theme_name && 'footer.png' == raindrops_warehouse('raindrops_footer_image')) { $footer_image_uri = str_replace($raindrops_current_theme_name, 'raindrops', $footer_image_uri); } $css .= "\n#ft{" . raindrops_upload_image_parser($footer_image_uri, 'inline', '#ft') . '}'; /* 1.306 add conditional */ if (false == raindrops_has_indivisual_notation()) { if (false == $raindrops_automatic_color) { $css .= "\n#ft{color:" . raindrops_warehouse('raindrops_footer_color') . ';}'; } } // 2col 3col change style helper $css .= '/*' . raindrops_warehouse_clone('raindrops_show_right_sidebar') . '*/'; if ("show" == raindrops_warehouse_clone('raindrops_show_right_sidebar')) { $css .= ' .rsidebar{display:block;} '; } else { $css .= ' .rsidebar{display:none;} '; $css .= '.yui-t6 .index.archives,.yui-t5 .index.archives,.yui-t4 .index.archives{ margin-right:1em; }'; } if ("hide" == raindrops_warehouse_clone('raindrops_display_article_author')) { $css .= ' .posted-by-string{display:none;} .raindrops-comment-link{margin:0;} '; } if ("avatar" == raindrops_warehouse_clone('raindrops_display_article_author')) { $css .= 'body:not(.ja) .posted-by-string{visibility:hidden;margin:-.5em;} '; } if ("hide" == raindrops_warehouse_clone('raindrops_posted_in_label')) { $css .= ' .entry-meta .tagged, .this-posted-in{display:none;} '; } if ("show" !== raindrops_warehouse_clone('raindrops_comments_are_closed')) { $css .= ' .nocomments{display:none;} '; } $raindrops_archive_title_label = raindrops_warehouse_clone('raindrops_archive_title_label'); if ("hide" == $raindrops_archive_title_label) { $css .= ' #archives-title .label{display:none;} '; } elseif ("emoji" == $raindrops_archive_title_label) { $css .= ' #archives-title .label{display:none;} '; $css .= ' #archives-title .title:before{ content: \'' . raindrops_emoji_collection() . '\';display:inline-block;margin-right:13px; }'; } if ("show" !== raindrops_warehouse_clone('raindrops_archive_nav_above')) { $css .= ' #nav-above{display:none;} '; } /* ver 1.304 add */ $raindrops_fonts_color = raindrops_warehouse_clone('raindrops_default_fonts_color'); if ($raindrops_fonts_color !== '' && false == raindrops_has_indivisual_notation()) { /* 1.306 add false == raindrops_has_indivisual_notation() */ if (false == $raindrops_automatic_color) { $css .= ' article {color:' . $raindrops_fonts_color . ';}'; } } /** * Add @version 1.304 */ $raindrops_sticky_conditional = raindrops_warehouse_clone('raindrops_display_sticky_post'); if ('only_home' == $raindrops_sticky_conditional) { $css .= ' .single .raindrops-sticky .entry-title, .single .raindrops-sticky .entry-content{ display:none; }'; } /** * Add @since 1.309 * */ // $raindrops_display_default_category = raindrops_warehouse_clone('raindrops_display_default_category'); if ('show' !== $raindrops_display_default_category) { //$css .= ' .this-posted-in{ display:none; }'; } //when manual style rule mode if (raindrops_warehouse_clone("raindrops_style_type") == $raindrops_current_theme_name) { return $css . raindrops_warehouse_clone('_raindrops_indv_css'); } /* 0611 1.301 * $raindrops_options = get_option( 'raindrops_theme_settings' ); */ $raindrops_base_color = raindrops_warehouse_clone('raindrops_base_color'); $raindrops_hyperlink_color = raindrops_warehouse_clone('raindrops_hyperlink_color'); $raindrops_style_type = raindrops_warehouse_clone('raindrops_style_type'); $color_check = raindrops_has_indivisual_notation(); if (false == $color_check) { $raindrops_style_type = raindrops_warehouse_clone('raindrops_style_type'); } else { if (isset($color_check['color_type'])) { $raindrops_style_type = $color_check['color_type']; } //$columns = $color_check['col']; } $raindrops_indv_css = raindrops_design_output($raindrops_style_type) . raindrops_color_base($raindrops_base_color); //when this code exists [raindrops color_type="minimal" col="1"] in the post $raindrops_indv_css = raindrops_color_type_custom($raindrops_indv_css); $css .= apply_filters("raindrops_indv_css", $raindrops_indv_css); if ($raindrops_hyperlink_color !== '') { if (false !== ($type = raindrops_has_indivisual_notation())) { if (isset($type['color_type'])) { $default_color = raindrops_default_color_clone('raindrops_hyperlink_color', $type['color_type']); $css .= raindrops_custom_link_color($default_color); } } else { /* 1.306 add conditional */ if (false == raindrops_has_indivisual_notation()) { if (false == $raindrops_automatic_color) { $css .= raindrops_custom_link_color($raindrops_hyperlink_color); } } } } $background = get_background_image(); $color = get_background_color(); if (!empty($background) || !empty($color)) { $css = preg_replace("|body[^{]*{[^}]+}|", "", $css); } if (raindrops_warehouse_clone('raindrops_basefont_settings') > 13) { $css .= 'body{font-size:' . raindrops_warehouse_clone('raindrops_basefont_settings') . 'px;}'; } elseif (isset($raindrops_base_font_size)) { $css .= 'body{font-size:' . $raindrops_base_font_size . 'px;}'; } //body background $body_background = get_theme_mod("background_color"); $body_background_image = get_theme_mod("background_image"); $body_background_repeat = get_theme_mod("background_repeat"); $body_background_position_x = get_theme_mod("background_position_x"); $body_background_attachment = get_theme_mod("background_attachment"); if ($body_background !== false && !empty($body_background) && !empty($body_background_image)) { $css .= "\nbody{background:#" . $body_background . ' url( ' . $body_background_image . ' );}'; } elseif ($body_background !== false && !empty($body_background)) { $css .= "\nbody{background-color:#" . $body_background . ';}'; } elseif (!empty($body_background_image)) { $css .= "\nbody{background-image: url( " . $body_background_image . ' );}'; } if (isset($body_background_repeat) && !empty($body_background_repeat)) { $css .= "\nbody{background-repeat: " . $body_background_repeat . ';}'; } if (isset($body_background_position_x) && !empty($body_background_position_x)) { $css .= "\nbody{background-position:top " . $body_background_position_x . ';}'; } if (isset($body_background_attachment) && !empty($body_background_attachment)) { $css .= "\nbody{background-attachment: " . $body_background_attachment . ';}'; } /* Primary Menu Font Size */ $primary_menu_font_size = raindrops_warehouse_clone('raindrops_menu_primary_font_size'); if (isset($primary_menu_font_size) && !empty($primary_menu_font_size)) { /* Add check value why some web site font-size:0% using child theme */ if ($primary_menu_font_size > 76 && $primary_menu_font_size < 183) { $css .= '#access .children li{width:100%;}'; $css .= '#access .sub-menu li{width:100%;}'; $css .= '#access a{font-size:' . floatval($primary_menu_font_size) . '%;}'; } else { $css .= '#access a{font-size:100%;}'; } } else { $css .= '#access a{font-size:100%;}'; } $primary_menu_min_width = raindrops_warehouse_clone('raindrops_menu_primary_min_width'); if (isset($primary_menu_min_width) && !empty($primary_menu_min_width)) { if ($primary_menu_min_width < 10) { $child_width = 10; } else { $child_width = floatval($primary_menu_min_width); } $adding_style = "\n" . '#access ul ul li,#access ul ul,#access a{ min-width:%1$dem;} .ie8 #access .page_item_has_children > a:after, .ie8 #access .menu-item-has-children > a:after{ content :"";} #access .children li,#access .sub-menu li,#access .children ul,#access .sub-menu ul,#access .children a,#access .sub-menu a{ min-width:%2$dem; }'; $css .= sprintf($adding_style, $primary_menu_min_width, $child_width); } $raindrops_sitewide_css = raindrops_warehouse_clone('raindrops_sitewide_css'); if (isset($raindrops_sitewide_css) && !empty($raindrops_sitewide_css)) { $css .= ' ' . wp_strip_all_tags($raindrops_sitewide_css); } if (empty($css)) { $css = "cannot get style value check me"; } if (WP_DEBUG !== true) { $css = str_replace(array("\n", "\r", "\t", '"', '--', '\\"'), array("", "", "", '"', '', '"'), $css); } else { $css = str_replace(array('"', '--', '\\"'), array('"', '', '"'), $css); } return apply_filters("raindrops_embed_meta_css", $css); }
function raindrops_print_scripts() { global $raindrops_current_data_version, $raindrops_customizer_admin_color, $raindrops_setting_type; wp_enqueue_script('raindrops-customize', get_template_directory_uri() . '/lib/customize.js', array('jquery'), $raindrops_current_data_version, true); wp_localize_script('raindrops-customize', 'raindrops_customizer_script_vars', array('preview_label' => __('Preview Width', 'raindrops'), 'basic_config_label' => __('<span>Basic Config</span>', 'raindrops'), 'admin_color' => $raindrops_customizer_admin_color, 'setting_field_type' => $raindrops_setting_type, 'dark_footer_color_default' => raindrops_default_color_clone('raindrops_footer_color', 'dark'), 'dark_hyperlink_color_default' => raindrops_default_color_clone('raindrops_hyperlink_color', 'dark'), 'dark_fonts_color_default' => raindrops_default_color_clone('raindrops_default_fonts_color', 'dark'), 'dark_footer_link_color' => raindrops_default_color_clone('raindrops_footer_link_color', 'dark'), 'dark_header_textcolor' => raindrops_default_color_clone('header_textcolor', 'dark'), 'w3standard_footer_color_default' => raindrops_default_color_clone('raindrops_footer_color', 'w3standard'), 'w3standard_hyperlink_color_default' => raindrops_default_color_clone('raindrops_hyperlink_color', 'w3standard'), 'w3standard_fonts_color_default' => raindrops_default_color_clone('raindrops_default_fonts_color', 'w3standard'), 'w3standard_footer_link_color' => raindrops_default_color_clone('raindrops_footer_link_color', 'w3standard'), 'w3standard_header_textcolor' => raindrops_default_color_clone('header_textcolor', 'w3standard'), 'light_footer_color_default' => raindrops_default_color_clone('raindrops_footer_color', 'light'), 'light_hyperlink_color_default' => raindrops_default_color_clone('raindrops_hyperlink_color', 'light'), 'light_fonts_color_default' => raindrops_default_color_clone('raindrops_default_fonts_color', 'light'), 'light_footer_link_color' => raindrops_default_color_clone('raindrops_footer_link_color', 'light'), 'light_header_textcolor' => raindrops_default_color_clone('header_textcolor', 'light'), 'minimal_footer_color_default' => raindrops_default_color_clone('raindrops_footer_color', 'minimal'), 'minimal_hyperlink_color_default' => raindrops_default_color_clone('raindrops_hyperlink_color', 'minimal'), 'minimal_fonts_color_default' => raindrops_default_color_clone('raindrops_default_fonts_color', 'minimal'), 'minimal_footer_link_color' => raindrops_default_color_clone('raindrops_footer_link_color', 'minimal'), 'minimal_header_textcolor' => raindrops_default_color_clone('header_textcolor', 'minimal'), 'fallback_footer_color_default' => apply_filters('raindrops_fallback_footer_color_default', raindrops_default_color_clone('raindrops_footer_color', 'fallback')), 'fallback_hyperlink_color_default' => apply_filters('raindrops_fallback_hyperlink_color_default', raindrops_default_color_clone('raindrops_hyperlink_color', 'fallback')), 'fallback_fonts_color_default' => apply_filters('raindrops_fallback_fonts_color_default', raindrops_default_color_clone('raindrops_default_fonts_color', 'fallback')), 'fallback_footer_link_color' => apply_filters('raindrops_fallback_footer_link_color', raindrops_default_color_clone('raindrops_footer_link_color', 'fallback')), 'fallback_header_textcolor' => apply_filters('raindrops_fallback_header_textcolor', raindrops_default_color_clone('header_textcolor', 'fallback')))); }