Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14800 lines (11534 sloc) 459 KB
<?php
/**
*
*
* @package Raindrops
* @since Raindrops 0.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
do_action( 'raindrops_before' );
/**
* move from hooks.php
* and change from load_textdomain( ) to load_theme_text_domain( )
*
*
* @since 0.988
*
* You can override parent themes language file from child theme.
*/
load_theme_textdomain( 'raindrops', apply_filters( 'raindrops_load_text_domain', get_template_directory() . '/languages' ) );
/**
* include raindrops custom settings
*
*
*
*/
if ( file_exists( get_template_directory() . '/raindrops-config.php' ) ) {
require_once( get_template_directory() . '/raindrops-config.php' );
}
if ( file_exists( get_stylesheet_directory() . '/lib/alias_functions.php' ) ) {
require_once ( get_stylesheet_directory() . '/lib/alias_functions.php' );
} else {
require_once ( get_template_directory() . '/lib/alias_functions.php' );
}
if ( false !== ( $path = raindrops_locate_url( 'lib/csscolor/csscolor.php', 'path' ) ) ) {
require_once ( $path );
}
if ( false !== ( $path = raindrops_locate_url( 'lib/csscolor.css.php', 'path' ) ) ) {
require_once ( $path );
}
if ( false !== ( $path = raindrops_locate_url( 'lib/vars.php', 'path' ) ) ) {
require_once ( $path );
}
if ( false !== ( $path = raindrops_locate_url( 'lib/validate.php', 'path' ) ) ) {
require_once ( $path );
}
if ( false !== ( $path = raindrops_locate_url( 'plugins/plugins-presentation.php', 'path' ) ) ) {
require_once ( $path );
}
if ( false !== ( $path = raindrops_locate_url( 'lib/widgets.php', 'path' ) ) ) {
require_once ( $path );
}
if ( get_locale() == 'ja' ) {
if ( false !== ( $path = raindrops_locate_url( 'languages/scripts/ja.php', 'path' ) ) ) {
require_once ( $path );
}
}
$jetpack_active_modules = get_option( 'jetpack_active_modules' );
if ( class_exists( 'Jetpack', false ) && $jetpack_active_modules ) {
if ( false !== ( $path = raindrops_locate_url( 'lib/jetpack.php', 'path' ) ) ) {
require_once ( $path );
}
}
/**
* Featured Image Presentation
* @since 1.274
*/
if ( false !== ( $path = raindrops_locate_url( 'lib/featured-image.php', 'path' ) ) ) {
require_once ( $path );
}
if ( is_admin() && $raindrops_recommend_plugins !== false ) {
$raindrops_is_include_tgm_config = false;
if ( false !== ( $path = raindrops_locate_url( 'plugins/tgm-config.php', 'path' ) ) ) {
require_once ( $path );
$raindrops_is_include_tgm_config = true;
}
if ( true == $raindrops_is_include_tgm_config && file_exists( get_template_directory() . '/plugins/class-tgm-plugin-activation.php' ) ) {
if ( !class_exists( 'WP_List_Table' ) ) {
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}
require_once ( get_template_directory() . '/plugins/class-tgm-plugin-activation.php' );
}
add_action( 'tgmpa_register', 'raindrops_theme_register_required_plugins' );
}
if ( true == $raindrops_extend_customizer && isset( $wp_customize ) ) {
if ( false !== ( $path = raindrops_locate_url( 'lib/customize.php', 'path' ) ) ) {
require_once ( $path );
}
}
/**
* It has hooks.
*
*
*
*
*/
if ( false !== ( $path = raindrops_locate_url( 'lib/hooks.php', 'path' ) ) ) {
require_once ( $path );
}
/**
*
*
*
* @since 1.138
*/
$raindrops_options_owner = raindrops_warehouse_clone( 'raindrops_options_owner' );
if ( isset( $raindrops_options_owner ) && $raindrops_current_theme_name !== $raindrops_options_owner ) {
raindrops_update_theme_option( 'raindrops_options_owner', $raindrops_current_theme_name );
}
/**
*
*/
add_action( 'wp_enqueue_scripts', 'raindrops_add_stylesheet' );
/**
*
*/
register_nav_menus( array( 'primary' => esc_html__( 'Primary Navigation', 'raindrops' ), ) );
if ( ! function_exists( 'raindrops_extend_query' ) ) {
/**
* Accessibility Settings
*
* When true
* Add to hidden text for identify entry-title link text, comment link text, more link
*
* @since 1.116
*/
function raindrops_extend_query( $vars ) {
$vars[] = 'raindrops_color_type';
$vars[] = 'raindrops_pid';
return $vars;
}
}
if ( 'yes' == raindrops_warehouse_clone( 'raindrops_accessibility_settings' ) ) {
$raindrops_accessibility_link = false;
}
if ( ! function_exists( 'raindrops_current_url' ) ) {
/**
* old function
* new raindrops_request_url()
* @return type
*/
function raindrops_current_url() {
$url = 'http';
$server_https = filter_input( INPUT_SERVER, 'HTTPS' );
if ( !is_null( $server_https ) && "on" == $server_https ) {
$url = "https";
}
$url .= "://";
$server_port = filter_input( INPUT_ENV, "SERVER_PORT", FILTER_VALIDATE_INT );
$server_name = filter_input( INPUT_ENV, "SERVER_NAME" );
$request_uri = filter_input( INPUT_ENV, "REQUEST_URI" );
if ( !is_null( $server_port ) && 80 !== $server_port ) {
$url .= $server_name . ":" . $server_port . $request_uri;
} else {
$url .= $server_name . $request_uri;
}
$url = esc_url( $url );
return apply_filters( 'raindrops_current_url', $url );
}
}
if ( ! function_exists( 'raindrops_request_url' ) ) {
/**
* @since 1.525
* @global type $wp
* @return type
*/
function raindrops_request_url() {
global $wp;
return home_url( $wp->request );
}
}
/**
* home link
*
* ver 1.116 default value change
* if you need home link then $raindrops_nav_menu_home_link set true.
*/
if ( !isset( $raindrops_nav_menu_home_link ) ) {
$raindrops_link_unique_text = raindrops_link_unique_text();
if ( true == $raindrops_link_unique_text ) {
$raindrops_nav_menu_home_link = false;
} else {
$raindrops_nav_menu_home_link = true;
}
}
/**
* HTML document type
*
*
*
* Now only 'xhtml'
* ver 0.999 add type 'html5'
*/
if ( !isset( $raindrops_document_type ) ) {
if ( 'xhtml' == raindrops_warehouse_clone( 'raindrops_doc_type_settings' ) ) {
$raindrops_document_type = 'xhtml';
} else {
$raindrops_document_type = 'html5';
add_theme_support( 'html5', array( 'gallery', 'caption' ) );
}
}
if ( ! function_exists( 'raindrops_gallery_atts' ) ) {
/**
*
* @global type $raindrops_extend_galleries
* @param type $out
* @param type $pairs
* @param type $atts
* @return gallery default attribute value
* @since 1.269
*/
function raindrops_gallery_atts( $out, $pairs, $atts ) {
global $raindrops_extend_galleries;
if ( $raindrops_extend_galleries !== true ) {
return $out;
}
if ( empty( $atts[ "columns" ] ) || $atts[ "columns" ] < 4 ) {
if ( isset( $atts[ "columns" ] ) && 1 == $atts[ "columns" ] ) {
$gallary_img_size = 'large';
} else {
$gallary_img_size = 'medium';
}
$atts = shortcode_atts( array( 'size' => $gallary_img_size, ), $atts );
$out[ 'size' ] = $atts[ 'size' ];
}
return $out;
}
}
add_filter( 'shortcode_atts_gallery', 'raindrops_gallery_atts', 10, 3 );
/**
* Force Document type for lt IE9 Old Browser
* Note: This setting is SERVER_SIDE Setting, I recommend that the browser is set when the cache of less than IE9 as not performed
*
* Raindrops 1.204 remove from header.php
* <!--[if IE]>
* <script src="http : // html5shiv.googlecode.com / svn / trunk / html5.js"></script>
* <![endif]-->
*
*
* ver 1.204
*/
if ( $is_IE ) {
$http_user_agent = filter_input( INPUT_ENV, 'HTTP_USER_AGENT' );
preg_match( "|(MSIE )([0-9]{1,2})(\.)|si", $http_user_agent, $raindrops_regs );
if ( isset( $raindrops_regs[ 2 ] ) && $raindrops_regs[ 2 ] < 9 ) {
$raindrops_document_type = 'xhtml';
remove_theme_support( 'html5' );
}
}
/**
*
*
* $raindrops_post_formats_args
* add ver0.991 gallery,status
*/
if ( !isset( $raindrops_post_formats_args ) ) {
$raindrops_post_formats_args = apply_filters( 'raindrops_post_formats_args', array( 'aside', 'gallery', 'chat', 'link', 'image', 'status', 'quote', 'video' ) );
add_theme_support( 'post-formats', $raindrops_post_formats_args );
}
/**
*
*
*
* $raindrops_custom_background_args
*
*/
if ( !isset( $raindrops_custom_background_args ) ) {
$raindrops_custom_background_args = apply_filters( 'raindrops_custom_background_args', array(
'default-color' => '',
'default-image' => '',
) );
add_theme_support( 'custom-background', $raindrops_custom_background_args );
}
/**
*
*
*
*
*
*/
add_theme_support( 'post-thumbnails' );
/**
*
*
*
*
*
*/
add_theme_support( 'automatic-feed-links' );
/**
* Content width implementation by manual labor
*
* If you need specific $content_width.
* value set 400 When not setting or empty.
*
*/
//$content_width = '';
/**
* $raindrops_fluid_minimum_width for IE
*
* IE browser not support responsive
*
* $raindrops_fluid_minimum_width
*
*/
if ( $is_IE ) {
$http_user_agent = filter_input( INPUT_ENV, 'HTTP_USER_AGENT' );
preg_match( "|(MSIE )([0-9]{1,2})(\.)|si", $http_user_agent, $regs );
if ( isset( $regs[ 2 ] ) && $regs[ 2 ] < 9 ) {
$raindrops_fluid_minimum_width = apply_filters( 'raindrops_fluid_minimum_width_lt_ie9', '640' );
}
}
/**
* fluid page main column maximum width px
*
*
*
* $raindrops_fluid_maximum_width
*
*/
if ( !isset( $raindrops_fluid_maximum_width ) ) {
$raindrops_fluid_maximum_width = raindrops_warehouse_clone( 'raindrops_fluid_max_width' );
}
if ( ! function_exists( 'raindrops_reset_theme_options' ) ) {
/**
* @since 1.401
*/
function raindrops_reset_theme_options() {
global $raindrops_setting_type, $raindrops_base_setting_args;
if ( 'yes' == raindrops_warehouse_clone( 'raindrops_reset_options' ) ) {
if ( 'option' == $raindrops_setting_type ) {
delete_option( 'raindrops_theme_settings' );
raindrops_update_theme_option( 'raindrops_reset_options', 'no' );
}
}
if ( 'theme_mod' == $raindrops_setting_type && 'yes' == get_theme_mod( 'raindrops_reset_options' ) ) {
foreach ( $raindrops_base_setting_args as $key => $name ) {
if ( $key == 'raindrops_footer_link_color' ||
$key == 'raindrops_footer_color' ||
$key == 'raindrops_hyperlink_color' ||
$key == 'raindrops_default_fonts_color' ) {
set_theme_mod( $key, raindrops_default_colors_clone( 'dark', $key ) );
} else {
set_theme_mod( $key, raindrops_warehouse_clone( $key, 'option_value' ) );
}
}
set_theme_mod( 'raindrops_reset_options', 'no' );
}
}
}
add_action( 'customize_save_after', 'raindrops_reset_theme_options' );
if ( ! function_exists( 'raindrops_reset_custom_color' ) ) {
/**
*
* @global type $raindrops_base_setting_args
* @since 1.401
*/
function raindrops_reset_custom_color() {
global $raindrops_base_setting_args;
if ( 'automatic' == raindrops_warehouse_clone( 'raindrops_color_select' ) ) {
$change_settings = array( 'raindrops_default_fonts_color', 'raindrops_complementary_color_for_title_link',
'raindrops_footer_color', 'raindrops_hyperlink_color', 'raindrops_footer_link_color' );
foreach ( $raindrops_base_setting_args as $key => $val ) {
if ( in_array( $key, $change_settings ) ) {
$validate_function = $key . '_validate';
if ( isset( $val[ 'option_value' ] ) ) {
$raindrops_color_default_val = $validate_function( $val[ 'option_value' ] );
raindrops_update_theme_option( $key, $raindrops_color_default_val );
}
}
}
}
}
}
add_action( 'customize_save_after', 'raindrops_reset_custom_color' );
/**
*
*
*
* @since 1.127
*/
if ( ! function_exists( 'raindrops_detect_display_none_condition' ) ) {
function raindrops_detect_display_none_condition() {
global $raindrops_where_display_none;
if ( !isset( $raindrops_where_display_none ) || empty( $raindrops_where_display_none ) ) {
$raindrops_display_none_pages = array();
if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_home' ) == 'none' ) {
$raindrops_display_none_pages[] = 'is_home';
}
if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_category' ) == 'none' ) {
$raindrops_display_none_pages[] = 'is_category';
}
if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_search' ) == 'none' ) {
$raindrops_display_none_pages[] = 'is_search';
}
$raindrops_where_display_none = $raindrops_display_none_pages;
}
if ( !empty( $raindrops_where_display_none ) && is_array( $raindrops_where_display_none ) ) {
foreach ( $raindrops_where_display_none as $excerpt ) {
if ( true == $excerpt() ) {
return true;
}
}
}
return false;
}
}
/**
* Custom image header
* $raindrops_custom_header_args
*/
add_filter( 'raindrops_header_image_width', 'raindrops_responsive_width_ajust' );
add_filter( 'raindrops_header_image_height', 'raindrops_responsive_height_ajust' );
if ( !isset( $raindrops_custom_header_args ) ) {
$raindrops_custom_header_width = apply_filters( 'raindrops_header_image_width', absint( raindrops_detect_header_image_size_clone( 'width' ) ) );
$raindrops_custom_header_height = apply_filters( 'raindrops_header_image_height', absint( raindrops_detect_header_image_size_clone( 'height' ) ) );
$raindrops_current_style_type = raindrops_warehouse_clone( 'raindrops_style_type' );
$raindrops_custom_header_args = array(
'default-text-color' => raindrops_default_colors_clone( $raindrops_current_style_type, "header_textcolor", true ),
'width' => $raindrops_custom_header_width,
'flex-width' => true,
'height' => $raindrops_custom_header_height,
'flex-height' => true,
'header-text' => true,
'default-image' => '%1$s/images/headers/wp3.jpg',
'wp-head-callback' => apply_filters( 'raindrops_wp-head-callback', 'raindrops_embed_meta' ),
);
if ( function_exists( 'has_header_video' ) ) {
/**
* WordPress 4.7 check
*/
$raindrops_custom_header_args[ 'video' ] = true;
}
add_theme_support( 'custom-header', apply_filters( 'raindrops_custom_header_args', $raindrops_custom_header_args ) );
/**
* Add for WordPress 4.1
* @since 1.260
*/
register_default_headers( array(
'raindrops' => array(
'url' => '%s/images/headers/wp3.jpg',
'thumbnail_url' => '%s/images/headers/wp3-thumbnail.jpg',
),
) );
}
if ( ! function_exists( 'raindrops_detect_excerpt_condition' ) ) {
function raindrops_detect_excerpt_condition() {
global $raindrops_where_excerpts, $post;
if ( !isset( $raindrops_where_excerpts ) || empty( $raindrops_where_excerpts ) ) {
$raindrops_where_excerpts = array();
}
if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_home' ) == 'excerpt' ||
raindrops_warehouse_clone( 'raindrops_entry_content_is_home' ) == 'excerpt_grid' ) {
$raindrops_where_excerpts[] = 'is_home';
}
if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_category' ) == 'excerpt' ||
raindrops_warehouse_clone( 'raindrops_entry_content_is_category' ) == 'excerpt_grid' ) {
$raindrops_where_excerpts[] = 'is_category';
}
if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_search' ) == 'excerpt' ||
raindrops_warehouse_clone( 'raindrops_entry_content_is_search' ) == 'excerpt_grid' ) {
$raindrops_where_excerpts[] = 'is_search';
}
if ( RAINDROPS_USE_LIST_EXCERPT !== true ) {
return false;
}
if ( !empty( $raindrops_where_excerpts ) ) {
$raindrops_where_excerpts = array_unique( $raindrops_where_excerpts );
foreach ( $raindrops_where_excerpts as $excerpt ) {
if ( true == $excerpt() ) {
return true;
}
}
}
return false;
}
}
if ( !isset( $raindrops_theme_settings ) ) {
$raindrops_theme_settings = get_option( 'raindrops_theme_settings', 'no' );
}
/**
* widget settings
*
* Registered Default Sidebar, Extra Sidebar, Sticky Widget, Footer Widget, Category Blog Widget
*
* @since 1.119 Widget label change from Category Blog Widget to Status Sidebar
*
*/
if ( ! function_exists( 'raindrops_widgets_init' ) ) {
function raindrops_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Default Sidebar', 'raindrops' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '<li id="%1$s" class="%2$s widget default" ' . raindrops_doctype_elements( '', 'tabindex="-1"', false ) . '>',
'after_widget' => "</li>\n",
'before_title' => "\n\t<h2 class=\"widgettitle default h2\"><span>",
'after_title' => "</span></h2>\n",
'widget_id' => 'default',
'widget_name' => 'default',
'text' => "1" ) );
register_sidebar( array(
'name' => esc_html__( 'Extra Sidebar', 'raindrops' ),
'id' => 'sidebar-2',
'description' => '',
'before_widget' => '<li id="%1$s" class="%2$s widget extra" ' . raindrops_doctype_elements( '', 'tabindex="-1"', false ) . '>',
'after_widget' => "</li>\n",
'before_title' => "\n\t<h2 class=\"widgettitle extra h2\"><span>",
'after_title' => "</span></h2>\n",
'widget_id' => 'extra',
'widget_name' => 'extra',
'text' => "2" ) );
register_sidebar( array(
'name' => esc_html__( 'Sticky Widget', 'raindrops' ),
'id' => 'sidebar-3',
'description' => '',
'before_widget' => '<li id="%1$s" class="%2$s widget sticky-widget" ' . raindrops_doctype_elements( '', 'tabindex="-1"', false ) . '>',
'after_widget' => '</li>',
'before_title' => "\n\t<h2 class=\"widgettitle home-top-content h2\"><span>",
'after_title' => "</span></h2>\n",
'widget_id' => 'toppage2',
'widget_name' => 'toppage2',
'text' => "3" ) );
register_sidebar( array(
'name' => esc_html__( 'Footer Widget', 'raindrops' ),
'id' => 'sidebar-4',
'description' => '',
'before_widget' => '<li id="%1$s" class="%2$s widget footer-widget" ' . raindrops_doctype_elements( '', 'tabindex="-1"', false ) . '>',
'after_widget' => "</li>\n",
'before_title' => "\n\t<h2 class=\"widgettitle footer-widget h2\"><span>",
'after_title' => "</span></h2>\n",
'widget_id' => 'footer',
'widget_name' => 'footer',
'text' => "4" ) );
register_sidebar( array(
'name' => esc_html__( 'Post Format Status Sidebar', 'raindrops' ),
'id' => 'sidebar-5',
'description' => '',
'before_widget' => '<li id="%1$s" class="%2$s widget category-blog-widget status-side-bar" ' . raindrops_doctype_elements( '', 'tabindex="-1"', false ) . '>',
'after_widget' => "</li>\n",
'before_title' => "\n\t<h2 class=\"widgettitle category-blog-widget h2 status-side-bar\">",
'after_title' => "</h2>\n",
'widget_id' => 'categoryblog',
'widget_name' => 'categoryblog',
'text' => "5" ) );
}
}
/**
*
*
*
*
* @since 1.238
*/
if ( isset( $raindrops_base_font_size ) ) {
raindrops_update_theme_option( 'raindrops_basefont_settings', $raindrops_base_font_size );
}
/**
* @since 1.278
*/
if ( raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) == 'hide' ) {
$rsidebar_show = false;
} else {
$rsidebar_show = true;
}
if ( !isset( $raindrops_current_style_type ) ) {
$raindrops_current_style_type = raindrops_warehouse_clone( "raindrops_style_type" );
}
/**
* Content width setup
*
*
*
*
*
*/
if ( !isset( $content_width ) || empty( $content_width ) ) {
$content_width = apply_filters( 'raindrops_content_width', raindrops_content_width_clone() );
}
add_action( 'widgets_init', 'raindrops_widgets_init' );
/**
* Add option helper
*
*
*
*
*
*/
foreach ( $raindrops_base_setting as $setting ) {
$function_name = $setting[ 'option_name' ] . '_validate';
if ( ! function_exists( $function_name ) ) {
/* translators: 1: theme option name 2: theme validate function name */
$message = sprintf( esc_html__( 'If you add %1$s when you must create function %2$s for data validation', 'raindrops' ), $setting[ 'option_name' ], $function_name );
printf( '<script type="text/javascript">alert( \'%1$s\' );</script>', $message );
return;
}
}
/**
* Extend body_class( )
*
*
* add browser class, languages class,
*
*
*/
if ( ! function_exists( 'raindrops_add_body_class' ) ) {
function raindrops_add_body_class( $classes ) {
global $post, $current_blog, $raindrops_link_unique_text, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $raindrops_browser_detection, $raindrops_status_bar, $raindrops_current_column, $raindrops_setting_type, $raindrops_change_all_excerpt_archives_to_grid_layout, $raindrops_where_excerpts;
$raindrops_link_unique_text = raindrops_link_unique_text();
$classes[] = get_locale();
$keyboard_support = raindrops_enable_keyboard();
if ( 'enable' == $keyboard_support && true !== $raindrops_link_unique_text ) {
$classes[] = 'enable-keyboard';
}
if( true == raindrops_is_grid_archives() ) {
/**
* @1.464
*/
$classes[] = 'rd-grid';
}
if ( 'yes' == get_theme_mod( 'raindrops_year_2017_base_settings' ) ) {
/**
* @since 1.457
*/
$classes[] = 'rd-2017-base-setting';
}
/**
* @since 1.447
* this class will removed jQuery removeClass
*/
$classes[] = 'noscript';
/**
* @since 1.415
* add $builtin_type @1.440
*/
$builtin_type = false;
if ( isset( $post->post_type ) && ( "post" == $post->post_type || "page" == $post->post_type || "attachment" == $post->post_type || "revision" == $post->post_type || "nav_menu_item" == $post->post_type ) ) {
$builtin_type = true;
}
if ( 'yes' == raindrops_warehouse_clone( 'raindrops_color_coded_category' ) && true == $builtin_type ) {
$classes[] = 'rd-cat-em';
}
if ( 'yes' == raindrops_warehouse_clone( 'raindrops_color_coded_post_tag' ) && true == $builtin_type ) {
$classes[] = 'rd-tag-em';
}
/**
* @since 1.307
*/
if ( is_home() ) {
$raindrops_use_featured_image_emphasis = raindrops_warehouse_clone( 'raindrops_use_featured_image_emphasis' );
// yes no
$raindrops_featured_image_position = raindrops_warehouse_clone( 'raindrops_featured_image_position' );
//left front
$classes[] = 'rd-featured-' . $raindrops_use_featured_image_emphasis . '-' . $raindrops_featured_image_position;
}
/**
* @since 1.497
*/
$classes[] = sanitize_html_class( "rd-basefont-" . raindrops_warehouse_clone( 'raindrops_basefont_settings' ) );
/**
* @since 1.289
*/
$classes[] = sanitize_html_class( "rd-pw-" . raindrops_warehouse( 'raindrops_page_width' ) );
if ( is_child_theme() ) {
raindrops_filter_page_column_control();
}
if ( isset( $raindrops_current_column ) && !empty( $raindrops_current_column ) ) {
$classes[] = sanitize_html_class( 'rd-col-' . $raindrops_current_column );
}
/**
* @since 1.447
*/
$raindrops_content_width_setting = raindrops_warehouse_clone( 'raindrops_content_width_setting' );
if ( isset( $raindrops_current_column ) && 1 == $raindrops_current_column ) {
$classes[] = sanitize_html_class( 'rd-content-width-' . $raindrops_content_width_setting );
}
if ( current_theme_supports( 'align-wide' ) && 'keep' !== $raindrops_content_width_setting ) {
/**
* @1.515
*/
$classes[] = 'enable-align-wide';
}
/**
*
*/
$paragraph_wrap_enable = raindrops_warehouse_clone( 'raindrops_paragraph_line_wrapping' );
if( 'enable' == $paragraph_wrap_enable ) {
$classes[] = 'paragraph_wrap_enable';
}
/**
* @1.401
*/
if ( 'option' == $raindrops_setting_type ) {
$customized = get_option( 'raindrops_theme_settings' );
if ( false == $customized ) {
$raindrops_is_customized = 'default';
$classes[] = sanitize_html_class( 'rd-option-' . $raindrops_is_customized );
}
/**
* @1.434
*/
$classes[] = 'rd-setting-option';
} else {
$classes[] = 'rd-setting-mod';
}
$doc_type = raindrops_warehouse_clone( 'raindrops_doc_type_settings' );
if ( function_exists( 'has_header_video' ) && is_header_video_active() && has_header_video() && 'html5' == $doc_type ) {
/**
* @since 1.445
*/
$classes[] = 'rd-video-header';
}
if ( is_single() || is_page() ) {
$raindrops_style_type = raindrops_warehouse_clone( "raindrops_style_type" );
if ( isset( $raindrops_style_type ) && !empty( $raindrops_style_type ) ) {
$color_type = sanitize_html_class( "rd-type-" . $raindrops_style_type );
}
if ( false !== ($type = raindrops_has_indivisual_notation() ) ) {
if ( isset( $type[ 'color_type' ] ) ) {
$color_type = sanitize_html_class( "rd-type-" . $type[ 'color_type' ] );
}
}
if ( !isset( $color_type ) ) { // When not using database
$color_type = sanitize_html_class( "rd-type-" . raindrops_warehouse( 'raindrops_style_type', 'option_value' ) );
}
$classes[] = $color_type;
} else {
$raindrops_style_type = raindrops_warehouse_clone( "raindrops_style_type" );
if ( isset( $raindrops_style_type ) && !empty( $raindrops_style_type ) ) {
$classes[] = sanitize_html_class( "rd-type-" . $raindrops_style_type );
}
}
if ( true == $raindrops_browser_detection ) {
$blowser_lang = raindrops_get_accept_language();
if ( !empty( $blowser_lang ) ) {
$browser_lang = 'accept-lang-' . $blowser_lang;
$classes[] = sanitize_html_class( $browser_lang );
}
switch ( true ) {
case ( $is_lynx ):
$classes[] = 'lynx';
break;
case ( $is_gecko ):
$classes[] = 'gecko';
break;
case ( $is_IE ):
$http_user_agent = filter_input( INPUT_ENV, 'HTTP_USER_AGENT' );
if ( preg_match( '!Trident/.*rv:([0-9]{1,}\.[\.0-9]{0,})!', $http_user_agent, $regs ) ) {
$classes[] = sanitize_html_class( 'ie' . (int) $regs[ 1 ] );
}
preg_match( "|(MSIE )([0-9]{1,2})(\.)|si", $http_user_agent, $regs );
if ( isset( $regs[ 2 ] ) ) {
$classes[] = sanitize_html_class( 'ie' . $regs[ 2 ] );
}
break;
case ( $is_opera ):
$classes[] = 'opera';
break;
case ( $is_NS4 ):
$classes[] = 'ns4';
break;
case ( $is_safari ):
$classes[] = 'safari';
break;
case ( $is_chrome ):
$classes[] = 'chrome';
break;
case ( $is_iphone ):
$classes[] = 'iphone';
break;
default:
$classes[] = 'unknown2';
break;
}
}
if ( isset( $current_blog ) ) {
$classes[] = "b" . absint( $current_blog->blog_id );
}
if ( true == $raindrops_link_unique_text ) {
$classes[] = 'raindrops-accessible-mode';
}
if ( !isset( $raindrops_status_bar ) ) {
$raindrops_status_bar = raindrops_warehouse_clone( 'raindrops_status_bar' );
if ( 'show' == $raindrops_status_bar ) {
$raindrops_status_bar = true;
} else {
$raindrops_status_bar = false;
}
}
if ( isset( $raindrops_status_bar ) && $raindrops_status_bar == true ) {
$classes[] = 'raindrops-status-bar-active';
}
return apply_filters( "raindrops_add_body_class", $classes );
}
}
/**
* wp_list_comments callback function
*
*
*
* comments.php
*
*/
if ( ! function_exists( 'raindrops_comment' ) ) {
function raindrops_comment( $comment, $args, $depth ) {
if ( '' == $comment->comment_type ) {
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-author vcard">
<?php
$core_avatar_setting = get_option( 'show_avatars' );
if ( !empty( $core_avatar_setting ) ) {
printf( '<div class="raindrops-comment-avatar">%1$s</div>', get_avatar( $comment, 160, '', esc_attr__( 'Avatar', 'raindrops' ) . ' ' . esc_attr( strip_tags( get_comment_author_link() ) ) ) );
}
?>
<div class="raindrops-comment-author-meta">
<?php
printf( '%1$s <span class="says">%2$s</span>', sprintf( '<cite class="fn">%s</cite> ', get_comment_author_link() ), esc_html__( 'says:', 'raindrops' ) );
?>
</div>
<div class="comment-meta commentmetadata clearfix">
<a href="<?php
/* translators: 1: comment date 2: comment time */
echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( esc_html__( '%1$s at %2$s', 'raindrops' ), get_comment_date(), get_comment_time() ); ?></a>
<?php
edit_comment_link( esc_html__( ' Edit ', 'raindrops' ) . raindrops_link_unique( 'Comment', $comment->comment_ID ), ' ' );
?>
</div>
</div>
<!-- .comment-author .vcard -->
<?php
if ( '0' == $comment->comment_approved ) {
?>
<div class="clearfix awaiting"> <em><?php esc_html_e( 'Your comment is awaiting moderation.', 'raindrops' ); ?></em>
<br />
</div>
<?php
} //endif
?>
<!-- .comment-meta .commentmetadata -->
<div class="comment-body">
<?php
comment_text();
?>
</div>
<div class="reply">
<?php
$raindrops_comment_reply_text = esc_html__( 'Reply', 'raindrops' ) . raindrops_link_unique( 'Comment', $comment->comment_ID );
comment_reply_link( array_merge( $args, array( 'reply_text' => $raindrops_comment_reply_text, 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) );
?>
</div>
<!-- .reply -->
</div>
<!-- #comment-## -->
<?php
} else {
?>
<li class="post pingback">
<p>
<?php
esc_html_e( 'Pingback:', 'raindrops' );
comment_author_link();
echo ' ';
edit_comment_link( esc_html__( ' Edit ', 'raindrops' ) . raindrops_link_unique( 'Comment', $comment->comment_ID ), ' ' );
?>
</p>
<?php
} //endif
}
}
/**
* Template function posted in
*
*
*
* loop.php
*
*/
if ( ! function_exists( 'raindrops_posted_in' ) ) {
function raindrops_posted_in() {
$exclude_category_conditionals = apply_filters( 'raindrops_posted_in_category', array( 'is_category' => 'raindrops_post_category_relation' ) );
$exclude_tag_conditional = apply_filters( 'raindrops_posted_in_tag', array( 'is_tag' => '' ) );
global $post, $raindrops_tag_emoji, $raindrops_category_emoji;
if ( is_sticky() ) {
return;
}
$format = get_post_format( $post->ID );
$tag_list = raindrops_get_the_posted_in_tag( '', ' ' );
$categories_list = raindrops_get_the_posted_in_category( ' ' );
$post_category_hide_check = raindrops_warehouse_clone( 'raindrops_color_coded_category' );
$post_tag_hide_check = raindrops_warehouse_clone( 'raindrops_color_coded_post_tag' );
if ( !empty( $exclude_category_conditionals ) && is_array( $exclude_category_conditionals ) ) {
foreach ( $exclude_category_conditionals as $key => $conditional ) {
if ( function_exists( $key ) && true == $key() ) {
if ( empty( $conditional ) ) {
$categories_list = '';
} elseif ( function_exists( $conditional ) ) {
$categories_list = $conditional();
}
}
}
}
if ( !empty( $exclude_tag_conditionals ) && is_array( $exclude_tag_conditionals ) ) {
foreach ( $exclude_tag_conditionals as $key => $conditional ) {
if ( function_exists( $key ) && true == $key() ) {
if ( empty( $conditional ) ) {
$tag_list = '';
} elseif ( function_exists( $conditional ) ) {
$tag_list = $conditional();
}
}
}
}
if ( 'emoji' == raindrops_warehouse_clone( 'raindrops_posted_in_label' ) ) {
$category_label = $raindrops_category_emoji . '<span class="screen-reader-text">' . esc_html__( 'This entry was posted in', 'raindrops' ) . '</span>';
$tag_label = $raindrops_tag_emoji . '<span class="screen-reader-text">' . esc_html__( 'and tagged', 'raindrops' ) . '</span>';
$categories = wp_get_post_categories( $post->ID );
$categories_count = count( $categories );
$default_category_id = absint( get_option( 'default_category' ) );
$raindrops_display_default_category = raindrops_warehouse_clone( 'raindrops_display_default_category' );
if ( $categories_count == 1 && absint( $categories[ 0 ] ) == absint( $default_category_id ) && 'show' !== $raindrops_display_default_category ) {
$category_label = '';
}
if ( is_category() ) {
$category_label = '';
}
} else {
$category_label = esc_html__( 'This entry was posted in', 'raindrops' );
$tag_label = esc_html__( 'and tagged', 'raindrops' );
}
if ( false === $format ) {
if ( 'hide' == $post_category_hide_check ) {
$category_label = '';
}
if ( ! isset( $post ) || 'hide' == $post_tag_hide_check ) {
$tag_label = '';
}
if ( $tag_list ) {
$posted_in = '<span class="this-posted-in">' .
$category_label .
'</span><span class="post-category"> %1$s </span><span class="tagged">' .
$tag_label .
'</span><span class="post-tag"> %2$s </span>';
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = '<span class="this-posted-in">' . $category_label . '</span><span class="post-category"> %1$s </span>';
} else {
$posted_in = '';
}
if ( 'hide' == $post_category_hide_check ) {
$categories_list = '';
}
if ( ! isset( $post ) || 'hide' == $post_tag_hide_check ) {
$tag_list = '';
}
$result = $format . sprintf( $posted_in, $categories_list, $tag_list );
$result = apply_filters( "raindrops_posted_in", $result );
echo $result;
} else {
if ( $tag_list ) {
if ( 'hide' == $post_category_hide_check ) {
$category_label = '';
}
if ( ! isset( $post ) || 'hide' == $post_tag_hide_check ) {
$tag_label = '';
}
$posted_in = '<span class="this-posted-in">' . $category_label . '</span><span class="post-category"> %1$s </span><span class="tagged">' . $tag_label . '</span> <span class="post-tag"> %2$s </span>' . ' <span class="post-format-wrap"><span class="post-format-text">%4$s</span> <a href="%3$s"> <span class="post-format">%5$s</span></a></span>';
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = '<span class="this-posted-in">' . $category_label . '</span> <span class="post-category">%1$s %2$s</span>' . ' <span class="post-format-wrap"><span class="post-format-text">%4$s</span><a href="%3$s"> <span class="post-format">%5$s</span></a></span>';
} else {
$posted_in = '<a href="%3$s"> <span class="post-format-wrap"><span class="post-format-text">%4$s</span> <span class="post-format">%5$s</span></span></a>';
}
if ( ! is_object_in_taxonomy( get_post_type(), 'category' ) ) {
if ( 'hide' == $post_category_hide_check ) {
$categories_list = '';
}
if ( ! isset( $post ) || 'hide' == $post_tag_hide_check ) {
$tag_list = '';
}
}
$result = sprintf( $posted_in, $categories_list, $tag_list, esc_url( get_post_format_link( $format ) ), esc_html( 'Format', 'raindrops' ), get_post_format_string( $format ) );
$result = apply_filters( "raindrops_posted_in", $result );
echo $result;
}
edit_post_link( esc_html__( 'Edit', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '<span class="edit-link">', '</span>' );
raindrops_delete_post_link( esc_html__( 'Trash', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '<span class="edit-link">', '</span>' );
}
}
/**
* Template function raindrops_comments_link
*
*
*
* loop.php
* @since 1.163
*/
if ( ! function_exists( 'raindrops_comments_link' ) ) {
function raindrops_comments_link() {
if ( comments_open() ) {
$raindrops_comment_html = '<a href="%1$s" class="raindrops-comment-link"><span class="raindrops-comment-string point"></span><em>%2$s %3$s</em></a>';
if ( get_comments_number() > 0 ) {
$raindrops_comment_string = _n( 'Comment', 'Comments', get_comments_number(), 'raindrops' ) . raindrops_link_unique( 'Post', get_the_ID() );
$raindrops_comment_number = get_comments_number();
} else {
$raindrops_comment_string = __( 'Comment ', 'raindrops' ) . raindrops_link_unique( 'Post', get_the_ID() );
$raindrops_comment_number = '';
}
} else {
$raindrops_comment_html = '';
$raindrops_comment_string = '';
$raindrops_comment_number = '';
}
$result = sprintf( $raindrops_comment_html, get_comments_link(), $raindrops_comment_number, $raindrops_comment_string );
return apply_filters( 'raindrops_comments_link', $result, get_comments_link(), $raindrops_comment_number, $raindrops_comment_string );
}
}
if ( ! function_exists( 'raindrops_post_author' ) ) {
/**
* loop
* @global type $post
* @return type
* @since 1.272
*/
function raindrops_post_author() {
global $post;
$author = raindrops_blank_fallback( get_the_author(), 'Somebody' );
/* translators: 1: post author */
$author_attr_title_string = sprintf( esc_attr__( 'View all posts by %s', 'raindrops' ), wp_kses( $author, array() ) );
$author_html = '<span class="author vcard"><a class="url fn nickname" href="%1$s" title="%2$s">%3$s</a></span> ';
if ( "avatar" == raindrops_warehouse_clone( 'raindrops_display_article_author' ) ) {
$author = get_avatar( get_the_author_meta( 'ID' ), 24 ) . '<span class="screen-reader-text">' . $author . '</span>';
}
$author_html = sprintf( $author_html, get_author_posts_url( get_the_author_meta( 'ID' ) ), $author_attr_title_string, $author );
$author_html = apply_filters( 'raindrops_post_author', $author_html );
return $author_html;
}
}
if ( ! function_exists( 'raindrops_post_date' ) ) {
/**
* loop
* @global type $post
* @return type
* @since1.272
*/
function raindrops_post_date() {
global $post, $raindrops_posted_on_date_emoji;
$published_class = 'updated';
if( isset( $post ) && $post->post_date == $post->post_modified ) {
/* @since 1.480 */
$published_class = 'published';
}
$entry_date_html = '<a href="%1$s" title="%2$s"><%4$s class="entry-date %6$s" %5$s>%3$s</%4$s></a>';
$archive_year = get_the_time( 'Y' );
$archive_month = get_the_time( 'm' );
$archive_day = get_the_time( 'd' );
$day_link = esc_url( get_day_link( $archive_year, $archive_month, $archive_day ) . '#post-' . $post->ID );
$raindrops_date_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
$date_text = get_the_date( $raindrops_date_format );
if ( 'emoji' == raindrops_warehouse_clone( 'raindrops_display_article_publish_date' ) ) {
$date_text = '<span class="emoji-date">' . $raindrops_posted_on_date_emoji . '</span><span class="screen-reader-text">' . $date_text . '</span>';
}
$entry_date_html = sprintf( $entry_date_html, $day_link, esc_attr( 'archives daily ' . get_the_date( $raindrops_date_format ) ), $date_text, raindrops_doctype_elements( 'span', 'time', false ), raindrops_doctype_elements( '', 'datetime="' . esc_attr( get_the_date( 'c' ) ) . '"', false ), $published_class
);
/**
* Custom Post Type Dairy Archives link not yet
* @since 1.443
*/
$post_type = get_post_type( get_the_ID() );
if ( 'post' !== $post_type && 'page' !== $post_type ) {
$entry_date_html = '<%2$s class="entry-date %4$s" %3$s>%1$s</%2$s>';
$entry_date_html = sprintf( $entry_date_html, $date_text, raindrops_doctype_elements( 'span', 'time', false ), raindrops_doctype_elements( '', 'datetime="' . esc_attr( get_the_date( 'c' ) ) . '"', false )
, $published_class );
}
$entry_date_html = apply_filters( 'raindrops_post_date', $entry_date_html, $date_text, absint( $post->ID ) );
return $entry_date_html;
}
}
/**
* Template function posted_on
*
*
*
* loop.php
*
*/
if ( ! function_exists( 'raindrops_posted_on' ) ) {
function raindrops_posted_on() {
global $post;
$called_function = __FUNCTION__;
$author_html = apply_filters( 'raindrops_post_author', raindrops_post_author(), $called_function );
$entry_date_html = apply_filters( 'raindrops_post_date', raindrops_post_date(), $called_function );
$posted_on_comment_link = '';
if ( !is_attachment() ) {
/**
* @1.404
* Customize / Advanced / Show Attach to Post Date and Author in Attachment
* No needs comments link when attachment page
*/
$posted_on_comment_link = apply_filters( 'raindrops_comments_link', raindrops_comments_link(), $called_function );
}
$result = '<span class="meta-prep meta-prep-author">
<span class="posted-on-string">%1$s</span></span> %2$s
<span class="meta-sep"><span class="posted-by-string">%3$s</span></span> %4$s %5$s';
$result = apply_filters( 'raindrops_posted_on_result', $result );
$posted_on_string = '';
if ( !empty( $entry_date_html ) ) {
/**
* @1.404
*/
if ( is_attachment() ) {
$posted_on_string = esc_html__( 'Attached to Post on', 'raindrops' );
} elseif ( is_page() ) {
$posted_on_string = esc_html__( 'Created on', 'raindrops' );
} else {
$posted_on_string = esc_html__( 'Posted on', 'raindrops' );
}
}
$posted_by_string = '';
if ( !empty( $entry_date_html ) ) {
$posted_by_string = esc_html__( 'by', 'raindrops' );
}
$result = sprintf( $result, $posted_on_string, $entry_date_html, $posted_by_string, $author_html, $posted_on_comment_link );
$result = raindrops_remove_empty_span( $result );
$format = get_post_format();
$content_empty_check = '';
if ( isset( $post ) ) {
$content_empty_check = trim( get_the_content() );
}
if ( false === $format ) {
$result = apply_filters( "raindrops_posted_on", $result );
echo $result;
} elseif ( empty( $content_empty_check ) ) {
echo $posted_on_comment_link;
} else {
$result = apply_filters( "raindrops_posted_on", $result );
echo $result;
}
}
}
/**
* Special custom fields key css, javascript, metatags
*
*
* css,javascrip,meta is separated anothor Custom Field.
*
*
*/
if ( ! function_exists( 'raindrops_filter_explode_meta_keys' ) ) {
function raindrops_filter_explode_meta_keys( $content, $key ) {
$explode_keys = array( 'css', 'javascript', 'meta' );
if ( in_array( $key, $explode_keys ) ) {
return;
} else {
return $content;
}
}
}
/**
* Like a get_option( )
*
*
* Raindrops conditional response.
*
* for templates
*/
if ( ! function_exists( 'raindrops_warehouse' ) ) {
function raindrops_warehouse( $name, $property = false, $fallback = false ) {
return apply_filters( "raindrops_warehouse", raindrops_warehouse_clone( $name, $property, $fallback ) );
}
}
/**
* Return $raindrops_base_setting value.
*
*
*
*
*
*/
if ( ! function_exists( 'raindrops_admin_meta' ) ) {
function raindrops_admin_meta( $name, $meta_name ) {
global $raindrops_base_setting, $raindrops_page_width;
$raindrops_current_data = wp_get_theme();
$raindrops_current_data_version = $raindrops_current_data->get( 'Version' );
$raindrops_current_theme_name = $raindrops_current_data->get( 'Name' );
/**
* Theme version trainsitional setting
* Note: Maybe remove new version live
*/
if ( version_compare( $raindrops_current_data_version, '1.356.1', '<=' ) && 'boots' == $raindrops_current_theme_name ) {
return apply_filters( 'raindrops_admin_meta', raindrops_admin_meta_transitional( $name, $meta_name ) );
}
if ( version_compare( $raindrops_current_data_version, '1.216', '<=' ) && 'puddle' == $raindrops_current_theme_name ) {
return apply_filters( 'raindrops_admin_meta', raindrops_admin_meta_transitional( $name, $meta_name ) );
}
return apply_filters( 'raindrops_admin_meta', $raindrops_base_setting[ $name ][ $meta_name ] );
}
}
if ( ! function_exists( 'raindrops_admin_meta_transitional' ) ) {
function raindrops_admin_meta_transitional( $name, $meta_name ) {
global $raindrops_base_setting, $raindrops_page_width;
$vertical = array();
foreach ( $raindrops_base_setting as $key => $val ) {
if ( !is_null( $raindrops_base_setting ) ) {
$vertical[] = $val[ 'option_name' ];
}
}
$row = array_search( $name, $vertical );
return $raindrops_base_setting[ $row ][ $meta_name ];
}
}
/**
* Admin Panel help
*
*
*
*
*
*/
if ( ! function_exists( 'raindrops_settings_page_contextual_help' ) ) {
function raindrops_settings_page_contextual_help() {
global $raindrops_current_data;
$html = '<dt>%1$s</dt><dd>%2$s</dd>';
$link = '<a href="%1$s" %3$s>%2$s</a>';
$content = '';
/* theme URI */
$content .= sprintf( $html, esc_html__( 'Theme URI', 'raindrops' ), sprintf( $link, $raindrops_current_data->get( 'ThemeURI' ), $raindrops_current_data->get( 'ThemeURI' ), 'target="_self"' ) );
/* AuthorURI */
$content .= sprintf( $html, esc_html__( 'Author', 'raindrops' ), sprintf( $link, $raindrops_current_data->get( 'AuthorURI' ), $raindrops_current_data->get( 'Author' ), 'target="_self"' ) );
/* Support */
$content .= sprintf( $html, esc_html__( 'Support', 'raindrops' ), sprintf( $link, 'https://wordpress.org/support/theme/raindrops', esc_html__( 'https://wordpress.org/support/theme/raindrops', 'raindrops' ), 'target="_blank"' ) . '<br />' . sprintf( $link, 'https://ja.wordpress.org/', esc_html__( 'https://ja.wordpress.org/ lang:Japanese', 'raindrops' ), 'target="_blank"' ) );
/* Version */
$content .= sprintf( $html, esc_html__( 'Version', 'raindrops' ), $raindrops_current_data->get( 'Version' ) );
/* Changelog.txt */
$content .= sprintf( $html, esc_html__( 'Change log text', 'raindrops' ), sprintf( $link, get_template_directory_uri() . '/changelog.txt', esc_html__( 'Changelog , display new window', 'raindrops' ), 'target="_blank"' ), 'target = "_blank"' );
/* readme.txt */
$content .= sprintf( $html, esc_html__( 'Readme text', 'raindrops' ), sprintf( $link, get_template_directory_uri() . '/README.txt', esc_html__( 'Readme , display new window', 'raindrops' ), 'target="_blank"' ) );
$content = '<dl id="raindrops-help">' . $content . '</dl>';
return $content;
}
}
if ( ! function_exists( 'raindrops_editor_page_contextual_help' ) ) {
function raindrops_editor_page_contextual_help() {
global $raindrops_current_data;
$html = '<dt>%1$s</dt><dd>%2$s</dd>';
$link = '<a href="%1$s" %3$s>%2$s</a>';
$content = '';
$content .= sprintf( $html, esc_html__( 'Support', 'raindrops' ), sprintf( $link, 'https://wordpress.org/support/theme/raindrops', esc_html__( 'English', 'raindrops' ), 'target="_blank"' ) . '<br />' . sprintf( $link, 'https://ja.forums.wordpress.org/', esc_html__( 'Japanese', 'raindrops' ), 'target="_blank"' ) );
$help = '<h2>' . esc_html__( 'How to remove Site Title Block', 'raindrops' ) . '</h2><pre><code>#hd{display:none;}</code></pre>';
$help .= '<h2>' . esc_html__( 'How to remove Post Author Name', 'raindrops' ) . '</h2><pre><code>.posted-by-string,.author{display:none;}</code></pre>';
$help .= '<h2>' . esc_html__( 'How to remove Entry Date', 'raindrops' ) . '</h2><pre><code>.posted-on-string,.entry-date{display:none;}</code></pre>';
$help .= '<h2>' . esc_html__( 'How to remove Entry Meta', 'raindrops' ) . '</h2><pre><code>.entry-meta{display:none;}</code></pre>';
$help .= '<h2>' . esc_html__( 'How to remove Archive Title Label[ like Category Archives ]', 'raindrops' ) . '</h2><pre><code>#archives-title .label{display:none;}</code></pre>';
$help .= '<h2>' . esc_html__( 'How to remove Home list above next prev navigation link', 'raindrops' ) . '</h2><pre><code> #nav-above{ display:none;}</code></pre>';
$help .= '<p>' . esc_html__( 'above codes paste style.css last. If not change when Version value change ( line:9 )', 'raindrops' ) . '</p>';
$help = wpautop( $help );
$content = '<dl id="raindrops-help">' . $content . $help . '</dl>';
return $content;
}
}
/**
* Raindrops edit help
*
*
* Check the real color of the Cradation Class and the Color Class.
*
*
*/
if ( ! function_exists( 'raindrops_edit_help' ) ) {
function raindrops_edit_help( $text, $force = false ) {
global $post_type_object;
global $title;
if ( RAINDROPS_USE_AUTO_COLOR !== true && $force !== true ) {
return $text;
}
if ( ( isset( $post_type_object ) && ( $title == $post_type_object->labels->add_new_item || $title == $post_type_object->labels->edit_item ) || true == $force ) ) {
$result = "<h2 class=\"h2\">" . esc_html__( 'Tips', 'raindrops' ) . '</h2>';
$result .= '<p>' . esc_html__( 'If Raindrops Options panel is opened, and the reference color is set, this arrangement of color is changed at once.', 'raindrops' ) . "</p>";
$result .= "<dl><dt><h3 class=\"dm-color\">" . esc_html__( 'Dinamic Color Class', 'raindrops' ) . '</strong></h3>';
$result .= "<dd><a href=\"customize.php?autofocus[section]=raindrops_theme_settings_presentation\">" . esc_html__( 'Link to Customize Base Color Settings', 'raindrops' ) . '</a></dd>';
$result .= '<dd><table><tr>
<td style="' . raindrops_colors_clone( 5, 'set' ) . ';padding:0.5em;">class color5</td>
<td style="' . raindrops_colors_clone( 4, 'set' ) . ';padding:0.5em;">class color4</td>
<td style="' . raindrops_colors_clone( 3, 'set' ) . ';padding:0.5em;">class color3</td>
<td style="' . raindrops_colors_clone( 2, 'set' ) . ';padding:0.5em;">class color2</td>
<td style="' . raindrops_colors_clone( 1, 'set' ) . ';padding:0.5em;">class color1</td></tr><tr>
<td style="' . raindrops_colors_clone( '-1', 'set' ) . ';padding:0.5em;">class color-1</td>
<td style="' . raindrops_colors_clone( '-2', 'set' ) . ';padding:0.5em;">class color-2</td>
<td style="' . raindrops_colors_clone( '-3', 'set' ) . ';padding:0.5em;">class color-3</td>
<td style="' . raindrops_colors_clone( '-4', 'set' ) . ';padding:0.5em;">class color-4</td>
<td style="' . raindrops_colors_clone( '-5', 'set' ) . ';padding:0.5em;">class color-5</td></tr>
<tr><td colspan="5">
' . esc_html__( 'code example:please HTML editor mode', 'raindrops' ) . '
<div style="' . raindrops_colors_clone( -1, 'set' ) . ';padding:1em;">&lt;div class="color-1"&gt;
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum&lt;/div&gt;
</div></td>
</tr></table>
</dd>';
$style_type = raindrops_warehouse_clone( 'raindrops_style_type' );
if( 'dark' == $style_type || 'light' == $style_type ) {
$result .= "<dt><h3>" . esc_html__( 'Dinamic Gradient Class', 'raindrops' ) . '</h3></dt>';
$result .= '<dd><table><tr>
<td style="' . raindrops_gradient_single( 1, "asc" ) . 'padding:0.5em;">class gradient1</td>
<td style="' . raindrops_gradient_single( 2, "asc" ) . 'padding:0.5em;">class gradient2</td>
<td style="' . raindrops_gradient_single( 3, "asc" ) . 'padding:0.5em;">class gradient3</td>
<td style="' . raindrops_gradient_single( 4, "asc" ) . 'padding:0.5em;">class gradient4</td>
</tr><tr>
<td style="' . raindrops_gradient_single( -1, "asc" ) . 'padding:0.5em;">class gradient-1</td>
<td style="' . raindrops_gradient_single( -2, "asc" ) . 'padding:0.5em;">class gradient-2</td>
<td style="' . raindrops_gradient_single( -3, "asc" ) . 'padding:0.5em;">class gradient-3</td>
<td style="' . raindrops_gradient_single( -4, "asc" ) . 'padding:0.5em;">class gradient-4</td>
</tr>
<tr><td colspan="5">
' . esc_html__( 'code example:please HTML editor mode', 'raindrops' ) . '
<div style="' . raindrops_gradient_single( -1, "asc" ) . 'padding:1em;">&lt;div class="gradient-1"&gt;<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>&lt;/div&gt;</div></td></tr></table></dd>';
}
$result .= "<dl><dt><h3>" . esc_html__( 'Font Size CSS Class', 'raindrops' ) . '</strong></h3>';
$result .= "<dt><p>" . esc_html__( 'Classes', 'raindrops' ) . '</p></dt>';
$result .= "<dd><p>" . esc_html__( 'f10 , f11 , f12 , f13 , f14 , f15 , f16 , f17 , f18 , f19 , f20 , f21 , f22 , f23 , f24 , f25 , f26...f40', 'raindrops' ) . "</p><pre><code>&lt;p class=\"f16\"&gt;Font Size 16px&lt;/p&gt;</code></pre>";
$result .= "</dl>";
$result .= "<dl><dt><h3>" . esc_html__( 'Google Fonts Family CSS Class', 'raindrops' ) . '</strong></h3>';
$result .= "<dt><p>" . esc_html__( 'Classes', 'raindrops' ) . '</p></dt>';
$result .= "<dd><p>" . esc_html__( 'Note, More than 90 percent of the Google font can be used, but there are some limitations.', 'raindrops' ) . "</p></dd>";
$result .= "<dd><p>" . esc_html__( 'Examples of the no corresponding font', 'raindrops' ) . "</p><pre><code>Fredericka the Great ( The first character is lowercase word ) </code></pre></dd>";
$result .= "<dd><p>" . esc_html__( 'Examples of the corresponding font', 'raindrops' ) . "</p><pre><code>Open Sans Condensed ( font name has 0 - 2 spaces ) </code></pre></dd>";
$result .= "<dd><p>" . esc_html__( 'How to specify the font', 'raindrops' ) . "</p><pre><code>Open Sans: &lt;p class=\"google-font-open-sans\"&gt;Open Sans&lt;/p&gt;</code></pre></dd>";
$result .= "<dd><p>" . esc_html__( 'Add prefix google-font- + Font name lowercase and change to - the space', 'raindrops' ) . "</p></dd>";
$result .= "<dd><p>" . esc_html__( 'How to specify the font weight', 'raindrops' ) . "</p><pre><code>Open Sans EXTRA-BOLD800: &lt;p class=\"google-font-open-sans800\"&gt;Open Sans&lt;/p&gt;</code></pre></dd>";
$result .= "<dd><p>" . esc_html__( 'How to specify the font style', 'raindrops' ) . "</p><pre><code>Open Sans EXTRA-BOLD800 Italic: &lt;p class=\"google-font-open-sans800i\"&gt;Open Sans&lt;/p&gt;</code></pre></dd>";
$result .= "</dl>";
$result .= "<dl><dt><h3>" . esc_html__( 'Example of Custom CSS Meta Box Style Rules', 'raindrops' ) . '</strong></h3>';
$result .= "<dt><p>" . esc_html__( 'Styling Entry Title', 'raindrops' ) . '</p></dt>';
$result .= "<dd><p>" . esc_html__( 'Change entry title color', 'raindrops' ) . "</p><pre><code>.entry-title span{ color:red; }</code></pre>";
$result .= "<dt><p>" . esc_html__( 'Styling Posted on', 'raindrops' ) . '</p></dt>';
$result .= "<dd><p>" . esc_html__( 'hide posted on from all post', 'raindrops' ) . "</p><pre><code> .posted-on, .entry-meta-default{ display:none;}</code></pre></dd>";
$result .= "<dt><p>" . esc_html__( 'Styling Posted in', 'raindrops' ) . '</p></dt>';
$result .= "<dd><p>" . esc_html__( 'hide posted in', 'raindrops' ) . "</p><pre><code> .entry-meta{ display:none;}</code></pre></dd>";
$result .= "<dt><p>" . esc_html__( 'Styling Article', 'raindrops' ) . '</p></dt>';
$result .= "<dd><p>" . esc_html__( 'add border and padding', 'raindrops' ) . "</p><pre><code>article {border:1px solid red;padding:1em;}</code></pre>"
. "<p>" . esc_html__( 'note:article elements and post_class () You can use all of the elements to be output.', 'raindrops' ) . "</p></dd>";
$result .= "</dl>";
$result .= "<dl><dt><h3>" . esc_html__( 'Example of Raindrops Notation Tags', 'raindrops' ) . '</strong></h3>';
$result .= '<dt><p>&lt;!--[raindrops color_type="dark" col="1"]--&gt;</p></dt>';
$result .= "<dd><p>" . esc_html__( 'When pasting this tag in the entry content, it displays in color type dark 1 column layout', 'raindrops' ) ."</p></dd>";
$result .= "<dd><p>" . esc_html__( 'color_type values [dark|light|w3standard|minimal] col values [1|2|3]', 'raindrops' ) ."</p></dd>";
$result .= '<dt><p>&lt;!--[raindrops skip-excerpt]--&gt;</p></dt>';
$result .= "<dd><p>" . esc_html__( 'Even if it is set to display excerpt sentences in the archive, this post will be displayed in full text.', 'raindrops' ) ."</p></dd>";
$result .= "</dl>";
$result .= $text;
return $result;
} else {
return $text;
}
}
}
/**
* internal function File upload
*
*
* @param $embed string inline or external or embed
* @param $id #hd or #ft
*/
if ( ! function_exists( 'raindrops_upload_image_parser' ) ) {
function raindrops_upload_image_parser( $uri, $embed = "inline", $id = "#hd" ) {
//upload image from raindrops admin panel saved filename
// e.g. raindrops-item-header-style-no-repeat-top-0-left-0-aomoriken.jpg
// filename parse and create style
$upload_info = wp_upload_dir();
$filename = basename( $uri );
if ( file_exists( get_stylesheet_directory() . '/images/' . $filename ) ) {
if ( '#hd' == $id ) {
if ( !file_exists( $upload_info[ 'path' ] . '/' . $filename ) ) {
return apply_filters( 'raindrops_upload_image_parser_hd', 'background:url( ' . get_stylesheet_directory_uri() . '/images/' . $filename . ' );background-repeat:repeat-x;' );
}
} elseif ( '#ft' == $id ) {
if ( !file_exists( $upload_info[ 'path' ] . '/' . $filename ) ) {
return apply_filters( 'raindrops_upload_image_parser_ft', 'background:url( ' . get_stylesheet_directory_uri() . '/images/' . $filename . ' );background-repeat:repeat-x;' );
}
}
} elseif ( file_exists( get_template_directory() . '/images/' . $filename ) ) {
if ( '#hd' == $id ) {
if ( !file_exists( $upload_info[ 'path' ] . '/' . $filename ) ) {
return apply_filters( 'raindrops_upload_image_parser_hd', 'background:url( ' . get_template_directory_uri() . '/images/' . $filename . ' );background-repeat:repeat-x;' );
}
} elseif ( '#ft' == $id ) {
if ( !file_exists( $upload_info[ 'path' ] . '/' . $filename ) ) {
return apply_filters( 'raindrops_upload_image_parser_ft', 'background:url( ' . get_template_directory_uri() . '/images/' . $filename . ' );background-repeat:repeat-x;' );
}
}
}
if ( file_exists( $upload_info[ 'path' ] . '/' . $filename ) ) {
$top = '';
$left = '';
$height = '';
$style = '';
preg_match( "|raindrops-item-([^-]+)|", $filename, $regs );
if ( isset( $regs[ 1 ] ) ) {
$purpose = $regs[ 1 ];
$purpose = str_replace( array( "header", "footer" ), array( "#hd", "#ft" ), $purpose );
}
preg_match( "|-style-([^-]+)|", $filename, $regs );
if ( isset( $regs[ 1 ] ) ) {
$style = $regs[ 1 ];
$style = str_replace( array( 'no', 'x' ), array( 'no-', '-x' ), $style );
}
preg_match( "|-top-(-?[^-]+)|", $filename, $regs );
if ( isset( $regs[ 1 ] ) ) {
$top = $regs[ 1 ];
}
preg_match( "|-left-(-?[^-]+)|", $filename, $regs );
if ( isset( $regs[ 1 ] ) ) {
$left = $regs[ 1 ];
}
preg_match( "|-height-([^-]+)|", $filename, $regs );
if ( isset( $regs[ 1 ] ) ) {
$height = $regs[ 1 ];
}
if ( 'inline' == $embed ) {
return apply_filters( 'raindrops_upload_image_parser_prop', 'background:url( ' . $uri . ' );background-repeat:' . $style . ';background-position:' . $left . 'px ' . $top . 'px;min-height:' . $height . 'px;' );
} elseif ( 'external' == $embed || 'embed' == $embed ) {
return apply_filters( 'raindrops_upload_image_parser_prop', $purpose . '{background:url( ' . $uri . ' );background-repeat:' . $style . ';background-position:' . $left . 'px ' . $top . 'px;min-height:' . $height . 'px;}' );
} else {
return;
}
}
return false;
}
}
/**
* Alias function Show real gradient where admin panel help
*
*
*
*
* return string inline style rule what gradient
*/
if ( ! function_exists( 'raindrops_gradient_single' ) ) {
function raindrops_gradient_single( $i, $order = "asc" ) {
return apply_filters( "raindrops_gradient_single", raindrops_gradient_single_clone( $i, $order ) );
}
}
/**
* Alias function Create gradient style rule
*
*
*
* return string embed header current style rule set what gradient
*/
if ( ! function_exists( 'raindrops_gradient' ) ) {
function raindrops_gradient( $selector ) {
return apply_filters( "raindrops_gradient", raindrops_gradient_clone( $selector ) );
}
}
if ( ! function_exists( "raindrops_add_stylesheet" ) ) {
function raindrops_add_stylesheet() {
global $raindrops_current_theme_name, $raindrops_current_data_version, $raindrops_css_auto_include, $raindrops_fallback_human_interface_show, $raindrops_tooltip, $wp_scripts, $raindrops_minified_suffix, $raindrops_load_minified_css_js;
/* 1.498 jquery in footer */
wp_scripts()->add_data( 'jquery', 'group', 1 );
wp_scripts()->add_data( 'jquery-core', 'group', 1 );
wp_scripts()->add_data( 'jquery-migrate', 'group', 1 );
if( ! is_user_logged_in() ) {
/* @since 1.490 */
$raindrops_current_data_version = null;
}
/* @1.333 */
if ( true == $raindrops_fallback_human_interface_show ) {
$fallback_style = get_template_directory_uri() . '/fallback.css';
wp_register_style( 'fallback_style', $fallback_style, array(), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'fallback_style' );
return;
}
if ( false !== ( $url = raindrops_locate_url( 'reset-fonts-grids.css' ) ) ) {
wp_register_style( 'raindrops_reset_fonts_grids', $url, array(), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'raindrops_reset_fonts_grids' );
}
if ( false !== ( $url = raindrops_locate_url( 'grids.css' ) ) ) {
wp_register_style( 'raindrops_grids', $url, array( 'raindrops_reset_fonts_grids' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'raindrops_grids' );
}
if ( false !== ( $url = raindrops_locate_url( 'fonts.css' ) ) ) {
wp_register_style( 'raindrops_fonts', $url, array( 'raindrops_grids' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'raindrops_fonts' );
}
$style_filename = 'languages/css/' . get_locale() . '.css';
if ( false !== ( $url = raindrops_locate_url( $style_filename ) ) ) {
wp_register_style( 'lang_style', $url, array( 'raindrops_fonts' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'lang_style' );
}
if ( raindrops_warehouse_clone( "raindrops_style_type" ) !== 'w3standard' ) {
if ( false !== ( $url = raindrops_locate_url( 'css3.css' ) ) ) {
wp_register_style( 'raindrops_css3', $url, array( 'raindrops_fonts' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'raindrops_css3' );
}
}
if ( $raindrops_css_auto_include == true ) {
$style_filename = get_template_directory_uri() . '/style.css';
if ( file_exists( get_template_directory() . '/style' . $raindrops_minified_suffix . '.css' ) && true == $raindrops_load_minified_css_js ) {
$style_filename = get_template_directory_uri() . '/style' . $raindrops_minified_suffix . '.css';
}
wp_register_style( 'style', $style_filename, array( 'raindrops_fonts' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'style' );
}
if ( is_child_theme() ) {
$style_filename = get_stylesheet_directory_uri() . '/style.css';
if ( file_exists( get_stylesheet_directory() . '/style' . $raindrops_minified_suffix . '.css' ) && true == $raindrops_load_minified_css_js ) {
$style_filename = get_stylesheet_directory_uri() . '/style' . $raindrops_minified_suffix . '.css';
}
if ( $raindrops_css_auto_include == true ) {
wp_register_style( 'child', $style_filename, array( 'style' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'child' );
$inline_style = apply_filters( 'raindrops_inline_style', "" );
$inline_style = raindrops_remove_spaces_from_css( $inline_style );
wp_add_inline_style( 'child', $inline_style );
} else {
if ( raindrops_warehouse_clone( "raindrops_style_type" ) !== 'w3standard' ) {
wp_register_style( 'child', $style_filename, array( 'raindrops_css3' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'child' );
} else {
wp_register_style( 'child', $style_filename, array( 'lang_style' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'child' );
}
}
/**
* When Using Child Theme, Parent rtl.css is not load, only load child themes load rtl.css
* When not exists rtl.css at Child Theme, It should be automate include parent rtl.css
*
*/
if ( is_rtl() ) {
$rtl_css = raindrops_locate_url( 'rtl.css' );
wp_register_style( 'child-rtl', $rtl_css, array( 'style' ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'child-rtl' );
}
$depending_on_style = 'child';
} else {
$depending_on_style = 'style';
}
if ( raindrops_warehouse_clone( "raindrops_page_width" ) == 'doc3' || raindrops_warehouse_clone( "raindrops_page_width" ) == 'doc5' ) {
if ( false !== ( $url = raindrops_locate_url( 'responsiveness.css' ) ) ) {
wp_register_style( 'raindrops_responsiveness', $url, array( $depending_on_style ), $raindrops_current_data_version, 'all' );
wp_enqueue_style( 'raindrops_responsiveness' );
}
}
if ( false !== ( $url = raindrops_locate_url( 'raindrops.js' ) ) ) {
wp_register_script( 'raindrops', $url, array( 'jquery', 'jquery-migrate', 'raindrops_helper_script' ), $raindrops_current_data_version, true );
wp_enqueue_script( 'raindrops' );
}
$raindrops_lazyload_image_enable = raindrops_warehouse_clone( 'raindrops_lazyload_image' );
$raindrops_performance_helper_enable = raindrops_warehouse_clone( 'raindrops_performance_helper' );
$only_front_end = raindrops_scripts_operate_only_front_end();
if( true == WP_DEBUG ) {
if('enable' == $raindrops_performance_helper_enable && $only_front_end ) {
if ( false !== ( $url = raindrops_locate_url( 'lazyload.js' ) ) ) {
wp_register_script( 'raindrops-lazyload', $url, array( 'raindrops' ), $raindrops_current_data_version, true );
}
}
if( 'enable' == $raindrops_lazyload_image_enable && $only_front_end ){
if ( false !== ( $url = raindrops_locate_url( 'instantclick.js' ) ) ) {
wp_register_script( 'raindrops-instantclick', $url, array( 'raindrops-lazyload' ), $raindrops_current_data_version, true );
}
}
} else {
if('enable' == $raindrops_performance_helper_enable && $only_front_end ) {
if ( false !== ( $url = raindrops_locate_url( 'lazyload.min.js' ) ) ) {
wp_register_script( 'raindrops-lazyload', $url, array( 'raindrops' ), $raindrops_current_data_version, true );
}
}
if( 'enable' == $raindrops_lazyload_image_enable && $only_front_end ){
if ( false !== ( $url = raindrops_locate_url( 'instantclick.min.js' ) ) ) {
wp_register_script( 'raindrops-instantclick', $url, array( 'raindrops-lazyload' ), $raindrops_current_data_version, true );
}
}
}
}
}
add_action( 'wp_enqueue_scripts', 'raindrops_add_tooltip_script' );
if ( ! function_exists( "raindrops_add_tooltip_script" ) ) {
/**
*
* @global type $raindrops_tooltip
* @global type $wp_scripts
* @since 1.417
*/
function raindrops_add_tooltip_script() {
global $raindrops_tooltip, $wp_scripts;
if ( $raindrops_tooltip == true && 'yes' == raindrops_warehouse_clone( 'raindrops_tooltip' ) ) {
wp_enqueue_script( 'jquery-ui-tooltip' );
$js = "jQuery(function() {
jQuery( document ).tooltip({position: {
my: 'center', at: 'top-30', collision: 'none'
}});
jQuery('.widget_media_video, .wp-video').tooltip({position:{
my: 'center', at: 'bottom+30', collision: 'none'
}});
jQuery('.widget_media_video, .wp-video').tooltip('option', 'tooltipClass','bottom-tooltip' );
});";
wp_add_inline_script( 'jquery-ui-tooltip', $js );
}
}
}
if ( ! function_exists( "raindrops_comment_form" ) ) {
/**
* filter function comment form
* @global type $commenter
* @param array $form
* @return type
*/
function raindrops_comment_form( $form ) {
global $commenter;
$form[ 'url' ] = '<p class="comment-form-url"><label for="url">' . esc_html__( 'Website', 'raindrops' ) . '</label><span class="option">' . esc_html__( '(&nbsp;optional&nbsp;)', 'raindrops' ) . '</span><input id="url" name="url" type="text" value="' . esc_attr( $commenter[ 'comment_author_url' ] ) . '" size="30" /></p>';
return apply_filters( "raindrops_comment_form", $form );
}
}
/**
* filter function remove area required
*
*
*
*
*/
if ( ! function_exists( "raindrops_custom_remove_aria_required" ) ) {
function raindrops_custom_remove_aria_required( $arg ) {
global $raindrops_document_type;
if ( $raindrops_document_type == 'xhtml' ) {
$change = array( "aria-required=\"true\"", "aria-required='true'" );
$arg = str_replace( $change, '', $arg );
return $arg;
} else {
return $arg;
}
}
}
/**
* image element has attribute 'width','height' and image size > column width
* style max-width value 100% set when expand height height attribute value.
*
* IE filter
*
*/
if ( ! function_exists( "raindrops_ie_height_expand_issue" ) ) {
function raindrops_ie_height_expand_issue( $content ) {
global $is_IE, $content_width;
if ( $is_IE ) {
preg_match_all( '#(<img)([^>]+)(height|width)(=")([0-9]+)"([^>]+)(height|width)(=")([0-9]+)"([^>]*)>#', $content, $images, PREG_SET_ORDER );
foreach ( $images as $image ) {
if ( ( "width" == $image[ 3 ] && $image[ 5 ] > $content_width ) || ( "width" == $image[ 7 ] && $image[ 9 ] > $content_width ) ) {
$content = str_replace( $image[ 0 ], $image[ 1 ] . $image[ 2 ] . $image[ 6 ] . $image[ 10 ] . '>', $content );
}
}
return $content;
} else {
return $content;
}
}
}
if ( ! function_exists( "raindrops_delete_all_options" ) ) {
function raindrops_delete_all_options() {
if ( current_user_can( 'delete_themes' ) ) {
delete_option( 'raindrops_theme_settings' );
remove_theme_mods();
delete_option( 'widget_raindrops_pinup_entry_widget' );
delete_option( 'widget_raindrops_entrywidget' );
$allposts = get_posts( 'numberposts=0&post_type=post&post_status=' );
foreach ( $allposts as $postinfo ) {
delete_post_meta( $postinfo->ID, '_web_fonts_styles' );
delete_post_meta( $postinfo->ID, '_web_fonts_link_element' );
delete_post_meta( $postinfo->ID, '_css' );
delete_post_meta( $postinfo->ID, 'css' );
delete_post_meta( $postinfo->ID, '_add-to-front' );
delete_post_meta( $postinfo->ID, '_raindrops_this_header_image' );
delete_post_meta( $postinfo->ID, 'meta' );
if ( RAINDROPS_CUSTOM_FIELD_SCRIPT == true ) {
delete_post_meta( $postinfo->ID, 'javascript' );
}
}
$allposts = get_posts( 'numberposts=0&post_type=page&post_status=' );
foreach ( $allposts as $postinfo ) {
delete_post_meta( $postinfo->ID, '_web_fonts_styles' );
delete_post_meta( $postinfo->ID, '_web_fonts_link_element' );
delete_post_meta( $postinfo->ID, '_css' );
delete_post_meta( $postinfo->ID, 'css' );
delete_post_meta( $postinfo->ID, '_add-to-front' );
delete_post_meta( $postinfo->ID, '_raindrops_this_header_image' );
delete_post_meta( $postinfo->ID, 'meta' );
if ( RAINDROPS_CUSTOM_FIELD_SCRIPT == true ) {
delete_post_meta( $postinfo->ID, 'javascript' );
}
}
}
}
}
/**
* insert into embed style ,javascript script and embed tags from custom field
*
*
*
* @1.312
*/
if ( ! function_exists( "raindrops_emoji_collection" ) ) {
function raindrops_emoji_collection( $condition = '' ) {
global $raindrops_tag_emoji, $raindrops_category_emoji;
$raindrops_tag_emoji_for_archive = '\\' . str_replace( array( '&#x', ';' ), '', $raindrops_tag_emoji );
$raindrops_category_emoji_for_archive = '\\' . str_replace( array( '&#x', ';' ), '', $raindrops_category_emoji );
$emoji_code = '';
$condition = get_the_archive_title();
if ( is_tag() ) {
$condition = 'tag';
$emoji_code = $raindrops_tag_emoji_for_archive;
}
if ( is_category() ) {
$condition = 'category';
$emoji_code = $raindrops_category_emoji_for_archive;
}
return apply_filters( 'raindrops_emoji_collection', $emoji_code, $condition );
}
}
if ( ! function_exists( "raindrops_embed_css" ) ) {
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;
if ( empty( $raindrops_automatic_color ) ) {
if ( 'automatic' == raindrops_warehouse_clone( 'raindrops_color_select' ) ) {
$raindrops_automatic_color = true;
} else {
$raindrops_automatic_color = false;
}
if ( false !== raindrops_has_indivisual_notation() ) {
$raindrops_automatic_color = true;
}
}
$css = apply_filters( 'raindrops_embed_css_pre', '' );
$css .= '/* raindrops_embed_css */';
$raindrops_content_elements_margin = raindrops_warehouse_clone( 'raindrops_content_elements_margin' );
$raindrops_content_elements_margin = floatval( $raindrops_content_elements_margin );
if ( 1 < $raindrops_content_elements_margin ) {
$raindrops_content_elements_margin_x2 = $raindrops_content_elements_margin * 2;
$raindrops_content_elements_top_margin = $raindrops_content_elements_margin * 1.5;
$raindrops_content_elements_bottom_margin = $raindrops_content_elements_margin * 0.75;
/* @since 1.511 */
if( 1.65 > $raindrops_content_elements_bottom_margin ) {
$raindrops_content_elements_line_height = 1.65;
} else {
$raindrops_content_elements_line_height = $raindrops_content_elements_bottom_margin;
}
/* Vertical Rhythm */
$css .= "\n article .entry-content > p{margin-bottom:" . $raindrops_content_elements_margin . 'em;line-height:'.$raindrops_content_elements_line_height.';}';
$css .= "\n article .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4,.entry-content h5, .entry-content h6{margin-top:" . $raindrops_content_elements_top_margin . "em; margin-bottom:" . $raindrops_content_elements_bottom_margin . 'em;}';
$css .= "\n article .entry-content > blockquote{margin-top:" . $raindrops_content_elements_margin . "em; margin-bottom:" . $raindrops_content_elements_margin . 'em;}';
$css .= "\n article .entry-content > div{margin-bottom:" . $raindrops_content_elements_margin_x2 . 'em;}';
$css .= "\n article .entry-content > ul,.entry-content > ol{margin-top:" . $raindrops_content_elements_margin . "em; margin-bottom:" . $raindrops_content_elements_margin . 'em;}';
}
$raindrops_text_transform_of_title = raindrops_warehouse_clone( 'raindrops_text_transform_of_title' );
if ( 'yes' == $raindrops_text_transform_of_title ) {
$css .= "\n#site-title{text-transform: uppercase;}";
$css .= "\n.entry-title{text-transform: uppercase;}";
$css .= "\n.widgettitle,.archive .title-wrapper,.date .page-title{text-transform: uppercase;}";
$css .= "\n h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{text-transform: uppercase;}";
}
/* @sice 1.458 fallback menu background color */
$raindrops_base_color = raindrops_warehouse_clone( 'raindrops_base_color' );
// @since 1.492
$default_basefont_val = (int) raindrops_warehouse_clone( 'raindrops_basefont_settings', 'option_value' );
$sidebar_h2_margin = ceil( $default_basefont_val * 1.539 );
$css .= '.lsidebar, div[role="main"]{ padding-top:'. $sidebar_h2_margin. 'px;}';
$css .= '.rsidebar{ padding-bottom:'. $sidebar_h2_margin. 'px;}';
$css .= '#doc5 .raindrops-no-keep-content-width .raindrops-expand-width{margin-top:0}';
$css .= '#doc3 .raindrops-no-keep-content-width .raindrops-expand-width{margin-top:0}';
// @1.497 $css .= '#searchform{margin: '. $sidebar_h2_margin. 'px 0 1em 0.38461538461em;}';
$css .= '.rd-col-1 .loop-before-toolbar{ margin-top:'. $sidebar_h2_margin. 'px;}';
$css .= '.rd-col-1 .single-post-thumbnail{ margin-top:'. $sidebar_h2_margin. 'px;}';
$css .= '.page ul.blank-front{ margin-top:'. $sidebar_h2_margin. 'px;}';
/**
* when not set widget in default sidebar,
* Add padding to the width section where the left margin of the page is insufficient
* relate .home #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b . below 237line
*
* @since 1.492
*/
$is_active_sidebar_1 = is_active_sidebar( 'sidebar-1' );
$default_sidebar_break_point = raindrops_warehouse_clone( 'raindrops_default_sidebar_responsive_breakpoint' );
$extra_sidebar_break_point = raindrops_warehouse_clone( 'raindrops_extra_sidebar_responsive_breakpoint' );
$min_break_point = min( $default_sidebar_break_point, $extra_sidebar_break_point );
$is_responsive_seting = raindrops_warehouse_clone( 'raindrops_extra_sidebar_responsive' );
if( ! $is_active_sidebar_1 && 'yes' == $is_responsive_seting ) {
$css .= "\n".'@media screen and (min-width : '. $min_break_point.'px){ div[role="main"]{padding-left:1em;box-sizing:border-box;} }';
//@1.526
$css .= "\n".'@media screen and (max-width : '. $min_break_point.'px){ '
. '.enable-align-wide #bd figure.alignfull{
margin-left: -2em;
margin-right: 0;
position: static;
display: block;
float: none;
clear: both;
}'
. ' }';
$css .= "\n".'#yui-main .rsidebar,#bd .lsidebar{min-height:0!important; }';
}
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
/**
* @since 1.514
*/
$thread_comments_depth = absint( get_option( 'thread_comments_depth' ) );
if ( isset( $thread_comments_depth ) && !empty( $thread_comments_depth ) ) {
for ($i = 2; $i <= $thread_comments_depth; $i++) {
$padding_count = ( $i - 1 ) * 13;
$css .= '.commentlist .depth-'. $i. '{ padding-left:2.4em; }';
}
}
}
/**
* Paragraph line wrapping
* @since 1.511
*/
$paragraph_wrap_enable = raindrops_warehouse_clone( 'raindrops_paragraph_line_wrapping' );
if ( 'enable' == $paragraph_wrap_enable ) {
$basefont_size = raindrops_warehouse_clone( 'raindrops_basefont_settings' );
$paragraph_wrap_width = raindrops_warehouse_clone( 'raindrops_paragraph_line_wrapping_value' );
$max_width_px = $basefont_size * $paragraph_wrap_width;
$paragraph_wrap_width_en = round( $paragraph_wrap_width / 2 );
$max_width_en_px = round( ( $basefont_size * $paragraph_wrap_width ) / 2 );
if ( 'ja' == get_locale() ) {
$css .= '.entry-content > .wp-block-search{ max-width:' . $max_width_px . 'px;}';
$css .= '.entry-content > .is-small-text{ max-width:' . $max_width_px . 'px;}';
$css .= '.entry-content > .is-regular-text{ max-width:' . $max_width_px . 'px;}';
$css .= '.post .entry-content > p:not(.d-tate):not(.trancate){ width:' . $paragraph_wrap_width . 'em;}';
$css .= '.entry-content > p.aligncenter{ width:' . $paragraph_wrap_width . 'em;}';
$css .= '.entry-content .aligncenter:not(.wp-block-cover){ max-width:' . $max_width_px . 'px;}';
$css .= '.entry-content figure.aligncenter{ max-width:' . $max_width_px . 'px;}';
$css .= '.entry-content .fit-p{ max-width:' . $max_width_px . 'px;}';
$css .= '.entry-content ul,ol{ max-width:' . $max_width_px . 'px;}';
$css .= '.rd-grid .entry-content > p:not([class]){ max-width:100%;}';
$css .= '.rd-grid .entry-content .aligncenter{ max-width:100%;}';
$css .= '.rd-grid .entry-content > p.aligncenter{ width:100%;}';
$css .= '.rd-grid .entry-content > p.alignleft{ max-width:100%;margin-right:0;}';
$css .= '.rd-grid .entry-content > p.alignright{ max-width:100%;margin-left:0;}';
$css .= '.rd-grid .entry-content .fit-p{ max-width:100%;}';
$css .= '@media screen and (max-width : ' . $paragraph_wrap_width . 'em){';
$css .= '.entry-content > .wp-block-search{ max-width:100%;}';
$css .= '.entry-content > .is-small-text{ max-width:100%;}';
$css .= '.entry-content > .is-regular-text{ max-width:100%;}';
$css .= '.entry-content > p:not(.d-tate):not(.trancate){ max-width:100%;}';
$css .= '.entry-content > p.aligncenter{ max-width:100%;}';
$css .= '.entry-content .aligncenter{ max-width:100%;}';
$css .= '.entry-content .fit-p{ max-width:100%;}';
$css .= '.entry-content ul,ol{ max-width:100%;}';
$css .= '}';
} else {
$css .= '.entry-content > .wp-block-search{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.entry-content > .is-small-text{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.entry-content > .is-regular-text{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.entry-content > p:not(.d-tate):not(.trancate){ width:' . $paragraph_wrap_width_en . 'em;}';
$css .= '.entry-content > p.aligncenter{ width:' . $paragraph_wrap_width_en . 'em;}';
$css .= '.entry-content .aligncenter{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.entry-content figure.aligncenter{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.entry-content .fit-p{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.entry-content ul,ol{ max-width:' . $max_width_en_px . 'px;}';
$css .= '.rd-grid .entry-content > p:not([class]){ max-width:100%;}';
$css .= '.rd-grid .entry-content .aligncenter{ max-width:100%;}';
$css .= '.rd-grid .entry-content > p.aligncenter{ width:100%;}';
$css .= '.rd-grid .entry-content > p.alignleft{ max-width:100%;margin-right:0;}';
$css .= '.rd-grid .entry-content > p.alignright{ max-width:100%;margin-left:0;}';
$css .= '.rd-grid .entry-content .fit-p{ max-width:100%;}';
$css .= '@media screen and (max-width : ' . $paragraph_wrap_width_en . 'em){';
$css .= '.entry-content > .wp-block-search{ max-width:100%;}';
$css .= '.entry-content > .is-small-text{ max-width:100%;}';
$css .= '.entry-content > .is-regular-text{ max-width:100%;}';
$css .= '.entry-content > p:not(.d-tate):not(.trancate){ max-width:100%;}';
$css .= '.entry-content > p.aligncenter{ max-width:100%;}';
$css .= '.entry-content .aligncenter{ max-width:100%;}';
$css .= '.entry-content .fit-p{ max-width:100%;}';
$css .= '.entry-content ul,ol{ max-width:100%;}';
$css .= '}';
}
}
/**
* if featured image in singular and show then add margin
*
* @1.492
*/
$is_featured_image_singlar_hide = raindrops_warehouse_clone( 'raindrops_featured_image_singular' );
if( 'hide' !== $is_featured_image_singlar_hide ) {
$css .= "\n". '.page .has-post-thumbnail .entry-title,.single .has-post-thumbnail .entry-title{ margin-top:.75em;}';
}
/**
* Customizer partial shortcut Position
* @1.494
*/
if( is_customize_preview() ) {
$css .= ' .widget .customize-partial-edit-shortcut, .customize-partial-edit-shortcut{margin: -15px 0 0 20px;}';
}
//#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 ) );
/* @since 1.445 */
$css .= '.rd-video-header .static-front-media ' . raindrops_header_image( 'css' ) . "\n";
$css .= '.rd-video-header .static-front-media #header-image #site-title,.rd-video-header .static-front-media #header-image .tagline{display:none!important;}' . "\n";
//site-title
$raindrops_text_color = get_theme_mod( 'header_textcolor' );
if ( $raindrops_text_color !== 'blank' &&
display_header_text() == true &&
false == raindrops_has_indivisual_notation() ) {
$css .= "\n h1 a.site-title-link{color:#" . $raindrops_text_color . ';}';
}
// @1.519
if( isset($post) && ! empty( $post ) ) {
if( metadata_exists( 'post', $post->ID, '_raindrops_this_header_image' ) ) {
$singular_header_image = get_post_meta( $post->ID , '_raindrops_this_header_image', true );
if( 'hide' == $singular_header_image ) {
$header_text_fallback_color = raindrops_fallback_header_text_color();
$css .= "\n h1 a.site-title-link,.tagline{color:" .$header_text_fallback_color . ';}';
}
}
}
// @1.353
if ( 'hide' == raindrops_warehouse_clone( "raindrops_display_site_title" ) ) {
$css .= "\n#site-title a:not(.custom-logo-link){display:none;}";
}
//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' ] . '/' . sanitize_file_name( 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 );
}
if ( 'none' !== raindrops_warehouse( 'raindrops_footer_image' ) ) {
$css .= "\n#ft{" . raindrops_upload_image_parser( $footer_image_uri, 'inline', '#ft' ) . '}';
}
/* @1.492 add */
$css .= "\n/*font-size-class*/\n". raindrops_font_size_class()."\n";
/* 1.306 add conditional */
if ( false == raindrops_has_indivisual_notation() ) {
if ( false == $raindrops_automatic_color ) {
$css .= "\n#ft{color:" . raindrops_warehouse_clone( '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 {
if( 3 !== ( int ) $raindrops_current_column ){
/**
* @since 1.471
*/
$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;} ';
$css .= ' .posted-on-after .author{display:none;} ';
}
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 .= ' .tagged, .entry-meta .tagged, .this-posted-in{display:none;} ';
$css .= ' .posted-on + .this-posted-in{display:none;} ';
$css .= ' .entry-title + .this-posted-in{display:none;} ';
}
if ( "emoji" == raindrops_warehouse_clone( 'raindrops_posted_in_label' ) ) {
$css .= ' .tagged,.this-posted-in{font-size:1.6em;} ';
}
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 && !is_post_type_archive() && !is_tax() ) {
$css .= ' #archives-title .label{display:none;} ';
} elseif ( "emoji" == $raindrops_archive_title_label && !is_post_type_archive() && !is_tax() ) {
$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 ( !empty( $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 . ';}';
}
}
/**
* ver 1.410 add
*/
$use_settings = raindrops_warehouse_clone( 'raindrops_extra_sidebar_responsive' );
if ( 1 < raindrops_get_column_count() && 'yes' == $use_settings ) {
$sidebar_breakpoint = absint( raindrops_warehouse_clone( 'raindrops_extra_sidebar_responsive_breakpoint' ) );
$css .= '@media screen and ( min-width: 641px) and (max-width: ' . $sidebar_breakpoint . 'px) {
#doc5 .rsidebar-shrink,
#doc3 .rsidebar-shrink{
display:inline-block;
}
#doc5 .rsidebar-shrink button,
#doc3 .rsidebar-shrink button{
display:block;
width:1.4em;
height:1.4em;
padding:0;
margin:0;
}
#doc5 .rsidebar-shrink button:focus,
#doc3 .rsidebar-shrink button:focus{
outline:none;
}
.rd-primary-menu-responsive-active #doc5 .rsidebar-shrink button,
.rd-primary-menu-responsive-active #doc3 .rsidebar-shrink button{
margin:2em 0 0 2em;
}
#doc5 #container:not(.rd-expand-sidebar) > div.first,
#doc3 #container:not(.rd-expand-sidebar) > div.first{
width:100%;
padding-right:1em;
box-sizing:border-box;
}
.rd-col-3 #doc5 #container:not(.rd-expand-sidebar) > div.first,
.rd-col-3 #doc3 #container:not(.rd-expand-sidebar) > div.first,
.rd-col-2 #doc5 #container:not(.rd-expand-sidebar) > div.first,
.rd-col-2 #doc3 #container:not(.rd-expand-sidebar) > div.first{
/* @1.505 */
padding-left:1em;
box-sizing:border-box;
}
#doc5 #container:not(.rd-expand-sidebar) .first+.yui-u,
#doc3 #container:not(.rd-expand-sidebar) .first+.yui-u{
display:none;
}
/* @1.498 */
#doc5 #container:not(.rd-expand-sidebar) .entry-content .first+.yui-u,
#doc3 #container:not(.rd-expand-sidebar) .entry-content .first+.yui-u{
display:block;
}
#doc5 .button-wrapper,
#doc3 .button-wrapper{
position:relative;
display:inline-block;
}
}';
}
$use_settings = raindrops_warehouse_clone( 'raindrops_default_sidebar_responsive' );
/* @1.150 2 to 1 */
if ( 1 < raindrops_get_column_count() && 'yes' == $use_settings ) {
$sidebar_breakpoint = absint( raindrops_warehouse_clone( 'raindrops_default_sidebar_responsive_breakpoint' ) );
$css .= '@media screen and ( min-width: 641px) and ( max-width: ' . $sidebar_breakpoint . 'px ) {
#doc5 .lsidebar-shrink,
#doc3 .lsidebar-shrink{
display:inline-block;
}
#doc5 .lsidebar-shrink button,
#doc3 .lsidebar-shrink button{
display:block;
width:1.4em;
height:1.4em;
z-index:1;
padding:0;
margin:0;
}
#doc5 .lsidebar-shrink button:focus,
#doc3 .lsidebar-shrink button:focus{
outline:none;
}
.rd-primary-menu-responsive-active #doc5 .lsidebar-shrink button,
.rd-primary-menu-responsive-active #doc3 .rsidebar-shrink button{
margin:2em 0 0 2em;
}
#doc5 #bd:not(.rd-expand-sidebar-default) > .yui-b,
#doc3 #bd:not(.rd-expand-sidebar-default) > .yui-b{
display:none;
}
#doc5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
#doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b{
width:100%;
box-sizing:border-box;
margin-left:0;
}
#doc5.yui-t6 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
#doc5.yui-t5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
#doc5.yui-t4 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
#doc3.yui-t6 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
#doc3.yui-t5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
#doc3.yui-t4 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b{
padding-right:1em;
}
.page #doc5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
.page #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
.search #doc5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
.search #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
.home #doc5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
.home #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b{
padding-left:1em;
}
.single #doc5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b,
.single #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b{
margin-left:0;
padding-left:1em;
}
.single.rd-primary-menu-responsive-active #doc5 #bd.rd-expand-sidebar .yui-main > .yui-b,
.single.rd-primary-menu-responsive-active #doc3 #bd.rd-expand-sidebar .yui-main > .yui-b{
margin-right:1em;
background:red!important;
}
#doc5 .button-wrapper-default,
#doc3 .button-wrapper-default{
position:relative;
display:inline-block;
}
#doc5 #bd:not(.rd-expand-sidebar) > div.first,
#doc3 #bd:not(.rd-expand-sidebar) > div.first{
padding-right:0;
}
}';
}
/**
* 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 ) {
/* @1.516*/
$default_category_id = absint( get_option('default_category') );
$css .= ' .post-category cat-item-'.$default_category_id.'{display:none;}';
}
/* 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 );
}
/**
* @since 1.505
*/
$css .= raindrops_width_class_and_relate_settings();
/**
* @since 1.443
*/
$primary_menu_color = raindrops_warehouse_clone( 'raindrops_primary_menu_color' );
if ( '' !== raindrops_primary_menu_color_validate( $primary_menu_color ) ) {
$css .= '.raindrops-mobile-menu, #top #access .children, #top #access .sub-menu, #top #access a{ color:' . $primary_menu_color . ';}';
}
$primary_menu_background = raindrops_warehouse_clone( 'raindrops_primary_menu_background' );
if ( '' !== raindrops_primary_menu_color_validate( $primary_menu_background ) ) {
$css .= '.raindrops-mobile-menu, #top #access .children, #top #access .sub-menu, #top #access, #top #access a{ background:' . $primary_menu_background . ';}';
}
$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";
}
$css = raindrops_remove_spaces_from_css( $css );
return apply_filters( "raindrops_embed_meta_css", $css );
}
}
/**
*
*
*
*
*
*/
if ( ! function_exists( "raindrops_custom_link_color" ) ) {
function raindrops_custom_link_color( $color ) {
$color = apply_filters( 'raindrops_custom_link_color_val', $color );
$css = <<< LINK_COLOR_CSS
.entry-content a:link,
.entry-content a:active,
.entry-content a:visited,
.entry-content a:hover{
color:{$color};
}