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' ) ) { 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 ); } } /** * 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 * * * * 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 ); } /** * * * * $raindrops_post_thumbnails_args * */ /** * @1.404 removed args * $raindrops_post_thumbnails_args = array(); * , apply_filters( 'raindrops_post_thumbnails_args', $raindrops_post_thumbnails_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', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', 'widget_id' => 'default', 'widget_name' => 'default', 'text' => "1" ) ); register_sidebar( array( 'name' => esc_html__( 'Extra Sidebar', 'raindrops' ), 'id' => 'sidebar-2', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', 'widget_id' => 'extra', 'widget_name' => 'extra', 'text' => "2" ) ); register_sidebar( array( 'name' => esc_html__( 'Sticky Widget', 'raindrops' ), 'id' => 'sidebar-3', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', 'widget_id' => 'toppage2', 'widget_name' => 'toppage2', 'text' => "3" ) ); register_sidebar( array( 'name' => esc_html__( 'Footer Widget', 'raindrops' ), 'id' => 'sidebar-4', 'before_widget' => '', 'before_title' => '', 'widget_id' => 'footer', 'widget_name' => 'footer', 'text' => "4" ) ); register_sidebar( array( 'name' => esc_html__( 'Post Format Status Sidebar', 'raindrops' ), 'id' => 'sidebar-5', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', '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 ) ) { $message = sprintf( esc_html__( 'If you add %s when you must create function %s for data validation', 'raindrops' ), $setting[ 'option_name' ], $function_name ); printf( '', $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.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 */ if ( isset( $raindrops_current_column ) && 1 == $raindrops_current_column ) { $raindrops_content_width_setting = raindrops_warehouse_clone( 'raindrops_content_width_setting' ); $classes[] = sanitize_html_class( 'rd-content-width-' . $raindrops_content_width_setting ); } /** * @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 ) { $GLOBALS[ 'comment' ] = $comment; if ( '' == $comment->comment_type ) { ?>
  • id="li-comment-">
    %1$s
    ', get_avatar( $comment, 160, '', esc_attr__( 'Avatar', 'raindrops' ) . ' ' . esc_attr( strip_tags( get_comment_author_link() ) ) ) ); } ?>
    %2$s', sprintf( '%s ', get_comment_author_link() ), esc_html__( 'says:', 'raindrops' ) ); ?>
    comment_approved ) { ?>

    comment_ID ); comment_reply_link( array_merge( $args, array( 'reply_text' => $raindrops_comment_reply_text, 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ); ?>
  • comment_ID ), ' ' ); ?>

    ID ) && is_singular() && true == $raindrops_allow_share_link && !$is_IE ) { $id = absint( $post->ID ); $title = urlencode( get_the_title( $id ) ); $url = urlencode( esc_url( get_permalink( $id ) ) ); $array_options = array( ' - - - ' => array( 'type' => '', 'url' => '', 'icon' => '' ), 'tweet' => array( 'type' => 'link', 'url' => 'https://twitter.com/intent/tweet?text=%title%&url=%url%', 'icon' => '' ), 'html' => array( 'type' => 'data', 'url' => 'data:text', 'icon' => '' ) ); $array_options = apply_filters( 'raindrops_add_share_link_args', $array_options ); $select = '
    '; $option = '' . "\n"; $i = 0; $options = ''; foreach ( $array_options as $key => $val ) { $replaced_url = str_replace( array( '%title%', '%url%' ), array( $title, $url ), $val[ 'url' ] ); if ( 'link' == $val[ 'type' ] ) { $replaced_url = esc_url( $replaced_url ); } elseif ( 'data' == $val[ 'type' ] ) { $replaced_url = esc_html( $val[ 'url' ] ); } else { $replaced_url = ''; } $icon = esc_html( $val[ 'icon' ] ); $post_class = 'share-link ' . sanitize_html_class( $key, 'share-' . $i ); $options .= sprintf( $option, $replaced_url, $key, $post_class, $icon ); $i++; } $result = sprintf( $select, $options ); return $posted_in . apply_filters( 'raindrops_add_share_link', $result ); } return $posted_in; } } /** * 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( ' ' ); 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 . '' . esc_html__( 'This entry was posted in', 'raindrops' ) . ''; $tag_label = $raindrops_tag_emoji . '' . esc_html__( 'and tagged', 'raindrops' ) . ''; $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 ( $tag_list ) { $posted_in = '' . $category_label . ' %1$s ' . $tag_label . ' %2$s '; } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = '' . $category_label . ' %1$s '; } else { $posted_in = ''; } $result = $format . sprintf( $posted_in, $categories_list, $tag_list ); echo apply_filters( "raindrops_posted_in", $result ); } else { if ( $tag_list ) { $posted_in = '' . $category_label . ' %1$s ' . $tag_label . ' %2$s ' . ' %4$s %5$s'; } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = '' . $category_label . ' %1$s %2$s' . ' %4$s %5$s'; } else { $posted_in = ' %4$s %5$s'; } $result = sprintf( $posted_in, $categories_list, $tag_list, esc_url( get_post_format_link( $format ) ), esc_html( 'Format', 'raindrops' ), get_post_format_string( $format ) ); echo apply_filters( "raindrops_posted_in", $result ); } edit_post_link( esc_html__( 'Edit', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '', '' ); raindrops_delete_post_link( esc_html__( 'Trash', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '', '' ); } } /** * 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 = '%2$s %3$s'; 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' ); $author_attr_title_string = sprintf( esc_attr__( 'View all posts by %s', 'raindrops' ), wp_kses( $author, array() ) ); $author_html = '%3$s '; if ( "avatar" == raindrops_warehouse_clone( 'raindrops_display_article_author' ) ) { $author = get_avatar( get_the_author_meta( 'ID' ), 24 ) . '' . $author . ''; } $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; $entry_date_html = '<%4$s class="entry-date updated" %5$s>%3$s'; $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 = '' . $raindrops_posted_on_date_emoji . '' . $date_text . ''; } $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 ) ); /** * 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 updated" %3$s>%1$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 ) ); } $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 = ' %1$s %2$s %3$s %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 ) { echo apply_filters( "raindrops_posted_on", $result ); } elseif ( empty( $content_empty_check ) ) { echo $posted_on_comment_link; } else { echo apply_filters( "raindrops_posted_on", $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 = '
    %1$s
    %2$s
    '; $link = '%2$s'; $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, 'http://wordpress.org/support/theme/raindrops', esc_html__( 'http://wordpress.org/support/theme/raindrops', 'raindrops' ), 'target="_blank"' ) . '
    ' . sprintf( $link, 'http://ja.forums.wordpress.org/', esc_html__( 'http://ja.forums.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 = '
    ' . $content . '
    '; return $content; } } if ( !function_exists( 'raindrops_editor_page_contextual_help' ) ) { function raindrops_editor_page_contextual_help() { global $raindrops_current_data; $html = '
    %1$s
    %2$s
    '; $link = '%2$s'; $content = ''; $content .= sprintf( $html, esc_html__( 'Support', 'raindrops' ), sprintf( $link, 'http://wordpress.org/support/theme/raindrops', esc_html__( 'English', 'raindrops' ), 'target="_blank"' ) . '
    ' . sprintf( $link, 'http://ja.forums.wordpress.org/', esc_html__( 'Japanese', 'raindrops' ), 'target="_blank"' ) ); $help = '

    ' . esc_html__( 'How to remove Site Title Block', 'raindrops' ) . '

    #hd{display:none;}
    '; $help .= '

    ' . esc_html__( 'How to remove Post Author Name', 'raindrops' ) . '

    .posted-by-string,.author{display:none;}
    '; $help .= '

    ' . esc_html__( 'How to remove Entry Date', 'raindrops' ) . '

    .posted-on-string,.entry-date{display:none;}
    '; $help .= '

    ' . esc_html__( 'How to remove Entry Meta', 'raindrops' ) . '

    .entry-meta{display:none;}
    '; $help .= '

    ' . esc_html__( 'How to remove Archive Title Label[ like Category Archives ]', 'raindrops' ) . '

    #archives-title .label{display:none;}
    '; $help .= '

    ' . esc_html__( 'How to remove Home list above next prev navigation link', 'raindrops' ) . '

     #nav-above{ display:none;}
    '; $help .= '

    ' . esc_html__( 'above codes paste style.css last. If not change when Version value change ( line:9 )', 'raindrops' ) . '

    '; $help = wpautop( $help ); $content = '
    ' . $content . $help . '
    '; 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 = "

    " . esc_html__( 'Tips', 'raindrops' ) . '

    '; $result .= '

    ' . esc_html__( 'If Raindrops Options panel is opened, and the reference color is set, this arrangement of color is changed at once.', 'raindrops' ) . "

    "; $result .= "

    " . esc_html__( 'Dinamic Color Class', 'raindrops' ) . '

    '; $result .= '
    class color5 class color4 class color3 class color2 class color1
    class color-1 class color-2 class color-3 class color-4 class color-5
    ' . esc_html__( 'code example:please HTML editor mode', 'raindrops' ) . '
    <div class="color-1"> 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</div>
    '; $result .= "

    " . esc_html__( 'Dinamic Gradient Class', 'raindrops' ) . '

    '; $result .= '
    class gradient1 class gradient2 class gradient3 class gradient4
    class gradient-1 class gradient-2 class gradient-3 class gradient-4
    ' . esc_html__( 'code example:please HTML editor mode', 'raindrops' ) . '
    <div class="gradient-1">

    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.

    </div>
    '; $result .= "

    " . esc_html__( 'Font Size CSS Class', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'Classes', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'f10 , f11 , f12 , f13 , f14 , f15 , f16 , f17 , f18 , f19 , f20 , f21 , f22 , f23 , f24 , f25 , f26', 'raindrops' ) . "

    <p class=\"f16\">Font Size 16px</p>
    "; $result .= "
    "; $result .= "

    " . esc_html__( 'Google Fonts Family CSS Class', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'Classes', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'Note, More than 90 percent of the Google font can be used, but there are some limitations.', 'raindrops' ) . "

    "; $result .= "

    " . esc_html__( 'Examples of the no corresponding font', 'raindrops' ) . "

    Fredericka the Great ( The first character is lowercase word ) 
    "; $result .= "

    " . esc_html__( 'Examples of the corresponding font', 'raindrops' ) . "

    Open Sans Condensed ( font name has 0 - 2 spaces ) 
    "; $result .= "

    " . esc_html__( 'How to specify the font', 'raindrops' ) . "

    Open Sans: <p class=\"google-font-open-sans\">Open Sans</p>
    "; $result .= "

    " . esc_html__( 'Add prefix google-font- + Font name lowercase and change to - the space', 'raindrops' ) . "

    "; $result .= "

    " . esc_html__( 'How to specify the font weight', 'raindrops' ) . "

    Open Sans EXTRA-BOLD800: <p class=\"google-font-open-sans800\">Open Sans</p>
    "; $result .= "

    " . esc_html__( 'How to specify the font style', 'raindrops' ) . "

    Open Sans EXTRA-BOLD800 Italic: <p class=\"google-font-open-sans800i\">Open Sans</p>
    "; $result .= "
    "; $result .= "

    " . esc_html__( 'Example of Custom CSS Meta Box Style Rules', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'Styling Entry Title', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'Change entry title color', 'raindrops' ) . "

    .entry-title span{ color:red; }
    "; $result .= "

    " . esc_html__( 'Styling Posted on', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'hide posted on from all post', 'raindrops' ) . "

     .posted-on, .entry-meta-default{ display:none;}
    "; $result .= "

    " . esc_html__( 'Styling Posted in', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'hide posted in', 'raindrops' ) . "

     .entry-meta{ display:none;}
    "; $result .= "

    " . esc_html__( 'Styling Article', 'raindrops' ) . '

    '; $result .= "

    " . esc_html__( 'add border and padding', 'raindrops' ) . "

    article {border:1px solid red;padding:1em;}
    " . "

    " . esc_html__( 'note:article elements and post_class () You can use all of the elements to be output.', 'raindrops' ) . "

    "; $result .= "
    "; $result .= $text; return $result; } else { return $text; } } } /** * Create admin panel form and define input value. * * * * */ if ( !function_exists( 'raindrops_options_init' ) ) { function raindrops_options_init() { global $raindrops_base_setting; if ( isset( $raindrops_base_setting ) ) { foreach ( $raindrops_base_setting as $setting ) { register_setting( 'raindrop_options', $setting[ 'option_name' ], $setting[ 'validate' ] ); } } } } /** * 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.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' ); } 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_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' }}); });"; $wp_scripts->add_data( 'jquery-ui-tooltip', 'data', $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' ] = '

    ' . esc_html__( '( optional )', 'raindrops' ) . '

    '; 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; } } } /** * Option value set when install. * * * * */ if ( !function_exists( "setup_raindrops" ) ) { function setup_raindrops() { global $wpdb, $raindrops_base_setting; if ( false == RAINDROPS_USE_AUTO_COLOR ) { return; } $raindrops_theme_settings = get_option( 'raindrops_theme_settings' ); foreach ( $raindrops_base_setting as $add ) { $option_name = $add[ 'option_name' ]; if ( !isset( $raindrops_theme_settings[ $option_name ] ) ) { $raindrops_theme_settings[ $option_name ] = $add[ 'option_value' ]; } } $style_type = raindrops_warehouse_clone( "raindrops_style_type" ); $raindrops_indv_css = raindrops_design_output_clone( $style_type ) . raindrops_color_base_clone(); $raindrops_theme_settings[ '_raindrops_indv_css' ] = $raindrops_indv_css; update_option( 'raindrops_theme_settings', $raindrops_theme_settings, "", $add[ 'autoload' ] ); if ( file_exists( get_stylesheet_directory() . '/images/headers/wp3.jpg' ) ) { $raindrops_site_image = get_stylesheet_directory_uri() . '/images/headers/wp3.jpg'; $raindrops_site_thumbnail_image = get_stylesheet_directory_uri() . '/images/headers/wp3-thumbnail.jpg'; } else { $raindrops_site_image = get_template_directory_uri() . '/images/headers/wp3.jpg'; $raindrops_site_thumbnail_image = get_template_directory_uri() . '/images/headers/wp3-thumbnail.jpg'; } set_theme_mod( 'default-image', $raindrops_site_image ); } } /** * 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( '#(]+)(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; } } } /** * Management of uninstall and install. * * * * ver 1.114 Theme data automatic change is supported at the time of site change. */ if ( !function_exists( "raindrops_install_navigation" ) ) { function raindrops_install_navigation() { global $raindrops_setting_type, $raindrops_current_theme_slug, $raindrops_current_theme_name; $install = get_option( 'raindrops_theme_settings' ); $upload_dir = wp_upload_dir(); if ( false == $install ) { } else { if ( isset( $install[ 'current_stylesheet_dir_url' ] ) && get_stylesheet_directory_uri() !== $install[ 'current_stylesheet_dir_url' ] ) { if ( isset( $install[ '_raindrops_indv_css' ] ) ) { $install[ '_raindrops_indv_css' ] = str_replace( $install[ 'current_stylesheet_dir_url' ], get_stylesheet_directory_uri(), $install[ '_raindrops_indv_css' ] ); } else { $install[ '_raindrops_indv_css' ] = ''; } $install[ 'old_stylesheet_dir_url' ] = $install[ 'current_stylesheet_dir_url' ]; $install[ 'current_stylesheet_dir_url' ] = get_stylesheet_directory_uri(); if ( 'option' == $raindrops_setting_type ) { update_option( 'raindrops_theme_settings', $install ); } if ( 'theme_mod' == $raindrops_setting_type ) { set_theme_mod( '_raindrops_indv_css', $install[ '_raindrops_indv_css' ] ); set_theme_mod( 'old_stylesheet_dir_url', esc_url( $install[ 'old_stylesheet_dir_url' ] ) ); set_theme_mod( 'current_stylesheet_dir_url', esc_url( $install[ 'current_stylesheet_dir_url' ] ) ); } } elseif ( !isset( $install[ 'current_stylesheet_dir_url' ] ) ) { $install[ 'current_stylesheet_dir_url' ] = get_stylesheet_directory_uri(); if ( 'option' == $raindrops_setting_type ) { update_option( 'raindrops_theme_settings', $install ); } if ( 'theme_mod' == $raindrops_setting_type ) { set_theme_mod( 'current_stylesheet_dir_url', esc_url( $install[ 'current_stylesheet_dir_url' ] ) ); } } if ( isset( $install[ 'current_upload_base_url' ] ) && $upload_dir !== $install[ 'current_upload_base_url' ] ) { if ( isset( $install[ '_raindrops_indv_css' ] ) ) { $install[ '_raindrops_indv_css' ] = str_replace( $install[ 'current_upload_base_url' ], $upload_dir[ 'baseurl' ], $install[ '_raindrops_indv_css' ] ); } $install[ 'old_upload_base_url' ] = $install[ 'current_upload_base_url' ]; $install[ 'current_upload_base_url' ] = $upload_dir[ 'baseurl' ]; if ( 'option' == $raindrops_setting_type ) { update_option( 'raindrops_theme_settings', $install ); } if ( 'theme_mod' == $raindrops_setting_type ) { if ( isset( $install[ '_raindrops_indv_css' ] ) ) { set_theme_mod( '_raindrops_indv_css', $install[ '_raindrops_indv_css' ] ); } set_theme_mod( 'old_upload_base_url', esc_url( $install[ 'old_upload_base_url' ] ) ); set_theme_mod( 'current_upload_base_url', esc_url( $install[ 'current_upload_base_url' ] ) ); } } elseif ( !isset( $install[ 'current_upload_base_url' ] ) ) { $install[ 'current_upload_base_url' ] = $upload_dir[ 'baseurl' ]; if ( 'option' == $raindrops_setting_type ) { update_option( 'raindrops_theme_settings', $install ); } if ( 'theme_mod' == $raindrops_setting_type ) { set_theme_mod( 'current_upload_base_url', esc_url( $install[ 'current_upload_base_url' ] ) ); } } if ( 'delete' == raindrops_warehouse_clone( "raindrops_uninstall_option" ) ) { //add_action( 'switch_theme', 'raindrops_delete_all_options' ); } } } } 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; /* Vertical Rhythm */ $css .= "\n.entry-content > p{margin-bottom:" . $raindrops_content_elements_margin . 'em;}'; $css .= "\n.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.entry-content > blockquote{margin-top:" . $raindrops_content_elements_margin . "em; margin-bottom:" . $raindrops_content_elements_margin . 'em;}'; $css .= "\n.entry-content > div{margin-bottom:" . $raindrops_content_elements_margin_x2 . 'em;}'; $css .= "\n.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;}"; } /* @sice 1.458 fallback menu background color */ $raindrops_base_color = raindrops_warehouse_clone( 'raindrops_base_color' ); if ( !empty( $raindrops_base_color ) ) { $css .= "\n.raindrops-menu-fixed{ background:{$raindrops_base_color};}"; } //#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#site-title a{color:#" . $raindrops_text_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.306 add conditional */ if ( false == raindrops_has_indivisual_notation() ) { if ( false == $raindrops_automatic_color ) { $css .= "\n#ft{color:" . raindrops_warehouse( 'raindrops_footer_color' ) . ';}'; } } // 2col 3col change style helper $css .= '/*' . raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) . '*/'; if ( "show" == raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) ) { $css .= ' .rsidebar{display:block;} '; } else { $css .= ' .rsidebar{display:none;} '; $css .= '.yui-t6 .index.archives,.yui-t5 .index.archives,.yui-t4 .index.archives{ margin-right:1em; }'; } if ( "hide" == raindrops_warehouse_clone( 'raindrops_display_article_author' ) ) { $css .= ' .posted-by-string{display:none;} .raindrops-comment-link{margin:0;} '; $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 .= ' .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{ /* @1.458 */ width:100%; padding-right: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; } #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; } .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; } .archive #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b .archive #doc5 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b, .archive #doc3 #bd:not(.rd-expand-sidebar-default) > .yui-main > .yui-b{ margin-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 ) { //$css .= ' .this-posted-in{ display:none; }'; } //when manual style rule mode if ( raindrops_warehouse_clone( "raindrops_style_type" ) == $raindrops_current_theme_name ) { return $css . raindrops_warehouse_clone( '_raindrops_indv_css' ); } /* 0611 1.301 * $raindrops_options = get_option( 'raindrops_theme_settings' ); */ $raindrops_base_color = raindrops_warehouse_clone( 'raindrops_base_color' ); $raindrops_hyperlink_color = raindrops_warehouse_clone( 'raindrops_hyperlink_color' ); $raindrops_style_type = raindrops_warehouse_clone( 'raindrops_style_type' ); $color_check = raindrops_has_indivisual_notation(); if ( false == $color_check ) { $raindrops_style_type = raindrops_warehouse_clone( 'raindrops_style_type' ); } else { if ( isset( $color_check[ 'color_type' ] ) ) { $raindrops_style_type = $color_check[ 'color_type' ]; } //$columns = $color_check['col']; } $raindrops_indv_css = raindrops_design_output( $raindrops_style_type ) . raindrops_color_base( $raindrops_base_color ); //when this code exists [raindrops color_type="minimal" col="1"] in the post $raindrops_indv_css = raindrops_color_type_custom( $raindrops_indv_css ); $css .= apply_filters( "raindrops_indv_css", $raindrops_indv_css ); if ( $raindrops_hyperlink_color !== '' ) { if ( false !== ($type = raindrops_has_indivisual_notation() ) ) { if ( isset( $type[ 'color_type' ] ) ) { $default_color = raindrops_default_color_clone( 'raindrops_hyperlink_color', $type[ 'color_type' ] ); $css .= raindrops_custom_link_color( $default_color ); } } else { /* 1.306 add conditional */ if ( false == raindrops_has_indivisual_notation() ) { if ( false == $raindrops_automatic_color ) { $css .= raindrops_custom_link_color( $raindrops_hyperlink_color ); } } } } $background = get_background_image(); $color = get_background_color(); if ( !empty( $background ) || !empty( $color ) ) { $css = preg_replace( "|body[^{]*{[^}]+}|", "", $css ); } if ( raindrops_warehouse_clone( 'raindrops_basefont_settings' ) > 13 ) { $css .= 'body{font-size:' . raindrops_warehouse_clone( 'raindrops_basefont_settings' ) . 'px;}'; } elseif ( isset( $raindrops_base_font_size ) ) { $css .= 'body{font-size:' . $raindrops_base_font_size . 'px;}'; } //body background $body_background = get_theme_mod( "background_color" ); $body_background_image = get_theme_mod( "background_image" ); $body_background_repeat = get_theme_mod( "background_repeat" ); $body_background_position_x = get_theme_mod( "background_position_x" ); $body_background_attachment = get_theme_mod( "background_attachment" ); if ( $body_background !== false && !empty( $body_background ) && !empty( $body_background_image ) ) { $css .= "\nbody{background:#" . $body_background . ' url( ' . $body_background_image . ' );}'; } elseif ( $body_background !== false && !empty( $body_background ) ) { $css .= "\nbody{background-color:#" . $body_background . ';}'; } elseif ( !empty( $body_background_image ) ) { $css .= "\nbody{background-image: url( " . $body_background_image . ' );}'; } if ( isset( $body_background_repeat ) && !empty( $body_background_repeat ) ) { $css .= "\nbody{background-repeat: " . $body_background_repeat . ';}'; } if ( isset( $body_background_position_x ) && !empty( $body_background_position_x ) ) { $css .= "\nbody{background-position:top " . $body_background_position_x . ';}'; } if ( isset( $body_background_attachment ) && !empty( $body_background_attachment ) ) { $css .= "\nbody{background-attachment: " . $body_background_attachment . ';}'; } /* Primary Menu Font Size */ $primary_menu_font_size = raindrops_warehouse_clone( 'raindrops_menu_primary_font_size' ); if ( isset( $primary_menu_font_size ) && !empty( $primary_menu_font_size ) ) { /* Add check value why some web site font-size:0% using child theme */ if ( $primary_menu_font_size > 76 && $primary_menu_font_size < 183 ) { $css .= '#access .children li{width:100%;}'; $css .= '#access .sub-menu li{width:100%;}'; $css .= '#access a{font-size:' . floatval( $primary_menu_font_size ) . '%;}'; } else { $css .= '#access a{font-size:100%;}'; } } else { $css .= '#access a{font-size:100%;}'; } $primary_menu_min_width = raindrops_warehouse_clone( 'raindrops_menu_primary_min_width' ); if ( isset( $primary_menu_min_width ) && !empty( $primary_menu_min_width ) ) { if ( $primary_menu_min_width < 10 ) { $child_width = 10; } else { $child_width = floatval( $primary_menu_min_width ); } $adding_style = "\n" . '#access ul ul li,#access ul ul,#access a{ min-width:%1$dem;} .ie8 #access .page_item_has_children > a:after, .ie8 #access .menu-item-has-children > a:after{ content :"";} #access .children li,#access .sub-menu li,#access .children ul,#access .sub-menu ul,#access .children a,#access .sub-menu a{ min-width:%2$dem; }'; $css .= sprintf( $adding_style, $primary_menu_min_width, $child_width ); } /* @1.346 image width class */ $thumbnail_size_w = get_option( 'thumbnail_size_w' ); if ( !empty( $thumbnail_size_w ) ) { if ( $thumbnail_size_w < 160 ) { $thumbnail_size_w = 160; } $css .= ' .rd-thumbnail{width:' . absint( $thumbnail_size_w ) . 'px; max-width:100%;}'; } $medium_size_w = get_option( 'medium_size_w' ); if ( !empty( $medium_size_w ) ) { $css .= ' .rd-medium{width:' . absint( $medium_size_w ) . 'px; max-width:100%;}'; } $large_size_w = get_option( 'large_size_w' ); if ( !empty( $large_size_w ) ) { $css .= ' .rd-large{width:' . absint( $large_size_w ) . 'px; max-width:100%;}'; } $css .= ' .rd-w320{width:320px; max-width:100%;}'; $css .= ' .rd-w480{width:480px; max-width:100%;}'; $css .= ' .rd-w640{width:640px; max-width:100%;}'; /** * @since 1.443 */ $primary_menu_color = raindrops_warehouse_clone( 'raindrops_primary_menu_color' ); if ( '' !== raindrops_primary_menu_color_validate( $primary_menu_color ) ) { $css .= ' #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 .= ' #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}; } .raindrops-toc-front a, .page-template-front-page a, .entry-title a:link, .entry-title a:active, .entry-title a:visited, .entry-title a:hover{ color:{$color}; } .posted-on a:link, .posted-on a:active, .posted-on a:visited, .posted-on a:hover{ color:{$color}; } .entry-meta-default a{ color:{$color}; }/*single.php*/ .entry-meta-default a{ color:{$color}; }/*single.php*/ .post .entry-meta, .entry-meta a:link, .entry-meta a:active, .entry-meta a:visited, .entry-meta a:hover{ color:{$color}; } .rsidebar a:link, .rsidebar a:active, .rsidebar a:visited, .rsidebar a:hover{ color:{$color}; } .lsidebar a:link, .lsidebar a:active, .lsidebar a:visited, .lsidebar a:hover{ color:{$color}; } #wp-calendar{ color:{$color}; } .raindrops-comment-link em, .raindrops-comment-link a:link em, .raindrops-comment-link a:active em, .raindrops-comment-link a:visited em, .raindrops-comment-link a:hover em{ /* @1.329 color:{$color}! important;*/ } .nav-previous a, .nav-next a, .nav-previous a, .nav-next a{ color:{$color}; } .logged-in-as a:link, .logged-in-as a:active, .logged-in-as a:visited, .logged-in-as a:hover{ color:{$color}; } LINK_COLOR_CSS; if ( preg_match( "!#([0-9a-f]{6}|[0-9a-f]{3})!si", $color ) ) { return apply_filters( "raindrops_custom_link_color", $css ); } } } /** * * * * * */ if ( !function_exists( "raindrops_embed_meta" ) ) { function raindrops_embed_meta( $content ) { global $post, $wp_customize, $content_width, $raindrops_use_transient, $raindrops_stylesheet_type, $raindrops_fallback_human_interface_show; /* @1.333 */ if ( true == $raindrops_fallback_human_interface_show ) { return; } if ( !isset( $raindrops_stylesheet_type ) ) { $raindrops_stylesheet_type = raindrops_warehouse_clone( 'raindrops_stylesheet_in_html' ); } $zen = get_option( 'comet_cache_options' ); do_action( 'raindrops_embed_meta_transient_before' ); if ( true == $raindrops_use_transient && !is_user_logged_in() && false !== ( $raindrops_embed_meta_transient = get_transient( 'raindrops_embed_meta_transient' ) ) && ( isset( $zen ) && false == $zen[ 'enable' ] || !class_exists( 'WebSharks\\CometCache\\Classes\\Plugin' ) ) && false == is_random_header_image() ) { echo $raindrops_embed_meta_transient; return $content; } $raindrops_use_featured_image_emphasis = raindrops_warehouse_clone( 'raindrops_use_featured_image_emphasis' ); if ( $raindrops_use_featured_image_emphasis == 'yes' ) { $raindrops_post_image_position = raindrops_warehouse_clone( 'raindrops_featured_image_position' ); add_filter( 'raindrops_post_thumbnail_size_main_query', 'raindrops_post_thumbnail_size_in_the_loop', 10, 3 ); switch ( $raindrops_post_image_position ) { case( 'front' ): add_filter( 'raindrops_embed_meta_css', 'raindrops_post_thumbnail_size_block_style' ); break; case( 'left' ): add_filter( 'raindrops_embed_meta_css', 'raindrops_post_thumbnail_size_lefty_style' ); break; default: remove_filter( 'raindrops_embed_meta_css', 'raindrops_post_thumbnail_size_block_style' ); remove_filter( 'raindrops_embed_meta_css', 'raindrops_post_thumbnail_size_lefty_style' ); } } $result = ""; $css = apply_filters( 'raindrops_embed_meta_pre', '' ); $css .='#doc5 .raindrops-keep-content-width{width:' . $content_width . 'px;max-width:100%;margin:auto;float:none;}' . "\n"; $css .='#doc5 .raindrops-keep-content-width .raindrops-expand-width{margin:0;}' . "\n"; $css .='#doc3 .raindrops-keep-content-width{width:' . $content_width . 'px;max-width:100%;margin:auto;float:none;}' . "\n"; $css .='#doc3 .raindrops-keep-content-width .raindrops-expand-width{margin:0;}' . "\n"; $css .='#doc5 .raindrops-no-keep-content-width{max-width:100%;margin:auto;float:none;}' . "\n"; $css .='#doc5 .raindrops-no-keep-content-width .raindrops-expand-width{margin:0;}' . "\n"; $css .='#doc3 .raindrops-no-keep-content-width{max-width:100%;margin:auto;float:none;}' . "\n"; $css .='#doc3 .raindrops-no-keep-content-width .raindrops-expand-width{margin:0;}' . "\n"; if ( isset( $wp_customize ) || $raindrops_stylesheet_type !== 'external' ) { $css .= raindrops_embed_css(); } $result_indv = ''; $pinup_style = ''; if ( RAINDROPS_USE_AUTO_COLOR !== true ) { // $css = ''; } if ( is_single() || is_page() ) { $pinup_widget_ids = raindrops_get_pinup_widget_ids(); $pinup_widget_post_ids = raindrops_pinup_widget_ids_to_post_ids( $pinup_widget_ids ); foreach ( $pinup_widget_post_ids as $pinup_id ) { $web_fonts = get_post_meta( $pinup_id, '_web_fonts_link_element', true ); if ( isset( $web_fonts ) && !empty( $web_fonts ) ) { $web_fonts_each_array = explode( "\n", $web_fonts ); foreach ( $web_fonts_each_array as $web_fonts_each ) { $result = str_replace( array( $web_fonts_each, "\n\n" ), array( '', "\n" ), $result ); $result .= $web_fonts_each . "\n"; } } $web_fonts_style = get_post_meta( $pinup_id, '_web_fonts_styles', true ); if ( isset( $web_fonts_style ) && !empty( $web_fonts_style ) ) { $web_fonts_style_each_array = explode( "\n", $web_fonts_style ); foreach ( $web_fonts_style_each_array as $web_fonts_style_each ) { $pinup_style = str_replace( array( $web_fonts_style_each, "\n\n" ), array( '', "\n" ), $pinup_style ); $pinup_style .= $web_fonts_style_each . "\n"; } } } $web_fonts = get_post_meta( get_the_ID(), '_web_fonts_link_element', true ); if ( isset( $web_fonts ) && !empty( $web_fonts ) ) { $result .= $web_fonts; } $web_fonts_styles = get_post_meta( $post->ID, '_web_fonts_styles', true ); if ( ( isset( $web_fonts_styles ) && !empty( $web_fonts_styles ) ) || !empty( $pinup_style ) ) { $web_fonts_styles_wrapper = "' . "\n"; $result .= sprintf( $web_fonts_styles_wrapper, $web_fonts_styles . $pinup_style ); } $css_single = get_post_meta( $post->ID, 'css', true ); /* 1.234 metabox support */ $css_single .= get_post_meta( $post->ID, '_css', true ); if ( true == RAINDROPS_OVERRIDE_POST_STYLE_ALL_CONTENTS ) { $css .= preg_replace_callback( '![^}]+{[^}]+}!siu', 'raindrops_css_add_id', $css_single ); } else { $css_single = $css_single; } if ( !empty( $css ) && RAINDROPS_CUSTOM_FIELD_CSS == true ) { $result .= '"; } $meta = get_post_meta( $post->ID, 'meta', true ); if ( !empty( $meta ) && RAINDROPS_CUSTOM_FIELD_META == true ) { $result .= raindrops_esc_custom_field_meta( $meta ); } $javascript = get_post_meta( $post->ID, 'javascript', true ); if ( !empty( $javascript ) && RAINDROPS_CUSTOM_FIELD_SCRIPT == true ) { $result .= '"; } } else { $pinup_widget_ids = raindrops_get_pinup_widget_ids(); $pinup_widget_post_ids = raindrops_pinup_widget_ids_to_post_ids( $pinup_widget_ids ); if ( isset( $pinup_widget_post_ids ) && is_array( $pinup_widget_post_ids ) ) { foreach ( $pinup_widget_post_ids as $pinup_id ) { $web_fonts = get_post_meta( $pinup_id, '_web_fonts_link_element', true ); if ( isset( $web_fonts ) && !empty( $web_fonts ) ) { $web_fonts_each_array = explode( "\n", $web_fonts ); foreach ( $web_fonts_each_array as $web_fonts_each ) { $result = str_replace( array( $web_fonts_each, "\n\n" ), array( '', "\n" ), $result ); $result .= $web_fonts_each . "\n"; } } $web_fonts_style = get_post_meta( $pinup_id, '_web_fonts_styles', true ); if ( isset( $web_fonts_style ) && !empty( $web_fonts_style ) ) { $web_fonts_style_each_array = explode( "\n", $web_fonts_style ); foreach ( $web_fonts_style_each_array as $web_fonts_style_each ) { $result_indv = str_replace( array( $web_fonts_style_each, "\n\n" ), array( '', "\n" ), $result_indv ); $result_indv .= $web_fonts_style_each . "\n"; } } } } if ( true == RAINDROPS_OVERRIDE_POST_STYLE_ALL_CONTENTS ) { if ( have_posts() && !is_date() ) { if ( false == RAINDROPS_USE_AUTO_COLOR ) { } while ( have_posts() ) { the_post(); $web_fonts = get_post_meta( $post->ID, '_web_fonts_link_element', true ); if ( isset( $web_fonts ) && !empty( $web_fonts ) ) { $web_fonts_each_array = explode( "\n", $web_fonts ); foreach ( $web_fonts_each_array as $web_fonts_each ) { $result = str_replace( array( $web_fonts_each, "\n\n" ), array( '', "\n" ), $result ); $result .= $web_fonts_each . "\n"; } } $web_fonts_style = get_post_meta( $post->ID, '_web_fonts_styles', true ); if ( isset( $web_fonts_style ) && !empty( $web_fonts_style ) ) { $web_fonts_style_each_array = explode( "\n", $web_fonts_style ); foreach ( $web_fonts_style_each_array as $web_fonts_style_each ) { $result_indv = str_replace( array( $web_fonts_style_each, "\n\n" ), array( '', "\n" ), $result_indv ); $result_indv .= $web_fonts_style_each . "\n"; } } $collections = get_post_meta( $post->ID, 'css', true ); $collections .= get_post_meta( $post->ID, '_css', true ); if ( !empty( $collections ) ) { $result_indv .= preg_replace_callback( '![^}]+{[^}]+}!siu', 'raindrops_css_add_id', $collections ); } } rewind_posts(); } } $result .= '\n"; } if ( true == $raindrops_use_transient ) { set_transient( 'raindrops_embed_css_transient', $css ); } if ( false == $raindrops_use_transient || is_user_logged_in() ) { set_transient( 'raindrops_embed_meta_transient', $result ); } echo apply_filters( 'raindrops_embed_meta_echo', $result ); return $content; } } if ( !function_exists( 'raindrops_esc_custom_field_meta' ) ) { function raindrops_esc_custom_field_meta( $meta_input ) { if ( RAINDROPS_CUSTOM_FIELD_META !== true ) { return; } $meta = preg_replace( '!>[^<]+\n<", $meta_input ); $meta = "\n{$meta}\n"; $meta = preg_replace( '!style\s*=\s*("|\')[^"\']+("|\')!', '', $meta ); $meta = preg_replace( '!onmouseover\s*=\s*("|\')[^"\']+("|\')!', '', $meta ); $meta = strip_tags( $meta, '' ); if ( is_singular() && !empty( $meta_input ) ) { return apply_filters( 'raindrops_esc_custom_field_meta', $meta, $meta_input ); } return; } } /** * When custom field element add single post display properly. * But loop page not adding element,result display improperly. * this filter detect custom field and add base URL to relative links and image source. */ add_filter( 'the_content', 'raindrops_custom_field_meta_helper' ); if ( !function_exists( 'raindrops_custom_field_meta_helper' ) ) { function raindrops_custom_field_meta_helper( $content ) { global $post; $meta_values = ''; if ( isset( $post ) ) { $meta_values = get_post_meta( $post->ID, 'meta', true ); } if ( !empty( $meta_values ) && strstr( $meta_values, ' $match ) { if ( preg_match( '!([^{]+){([^{]+{)(.+)!', $match, $regs ) ) { $result .= $regs[ 1 ] . '{' . "\n"; $match = $regs[ 2 ] . $regs[ 3 ]; } if ( preg_match( '!(' . $exclude_lists . ')!', $result . $match ) || preg_match( '!^[0-9]{1,3}%!', trim( $match ) ) ) { if ( preg_match( '!@raindrops!', $match ) ) { // @raindrops is force keyword, Not adding ID // Although not recommended, please use only if absolutely necessary // Please include the CSS body class that specifies a particular page(.postid-xxxx). This is not the case when the layout is likely to collapse. $match = str_replace( '@raindrops', '', $match ); } $result .= ' ' . trim( $match ) . "\n"; return $result; } if ( preg_match( '|^([^@]+){(.+)|siu', $match, $regs ) ) { $match_1 = str_replace( ',', ', #post-' . $post->ID . ' ', $regs[ 1 ] ); $match = $match_1 . '{' . $regs[ 2 ]; $result .= '#post-' . $post->ID . ' ' . trim( $match ) . "\n"; } else { $result .= ' ' . trim( $match ) . "\n"; } } return $result; } } /** * Alternative character when value is blank * * * * */ if ( !function_exists( "raindrops_blank_fallback" ) ) { function raindrops_blank_fallback( $string, $fallback ) { if ( !empty( $string ) ) { return $string; } else { return $fallback; } } } /** * Article navigation * * * * */ if ( !function_exists( "raindrops_prev_next_post" ) ) { function raindrops_prev_next_post( $position = "nav-above" ) { if ( is_category() ) { $filter = true; //display same category. } else { $filter = false; } //exclude separate 'and' $exclude_category = apply_filters( 'raindrops_next_prev_excluded_categories', '' ); printf( '
    ', $position, "clearfix" ); $prev_post = get_previous_post( $filter, $exclude_category ); if ( !empty( $prev_post ) ) { printf( '', "nav-previous" ); previous_post_link( '%link', '« %title', $filter, $exclude_category ); printf( '' ); } $next_post = get_next_post( $filter, $exclude_category ); if ( !empty( $next_post ) ) { printf( '', "nav-next" ); next_post_link( '%link', ' %title »', $filter, $exclude_category ); printf( '' ); } printf( '
    ' ); echo apply_filters( "raindrops_prev_next_post", '' ); } } /** * date.php * * * * */ if ( !function_exists( "raindrops_days_in_month" ) ) { function raindrops_days_in_month( $month, $year ) { $daysInMonth = array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ); if ( $month != 2 ) { return $daysInMonth[ $month - 1 ]; } return ( checkdate( $month, 29, $year ) ) ? 29 : 28; } } /** * for date.php * * * * */ if ( !function_exists( "raindrops_get_year" ) ) { function raindrops_get_year( $posts = '', $year = '', $pad = 0 ) { global $calendar_page_number, $post_per_page, $calendar_page_last, $calendar_page_start; $months = array(); $y = ""; $m = ""; $d = ""; // first let's parse through our posts, organizing them by month foreach ( $posts as $post ) { $y = substr( $post->post_date, 0, 4 ); $m = substr( $post->post_date, 5, 2 ); $d = substr( $post->post_date, 8, 2 ); $months[ $m ][] = $post; } $year_label = apply_filters( 'raindrops_archive_year_label', $year ); // @1.334 $output = "

    $year_label

    "; $output = raindrops_archive_year_navigation( false ); $table_year = array( '', '', '', '', '', '', '', '', '', '', '', '', '', '
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    ' ); foreach ( $months as $num => $val ) { $num = (int) $num; $table_year[ $num ] = '" . $num . '" . sprintf( esc_html__( "%s Articles archived", 'raindrops' ), count( $val ) ) . ''; } return $output . implode( "\n", $table_year ); } } /* end raindrops_get_year( ) */ /** * for date.php * * * * */ if ( !function_exists( "raindrops_get_day" ) ) { function raindrops_get_day( $posts = '', $year = '', $mon = '', $day = '', $pad = 1 ) { global $month; $here = home_url(); $year_label = apply_filters( 'raindrops_archive_year_label', $year ); $month_label = apply_filters( 'raindrops_archive_month_label', $mon ); $day_label = apply_filters( 'raindrops_archive_day_label', $day ); if ( 'ja' == get_locale() ) { $output = "

    $year_label " . $month_label . " " . $day_label . "

    "; } else { $output = "

    " . $day_label . " " . $month_label . " $year_label

    "; } $output .= ''; foreach ( $posts as $mytime ) { $h = substr( $mytime->post_date, 11, 2 ); if ( 10 > $h ) { $h = substr( $h, 1, 1 ); } $today[ $h ][] = $mytime; } for ( $i = 0; $i <= 24; $i++ ) { $output .= ''; } $output .= '
    '; if ( 10 > $i ) { $output .= "0$i:00"; } else { $output .= "$i:00"; } $output .= ''; if ( isset( $today[ $i ] ) ) { foreach ( $today[ $i ] as $mytime ) { //@ 1.317 add context 2 $mytime->post_title = raindrops_fallback_title( $mytime->post_title, $mytime->ID ); $mytime->post_title = preg_replace( '|>.+[Article ' . $mytime->ID . ']post_title ); $output .= "ID ) ) . "\" id=\"post-" . absint( $mytime->ID ) . "\">" . strip_tags( $mytime->post_title, '' ) . "
    "; } } else { $output .= '.'; } $output .= '
    '; return $output; } } /* end raindrops_get_day( ) */ /** * for date.php * * * * */ if ( !function_exists( "raindrops_year_list" ) ) { function raindrops_year_list( $one_month, $ye, $mo ) { global $calendar_page_number, $post_per_page, $calendar_page_last, $calendar_page_start; $d = ""; $links = ""; $result = ""; foreach ( $one_month as $key => $month ) { list( $y, $m, $d ) = sscanf( $month->post_date, "%d-%d-%d $d:$d:$d" ); $month->post_title = raindrops_fallback_title( $month->post_title ); $month->post_title = preg_replace( '|>.+[link to ' . $month->ID . ']post_title ); if ( $m == $mo && $ye == $y ) { $links .= "
  • ID ) ) . "\" title=\"" . esc_attr( strip_tags( $month->post_title ) ) . "\">" . $month->post_title . "
  • "; } } if ( !empty( $links ) ) { $result .= "
      "; $result .= $links; $result .= "
    "; } return $result; } } /** * sort month_list * * * * */ if ( !function_exists( "raindrops_cmp_ids" ) ) { function raindrops_cmp_ids( $a, $b ) { $cmp = strcmp( $a->post_date, $b->post_date ); return $cmp; } } /** * for date.php * * * * * */ if ( !function_exists( "raindrops_month_list" ) ) { function raindrops_month_list( $one_month, $ye, $mo, $post_type = 'post' ) { global $calendar_page_number, $post_per_page, $calendar_page_last, $calendar_page_start, $wp_locale; $result = ""; $here = home_url(); $z = - 1; $c = 0; for ( $i = 1; $i <= raindrops_days_in_month( $mo, $ye ); $i++ ) { $links = ""; usort( $one_month, "raindrops_cmp_ids" ); $page_break = false; $first_data = false; foreach ( $one_month as $key => $month ) { $m = 0; list( $y, $m, $d, $h, $min, $s ) = sscanf( $month->post_date, "%d-%d-%d %d:%d:%d" ); if ( $key < $calendar_page_last && $key >= $calendar_page_start ) { if ( $d == $i && $m == $mo && $y == $ye ) { $first_data = true; $month->post_title = raindrops_fallback_title( $month->post_title ); $month->post_title = preg_replace( '|>.+[link to ' . $month->ID . ']post_title ); $html = '
  • %4$s <%7$s class="entry-date updated" %8$s>%9$s %12$s
  • '; $display_name = get_the_author_meta( 'display_name', $month->post_author ); $links .= sprintf( $html, 'h2 entry-title', esc_url( get_permalink( $month->ID ) ), 'link to content: ' . esc_attr( strip_tags( $month->post_title ) ), $month->post_title, $month->ID, ' ' . raindrops_post_class( array( 'clearfix' ), $month->ID, false ), raindrops_doctype_elements( 'span', 'time', false ), raindrops_doctype_elements( '', 'datetime="' . esc_attr( get_the_date( 'c' ) ) . '"', false ), $month->post_date, get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'raindrops' ), $display_name ), $display_name ); $c++; } } } $post_per_page = get_option( 'posts_per_page' ); $post_per_page = apply_filters( 'raindrops_month_list_post_count', $post_per_page ); if ( $z == $c && $c == $post_per_page ) { break; } if ( !empty( $links ) ) { if ( 'post' !== $post_type ) { $day_permalink = add_query_arg( 'post_type', $post_type, get_day_link( $y, $mo, $i ) ); } else { $day_permalink = get_day_link( $y, $mo, $i ); } $result .= ""; $result .= ""; $result .= $i; $result .= "
      "; $result .= $links; $result .= "
    "; } else { $result .= ""; $result .= $i; $result .= "  "; } $z = $c; } $month_name = $wp_locale->get_month( $m ); $year_name = apply_filters( 'raindrops_month_list_year_name', $y ); if ( 'post' !== $post_type ) { $year_permalink = add_query_arg( 'post_type', $post_type, get_year_link( $y ) ); } else { $year_permalink = get_year_link( $y ); } if ( get_locale() == 'ja' ) { $output = "

    " . esc_html( $year_name ) . " " . esc_html( $month_name ) . "

    "; } else { $output = "

    " . esc_html( $month_name ) . " " . esc_html( $year_name ) . "

    "; } return $output . '' . $result . "
    "; } } /** * index ,archive,loops page title * * echo Archives title * * */ if ( !function_exists( "raindrops_loop_title" ) ) { function raindrops_loop_title() { global $template; $Raindrops_class_name = ""; $page_title = ""; $page_title_c = ""; if ( is_search() ) { $Raindrops_class_name = 'serch-result'; $page_title = esc_html__( "Search Results", 'raindrops' ); $page_title_c = get_search_query(); } elseif ( is_tag() ) { $tag_id = absint( get_queried_object_id() ); $Raindrops_class_name = 'tag-archives tag-' . $tag_id; $page_title = esc_html__( "Tag Archives", 'raindrops' ); $page_title_c = single_term_title( "", false ); } elseif ( is_category() ) { $page_title_c = single_cat_title( '', false ); $category_id = get_cat_ID( $page_title_c ); $Raindrops_class_name = 'category-archives cat-item-' . $category_id; $page_title = esc_html__( "Category Archives", 'raindrops' ); } elseif ( is_archive() ) { $raindrops_date_format = get_option( 'date_format' ); if ( is_day() ) { $Raindrops_class_name = 'dayly-archives'; $page_title = esc_html__( 'Daily Archives', 'raindrops' ); $page_title_c = get_the_date( $raindrops_date_format ); } elseif ( is_month() ) { $Raindrops_class_name = 'monthly-archives'; $page_title = esc_html__( 'Monthly Archives', 'raindrops' ); if ( 'ja' == get_locale() ) { $page_title_c = get_the_date( 'Y / F' ); } else { $page_title_c = get_the_date( 'F Y' ); } } elseif ( is_year() ) { $Raindrops_class_name = 'yearly-archives'; $page_title = esc_html__( 'Yearly Archives', 'raindrops' ); $page_title_c = get_the_date( 'Y' ); } elseif ( is_author() ) { $Raindrops_class_name = 'author-archives'; $page_title = esc_html__( "Author Archives", 'raindrops' ); while ( have_posts() ) { the_post(); $page_title_c = get_avatar( get_the_author_meta( 'user_email' ), 32 ) . ' ' . get_the_author(); break; } rewind_posts(); } elseif ( has_post_format( 'aside' ) ) { $slug = 'aside'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'chat' ) ) { $slug = 'chat'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'gallery' ) ) { $slug = 'gallery'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'link' ) ) { $slug = 'link'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'image' ) ) { $slug = 'image'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'quote' ) ) { $slug = 'quote'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'status' ) ) { $slug = 'status'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'video' ) ) { $slug = 'video'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } elseif ( has_post_format( 'audio' ) ) { $slug = 'audio'; $Raindrops_class_name = 'post-format-' . $slug; $page_title = esc_html__( 'Post Format', 'raindrops' ); $page_title_c = get_post_format_string( $slug ); } else { $Raindrops_class_name = 'blog-archives'; $page_title = esc_html__( "Blog Archives", 'raindrops' ); $page_title_c = 'blog'; } /** * Custom Post Type Archives Title * @1.438 */ $post_type = get_post_type( get_the_ID() ); if ( "post" !== $post_type || "page" !== $post_type || "attachment" !== $post_type || "revision" !== $post_type || "nav_menu_item" !== $post_type ) { $obj = get_post_type_object( $post_type ); if ( !empty( $obj ) && is_post_type_archive( $obj->name ) && true == $obj->has_archive ) { $Raindrops_class_name = sanitize_html_class( $obj->name . '-archives' ) . ' custom-post-archives'; $page_title = post_type_archive_title( '', false ); $page_title_c = ''; } } /** * Custom Taxonomy Archives Title * @1.438 */ if ( is_tax() && !isset( $page_title ) ) { $obj = get_post_type_object( $post_type ); $taxes = get_object_taxonomies( $obj->name ); $current_taxsonomy = apply_filters( 'raindrops_custom_post_tax', $taxes[ 0 ] ); $Raindrops_class_name = sanitize_html_class( 'custom-taxsonomy-archives-' . $current_taxsonomy ) . ' custom-taxsonomy-archives'; $taxonomy_meta_data = get_taxonomy( $current_taxsonomy ); $page_title = esc_html( $taxonomy_meta_data->labels->name ); $page_title_c = ''; $current_tax = get_queried_object(); if ( !empty( $current_tax->name ) ) { $separator = apply_filters( 'raindrops_custom_post_tax_separator', ' : ' ); $page_title .= $separator . esc_html( $current_tax->name ); } } } $page_title = apply_filters( 'raindrops_loop_title_page_title', $page_title ); if ( empty( $Raindrops_class_name ) ) { if ( is_front_page() ) { $Raindrops_class_name = 'front-page '; } $Raindrops_class_name .= basename( $template, '.php' ); $Raindrops_class_name = str_replace( array( '_', ), array( '-', ), $Raindrops_class_name ); } if ( !empty( $Raindrops_class_name ) ) { echo "\n" . str_repeat( "\t", 7 ) . '
      '; } else { echo "\n" . str_repeat( "\t", 7 ) . '
        '; } if ( !empty( $page_title ) ) { do_action( 'raindrops_loop_title_before' ); printf( '
      • %1$s %2$s
      • ', apply_filters( 'raindrops_archive_name', $page_title ), apply_filters( 'raindrops_archive_value', $page_title_c ), $Raindrops_class_name ); do_action( 'raindrops_loop_title_after' ); $category_navigation_empty_check = strip_tags( raindrops_category_navigation() ); if ( is_category() && !empty( $category_navigation_empty_check ) ) { printf( '
      • %1$s
      • ', raindrops_category_navigation() ); } } } } /** * yui helper function * * * * * */ if ( !function_exists( "raindrops_yui_class_modify" ) ) { function raindrops_yui_class_modify( $raindrops_inner_class = 'yui-ge' ) { // global $yui_inner_layout; $value = raindrops_warehouse_clone( 'raindrops_right_sidebar_width_percent' ); if ( '25' == $value ) { $yui_inner_layout = 'yui-ge'; } elseif ( '75' == $value ) { $yui_inner_layout = 'yui-gf'; } elseif ( '33' == $value ) { $yui_inner_layout = 'yui-gc'; } elseif ( '66' == $value ) { $yui_inner_layout = 'yui-gd'; } elseif ( '50' == $value ) { $yui_inner_layout = 'yui-g'; } else { $yui_inner_layout = 'yui-ge'; } return apply_filters( 'raindrops_yui_class_modify', $yui_inner_layout ); } } /** * Template conditional function Raindrops display 2column or not * * * @param string css rule or text * @param bool if value is true echo or false return * @return string input strings text */ if ( !function_exists( "raindrops_is_2col" ) ) { function raindrops_is_2col( $action = true, $echo = true ) { global $template; $template_name = basename( $template, '.php' ); $raindrops_col_setting_type = raindrops_warehouse_clone( 'raindrops_col_setting_type' ); if ( 'simple' == $raindrops_col_setting_type ) { if ( 'hide' == raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } else { return false; } } if ( 'details' == $raindrops_col_setting_type ) { if ( is_home() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_index' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_date() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_date' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_page() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_page' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_search() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_search' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_single() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_single' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_archive() && 'image' == $template_name && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_image_archive' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_404() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_404' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_page() && 'list-of-post' == $template_name && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_list_of_post' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_category() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_category' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_tag() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_tag' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } if ( is_author() && 2 == raindrops_warehouse_clone( 'raindrops_sidebar_author' ) ) { if ( true == $echo ) { echo $action; } else { return $action; } } return false; } } } /** * yui layout calc * * * * @return content width */ if ( !function_exists( "raindrops_main_width" ) ) { function raindrops_main_width() { return absint( raindrops_content_width_clone() ); } } /** * content width calc * * * * * @return main column width */ if ( !function_exists( "raindrops_content_width" ) ) { function raindrops_content_width() { return absint( apply_filters( 'raindrops_content_width', raindrops_content_width_clone() ) ); } } /** * plugin API * * * * * */ if ( !function_exists( "raindrops_plugin_is_active" ) ) { function raindrops_plugin_is_active( $plugin_path ) { $return_var = in_array( $plugin_path, get_option( 'active_plugins' ) ); return $return_var; } if ( raindrops_plugin_is_active( 'tmn-quickpost/tmn-quickpost.php' ) ) { global $base_info; foreach ( $base_info[ 'root' ] as $key => $val ) { $wp_cockneyreplace[ '%' . $key . '%' ] = $val; } function raindrops_import_post_meta() { global $post, $base_info; $r = get_post_meta( $post->ID, 'template', true ); foreach ( $base_info[ 'root' ] as $key => $val ) { $r = str_replace( '%' . $key . '%', $val, $r ); } if ( class_exists( 'trans' ) ) { $n = new trans( $r ); return $n->text2html(); } else { return $r; } } } } /** * Empty title fallback * * */ if ( !function_exists( 'raindrops_fallback_title' ) ) { function raindrops_fallback_title( $title, $id = 0 ) { global $post, $raindrops_link_unique_text; $format_label = ''; if ( 0 == $id && is_object( $post ) ) { $id = $post->ID; } //@ 1.317 $id = absint( $id ); if ( !is_admin() ) { $format = get_post_format( $id ); if ( false === $format ) { $image_uri = get_template_directory_uri() . '/images/link.png'; $class = 'icon-link-no-title'; $format_label = esc_html__( 'Article', 'raindrops' ); } else { $image_uri = get_template_directory_uri() . '/images/post-format-' . $format . '.png'; $class = 'icon-post-format-notitle icon-post-format-' . $format; if ( 'link' == $format ) { $add_label = esc_html__( ' to entry', 'raindrops' ); } else { $add_label = ''; } $format_labels = array( 'standard' => __( 'Standard', 'raindrops' ), 'aside' => __( 'Aside', 'raindrops' ), 'chat' => __( 'Chat', 'raindrops' ), 'gallery' => __( 'Gallery', 'raindrops' ), 'link' => __( 'Link', 'raindrops' ), 'image' => __( 'Image', 'raindrops' ), 'quote' => __( 'Quote', 'raindrops' ), 'status' => __( 'Status', 'raindrops' ), 'video' => __( 'Video', 'raindrops' ), 'audio' => __( 'Audio', 'raindrops' ), ); if ( isset( $format_labels[ $format ] ) ) { $format_label = esc_attr( $format_labels[ $format ] ); } else { $format_label = esc_attr( $format ); } $format_label = esc_html__( 'Post Format ', 'raindrops' ) . $format_label . $add_label; } $raindrops_post_thumbnail_size = array( 48, 48 ); if ( in_the_loop() ) { //@ 1.317 $raindrops_post_thumbnail_size = apply_filters( 'raindrops_post_thumbnail_size_main_query', array( 48, 48 ), $post->ID, get_post_class( '', $post->ID ) ); $raindrops_post_thumbnail_size = apply_filters( 'raindrops_post_thumbnail_size_main_query', array( 48, 48 ), $id, get_post_class( '', $id ) ); } $thumbnail = ''; //@ 1.317 if ( in_the_loop() && has_post_thumbnail( $post->ID ) && !post_password_required() && !is_singular() ) { if ( in_the_loop() && has_post_thumbnail( $id ) && !post_password_required() && !is_singular() ) { $thumbnail .= ''; $thumbnail .= get_the_post_thumbnail( $post->ID, $raindrops_post_thumbnail_size, array( "style" => "vertical-align:middle;", "alt" => null ) ); $thumbnail .= ''; } //@ 1.317 if (isset( $post->ID ) && ! is_404() && !has_post_thumbnail( $post->ID ) && !is_singular() && !post_password_required() ) { if ( isset( $id ) && !is_404() && !has_post_thumbnail( $id ) && !is_singular() && !post_password_required() ) { $thumbnail = apply_filters( 'raindrops_title_thumbnail', $thumbnail, '', '' ); } if ( !is_singular() && in_the_loop() ) { $raindrops_entry_title_text_allow = apply_filters( 'raindrops_entry_title_text_elements_allow', true ); if ( true == $raindrops_entry_title_text_allow ) { $title = $thumbnail . '' . $title . ''; } else { $title = $thumbnail . $title; } } else { $title = $thumbnail . $title; } $striped_title = wp_kses( $title, array() ); if ( empty( $title ) || empty( $striped_title ) ) { $html = $thumbnail . ''; return $html; } } $raindrops_link_unique_text = raindrops_link_unique_text(); //@ 1.317 if ( isset( $post->ID ) && $raindrops_link_unique_text == true ) { if ( isset( $id ) && $raindrops_link_unique_text == true ) { $title = $title . raindrops_unique_entry_title( $id ); } return apply_filters( 'raindrops_fallback_title', $title ); } } /** * for remove title html escaped from plug-ins * @param type $title * @return type * @since 1.276 */ if ( !function_exists( 'raindrops_strip_escaped_title' ) ) { function raindrops_strip_escaped_title( $title ) { /** * @1.423 add filter */ $title = apply_filters( 'raindrops_strip_escaped_title', $title ); return preg_replace( '!<.*?>!', '', $title ); } } /** * * * * @since 1.139 */ if ( !function_exists( 'raindrops_detect_header_image_size' ) ) { function raindrops_detect_header_image_size( $xy = 'width' ) { global $raindrops_custom_header_args; return raindrops_detect_header_image_size_clone( $xy ); } } if ( !function_exists( 'raindrops_the_header_image' ) ) { function raindrops_the_header_image( $type = 'default', $args = array() ) { global $raindrops_link_unique_text; /** * Custom Header */ $raindrops_title_in_the_header_check = raindrops_warehouse_clone( 'raindrops_place_of_site_title' ); if ( true == $raindrops_link_unique_text || $raindrops_title_in_the_header_check == 'header_image' ) { $type = 'elements'; } else { $type = 'home_url'; } if ( function_exists( 'has_header_video' ) && has_header_video() && is_header_video_active() ) { /** * @since 1.445 */ $type = 'elements'; } echo raindrops_header_image( $type, $args ); } } /** * Template function print header image * * This function has filter hook name raindrops_header_image * @param array( 'img'=> 'image uri' , 'height' => 'image height' , 'color' => 'text color', 'style' => '( default ) background-size:cover;' , 'description' => 'replace text from bloginfo( description ) to your text','description_style' => 'Your description style rule' ) * @return string htmlblock

        [WordPress site description]

        */ if ( !function_exists( 'raindrops_header_image' ) ) { function raindrops_header_image( $type = 'default', $args = array() ) { global $raindrops_page_width, $post, $raindrops_custom_header_height, $is_IE, $is_edge; $raindrops_document_width = $raindrops_page_width; $raindrops_header_image = get_custom_header(); $raindrops_header_image_uri = $raindrops_header_image->url; $raindrops_header_image_width = apply_filters( 'raindrops_header_image_width', raindrops_detect_header_image_size( 'width' ) ); $raindrops_header_image_height = apply_filters( 'raindrops_header_image_height', raindrops_detect_header_image_size( 'height' ) ); $raindrops_restore_check = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); $raindrops_field_exists_check = get_post_custom_values( '_raindrops_this_header_image' ); if ( $raindrops_field_exists_check !== null ) { $display_header_image_file = get_post_meta( $post->ID, '_raindrops_this_header_image', true ); if ( $display_header_image_file == 'hide' && is_singular() ) { return; } if ( !empty( $display_header_image_file ) && $display_header_image_file !== 'default' && is_singular() ) { $display_header_image_attr = wp_get_attachment_image_src( $display_header_image_file, 'full' ); if ( !empty( $display_header_image_attr ) ) { $raindrops_header_image_uri = $display_header_image_attr[ 0 ]; $raindrops_header_image_width = $display_header_image_attr[ 1 ]; $raindrops_header_image_height = $display_header_image_attr[ 2 ]; } } } if ( 'remove-header' == $raindrops_restore_check ) { return; } if ( empty( $raindrops_header_image_uri ) || has_filter( 'theme_mod_header_image' ) ) { $raindrops_header_image_uri = $raindrops_restore_check; } if ( $raindrops_header_image_width > 0 && $raindrops_header_image_height > 0 ) { $ratio = $raindrops_header_image_height / $raindrops_header_image_width; } else { $ratio = 0; } $raindrops_width = raindrops_warehouse_clone( 'raindrops_page_width' ); switch ( true ) { case 'doc' == $raindrops_width: $raindrops_document_width = 750; break; case 'doc2' == $raindrops_width: $raindrops_document_width = 950; break; case 'doc4' == $raindrops_width: $raindrops_document_width = 974; break; case is_numeric( $raindrops_width ): $raindrops_document_width = $raindrops_page_width; break; case 'doc3' == $raindrops_width: $raindrops_document_width = 950; //this value is fake following javascript break; case 'doc5' == $raindrops_width: $raindrops_document_width = 950; //this value is fake following javascript break; } if ( $raindrops_header_image_width >= $raindrops_document_width ) { $ratio = floatval( $ratio ); $height_current = round( $raindrops_document_width * $ratio ) . 'px'; $block_style = 'background-size:cover;'; } else { $height_current = round( $raindrops_header_image_height ) . 'px'; $raindrops_style_type = raindrops_warehouse_clone( 'raindrops_style_type' ); /** * @1.434 conditional */ if ( "w3standard" == $raindrops_style_type ) { $block_style = 'background-repeat:no-repeat;background-position:center;background-color:#000;background-size:auto;'; if ( !$is_IE && !$is_edge ) { $block_style .= ' background-origin:content-box;'; } } else { $block_style = 'background-repeat:no-repeat;background-position:top center;background-color:#000;background-size:auto;'; if ( !$is_IE && !$is_edge ) { $block_style .= ' background-origin:content-box;'; } } } if ( 'doc3' == $raindrops_width ) { $block_style = str_replace( 'background-size:auto', 'background-size:cover', $block_style ); } //w3standard can not use CSS3 if ( 'w3standard' == raindrops_warehouse( 'raindrops_style_type' ) ) { $block_style = 'background-repeat:no-repeat;background-position:center;background-color:#000;'; } if ( '' == get_header_image() ) { $height = 0; $description_style = ' style="display:none;"'; } $defaults = array( 'img' => $raindrops_header_image_uri, 'height' => $height_current, 'color' => get_theme_mod( 'header_textcolor' ), 'style' => $block_style, 'text' => get_bloginfo( 'description' ), 'text_attr' => '' ); $args = wp_parse_args( $args, $defaults ); extract( $args, EXTR_SKIP ); if ( 'blank' == get_theme_mod( 'header_textcolor' ) ) { $text_attr = ' style="display:none;"'; } elseif ( preg_match( "!([0-9a-f]{6}|[0-9a-f]{3})!si", get_theme_mod( 'header_textcolor' ) ) ) { $add_class = ''; $add_style = ''; if ( preg_match( '!style!', $text_attr ) ) { $add_style = str_replace( array( 'style', "'", '"', '=' ), '', $text_attr ); } else { $add_class = $text_attr; } /* @1.326 remove inline style ' style="color:#' . esc_attr( get_theme_mod( 'header_textcolor' ) ) . ';' . */ $text_attr = esc_attr( $add_style ) . ' ' . esc_html( $add_class ); $text_attr = apply_filters( 'raindrops_header_image_description_attr', $text_attr ); } $responsive_page_width_check = Raindrops_warehouse_clone( "raindrops_page_width" ); if ( 'doc3' == $responsive_page_width_check || 'doc5' == $responsive_page_width_check ) { $width = 'width:100%'; $height = apply_filters( 'raindrops_header_image_height', $raindrops_custom_header_height ) . 'px'; } else { $width = 'width:' . $raindrops_document_width . 'px'; } if ( $type == 'default' || !isset( $type ) ) { $html = '

        %7$s

        '; $html = sprintf( $html, 'header-image', esc_url( $img ), esc_html( $height ), esc_html( $color ), esc_html( $style ), htmlspecialchars( $text_attr, ENT_NOQUOTES ), esc_html( $text ), $width ); if ( $color == 'blank' ) { $html = str_replace( 'color:#blank;', '', $html ); } return apply_filters( "raindrops_header_image", $html ); } elseif ( 'css' == $type ) { $old_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 ] ) ) { $old_ie = 'ie' . $regs[ 2 ]; } $raindrops_header_imge_filter_color = raindrops_warehouse_clone( 'raindrops_header_image_filter_color' ); $raindrops_header_image_color_rgb_array = raindrops_hex2rgb_array_clone( $raindrops_header_imge_filter_color ); $raindrops_header_image_filter_apply_top = raindrops_warehouse_clone( 'raindrops_header_image_filter_apply_top' ); $raindrops_header_image_filter_apply_bottom = raindrops_warehouse_clone( 'raindrops_header_image_filter_apply_bottom' ); $raindrops_enable_header_image_filter = raindrops_warehouse_clone( 'raindrops_enable_header_image_filter' ); if ( false !== $raindrops_header_image_color_rgb_array && 'enable' == $raindrops_enable_header_image_filter && $old_ie !== 'ie8' && $old_ie !== 'ie9' ) { // client side yet 1.298 $style_rule_template = ' background: linear-gradient( rgba(%1$s, %2$s, %3$s, %4$s),rgba(%1$s, %2$s, %3$s, %5$s) ), url(%6$s); background: -moz-linear-gradient( rgba(%1$s, %2$s, %3$s, %4$s),rgba(%1$s, %2$s, %3$s, %5$s) ), url(%6$s); background: -webkit-linear-gradient( rgba(%1$s, %2$s, %3$s, %4$s),rgba(%1$s, %2$s, %3$s, %5$s) ), url(%6$s); background-size:cover;'; $background_property = sprintf( $style_rule_template, $raindrops_header_image_color_rgb_array[ 0 ], $raindrops_header_image_color_rgb_array[ 1 ], $raindrops_header_image_color_rgb_array[ 2 ], $raindrops_header_image_filter_apply_top, $raindrops_header_image_filter_apply_bottom, esc_url( $img ) ); } else { $background_property = 'background-image:url( ' . esc_url( $img ) . ' );'; } $css = '#%1$s{%2$s%8$s;height:%3$s;color:#%4$s;%5$s}' . "\n" . '#%1$s p {color:#%4$s;}' . "\n" . '.site-title-link{color:#%4$s;}'; $text_attr = str_replace( array( 'style', '=', '"', "'" ), '', $text_attr ); $css = sprintf( $css, 'header-image', apply_filters( 'raindrops_header_image_background_image', $background_property ), esc_html( $height ), esc_html( $color ), apply_filters( 'raindrops_header_image_background_style', esc_html( $style ) ), htmlspecialchars( $text_attr, ENT_NOQUOTES ), esc_html( $text ), $width ); if ( $color == 'blank' ) { $css = str_replace( 'color:#blank;', '', $css ); } return apply_filters( "raindrops_header_image_css", $css ); } elseif ( 'elements' == $type ) { $raindrops_tagline = apply_filters( 'raindrops_tagline_elements', '

        %2$s

        ' ); $elements = '
        ' . apply_filters( 'raindrops_header_image_contents', '' ) . $raindrops_tagline . '
        '; $elements = sprintf( $elements, 'header-image', esc_html( $text ), $text_attr ); return apply_filters( "raindrops_header_image_elements", $elements ); } elseif ( 'home_url' == $type ) { $raindrops_tagline = apply_filters( 'raindrops_tagline_home_url', '

        %2$s

        ' ); $elements = '
        ' . apply_filters( 'raindrops_header_image_contents', '' ) . $raindrops_tagline . '
        '; $elements = sprintf( $elements, 'header-image', esc_html( $text ), esc_url( home_url() ), $text_attr ); return apply_filters( "raindrops_header_image_home_url", $elements ); } } } /** * Print site description html * * This function has filter hook name raindrops_site_description * * @param array( "text" => 'Some text' , "switch" => ' style="display:none;"' ) * @return string htmlblock
        [input text]
        * */ if ( !function_exists( 'raindrops_site_description' ) ) { function raindrops_site_description( $args = array() ) { // if ( 'blank' == get_theme_mod( 'header_textcolor' ) ) { if ( 'above' == raindrops_warehouse_clone( 'raindrops_tagline_in_the_header_image' ) ) { $raindrops_show_hide = ''; } elseif ( preg_match( "!([0-9a-f]{6}|[0-9a-f]{3})!si", get_header_textcolor() ) ) { $raindrops_show_hide = ' style="display:none;"'; } else { $raindrops_show_hide = ' style="display:none;"'; } $defaults = array( 'text' => get_bloginfo( 'description' ), 'switch' => $raindrops_show_hide ); $args = wp_parse_args( $args, $defaults ); extract( $args, EXTR_SKIP ); $html = '
        %2$s
        '; $html = sprintf( $html, $switch, $text ); return apply_filters( "raindrops_site_description", $html ); } } /** * Print the site title * * This function has filter hook name raindrops_site_title( #site-title ) * * * @param $text string append to title strings * @return htmlblock <[h1|div] class="h1" id="site-title">[bloginfo( name )] */ if ( function_exists( 'the_custom_logo' ) ) { /* for WordPress 4.5 */ /** * * @see https://developers.google.com/search/docs/data-types/articles#amp-logo-guidelines */ add_image_size( 'raindrops-logo', 1200, 120 ); add_theme_support( 'custom-logo', array( 'size' => 'raindrops-logo' ) ); } if ( !function_exists( 'raindrops_site_title' ) ) { function raindrops_site_title( $text = "" ) { global $raindrops_document_type; if ( 'xhtml' == $raindrops_document_type ) { if ( is_home() || is_front_page() ) { $heading_elememt = 'h1'; } else { $heading_elememt = 'div'; } } else { $heading_elememt = 'h1'; } $header_text_color = get_theme_mod( 'header_textcolor' ); // check hex value if ( 'blank' == $header_text_color || '' == $header_text_color ) if ( preg_match( '|^([A-Fa-f0-9]{3}){1,2}$|', $header_text_color ) ) { $hd_style = ' style="color:#' . $header_text_color . ';"'; } else { $hd_style = ''; } if ( function_exists( 'the_custom_logo' ) ) { if ( 'hide' == raindrops_warehouse_clone( "raindrops_display_site_title" ) ) { $logo = get_custom_logo(); } else { $logo = '' . strip_tags( get_custom_logo(), '' ) . ''; } } else { $logo = ''; } $title_format = '<%1$s class="%6$s" id="site-title">%7$s%5$s'; $html = sprintf( $title_format, $heading_elememt, esc_url( home_url() ), esc_attr( 'site title ' . get_bloginfo( 'name', 'display' ) ), "home", get_bloginfo( 'name', 'display' ) . esc_html( $text ), apply_filters( 'raindrops_site_title_class', 'h1' ), $logo ); return apply_filters( "raindrops_site_title", $html ); } } /** * * * * * */ if ( !function_exists( "raindrops_column_controller" ) ) { function raindrops_column_controller( $col = false ) { global $post; if ( $col !== false && !is_singular() ) { return absint( $col ); } if ( isset( $post ) ) { $filter_column = apply_filters( 'raindrops_column_controller', '', $post->ID ); } else { $filter_column = apply_filters( 'raindrops_column_controller', '', 0 ); } if ( !empty( $filter_column ) && !is_int( $filter_column ) ) { $filter_column = false; } if ( isset( $post ) ) { if ( false !== ($type = raindrops_has_indivisual_notation() ) ) { if ( isset( $type[ 'col' ] ) ) { return absint( $type[ 'col' ] ); } } if ( !empty( $filter_column ) ) { return absint( $filter_column ); } /** * @since 1.447 */ if ( !is_active_sidebar( 1 ) && !is_active_sidebar( 2 ) ) { return 1; } if ( is_active_sidebar( 1 ) && !is_active_sidebar( 2 ) ) { return 2; } if ( 'hide' == Raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) ) { return 2; } elseif ( 'show' == Raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) ) { return 3; } } return false; } } /** * * * * * */ if ( !function_exists( "raindrops_color_type_custom" ) ) { function raindrops_color_type_custom( $css ) { global $post; if ( isset( $post ) ) { $filter_custom_color = apply_filters( 'raindrops_color_type_custom', '', $post->ID ); } else { $filter_custom_color = apply_filters( 'raindrops_color_type_custom', '', 0 ); } if ( !empty( $filter_custom_color ) ) { /* validate value */ $raindrops_style_type_choices = raindrops_register_styles( "w3standard" ); if ( !array_key_exists( $filter_custom_color, $raindrops_style_type_choices ) ) { $filter_custom_color = ''; } } if ( false !== ($type = raindrops_has_indivisual_notation() ) ) { if ( isset( $type[ 'color_type' ] ) ) { return raindrops_design_output( $type[ 'color_type' ] ) . raindrops_color_base(); } if ( !empty( $filter_custom_color ) ) { return raindrops_design_output( $filter_custom_color ) . raindrops_color_base( $filter_custom_color ); } else { return $css; } } elseif ( intval( get_query_var( 'raindrops_color_type' ) ) == 1 && $post_id = get_query_var( 'raindrops_pid' ) ) { $post_id = absint( $post_id ); $type = raindrops_has_indivisual_notation( $post_id ); if ( isset( $type[ 'color_type' ] ) ) { return raindrops_design_output( $type[ 'color_type' ] ) . raindrops_color_base(); } else { if ( !empty( $filter_custom_color ) ) { $color_type = $filter_custom_color; return raindrops_design_output( $color_type ) . raindrops_color_base(); } else { return $css; } } } else { return $css; } } } /** * * * * * */ if ( !function_exists( "raindrops_delete_post_link" ) ) { function raindrops_delete_post_link( $link_text = null, $before = '', $after = '', $id = 0, $echo = true ) { global $post; if ( RAINDROPS_SHOW_DELETE_POST_LINK !== true ) { return; } if ( empty( $link_text ) ) { $link_text = esc_html__( 'Trash', 'raindrops' ); } if ( current_user_can( 'edit_post', $post->ID ) && $url = get_delete_post_link() ) { $html = $before . '%2$s' . $after; $html = sprintf( $html, esc_url( $url ), $link_text ); if ( $echo !== true ) { return $html; } else { echo $html; } } } } /** * comment reply * * * * @since 0.956 */ if ( !function_exists( "raindrops_enqueue_comment_reply" ) ) { function raindrops_enqueue_comment_reply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } } if ( !function_exists( 'raindrops_load_small_device_helper' ) ) { /** * * @global type $raindrops_current_data_version * @global type $is_IE * @global type $raindrops_fluid_maximum_width * @global type $raindrops_browser_detection * @global type $post * @global type $template * @global type $raindrops_link_unique_text * @since 1.254 */ function raindrops_load_small_device_helper() { global $raindrops_current_data_version, $is_IE, $raindrops_fluid_maximum_width, $raindrops_browser_detection, $post, $template, $raindrops_link_unique_text, $raindrops_fallback_image_for_entry_content_enable, $raindrops_fallback_human_interface_show, $raindrops_add_inline_style_for_sidebars; if ( true == $raindrops_fallback_human_interface_show ) { return; } $raindrops_header_image = get_custom_header(); $raindrops_header_image_uri = $raindrops_header_image->url; $ratio = 0; if ( empty( $raindrops_header_image_uri ) ) { $raindrops_header_image_uri = get_header_image(); } $raindrops_header_image_width = apply_filters( 'raindrops_header_image_width', raindrops_detect_header_image_size( 'width' ) ); $raindrops_header_image_height = apply_filters( 'raindrops_header_image_height', raindrops_detect_header_image_size( 'height' ) ); $raindrops_field_exists_check = get_post_custom_values( '_raindrops_this_header_image' ); if ( $raindrops_field_exists_check !== null ) { $display_header_image_file = get_post_meta( $post->ID, '_raindrops_this_header_image', true ); if ( !empty( $display_header_image_file ) && $display_header_image_file !== 'default' && is_singular() ) { $display_header_image_attr = wp_get_attachment_image_src( $display_header_image_file, 'full' ); if ( !empty( $display_header_image_attr ) ) { $raindrops_header_image_uri = esc_url( $display_header_image_attr[ 0 ] ); $raindrops_header_image_width = absint( $display_header_image_attr[ 1 ] ); $function = absint( $display_header_image_attr[ 2 ] ); } } } $raindrops_restore_check = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); if ( $raindrops_restore_check !== 'remove-header' ) { if ( $raindrops_header_image_width > 0 && $raindrops_header_image_height > 0 ) { $ratio = $raindrops_header_image_height / $raindrops_header_image_width; } else { $ratio = 0; } } $raindrops_current_template = basename( $template, '.php' ); if ( $raindrops_current_template == 'list_of_post' ) { $raindrops_ignore_template = true; } else { $raindrops_ignore_template = false; } $color_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( $type[ 'col' ] ) ) { $color_type .= ' '; $color_type .= sanitize_html_class( "rd-col-" . $type[ 'col' ] ); } } else { $raindrops_style_type = raindrops_warehouse_clone( 'raindrops_style_type' ); if ( !empty( $raindrops_style_type ) ) { $color_type = esc_attr( "rd-type-" . $raindrops_style_type ); } } $raindrops_page_width = raindrops_warehouse_clone( 'raindrops_page_width' ); if ( false !== ( $url = raindrops_locate_url( 'raindrops-helper.js' ) ) ) { wp_enqueue_script( 'raindrops_helper_script', $url, array( 'jquery' ), $raindrops_current_data_version, true ); } if ( $raindrops_browser_detection == true ) { $raindrops_browser_detection = 1; } else { $raindrops_browser_detection = 0; } if ( is_singular() == true ) { $raindrops_is_singular = 1; } else { $raindrops_is_singular = 0; } if ( is_single() == true ) { $raindrops_is_single = 1; } else { $raindrops_is_single = 0; } if ( is_page() == true ) { $raindrops_is_page = 1; } else { $raindrops_is_page = 0; } $raindrops_link_unique_text = raindrops_link_unique_text(); /* @1.328 */ if ( true == $raindrops_fallback_image_for_entry_content_enable ) { $raindrops_fallback_image_for_entry_content = esc_url( raindrops_warehouse_clone( 'raindrops_fallback_image_for_entry_content' ) ); } else { $raindrops_fallback_image_for_entry_content = false; } if ( wp_is_mobile() ) { $kind_of_browser = 'rd-mobile'; } else { $kind_of_browser = 'rd-pc'; } /* comments */ if ( 1 == get_option( 'require_name_email' ) ) { $raindrops_required_name_email = 1; } else { $raindrops_required_name_email = 0; } /* menu percent font size */ $raindrops_menu_primary_font_size = absint( raindrops_warehouse_clone( 'raindrops_menu_primary_font_size' ) ); $raindrops_menu_primary_font_size = $raindrops_menu_primary_font_size / 100; /* base font size of pixel */ $raindrops_basefont_size = raindrops_warehouse_clone( 'raindrops_basefont_settings' ); $raindrops_current_menu_font_size = (float) $raindrops_basefont_size * $raindrops_menu_primary_font_size; $raindrops_current_menu_button_height = $raindrops_current_menu_font_size * 3.4; //3.4 is line-height $raindrops_menu_height_check_value = apply_filters( 'raindrops_menu_height_check_value', absint( $raindrops_current_menu_button_height * 1.8 ), $raindrops_basefont_size, $raindrops_menu_primary_font_size ); //near 2 line /* @since 1.445 */ if ( function_exists( 'has_header_video' ) && has_header_video() && ( true == is_home() && true == is_front_page() || false == is_home() && true == is_front_page() ) ) { $raindrops_header_video_active = 'yes'; } else { $raindrops_header_video_active = 'no'; } $raindrops_doc_type = raindrops_warehouse_clone( 'raindrops_doc_type_settings' ); wp_localize_script( 'raindrops_helper_script', 'raindrops_script_vars', array( 'is_ie' => $is_IE, 'fluid_maximum_width' => $raindrops_fluid_maximum_width, 'browser_detection' => $raindrops_browser_detection, 'template' => $template, 'link_unique_text' => $raindrops_link_unique_text, 'header_image_uri' => $raindrops_header_image_uri, 'header_image_width' => $raindrops_header_image_width, 'header_image_height' => $raindrops_header_image_height, 'field_exists_check' => $raindrops_field_exists_check, 'restore_check' => $raindrops_restore_check, 'ratio' => apply_filters( 'raindrops_header_image_ratio', $ratio ), 'has_ratio_filter' => has_filter( 'raindrops_header_image_ratio' ), 'current_template' => $raindrops_current_template, 'ignore_template' => $raindrops_ignore_template, 'is_single' => $raindrops_is_single, 'is_page' => $raindrops_is_page, 'is_singular' => $raindrops_is_singular, 'browser_detection' => $raindrops_browser_detection, 'color_type' => $color_type, 'page_width' => $raindrops_page_width, 'accessibility_settings' => raindrops_warehouse_clone( 'raindrops_accessibility_settings' ), 'fallback_image_for_entry_content' => $raindrops_fallback_image_for_entry_content, 'blockquote_cite_i18n' => esc_html__( 'cite:', 'raindrops' ), 'kind_of_browser' => $kind_of_browser, 'require_name_email' => $raindrops_required_name_email, 'placeholder_text_message' => esc_html__( "Message", 'raindrops' ), 'placeholder_text_required_message' => esc_html__( "Required Your Message", 'raindrops' ), 'placeholder_text_comment_name' => esc_html__( "Name", 'raindrops' ), 'placeholder_text_required_comment_name' => esc_html__( "Required Your Name", 'raindrops' ), 'placeholder_text_email' => esc_html__( "Email Address", 'raindrops' ), 'placeholder_text_required_email' => esc_html__( "Required Your Email", 'raindrops' ), 'placeholder_text_url' => esc_html__( "Website", 'raindrops' ), 'home_url' => home_url(), 'content_shareing' => raindrops_content_shareing(), 'raindrops_primary_menu_responsive' => raindrops_warehouse_clone( 'raindrops_primary_menu_responsive' ), 'raindrops_primary_menu_responsive_height' => $raindrops_menu_height_check_value, 'raindrops_raindrops_sticky_menu' => raindrops_warehouse_clone( 'raindrops_sticky_menu' ), 'raindrops_default_sidebar_responsive' => raindrops_warehouse_clone( 'raindrops_default_sidebar_responsive' ), 'raindrops_extra_sidebar_responsive' => raindrops_warehouse_clone( 'raindrops_extra_sidebar_responsive' ), 'raindrops_sidebar_responsive_text_op' => esc_html__( 'Open', 'raindrops' ), 'raindrops_sidebar_responsive_text_cl' => esc_html__( 'Close', 'raindrops' ), 'raindrops_archive_has_count' => raindrops_archive_has_count(), 'raindrops_add_inline_style_for_sidebars' => $raindrops_add_inline_style_for_sidebars, 'raindrops_header_video_active' => $raindrops_header_video_active, 'raindrops_video_header_tagline_title_attr' => esc_html__( 'Link to Main Content', 'raindrops' ), 'doc_type' => $raindrops_doc_type, 'raindrops_layout_change_label_to_list' => esc_html__( 'Change to list layout', 'raindrops' ), 'raindrops_layout_change_label_to_grid' => esc_html__( 'Change to grid layout', 'raindrops' ), ) ); wp_reset_postdata(); } } /** * * * * * */ if ( !function_exists( 'raindrops_custom_width' ) ) { function raindrops_custom_width() { global $raindrops_page_width; $c_width = (int) $raindrops_page_width; $width = $c_width / 13; $ie_width = $width * 0.9759; $custom_content_width = '/* set custom content width start */' . '#custom-doc {margin:auto;text-align:left;' . "\n" . 'width:' . round( $width, 0 ) . 'em;' . "\n" . '*width:' . round( $ie_width, 0 ) . 'em;' . "\n" . 'min-width:' . round( $width * 0.7, 0 ) . 'em;}/* set custom content width end */'; return apply_filters( "raindrops_custom_width", $custom_content_width ); } } /** * * * * * */ if ( !function_exists( 'raindrops_is_fluid' ) ) { function raindrops_is_fluid() { global $post, $is_IE, $raindrops_fluid_minimum_width, $raindrops_fluid_maximum_width, $raindrops_current_column, $raindrops_stylesheet_type, $raindrops_header_image_default_ratio; if ( !isset( $raindrops_stylesheet_type ) ) { $raindrops_stylesheet_type = raindrops_warehouse_clone( 'raindrops_stylesheet_in_html' ); } $content_width = raindrops_content_width_clone(); $width = intval( $raindrops_fluid_minimum_width ); $extra_sidebar_width = raindrops_warehouse_clone( 'raindrops_right_sidebar_width_percent' ); $fluid_width = ''; $page_width = raindrops_warehouse_clone( 'raindrops_page_width' ); if ( '25' == $extra_sidebar_width ) { $main_column_width_fluid = 74.2; } elseif ( '75' == $extra_sidebar_width ) { $main_column_width_fluid = 24; } elseif ( '33' == $extra_sidebar_width ) { $main_column_width_fluid = 64; } elseif ( '66' == $extra_sidebar_width ) { $main_column_width_fluid = 32; } elseif ( '50' == $extra_sidebar_width ) { $main_column_width_fluid = 49; } else { $main_column_width_fluid = 100; } if ( 'show' !== raindrops_warehouse_clone( 'raindrops_show_right_sidebar' ) ) { $main_column_width_fluid = 100; } $padding_height = $raindrops_header_image_default_ratio * 100; $raindrops_header_image_width = absint( raindrops_detect_header_image_size_clone( 'width' ) ); $raindrops_header_image_height = absint( raindrops_detect_header_image_size_clone( 'height' ) ); $raindrops_field_exists_check = get_post_custom_values( '_raindrops_this_header_image' ); if ( is_singular() && $raindrops_field_exists_check !== null ) { $display_header_image_file = get_post_meta( $post->ID, '_raindrops_this_header_image', true ); $display_header_image_attr = wp_get_attachment_image_src( $display_header_image_file, 'full' ); if ( !empty( $display_header_image_attr ) ) { $raindrops_header_image_uri = $display_header_image_attr[ 0 ]; $raindrops_header_image_width = $display_header_image_attr[ 1 ]; $raindrops_header_image_height = $display_header_image_attr[ 2 ]; } } if ( $raindrops_header_image_height !== 0 && $raindrops_header_image_width !== 0 ) { $padding_height = $raindrops_header_image_height / $raindrops_header_image_width * 100; } if ( 'doc3' == $page_width ) { $fluid_width = "\n" . '/* raindrops is fluid start */' . "\n#doc3,.raindrops-auto-fit-width{min-width:" . $raindrops_fluid_minimum_width . 'px;max-width:' . $raindrops_fluid_maximum_width . 'px;}' . "\n#access{min-width:" . $raindrops_fluid_minimum_width . 'px;}' . "\n" . ".rd-pw-doc3.rd-col-1 .breadcrumbs{width:" . $content_width . 'px;margin:auto;}' . "\n"; if ( false == has_filter( 'raindrops_header_image_ratio' ) ) { $fluid_width .= "#doc3 #header-image{ display:block; position: relative; padding-bottom: {$padding_height}%; height: 0!important; max-width:100%; }"; } $fluid_width .= '/* raindrops is fluid end */'; } elseif ( 'doc5' == $page_width ) { $raindrops_full_width_limit_window_width = raindrops_warehouse_clone( 'raindrops_full_width_limit_window_width' ); $raindrops_full_width_max_width = raindrops_warehouse_clone( 'raindrops_full_width_max_width' ); $raindrops_document_type = raindrops_warehouse_clone( 'raindrops_doc_type_settings' ); $sticky_post_count = count( get_option( 'sticky_posts' ) ); $post_per_page = get_option( 'posts_per_page' ); $total_loop = absint( $sticky_post_count ) + absint( $post_per_page ); $raindrops_full_width_max_width_keep_content_width = raindrops_content_width_clone(); /* loop-12 replace loop-0 */ $post_per_page_relate_style = ''; if ( 'html5' == $raindrops_document_type ) { $post_per_page_relate_style = '.rd-pw-doc5.rd-col-1 .loop-0 article,'; } if ( 'xhtml' == $raindrops_document_type ) { $post_per_page_relate_style = '.rd-pw-doc5.rd-col-1 .loop-0 > div > div,'; } for ( $i = 0; $i < $total_loop; $i++ ) { $num = absint( $i + 1 ); if ( 'html5' == $raindrops_document_type ) { $post_per_page_relate_style .= '.rd-pw-doc5.rd-col-1 .loop-' . $num . ' article,'; } if ( 'xhtml' == $raindrops_document_type ) { $post_per_page_relate_style .= '.rd-pw-doc5.rd-col-1 .loop-' . $num . ' > div > div,'; } } $fluid_width = "\n" . '/* raindrops is fluid start */' . '#header-image,' . "\n#doc5{min-width:" . $raindrops_fluid_minimum_width . 'px;max-width:' . $raindrops_full_width_limit_window_width . 'px;}' . "\n#access{min-width:" . $raindrops_fluid_minimum_width . 'px;}' . '.raindrops-auto-fit-width, ' . "\n#doc5 .static-front-content, #doc5 .front-page-top-container, .page-template-page-featured .poster .line, .page-template-page-featured .page article, #hd, .social, #portfolio, #raindrops-recent-posts, .commentlist, #nav-above-comments, #nav-below-comments, #nav-below, .no-header-image #header-inner, #access .menu-header, #access > .menu, #top ol.breadcrumbs, .rd-tag-description, .rd-category-description, #bd, .related-posts, #ft .widget-wrapper, .rd-col-1.rd-grid.rd-content-width-fit .index.search-results, .rd-col-1.rd-grid.rd-content-width-fit .index.archives{ max-width:{$raindrops_full_width_max_width}px; margin-left:auto; margin-right:auto; } #ft address{ max-width:{$raindrops_full_width_max_width}px; } #top > a{ display:block; }"; if ( false == has_filter( 'raindrops_header_image_ratio' ) ) { $fluid_width .= "#doc5 #header-image{ display:block; position: relative; padding-bottom: {$padding_height}%; height: 0!important; max-width:100%; }"; } $fluid_width .= "\n" . '/* raindrops is fluid end */'; $fluid_width .= "\n" . '/* raindrops is fluid 1 column start */' . "\n#doc5{ min-width:{$raindrops_fluid_minimum_width}px; max-width: {$raindrops_full_width_limit_window_width}px; } .rd-pw-doc5.rd-col-1 #doc5 #header-image{ display:block; position: relative; padding-bottom: {$padding_height}%; height: 0!important; max-width:100%; } .rd-pw-doc5.rd-col-1 .raindrops-expand-width{ padding-right:0; } .rd-pw-doc5.rd-col-1 #bd{ max-width:none; } /* @1.456 .rd-pw-doc5.rd-col-1 .yui-t6 #container > .first, .rd-pw-doc5.rd-col-1 .yui-t5 #container > .first, .rd-pw-doc5.rd-col-1 .yui-t4 #container > .first { margin:0; }*/ .loop-before-toolbar, .rd-pw-doc5.rd-col-1 .topsidebar .metaslider, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .widget_calendar #calendar_wrap, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .raindrops-pinup-entries .page, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .raindrops-pinup-entries .post, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .raindrops-extend-archive .eco-archive, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .widget_categories ul, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .widget_nav_menu > div, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .widget_tag_cloud .tagcloud, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .widget_text .textwidget, .rd-pw-doc5.rd-col-1 .topsidebar > ul > .widget_search #searchform, .rd-pw-doc5.rd-col-1 .topsidebar > ul > li > .widgettitle, .rd-pw-doc5.rd-col-1 .topsidebar > ul > li > ul, .rd-pw-doc5.rd-col-1 .rd-tpl-image, .rd-pw-doc5.rd-col-1 .breadcrumbs, .rd-pw-doc5.rd-col-1 .wp-pagenavi, .rd-pw-doc5.rd-col-1 #home-tab, .rd-pw-doc5.rd-col-1 .bottom-sidebar-1 li, .rd-pw-doc5.rd-col-1 .page-template-list_of_post-php #container, .rd-pw-doc5.rd-col-1 .error404 .entry-content, .rd-pw-doc5.rd-col-1 .error404 .entry-title, .rd-pw-doc5.rd-col-1 .bottom-sidebar-3 ul, .rd-pw-doc5.rd-col-1 .bottom-sidebar-2 ul, .rd-pw-doc5.rd-col-1 .raindrops-toc-front, .rd-pw-doc5.rd-col-1 .nav-links, .rd-pw-doc5.rd-col-1 #access .menu, .rd-pw-doc5.rd-col-1 #doc3 .front-page-top-container, .rd-pw-doc5.rd-col-1 #hd, .rd-pw-doc5.rd-col-1 #access .menu-header, .rd-pw-doc5.rd-col-1 #archives-title, .rd-pw-doc5.rd-col-1 .page-title, .rd-pw-doc5.rd-col-1.page-template-date-php #doc3 .raindrops-monthly-archive-prev-next-avigation, .rd-pw-doc5.rd-col-1 #nav-above, .rd-pw-doc5.rd-col-1 #ft .widget-wrapper, .rd-pw-doc5.rd-col-1 #ft address{ max-width:{$raindrops_full_width_max_width}px; margin-left:auto; margin-right:auto; } .rd-pw-doc5.rd-col-1 #ft address{ margin:1em auto; } /* div > div for xhtml */ .rd-pw-doc5.rd-col-1.search .search-results > div > div, .rd-pw-doc5.rd-col-1.tag > div > div, .rd-pw-doc5.rd-col-1.single .post, .rd-pw-doc5.rd-col-1.page .page .page," . $post_per_page_relate_style . " .rd-pw-doc5.rd-col-1 .loop-item-show-allways > div > div, .rd-pw-doc5.rd-col-1.error404 .entry-title, .rd-pw-doc5.rd-col-1.archive.author main, .rd-pw-doc5.rd-col-1.archive .raindrops-monthly-archive-prev-next-avigation, .rd-pw-doc5.rd-col-1.archive .datetable, .rd-pw-doc5.rd-col-1 #list-of-post, .rd-pw-doc5.rd-col-1 .raindrops-tile-wrapper .portfolio, .rd-pw-doc5.rd-col-1.search .pagetitle, .rd-pw-doc5.rd-col-1.search .search-results article, .rd-pw-doc5.rd-col-1 .fail-search, .rd-pw-doc5.rd-col-1.tag article, .rd-pw-doc5.rd-col-1.page-template-date-php #doc3 .datetable, .rd-pw-doc5.rd-col-1.single .raindrops-no-keep-content-width article, .rd-pw-doc5.rd-col-1.page-template .raindrops-no-keep-content-width article, .rd-pw-doc5.rd-col-1.page .raindrops-no-keep-content-width article, .rd-pw-doc5.rd-col-1.page > div > article, .rd-pw-doc5.rd-col-1 .loop-item-show-allways > div > article{ max-width:{$raindrops_full_width_max_width}px; /* @1.456 */ margin-left:auto!important; margin-right:auto!important; } /* @since1.443 */ .rd-pw-doc5.rd-col-1.single .raindrops-keep-content-width article{ max-width:{$raindrops_full_width_max_width_keep_content_width}px; margin-left:auto!important; margin-right:auto!important; } /* @since1.446 */ .page-template-front-page .topsidebar ul > li > .widgettitle ~ select[name=\"archive-dropdown\"], .page-template-front-page .topsidebar ul > li > .widgettitle ~ .postform{ margin-left: 30%; margin-right:30%; width: 40%; } .page-template-front-page .topsidebar ul > li > .widgettitle + form .searchform, .page-template-front-page .topsidebar ul > li > .widgettitle + table, .page-template-front-page .topsidebar ul > li > .widgettitle + div, .page-template-front-page .topsidebar ul > li > #calendar_wrap, .page-template-front-page .topsidebar ul > li > .widgettitle + ul, .page-template-front-page .topsidebar ul > li > .widgettitle, .page-template-front-page #portfolio .portfolio-nav, .page-template-front-page #portfolio .index, .page-template-front-page .front-page-template-pages .rd-tpl-front-page, .page-template-front-page .raindrops-toc-front, .page-template-front-page > .line{ max-width:{$raindrops_full_width_max_width}px; margin-left:auto!important; margin-right:auto!important; } .page-template-front-page #portfolio, .page-template-front-page #bd{ max-width:{$raindrops_full_width_limit_window_width}px; margin-left:auto!important; margin-right:auto!important; } " . '/* raindrops is fluid 1 column end */'; } $fluid_width = raindrops_remove_spaces_from_css( $fluid_width ); return apply_filters( "raindrops_is_fluid", $fluid_width ); } } if ( !function_exists( 'raindrops_is_fixed' ) ) { function raindrops_is_fixed() { global $is_IE, $raindrops_page_width, $raindrops_base_font_size; $add_ie = ''; $pw = raindrops_warehouse_clone( "raindrops_page_width" ); $raindrops_base_font_size = apply_filters( 'raindrops_base_font_size', $raindrops_base_font_size ); //px size if ( 'doc' == $pw ) { $width = 750; $px = 'max-width:' . $width . 'px;'; $width = $width / $raindrops_base_font_size; } if ( 'doc2' == $pw ) { $width = 950; $px = 'max-width:' . $width . 'px;'; $width = $width / $raindrops_base_font_size; } if ( 'doc4' == $pw ) { $width = 974; $px = 'max-width:' . $width . 'px;'; $width = $width / $raindrops_base_font_size; } if ( 'custom-doc' == $pw ) { $width = $raindrops_page_width; $px = 'width:' . $width . 'px;'; $width = $width / $raindrops_base_font_size; } $raindrops_main_width = raindrops_main_width(); $raindrops_main_width = $raindrops_main_width / $raindrops_base_font_size; if ( $is_IE ) { $width = round( $width * 0.9759, 1 ); $add_ie = ''; $raindrops_main_width = round( $raindrops_main_width * 0.9759, 1 ); } else { $width = round( $width, 1 ); $raindrops_main_width = round( $raindrops_main_width, 1 ); } $custom_fixed_width = '/* raindrops is fixed start*/' . " \n#" . $pw . '{margin:auto;text-align:left;' . "\n" . 'width:' . $width . 'em;' . $add_ie . $px . '}' . "\n#container{width:" . $raindrops_main_width . 'em;}/* raindrops is fixed end */'; return apply_filters( "raindrops_is_fixed", $custom_fixed_width ); } } /** * * * * * */ add_filter( 'raindrops_embed_meta_css', 'raindrops_add_gallery_css' ); if ( !function_exists( 'raindrops_add_gallery_css' ) ) { function raindrops_add_gallery_css( $css ) { return $css . raindrops_gallerys(); } } if ( !function_exists( 'raindrops_gallerys' ) ) { function raindrops_gallerys() { global $raindrops_document_type; $raindrops_gallerys = raindrops_gallerys_clone(); $raindrops_gallerys = raindrops_remove_spaces_from_css( $raindrops_gallerys ); return $raindrops_gallerys; } } add_filter( 'raindrops_prev_next_post', 'raindrops_remove_empty_span' ); add_filter( 'raindrops_posted_on', 'raindrops_remove_empty_span' ); add_filter( 'raindrops_posted_in', 'raindrops_remove_empty_span' ); /** * * * * */ if ( !function_exists( 'raindrops_remove_empty_span' ) ) { function raindrops_remove_empty_span( $content ) { return preg_replace( '!]*>(\s*)?<\/span>!', '', $content ); } } /** * * * * * thanks aison */ if ( !function_exists( 'raindrops_page_menu_args' ) ) { function raindrops_page_menu_args( $args ) { global $raindrops_nav_menu_home_link; $args[ 'show_home' ] = $raindrops_nav_menu_home_link; return $args; } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_insert_message_action_hook_position' ) ) { function raindrops_insert_message_action_hook_position( $hook_name = '' ) { global $wp_customize; if ( ( true == WP_DEBUG || $wp_customize) && is_user_logged_in() && current_user_can( 'edit_theme_options' ) ) { add_action( 'raindrops_after_nav_menu', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_entry_content', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_extra_sidebar', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_extra_sidebar', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_doc', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_doc', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_default_sidebar', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_default_sidebar', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_footer', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_footer', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_entry_content', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_loop', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_loop', 'raindrops_action_hook_messages' ); add_action( 'raindrops_before_article', 'raindrops_action_hook_messages' ); add_action( 'raindrops_after_article', 'raindrops_action_hook_messages' ); add_action( 'raindrops_prepend_widget_sticky', 'raindrops_action_hook_messages' ); add_action( 'raindrops_append_widget_sticky', 'raindrops_action_hook_messages' ); } } } raindrops_insert_message_action_hook_position(); /** * * * * * @since 1.204 */ if ( !function_exists( 'raindrops_prepend_loop' ) ) { function raindrops_prepend_loop() { $args = array( 'hook_name' => 'raindrops_prepend_loop', 'template_part_name' => 'hook-prepend-loop.php' ); get_template_part( 'hook', 'prepend-loop' ); do_action( 'raindrops_prepend_loop', $args ); } } /** * * * * * @since 1.204 */ if ( !function_exists( 'raindrops_append_loop' ) ) { function raindrops_append_loop() { $args = array( 'hook_name' => 'raindrops_append_loop', 'template_part_name' => 'hook-append-loop.php' ); get_template_part( 'hook', 'append-loop' ); do_action( 'raindrops_append_loop', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_action_hook_messages' ) ) { function raindrops_action_hook_messages( $args ) { global $raindrops_actions_hook_message; /** * When WP_DEBUG value true and $raindrops_actions_hook_message value true * Show Raindrops action filter position and examples * * $raindrops_actions_hook_message * @since 0.980 */ if ( !isset( $raindrops_actions_hook_message ) ) { $customizer_modify_value = raindrops_warehouse_clone( 'raindrops_actions_hook_message' ); if ( 'show' !== $customizer_modify_value ) { $raindrops_actions_hook_message = false; } else { $raindrops_actions_hook_message = true; } } if ( true == $raindrops_actions_hook_message ) { if ( isset( $args ) && array_key_exists( 'hook_name', $args ) && array_key_exists( 'template_part_name', $args ) ) { $message = esc_html__( 'add_action( \'%1$s\', \'your_function\' ) or add template part file the name \'%2$s\'.', 'raindrops' ); $message = sprintf( $message, $args[ 'hook_name' ], $args[ 'template_part_name' ] ); printf( '
        %1$s
        ', $message, 'word-break:break-all;word-wrap:break-word;' ); } } } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_after_nav_menu' ) ) { function raindrops_after_nav_menu() { get_template_part( 'hook', 'after-nav-menu' ); $args = array( 'hook_name' => 'raindrops_after_nav_menu', 'template_part_name' => 'hook-after-nav-menu.php' ); do_action( 'raindrops_after_nav_menu', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_prepend_doc' ) ) { function raindrops_prepend_doc() { $args = array( 'hook_name' => 'raindrops_prepend_doc', 'template_part_name' => 'hook-prepend-doc.php' ); get_template_part( 'hook', 'prepend-doc' ); do_action( 'raindrops_prepend_doc', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_append_doc' ) ) { function raindrops_append_doc() { $args = array( 'hook_name' => 'raindrops_append_doc', 'template_part_name' => 'hook-append-doc.php' ); get_template_part( 'hook', 'append-doc' ); do_action( 'raindrops_append_doc', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_prepend_entry_content' ) ) { function raindrops_prepend_entry_content() { $args = array( 'hook_name' => 'raindrops_prepend_entry_content', 'template_part_name' => 'hook-prepend-entry-content.php' ); get_template_part( 'hook', 'prepend-entry-content' ); do_action( 'raindrops_prepend_entry_content', $args ); } } if ( !function_exists( 'raindrops_prepend_widget_sticky' ) ) { function raindrops_prepend_widget_sticky() { $args = array( 'hook_name' => 'raindrops_prepend_widget_sticky', 'template_part_name' => 'hook-prepend-widget-sticky.php' ); get_template_part( 'hook', 'prepend-widget-sticky' ); do_action( 'raindrops_prepend_widget_sticky', $args ); } } if ( !function_exists( 'raindrops_append_widget_sticky' ) ) { function raindrops_append_widget_sticky() { $args = array( 'hook_name' => 'raindrops_append_widget_sticky', 'template_part_name' => 'hook-append-widget-sticky.php' ); get_template_part( 'hook', 'append-widget-sticky' ); do_action( 'raindrops_append_widget_sticky', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_prepend_extra_sidebar' ) ) { function raindrops_prepend_extra_sidebar() { $args = array( 'hook_name' => 'raindrops_prepend_extra_sidebar', 'template_part_name' => 'hook-prepend-extra-sidebar.php' ); get_template_part( 'hook', 'prepend-extra-sidebar' ); do_action( 'raindrops_prepend_extra_sidebar', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_prepend_default_sidebar' ) ) { function raindrops_prepend_default_sidebar() { $args = array( 'hook_name' => 'raindrops_prepend_default_sidebar', 'template_part_name' => 'hook-prepend-default-sidebar.php' ); get_template_part( 'hook', 'prepend-default-sidebar' ); do_action( 'raindrops_prepend_default_sidebar', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_prepend_footer' ) ) { function raindrops_prepend_footer() { $args = array( 'hook_name' => 'raindrops_prepend_footer', 'template_part_name' => 'hook-prepend-footer.php' ); get_template_part( 'hook', 'prepend-footer' ); do_action( 'raindrops_prepend_footer', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_append_entry_content' ) ) { function raindrops_append_entry_content() { $args = array( 'hook_name' => 'raindrops_append_entry_content', 'template_part_name' => 'hook-append-entry-content.php' ); get_template_part( 'hook', 'append-entry-content' ); do_action( 'raindrops_append_entry_content', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_append_extra_sidebar' ) ) { function raindrops_append_extra_sidebar() { $args = array( 'hook_name' => 'raindrops_append_extra_sidebar', 'template_part_name' => 'hook-append-extra-sidebar.php' ); get_template_part( 'hook', 'append-extra-sidebar' ); do_action( 'raindrops_append_extra_sidebar', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_append_default_sidebar' ) ) { function raindrops_append_default_sidebar() { $args = array( 'hook_name' => 'raindrops_append_default_sidebar', 'template_part_name' => 'hook-append-default-sidebar.php' ); get_template_part( 'hook', 'append-default-sidebar' ); do_action( 'raindrops_append_default_sidebar', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_append_footer' ) ) { function raindrops_append_footer() { $args = array( 'hook_name' => 'raindrops_append_footer', 'template_part_name' => 'hook-append-footer.php' ); get_template_part( 'hook', 'append-footer' ); do_action( 'raindrops_append_footer', $args ); } } /** * * * * * @since 1.334 */ if ( !function_exists( 'raindrops_before_article' ) ) { function raindrops_before_article() { $args = array( 'hook_name' => 'raindrops_before_article', 'template_part_name' => 'hook-before_article.php' ); get_template_part( 'hook', 'before_article' ); do_action( 'raindrops_before_article', $args ); } } /** * * * * * @since 1.334 */ if ( !function_exists( 'raindrops_after_article' ) ) { function raindrops_after_article() { $args = array( 'hook_name' => 'raindrops_after_article', 'template_part_name' => 'hook-after_article.php' ); get_template_part( 'hook', 'after_article' ); do_action( 'raindrops_after_article', $args ); } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_entry_title' ) ) { function raindrops_entry_title( $args = array() ) { global $post, $templates, $raindrops_link_unique_text; $default = array( 'raindrops_title_element' => 'h2', 'echo' => true ); $args = wp_parse_args( $args, $default ); $thumbnail = ''; $raindrops_unique_label = ''; extract( $args, EXTR_SKIP ); $raindrops_entry_title_text_class_start = ''; $raindrops_entry_title_text_class_end = ''; $raindrops_entry_title_text_class = apply_filters( 'raindrops_entry_title_text_class', '' ); if( ! empty( $raindrops_entry_title_text_class ) ) { $raindrops_entry_title_text_class_start = ''; $raindrops_entry_title_text_class_end = ''; } if ( !is_singular() || is_page_template( 'page-templates/list-of-post.php' ) || ( is_page_template( 'page-templates/full-width.php' ) && is_front_page() ) || ( is_page_template( 'page-templates/front-page.php' ) && is_front_page() ) ) { $html = '<' . $raindrops_title_element . ' class="%1$s">%2$s' . "\n" . str_repeat( "\t", 11 ) . '%5$s %6$s' . "\n" . str_repeat( "\t", 10 ) . ''; $html = sprintf( $html, apply_filters( 'raindrops_entry_title_class', 'h2 entry-title' ), $thumbnail, get_permalink(), the_title_attribute( array( 'before' => '', 'after' => '', 'echo' => false ) ), the_title( $raindrops_entry_title_text_class_start, $raindrops_entry_title_text_class_end, false ), $raindrops_unique_label ); if ( true == $echo ) { echo apply_filters( 'raindrops_entry_title', $html ); } else { return apply_filters( 'raindrops_entry_title', $html ); } } else { $html = '<' . $raindrops_title_element . ' class="%1$s">%4$s%3$s %2$s'; $html = sprintf( $html, apply_filters( 'raindrops_entry_title_class', 'h2 entry-title' ), the_title( '', '', false ), $raindrops_unique_label, $thumbnail ); if ( true == $echo ) { echo apply_filters( 'raindrops_entry_title', $html ); } else { return apply_filters( 'raindrops_entry_title', $html ); } } } } if ( !function_exists( 'raindrops_excerpt_with_html' ) ) { /** * * @param type $content * @return type * @since 1.278 */ function raindrops_excerpt_with_html( $content ) { $raindrops_excerpt_condition = raindrops_detect_excerpt_condition(); $raindrops_excerpt_enable = raindrops_warehouse_clone( 'raindrops_excerpt_enable' ); $raindrops_allow_oembed_excerpt_view = raindrops_warehouse_clone( 'raindrops_allow_oembed_excerpt_view' ); if ( true == $raindrops_excerpt_condition && 'yes' == $raindrops_excerpt_enable ) { return raindrops_html_excerpt_with_elements( $content, 200, ' ...', true, true ); } return $content; } } if ( !function_exists( 'raindrops_maybe_multibyte' ) ) { /** * * @param type $text * @return boolean * @since 1.278 */ function raindrops_maybe_multibyte( $text ) { $filter_value = apply_filters( 'raindrops_maybe_multibyte', 0, $text ); if ( is_bool( $filter_value ) ) { return $filter_value; } if ( !is_string( $text ) ) { return false; } if ( strlen( $text ) !== mb_strlen( $text, "UTF-8" ) ) { return true; } return false; } } if ( !function_exists( 'raindrops_html_excerpt_with_elements' ) ) { /** * * @param type $content * @param type $length * @param type $more * @param type $exact * @param type $allow_html * @return type * @since 1.278 */ function raindrops_html_excerpt_with_elements( $content, $length = 200, $more = '...', $exact = true, $allow_html = false ) { global $post; $no_closed_elements = '(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param|embed)'; $length = apply_filters( 'excerpt_length', $length ); $length = apply_filters( 'raindrops_html_excerpt_with_elements_length', $length ); $allow_html = apply_filters( 'raindrops_html_excerpt_with_elements_allow_html', $allow_html ); if ( isset( $post ) && has_excerpt() ) { return apply_filters( 'the_excerpt', get_the_excerpt() ); } if ( isset( $post->ID ) && is_sticky( $post->ID ) ) { return $content; } if ( $allow_html ) { $raindrops_skip_excerpt = apply_filters( 'raindrops_skip_excerpt', false ); if ( preg_match( '!\[raindrops skip-excerpt\]!', $content ) || true == $raindrops_skip_excerpt ) { return $content; } $striped_shortcode_content = strip_shortcodes( $content ); $striped_content = wp_kses( $striped_shortcode_content, array() ); if ( mb_strlen( $striped_content, "UTF-8" ) <= $length ) { return $content; } preg_match_all( '/(<.+?>|\[.+\])?([^<>]*)/s', $content, $lines, PREG_SET_ORDER ); $total_length = mb_strlen( $more, "UTF-8" ); $open_tags = array(); $truncate = ''; foreach ( $lines as $line_matchings ) { if ( isset( $line_matchings[ 1 ] ) and ! empty( $line_matchings[ 1 ] ) ) { if ( preg_match( '/^<(\s*.+?\/\s*|\s*' . $no_closed_elements . '(\s.+?)?)>$/is', $line_matchings[ 1 ] ) ) { } elseif ( preg_match( '!\[\/([^\]]+)\]!', $line_matchings[ 1 ], $tag_matchings ) ) { $pos = array_search( $tag_matchings[ 1 ], $open_tags ); if ( $pos !== false ) { unset( $open_tags[ $pos ] ); } } elseif ( preg_match( '/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[ 1 ], $tag_matchings ) ) { $pos = array_search( $tag_matchings[ 1 ], $open_tags ); if ( $pos !== false ) { unset( $open_tags[ $pos ] ); } } elseif ( preg_match( '/^<\s*([^\s>!]+).*?>$/s', $line_matchings[ 1 ], $tag_matchings ) ) { array_unshift( $open_tags, strtolower( $tag_matchings[ 1 ] ) ); } elseif ( preg_match( '/^\[\s*([^\s\]!]+).*?\]$/s', $line_matchings[ 1 ], $tag_matchings ) ) { array_unshift( $open_tags, strtolower( $tag_matchings[ 1 ] ) ); } $truncate .= $line_matchings[ 1 ]; } $content_length = mb_strlen( preg_replace( '/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $line_matchings[ 2 ] ), "UTF-8" ); if ( $total_length + $content_length > $length ) { $left = $length - $total_length; $entities_length = 0; if ( preg_match_all( '/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', $line_matchings[ 2 ], $entities, PREG_OFFSET_CAPTURE ) ) { foreach ( $entities[ 0 ] as $entity ) { if ( $entity[ 1 ] + 1 - $entities_length <= $left ) { $left--; $entities_length += mb_strlen( $entity[ 0 ], "UTF-8" ); } else { break; } } } $truncate .= wp_html_excerpt( $line_matchings[ 2 ], $left + $entities_length, '' ); break; } else { $truncate .= $line_matchings[ 2 ]; $total_length += $content_length; } if ( $total_length >= $length ) { break; } } } else { if ( mb_strlen( $content, "UTF-8" ) <= $length ) { return $content; } else { $truncate = wp_html_excerpt( $striped_shortcode_content, $length - mb_strlen( $more, "UTF-8" ), $more ); } } if ( !$exact ) { $spacepos = mb_strrpos( $truncate, ' ' ); if ( isset( $spacepos ) ) { $truncate = mb_substr( $truncate, 0, $spacepos, "UTF-8" ); } } $truncate .= $more; if ( $allow_html ) { foreach ( $open_tags as $tag ) { $truncate .= ''; } } return apply_filters( 'raindrops_html_excerpt_with_elements', $truncate, __FUNCTION__ ); } } if ( !function_exists( 'raindrops_entry_content' ) ) { /** * * * * * @since 0.980 */ function raindrops_entry_content( $more_link_text = null, $stripteaser = false ) { global $post, $more_link_text, $raindrops_change_html_excerpt_when_post_formats; if ( raindrops_detect_display_none_condition() ) { return; } if ( empty( $more_link_text ) ) { $more_link_text = esc_html__( 'Continue reading ', 'raindrops' ) . '' . esc_html__( ' Post ID ', 'raindrops' ) . get_the_ID() . ''; } $raindrops_excerpt_condition = apply_filters( 'raindrops_excerpt_conditional', raindrops_detect_excerpt_condition() ); $raindrops_excerpt_enable = raindrops_warehouse_clone( 'raindrops_excerpt_enable' ); $raindrops_allow_oembed_excerpt_view = raindrops_warehouse_clone( 'raindrops_allow_oembed_excerpt_view' ); $raindrops_excerpt_length = raindrops_warehouse_clone( 'raindrops_excerpt_length' ); if ( isset( $post ) ) { $raindrops_skip_excerpt = apply_filters( 'raindrops_skip_excerpt', false, $post->ID ); } else { $raindrops_skip_excerpt = false; } if ( has_excerpt() && ! is_singular() && ! is_search() ) { /* @1.466 */ the_excerpt(); } else { if ( ( true == $raindrops_excerpt_condition && !is_sticky() && 'no' == $raindrops_excerpt_enable && !preg_match( '!\[raindrops skip-excerpt\]!', $post->post_content ) ) && false == $raindrops_skip_excerpt ) { if ( !has_post_format() || 'no' == $raindrops_allow_oembed_excerpt_view && has_post_format( 'video' ) || false == $raindrops_change_html_excerpt_when_post_formats ) { $excerpt = get_the_excerpt(); $excerpt = strip_shortcodes( $excerpt ); $excerpt = wp_html_excerpt( $excerpt, $raindrops_excerpt_length, '...' ); $excerpt = preg_replace( '!\[raindrops[^\]]+\]!', '', $excerpt ); $excerpt = apply_filters( 'the_excerpt', $excerpt ); $excerpt = apply_filters( 'raindrops_the_excerpt', $excerpt, __FUNCTION__ ); echo apply_filters( 'raindrops_entry_content', $excerpt ); } elseif ( isset( $post ) && true == $raindrops_change_html_excerpt_when_post_formats && true == $raindrops_excerpt_condition && has_post_format() ) { $content = get_the_content( $more_link_text, $stripteaser ); $content = apply_filters( 'the_content', $content ); $content = apply_filters( 'raindrops_the_excerpt', $content, __FUNCTION__ ); echo raindrops_html_excerpt_with_elements( $content, $raindrops_excerpt_length, ' ...', true, true ); } } else { $content = ''; // wp-includes/post-template.php:265 - Trying to get property of non-object if ( isset( $post ) ) { $content .= get_the_content( $more_link_text, $stripteaser ); } $content = apply_filters( 'the_content', $content ); $content = apply_filters( 'raindrops_entry_content', $content ); $content = str_replace( ']]>', ']]>', $content ); /** * @1.325 */ if ( has_excerpt() && empty( $content ) && !wp_attachment_is_image( $post->ID ) ) { $content .= sprintf( '
        %1$s
        ', get_the_excerpt() ); } echo $content; } } } } /** * * * * * @since 0.980 */ if ( !function_exists( 'raindrops_next_prev_links' ) ) { function raindrops_next_prev_links( $position = 'nav-above' ) { global $wp_query, $paged; $raindrops_old = $paged + 1; $raindrops_new = $paged - 1; $raindrops_old = raindrops_link_unique( $text = 'Next Page', $raindrops_old ); $raindrops_new = raindrops_link_unique( $text = 'Next Page', $raindrops_new ); if ( $wp_query->max_num_pages > 1 ) { $html = '
        ' . "\n" . str_repeat( "\t", 8 ) . '%1$s%2$s' . "\n" . str_repeat( "\t", 7 ) . '
        ' . "\n"; $html = sprintf( $html, get_next_posts_link( '' . $raindrops_old . esc_html__( ' Older posts', 'raindrops' ) ), get_previous_posts_link( '' . $raindrops_new . esc_html__( 'Newer posts', 'raindrops' ) . '' ), $position ); echo apply_filters( 'raindrops_next_prev_links', $html, $position ); } } } add_filter( 'raindrops_next_prev_links', 'raindrops_the_pagenation', 10, 2 ); if ( !function_exists( 'raindrops_the_pagenation' ) ) { function raindrops_the_pagenation( $html, $position ) { global $raindrops_document_type; if ( function_exists( 'get_the_posts_pagination' ) && $position == 'nav-below' ) { if ( $raindrops_document_type == 'html5' ) { $result = str_replace( array( 'role="navigation"' ), array( '' ), get_the_posts_pagination() ); return $result; } elseif ( $raindrops_document_type == 'xhtml' ) { $result = str_replace( array( 'role="navigation"' ), array( '' ), get_the_posts_pagination() ); $result = str_replace( array( '