Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Geertjuhh

    (@geertjuhh)

    This is my functions.php, maybe you see the fault i made?

    <?php
    /**
     * functions and constants for Raindrops theme
     *
     *
     * @package Raindrops
     * @since Raindrops 0.1
     */
    if ( !defined( 'ABSPATH' ) ) {
    
        exit;
    }
    /**
     * include raindrops custom settings
     *
     *
     *
     */
    if ( file_exists( get_template_directory() . '/raindrops-config.php' ) ) {
    
        require_once( get_template_directory() . '/raindrops-config.php' );
    }
    /**
     * Show theme options page
     * If set false then hide customize.php Raindrops theme option and Raindrops options page
     *
     * $raindrops_show_theme_option
     * @since 1.149
     */
    if ( !isset( $raindrops_show_theme_option ) ) {
    
        $raindrops_show_theme_option = true;
    }
    
    if ( !defined( 'RAINDROPS_USE_AUTO_COLOR' ) ) {
    
        define( 'RAINDROPS_USE_AUTO_COLOR', true );
    }
    /**
     * Add to style for each post, page
     *
     * need role edit page.
     * @since 1.201
     */
    if ( !defined( 'RAINDROPS_CUSTOM_FIELD_CSS' ) ) {
    
        define( 'RAINDROPS_CUSTOM_FIELD_CSS', true );
    }
    /**
     * Add to script or metatag singlure page from custom field
     *
     *
     * javascript custom field key name: javascript
     * metatag name : meta
     * need role edit page.
     * @since 1.201
     */
    if ( !defined( 'RAINDROPS_CUSTOM_FIELD_META' ) ) {
    
        define( 'RAINDROPS_CUSTOM_FIELD_META', true );
    }
    if ( !defined( 'RAINDROPS_CUSTOM_FIELD_SCRIPT' ) ) {
    
        define( 'RAINDROPS_CUSTOM_FIELD_SCRIPT', false );
    }
    /**
     * move from hooks.php
     * and change from load_textdomain(   ) to load_theme_text_domain(   )
     *
     *
     * @since 0.988
     *
     * When child theme has languages/raindrops_[lang].mo
     * Raindrops Theme read this language file.
     * You can override parent themes language file from child theme.
     */
    load_theme_textdomain( 'Raindrops', apply_filters( 'raindrops_load_text_domain', get_template_directory() . '/languages' ) );
    
    /**
     * 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 ) ) {
    
        $raindrops_actions_hook_message = false;
    }
    /**
     *
     * Show Raindrops status bar at browser bottom
     *
     * shows true hide false
     * @since 1.211
     */
    if ( !isset( $raindrops_status_bar ) ) {
    
        $raindrops_status_bar = true;
    }
    /**
     *
     * Add <wbr> element for entry title.
     *
     * uses true no use false
     * @since 1.228
     */
    if ( !isset( $raindrops_use_wbr_for_title ) ) {
    
        $raindrops_use_wbr_for_title = false;
    }
    /**
     *
     * Add enable keyboard focus
     *
     * uses true no use false
     * @since 1.229
     */
    if ( !isset( $raindrops_enable_keyboard ) ) {
    
        $raindrops_enable_keyboard = true;
    }
    /**
     * Current version of WordPress
     *
     *
     * $raindrops_current_data_theme_uri
     * $raindrops_current_data_author_uri
     * @since 0.965
     */
    $raindrops_check_wp_version        = explode( '-', $wp_version );
    $raindrops_wp_version              = $raindrops_check_wp_version[0];
    /* @since 1.103 */
    $raindrops_current_data            = wp_get_theme();
    $raindrops_current_data_theme_uri  = apply_filters( 'raindrops_theme_url', $raindrops_current_data->get( 'ThemeURI' ) );
    $raindrops_current_data_author_uri = apply_filters( 'raindrops_author_url', $raindrops_current_data->get( 'AuthorURI' ) );
    $raindrops_current_data_version    = $raindrops_current_data->get( 'Version' );
    $raindrops_current_theme_name      = $raindrops_current_data->get( 'Name' );
    /**
     * Include functions about the Raindrops options panel
     *
     *
     *
     *
     * @since 1.238
     */
    if ( file_exists( get_stylesheet_directory() . '/lib/validate.php' ) ) {
    
        require_once ( get_stylesheet_directory() . '/lib/validate.php' );
    } else {
    
        require_once ( get_template_directory() . '/lib/validate.php' );
    }
    
    if ( !class_exists( 'raindrops_menu_create' ) ) {
    
        if ( file_exists( get_stylesheet_directory() . '/lib/option-panel.php' ) ) {
    
            require_once ( get_stylesheet_directory() . '/lib/option-panel.php' );
        } else {
    
            require_once ( get_template_directory() . '/lib/option-panel.php' );
        }
    }
    
    if ( $raindrops_show_theme_option == true ) {
    
        $is_submenu = new raindrops_menu_create;
        add_action( 'admin_menu', array( $is_submenu, 'raindrops_add_menus' ) );
    }
    /**
     * Include functions about colors ,backgrounds and borders
     *
     *
     *
     *
     */
    $raindrops_included_files = get_included_files();
    
    foreach ( $raindrops_included_files as $key => $val ) {
    
        $included_file[$key] = basename( $val );
    }
    
    $raindrops_included_files  = $included_file;
    $raindrops_color_file_path = get_stylesheet_directory() . '/lib/csscolor/csscolor.php';
    
    if ( !in_array( 'csscolor.php', $raindrops_included_files ) && file_exists( $raindrops_color_file_path ) ) {
    
        require_once ( $raindrops_color_file_path );
    } elseif ( !in_array( 'csscolor.php', $raindrops_included_files ) ) {
    
        require_once ( get_template_directory() . '/lib/csscolor/csscolor.php' );
    }
    
    $raindrops_color_file_path = get_stylesheet_directory() . '/lib/csscolor.css.php';
    
    if ( !in_array( 'csscolor.css.php', $raindrops_included_files ) && file_exists( $raindrops_color_file_path ) ) {
    
        require_once ( $raindrops_color_file_path );
    } elseif ( !in_array( 'csscolor.css.php', $raindrops_included_files ) ) {
    
        require_once ( get_template_directory() . '/lib/csscolor.css.php' );
    }
    
    $raindrops_widget_path = get_stylesheet_directory() . '/lib/widgets.php';
    
    if ( !in_array( 'widgets.php', $raindrops_included_files ) && file_exists( $raindrops_widget_path ) ) {
    
        require_once ( $raindrops_widget_path );
    } elseif ( !in_array( 'widgets.php', $raindrops_included_files ) ) {
    
        require_once ( get_template_directory() . '/lib/widgets.php' );
    }
    /** Raindrops help
     *
     *
     *
     * @since 1.155
     */
    add_action( 'load-post.php', array( 'RaindropsPostHelp', 'init' ) );
    add_action( 'load-post-new.php', array( 'RaindropsPostHelp', 'init' ) );
    add_action( 'load-themes.php', array( 'RaindropsPostHelp', 'init' ) );
    add_action( 'load-theme-editor.php', array( 'RaindropsPostHelp', 'init' ) );
    
    class RaindropsPostHelp {
    
        public $tabs = array(
            'raindrops-post' => array(
                'title'   => 'Raindrops Help'
                , 'content' => 'help'
            ),
        );
    
        static public function init() {
            $class = __CLASS__;
            new $class;
        }
    
        public function __construct() {
    
            switch ( $GLOBALS['pagenow'] ) {
                case( 'theme-editor.php' ):
    
                    $this->tabs = array( 'raindrops-settings-help' => array( 'title' => 'Raindrops Infomation', 'content' => 'help' ) );
    
                    add_action( "load-{$GLOBALS['pagenow']}", array( $this, 'add_tabs_theme_editor' ), 20 );
                    break;
    
                case( 'themes.php' ):
    
                    $this->tabs = array( 'raindrops-settings-help' => array( 'title' => 'Raindrops Infomation', 'content' => 'help' ) );
    
                    add_action( "load-{$GLOBALS['pagenow']}", array( $this, 'add_tabs_theme' ), 20 );
                    break;
    
                default:
                    add_action( "load-{$GLOBALS['pagenow']}", array( $this, 'add_tabs' ), 20 );
                    break;
            }
        }
    
        public function add_tabs() {
    
            foreach ( $this->tabs as $id => $data ) {
    
                get_current_screen()->add_help_tab( array(
                    'id'       => $id
                    , 'title'    => __( 'Raindrops Help', 'Raindrops' )
                    , 'content'  => '<h1>' . __( 'About Base Color related Class', 'Raindrops' ) . '</h1>'
                    , 'callback' => array( $this, 'prepare' )
                ) );
            }
        }
    
        public function add_tabs_theme() {
    
            foreach ( $this->tabs as $id => $data ) {
    
                get_current_screen()->add_help_tab( array(
                    'id'       => $id
                    , 'title'    => __( 'Raindrops Theme Help', 'Raindrops' )
                    , 'content'  => '<h1>' . __( 'About Raindrops Theme', 'Raindrops' ) . '</h1>'
                    , 'callback' => array( $this, 'prepare_theme' )
                ) );
            }
        }
    
        public function add_tabs_theme_editor() {
    
            foreach ( $this->tabs as $id => $data ) {
    
                get_current_screen()->add_help_tab( array(
                    'id'       => $id
                    , 'title'    => __( 'Raindrops CSS Help', 'Raindrops' )
                    , 'content'  => '<h1>' . __( 'About Raindrops CSS', 'Raindrops' ) . '</h1>'
                    , 'callback' => array( $this, 'prepare_theme_editor' )
                ) );
            }
        }
    
        public function prepare( $screen, $tab ) {
    
            if ( RAINDROPS_USE_AUTO_COLOR !== false ) {
    
                echo raindrops_edit_help( '' );
            } else {
    
                printf( '<p class="disable-color-gradient">%1$s</p>', __( 'Now RAINDROPS_USE_AUTO_COLOR value false and Cannot show this help', 'Raindrops' ) );
            }
        }
    
        public function prepare_theme( $screen, $tab ) {
    
            echo raindrops_settings_page_contextual_help();
        }
    
        public function prepare_theme_editor( $screen, $tab ) {
    
            echo raindrops_editor_page_contextual_help();
        }
    
    }
    
    /**
     * It has alias functions.
     *
     *
     *
     *
     */
    $raindrops_functions_file_path = get_stylesheet_directory() . '/lib/alias_functions.php';
    
    if ( !in_array( 'alias_functions.php', $raindrops_included_files ) && file_exists( $raindrops_functions_file_path ) ) {
    
        require_once ( $raindrops_functions_file_path );
    } elseif ( !in_array( 'alias_functions.php', $raindrops_included_files ) ) {
    
        require_once ( get_template_directory() . '/lib/alias_functions.php' );
    }
    /**
     *
     *
     *
     * @since 1.138
     */
    do_action( 'raindrops_include_after' );
    /**
     *
     *
     *
     *
     *
     */
    add_action( 'wp_enqueue_scripts', 'add_raindrops_stylesheet' );
    /**
     *
     *
     *
     *
     *
     */
    register_nav_menus( array( 'primary' => esc_html__( 'Primary Navigation', 'Raindrops' ), ) );
    /**
     * Custom image header
     *
     *
     *
     * $raindrops_custom_header_args
     *
     */
    if ( !isset( $raindrops_custom_header_args ) ) {
    
        $raindrops_custom_header_args = array( 'default-text-color'     => 'bbbbbb',
            'width'                  => apply_filters( 'raindrops_header_image_width', '950' ),
            'flex-width'             => true,
            'height'                 => apply_filters( 'raindrops_header_image_height', '198' ),
            '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' ),
            'admin-preview-callback' => 'raindrops_admin_header_image', 'admin-head-callback'    => 'raindrops_admin_header_style' );
    
        add_theme_support( 'custom-header', $raindrops_custom_header_args );
    //they are "suggested" when flex-width and flex-height are set
    }
    
    /**
     * It has hooks.
     *
     *
     *
     *
     */
    $raindrops_functions_file_path = get_stylesheet_directory() . '/lib/hooks.php';
    
    if ( !in_array( 'hooks.php', $raindrops_included_files ) && file_exists( $raindrops_functions_file_path ) ) {
    
        require_once ( $raindrops_functions_file_path );
    } elseif ( !in_array( 'alias_functions.php', $raindrops_included_files ) ) {
    
        require_once ( get_template_directory() . '/lib/hooks.php' );
    }
    
    /**
     * 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[] = 'friendly';
        return $vars;
    }
    
    if ( !isset( $raindrops_link_unique_text ) ) {
    
        if ( 'yes' == raindrops_warehouse_clone( 'raindrops_accessibility_settings' ) ) {
    
            $raindrops_link_unique_text = true;
        } else {
    
            $raindrops_link_unique_text = false;
        }
    }
    /**
     * Enabling accessibility links when Setting value no at Raindrops options page Accessibility Settings
     *
     *
     * @since1.217
     */
    if ( !isset( $raindrops_accessibility_link ) ) {
    
        $raindrops_accessibility_link = true;
    }
    
    if ( 'yes' == raindrops_warehouse_clone( 'raindrops_accessibility_settings' ) ) {
    
        $raindrops_accessibility_link = false;
    }
    
    if ( isset( $_REQUEST['friendly'] ) && !empty( $_REQUEST['friendly'] ) && true == $raindrops_accessibility_link ) {
    
        $raindrops_link_unique_text = true;
    }
    
    function raindrops_current_url() {
    
        $url = 'http';
        if ( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on" ) {
            $url .= "s";
        }
        $url .= "://";
        if ( isset( $_SERVER["SERVER_PORT"] ) && $_SERVER["SERVER_PORT"] != "80" ) {
            $url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } else {
            $url .= $_SERVER["SERVER_NAME"] . $_SERVER["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 ) ) {
    
        if ( true == $raindrops_link_unique_text ) {
    
            $raindrops_nav_menu_home_link = false;
        } else {
    
            $raindrops_nav_menu_home_link = true;
        }
    }
    /**
     * browser detection
     * use server side browser detection or javascript browser ditection
     *
     * javascript browser ditection is At a target [ operate / even when cash plug-in is used / properly ]
     * value bool
     * $raindrops_browser_detection
     * ver 1.121
     */
    if ( !isset( $raindrops_browser_detection ) ) {
    
        $raindrops_browser_detection = false;
    }
    /**
     * 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';
        }
    }
    /**
     * Force Document type for lt IE9 Old Browser
     * Note: This setting is SERVER_SIDE Setting, I recommend that the browser is set when the cache of less than IE9 as not performed
     *
     * Raindrops 1.204 remove from header.php
     * 		<!--[if IE]>
     * 		<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
     * 		<![endif]-->
     *
     *
     * ver 1.204
     */
    if ( $is_IE ) {
    
        preg_match( "|(MSIE )([0-9]{1,2})(\.)|si", $_SERVER['HTTP_USER_AGENT'], $raindrops_regs );
    
        if ( isset( $raindrops_regs[2] ) && $raindrops_regs[2] < 9 ) {
    
            $raindrops_document_type = 'xhtml';
        }
    }
    /**
     *
     *
     * $raindrops_post_formats_args
     * add ver0.991 gallery,status
     */
    if ( !isset( $raindrops_post_formats_args ) ) {
    
        $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 = array( 'default-color'    => '',
            'default-image'    => '',
            'wp-head-callback' => apply_filters( 'raindrops_wp-head-callback', 'raindrops_embed_meta' ) );
        add_theme_support( 'custom-background', $raindrops_custom_background_args );
    }
    /**
     *
     *
     *
     * $raindrops_post_thumbnails_args
     *
     */
    if ( !isset( $raindrops_post_thumbnails_args ) ) {
    
        $raindrops_post_thumbnails_args = array( 'post', 'page' );
        add_theme_support( 'post-thumbnails', $raindrops_post_thumbnails_args );
    }
    /**
     *
     *
     *
     *
     *
     */
    add_theme_support( 'automatic-feed-links' );
    /**
     * Your extend function , settings write below.
     *
     *
     *
     *
     */
    /**
     * Original page width implementation by manual labor
     *
     * If you need original page width
     * you can specific pixel page width
     * e.g. '$raindrops_page_width = '776';' is  776px page width.
     *
     *
     */
    if ( !isset( $raindrops_page_width ) ) {
    
        $raindrops_page_width = '';
    }
    /**
     * Content width implementation by manual labor
     *
     * If you need specific $content_width.
     * value set 400 When not setting or empty.
     *
     */
    //$content_width = '';
    
    /**
     * 750px,950px centered layout fluid or fixed page width switch
     *
     * Empty value makes like a Elastic layout
     *
     * value 'fixed' or empty
     *
     */
    if ( !isset( $raindrops_fluid_or_fixed ) ) {
    
        $raindrops_fluid_or_fixed = 'fixed';
    }
    /**
     * fluid page  main column minimum width px
     *
     *
     *
     * $raindrops_fluid_minimum_width
     *
     */
    if ( !isset( $raindrops_fluid_minimum_width ) ) {
    
        $raindrops_fluid_minimum_width = '320';
    }
    /**
     * $raindrops_fluid_minimum_width for IE
     *
     * IE browser not support responsive
     *
     * $raindrops_fluid_minimum_width
     *
     */
    if ( $is_IE ) {
    
        preg_match( "|(MSIE )([0-9]{1,2})(\.)|si", $_SERVER['HTTP_USER_AGENT'], $regs );
    
        if ( isset( $regs[2] ) && $regs[2] < 9 ) {
    
            $raindrops_fluid_minimum_width = '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' );
    }
    
    /**
     * Special simple view for mobile and small width browser
     * If it sets to true, a display simple compulsory always will be performed.
     *
     * default false
     * $raindrops_fallback_human_interface_show
     *
     */
    if ( !isset( $raindrops_fallback_human_interface_show ) ) {
    
        $raindrops_fallback_human_interface_show = false;
    }
    /**
     * Raindrops header and footer image upload
     *
     * $raindrops_max_width
     * $raindrops_max_upload_size
     * $raindrops_allow_file_type
     *
     */
    // Allow image type Raindrops footer and header.
    
    if ( !isset( $raindrops_allow_file_type ) ) {
    
        $raindrops_allow_file_type = array( 'image/png', 'image/jpeg', 'image/jpg', 'image/gif' );
    }
    //max upload size byte
    
    if ( !isset( $raindrops_max_upload_size ) ) {
    
        $raindrops_max_upload_size = 2000000;
    }
    //header or footer image max width px
    
    if ( !isset( $raindrops_max_width ) ) {
    
        $raindrops_max_width = 1300;
    }
    /**
     * Custom fields name css is add to post style rules.
     *
     * When false add to style single post and pages
     * When true add to style all list style posts and pages
     * RAINDROPS_OVERRIDE_POST_STYLE_ALL_CONTENTS
     * @since 0.992
     */
    if ( !defined( 'RAINDROPS_OVERRIDE_POST_STYLE_ALL_CONTENTS' ) ) {
    
        define( "RAINDROPS_OVERRIDE_POST_STYLE_ALL_CONTENTS", true );
    }
    /**
     *
     *
     *
     * RAINDROPS_SHOW_DELETE_POST_LINK
     *
     */
    if ( !defined( 'RAINDROPS_SHOW_DELETE_POST_LINK' ) ) {
    
        define( "RAINDROPS_SHOW_DELETE_POST_LINK", false );
    }
    /**
     * the_content(   ) or the_excerpt
     *
     * the_excerpt use where index,archive,other not single pages.
     * If RAINDROPS_USE_LIST_EXCERPT value false and use the_content .
     *
     * RAINDROPS_USE_LIST_EXCERPT
     * add ver 1.127
     * When use excerpt please set $raindrops_where_excerpts
     */
    if ( !defined( 'RAINDROPS_USE_LIST_EXCERPT' ) ) {
    
        define( "RAINDROPS_USE_LIST_EXCERPT", true );
    }
    // values 'is_search', 'is_archive', 'is_category' ,'is_tax', 'is_tag' any conditional function name
    
    if ( !isset( $raindrops_where_excerpts ) ) {
    
        $raindrops_excerpt_pages = array();
    
        if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_home' ) == 'excerpt' ) {
    
            $raindrops_excerpt_pages[] = 'is_front_page';
        }
        if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_category' ) == 'excerpt' ) {
    
            $raindrops_excerpt_pages[] = 'is_category';
        }
    
        if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_search' ) == 'excerpt' ) {
    
            $raindrops_excerpt_pages[] = 'is_search';
        }
    
        $raindrops_where_excerpts = $raindrops_excerpt_pages;
    }
    
    /**
     *
     *
     *
     * @since 1.127
     */
    if ( !isset( $raindrops_where_display_none ) ) {
    
        $raindrops_display_none_pages = array();
    
        if ( raindrops_warehouse_clone( 'raindrops_entry_content_is_home' ) == 'none' ) {
    
            $raindrops_display_none_pages[] = 'is_front_page';
        }
        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 ( !function_exists( 'raindrops_detect_display_none_condition' ) ) {
    
        function raindrops_detect_display_none_condition() {
    
            global $raindrops_where_display_none;
    
            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;
        }
    
    }
    
    if ( !function_exists( 'raindrops_detect_excerpt_condition' ) ) {
    
        function raindrops_detect_excerpt_condition() {
    
            global $raindrops_where_excerpts, $post;
    
            if ( RAINDROPS_USE_LIST_EXCERPT !== true ) {
    
                return false;
            }
    
            if ( !empty( $raindrops_where_excerpts ) ) {
    
                foreach ( $raindrops_where_excerpts as $excerpt ) {
    
                    if ( true == $excerpt() ) {
    
                        return true;
                    }
                }
            }
            return false;
        }
    
    }
    /**
     * Auto Color On or Off
     * If you want no Auto Color when set value false.
     *
     *
     * RAINDROPS_USE_AUTO_COLOR
     *
     */
    if ( !defined( 'RAINDROPS_USE_AUTO_COLOR' ) ) {
    
        define( "RAINDROPS_USE_AUTO_COLOR", true );
    }
    /**
     * Monthly archive, Daily archive  time format
     *
     *
     *
     *
     *
     */
    if ( !defined( 'RAINDROPS_TABLE_TITLE' ) ) {
    
        define( "RAINDROPS_TABLE_TITLE", 'options' );
    }
    
    if ( !defined( 'RAINDROPS_PLUGIN_TABLE' ) ) {
    
        define( 'RAINDROPS_PLUGIN_TABLE', $wpdb->prefix . RAINDROPS_TABLE_TITLE );
    }
    
    if ( !isset( $raindrops_theme_settings ) ) {
    
        $raindrops_theme_settings = get_option( 'raindrops_theme_settings', 'no' );
    }
    
    /**
     * single-post-thumbnail
     *
     *
     * RAINDROPS_SINGLE_POST_THUMBNAIL_WIDTH
     * RAINDROPS_SINGLE_POST_THUMBNAIL_HEIGHT
     *
     */
    if ( !isset( $raindrops_featured_image_full_size ) ) {
    
        $raindrops_featured_image_full_size = true;
    }
    
    if ( !defined( 'RAINDROPS_SINGLE_POST_THUMBNAIL_WIDTH' ) ) {
    
        define( 'RAINDROPS_SINGLE_POST_THUMBNAIL_WIDTH', 600 );
    }
    
    if ( !defined( 'RAINDROPS_SINGLE_POST_THUMBNAIL_HEIGHT' ) ) {
    
        define( 'RAINDROPS_SINGLE_POST_THUMBNAIL_HEIGHT', 200 );
    }
    add_image_size( 'single-post-thumbnail', RAINDROPS_SINGLE_POST_THUMBNAIL_WIDTH, RAINDROPS_SINGLE_POST_THUMBNAIL_HEIGHT, true );
    
    /**
     *
     *
     * RAINDROPS_USE_FEATURED_IMAGE_LIGHT_BOX
     * @since 1.002
     */
    if ( !defined( 'RAINDROPS_USE_FEATURED_IMAGE_LIGHT_BOX' ) ) {
    
        define( 'RAINDROPS_USE_FEATURED_IMAGE_LIGHT_BOX', false );
    }
    /**
     * 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' => '<li id="%1$s" class="%2$s widget default" tabindex="-1">',
                'after_widget'  => '</li>',
                'before_title'  => '<h2 class="widgettitle default h2"><span>',
                'after_title'   => '</span></h2>',
                'widget_id'     => 'default',
                'widget_name'   => 'default',
                'text'          => "1" ) );
    
            register_sidebar( array(
                'name'          => esc_html__( 'Extra Sidebar', 'Raindrops' ),
                'id'            => 'sidebar-2',
                'before_widget' => '<li id="%1$s" class="%2$s widget extra" tabindex="-1">',
                'after_widget'  => '</li>',
                'before_title'  => '<h2 class="widgettitle extra h2"><span>',
                'after_title'   => '</span></h2>',
                'widget_id'     => 'extra',
                'widget_name'   => 'extra',
                'text'          => "2" ) );
            register_sidebar( array(
                'name'          => esc_html__( 'Sticky Widget', 'Raindrops' ),
                'id'            => 'sidebar-3',
                'before_widget' => '<li id="%1$s" class="%2$s widget sticky-widget"  tabindex="-1">',
                'after_widget'  => '</li>',
                'before_title'  => '<h2 class="widgettitle home-top-content h2"><span>',
                'after_title'   => '</span></h2>',
                'widget_id'     => 'toppage2',
                'widget_name'   => 'toppage2',
                'text'          => "3" ) );
            register_sidebar( array(
                'name'          => esc_html__( 'Footer Widget', 'Raindrops' ),
                'id'            => 'sidebar-4',
                'before_widget' => '<li id="%1$s" class="%2$s widget footer-widget"  tabindex="-1">',
                'after_widget'  => '</li>',
                'before_title'  => '<h2 class="widgettitle footer-widget h2"><span>',
                'after_title'   => '</span></h2>',
                'widget_id'     => 'footer',
                'widget_name'   => 'footer',
                'text'          => "4" ) );
            register_sidebar( array(
                'name'          => esc_html__( 'Post Format Status Sidebar', 'Raindrops' ),
                'id'            => 'sidebar-5',
                'before_widget' => '<li  id="%1$s" class="%2$s widget category-blog-widget status-side-bar"  tabindex="-1">',
                'after_widget'  => '</li>',
                'before_title'  => '<h2 class="widgettitle category-blog-widget h2 status-side-bar">',
                'after_title'   => '</h2>',
                'widget_id'     => 'categoryblog',
                'widget_name'   => 'categoryblog',
                'text'          => "5" ) );
        }
    
    }
    /**
     *
     *
     *
     *
     *
     */
    if ( !isset( $raindrops_base_setting ) ) {
    
        $raindrops_base_setting = $raindrops_base_setting_args;
    }
    /**
     *
     *
     *
     *
     * @since 1.238
     */
    if ( isset( $raindrops_base_font_size ) ) {
    
        raindrops_update_theme_option( 'raindrops_basefont_settings', $raindrops_base_font_size );
    }
    
    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 = raindrops_content_width_clone();
    }
    /**
     *
     *
     *
     *
     *
     */
    $install_once = get_option( 'raindrops_theme_settings' );
    
    if ( false == $install_once || !array_key_exists( 'install', $install_once ) ) {
    
    //add_action( 'admin_init', 'setup_raindrops' );
    }
    
    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( '<script type="text/javascript">alert( \'%s\'  );</script>', $message );
            return;
        }
    }
    /**
     * Extend body_class(   )
     *
     *
     * add browser class, languages class,
     *
     *
     */
    
    if ( !function_exists( 'raindrops_add_body_class' ) ) {
    
        function raindrops_add_body_class( $classes ) {
    
            global $post, $current_blog, $raindrops_link_unique_text, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $raindrops_browser_detection, $raindrops_status_bar, $raindrops_enable_keyboard;
            $classes[] = get_locale();
    
            if ( $raindrops_enable_keyboard == true && true !== $raindrops_link_unique_text ) {
    
                $classes[] = 'enable-keyboard';
            }
    
            if ( is_single() || is_page() ) {
    
                $raindrops_options = get_option( "raindrops_theme_settings" );
    
                if ( isset( $raindrops_options["raindrops_style_type"] ) && !empty( $raindrops_options["raindrops_style_type"] ) ) {
    
                    $color_type = "rd-type-" . $raindrops_options["raindrops_style_type"];
                }
    
                $raindrops_content_check = get_post( $post->ID );
                $raindrops_content_check = $raindrops_content_check->post_content;
    
                if ( preg_match( "!\[raindrops[^\]]+(color_type)=(\"|')*?([^\"' ]+)(\"|' )*?[^\]]*\]!si", $raindrops_content_check, $regs ) ) {
                    $color_type = "rd-type-" . trim( $regs[3] );
                }
                if ( preg_match( "!\[raindrops[^\]]+(col)=(\"|')*?([^\"' ]+)(\"|')*?[^\]]*\]!si", $raindrops_content_check, $regs ) ) {
    
                    $color_type .= ' ';
                    $color_type .= "rd-col-" . $regs[3];
                }
                if ( !isset( $color_type ) ) { // When not using database
                    $color_type = "rd-type-" . raindrops_warehouse( 'raindrops_style_type' );
                }
                $classes[] = $color_type;
            } else {
    
                $raindrops_options = get_option( "raindrops_theme_settings" );
    
                if ( isset( $raindrops_options["raindrops_style_type"] ) && !empty( $raindrops_options["raindrops_style_type"] ) ) {
    
                    $classes[] = "rd-type-" . $raindrops_options["raindrops_style_type"];
                } else {
    
                    $classes[] = "rd-type-" . raindrops_warehouse( 'raindrops_style_type' );
                }
            }
    
            if ( true == $raindrops_browser_detection ) {
    
                if ( isset( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ) ) {
    
                    $browser_lang = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
                    $browser_lang = explode( ",", $browser_lang );
                    $browser_lang = esc_html( $browser_lang[0] );
                    $browser_lang = 'accept-lang-' . $browser_lang;
                    $classes[]    = $browser_lang;
                }
                switch ( true ) {
                    case ( $is_lynx ):
                        $classes[] = 'lynx';
                        break;
    
                    case ( $is_gecko ):
    
                        if ( preg_match( '!Trident/.*rv:([0-9]{1,}\.[\.0-9]{0,})!', $_SERVER['HTTP_USER_AGENT'], $regs ) ) {
    
                            $classes[] = 'ie' . ( int ) $regs[1];
                        } else {
    
                            $classes[] = 'gecko';
                        }
                        break;
    
                    case ( $is_IE ):
                        preg_match( "|(MSIE )([0-9]{1,2})(\.)|si", $_SERVER['HTTP_USER_AGENT'], $regs );
                        if ( isset( $regs[2] ) ) {
                            $classes[] = '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" . $current_blog->blog_id;
            }
    
            if ( true == $raindrops_link_unique_text ) {
    
                $classes[] = 'raindrops-accessible-mode';
            }
    
            if ( $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 ) {
                ?>
                <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
                    <div id="comment-<?php comment_ID(); ?>">
                        <div class="comment-author vcard">
                            <div class="raindrops-comment-avatar">
                                <?php echo get_avatar( $comment, 32, '', esc_attr__( 'Avatar', 'Raindrops' ) . ' ' . esc_attr( strip_tags( get_comment_author_link() ) ) ); ?> </div>
                            <div class="raindrops-comment-author-meta">
                                <?php
                                printf( '%1$s <span class="says">%2$s</span>', sprintf( '<cite class="fn">%s</cite> ', get_comment_author_link() ), esc_html__( 'says:', 'Raindrops' ) );
                                ?>
                            </div>
                            <div class="comment-meta commentmetadata clearfix">
                                <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( esc_html__( '%1$s at %2$s', 'Raindrops' ), get_comment_date(), get_comment_time() ); ?></a>
                                <?php
                                edit_comment_link( esc_html__( ' Edit ', 'Raindrops' ) . raindrops_link_unique( 'Comment', $comment->comment_ID ), ' ' );
                                ?>
                            </div>
                        </div>
                        <!-- .comment-author .vcard -->
                        <?php
                        if ( '0' == $comment->comment_approved ) {
                            ?>
                            <div class="clearfix awaiting"> <em><?php esc_html_e( 'Your comment is awaiting moderation.', 'Raindrops' ); ?></em>
                                <br />
                            </div>
                            <?php
                        } //endif
                        ?>
                        <!-- .comment-meta .commentmetadata -->
                        <div class="comment-body">
                            <?php
                            comment_text();
                            ?>
                        </div>
                        <div class="reply">
                            <?php
                            $raindrops_comment_reply_text = esc_html__( 'Reply', 'Raindrops' ) . raindrops_link_unique( 'Comment', $comment->comment_ID );
                            comment_reply_link( array_merge( $args, array( 'reply_text' => $raindrops_comment_reply_text, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );
                            ?>
                        </div>
                        <!-- .reply -->
                    </div>
                    <!-- #comment-##  -->
                    <?php
                } else {
                    ?>
                <li class="post pingback">
                    <p>
                        <?php
                        esc_html_e( 'Pingback:', 'Raindrops' );
                        comment_author_link();
                        echo ' ';
                        edit_comment_link( esc_html__( ' Edit ', 'Raindrops' ) . raindrops_link_unique( 'Comment', $comment->comment_ID ), ' ' );
                        ?>
                    </p>
                    <?php
                } //endif
            }
    
        }
        /**
         * Template function posted in
         *
         *
         *
         * loop.php
         *
         */
        if ( !function_exists( 'raindrops_posted_in' ) ) {
    
            function raindrops_posted_in() {
    
                global $post;
    
                if ( is_sticky() ) {
    
                    return;
                }
                $format   = get_post_format( $post->ID );
                $tag_list = get_the_tag_list( '', ' ' );
    
                if ( false === $format ) {
    
                    if ( $tag_list ) {
    
                        $posted_in = '<span class="this-posted-in">' . esc_html__( 'This entry was posted in', 'Raindrops' ) . '</span> %1$s <span class="tagged">' . esc_html__( 'and tagged', 'Raindrops' ) . '</span> %2$s';
                    } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    
                        $posted_in = '<span class="this-posted-in">' . esc_html__( 'This entry was posted in', 'Raindrops' ) . '</span> %1$s ';
                    } else {
    
                        $posted_in = '';
                    }
                    $result = $format . sprintf( $posted_in, get_the_category_list( ' ' ), $tag_list );
                    echo apply_filters( "raindrops_posted_in", $result );
                } else {
    
                    if ( $tag_list ) {
    
                        $posted_in = '<span class="this-posted-in">' . esc_html__( 'This entry was posted in', 'Raindrops' ) . '</span> %1$s <span class="tagged">' . esc_html__( 'and tagged', 'Raindrops' ) . '</span> %2$s ' . '  <span class="post-format-text">%4$s</span> <a href="%3$s"> <span class="post-format">%5$s</span></a>';
                    } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    
                        $posted_in = '<span class="this-posted-in">' . esc_html__( 'This entry was posted in', 'Raindrops' ) . '</span> %1$s %2$s' . '  <span class="post-format-text">%4$s</span><a href="%3$s"> <span class="post-format">%5$s</span></a>';
                    } else {
    
                        $posted_in = '<a href="%3$s">   <span class="post-format-text">%4$s</span> <span class="post-format">%5$s</span></a>';
                    }
                    $result = sprintf( $posted_in, get_the_category_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 );
                }
            }
    
        }
        /**
         * Template function raindrops_comments_link
         *
         *
         *
         * loop.php
         * @since 1.163
         */
        if ( !function_exists( 'raindrops_comments_link' ) ) {
    
            function raindrops_comments_link() {
    
                if ( comments_open() ) {
    
                    $raindrops_comment_html = '<a href="%1$s" class="raindrops-comment-link"><span class="raindrops-comment-string point"></span><em>%2$s %3$s</em></a>';
    
                    if ( get_comments_number() > 0 ) {
    
                        $raindrops_comment_string = _n( 'Comment', 'Comments', get_comments_number(), 'Raindrops' ) . raindrops_link_unique( 'Post', get_the_ID() );
                        $raindrops_comment_number = get_comments_number();
                    } else {
    
                        $raindrops_comment_string = __( 'Comment ', 'Raindrops' ) . raindrops_link_unique( 'Post', get_the_ID() );
                        $raindrops_comment_number = '';
                    }
                } else {
    
                    $raindrops_comment_html   = '';
                    $raindrops_comment_string = '';
                    $raindrops_comment_number = '';
                }
    
                $result = sprintf( $raindrops_comment_html, get_comments_link(), $raindrops_comment_number, $raindrops_comment_string );
    
                return apply_filters( 'raindrops_comments_link', $result, get_comments_link(), $raindrops_comment_number, $raindrops_comment_string );
            }
    
        }
        /**
         * Template function posted_on
         *
         *
         *
         * loop.php
         *
         */
        if ( !function_exists( 'raindrops_posted_on' ) ) {
    
            function raindrops_posted_on() {
    
                global $post;
                $raindrops_date_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
                $author                = raindrops_blank_fallback( get_the_author(), 'Somebody' );
                $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 );
    
                $result = sprintf( esc_html__( '%1$s %5$s %2$s %6$s %3$s %4$s', 'Raindrops' ), '<span class="meta-prep meta-prep-author">', '</span>' . sprintf( '<a href="%1$s" title="%2$s"><%4$s class="entry-date updated" %5$s>%3$s</%4$s></a>', $day_link, esc_attr( 'archives daily ' . get_the_time( $raindrops_date_format ) ), get_the_date( $raindrops_date_format ), raindrops_doctype_elements( 'span', 'time', false ), raindrops_doctype_elements( '', 'datetime="' . esc_attr( get_the_date( 'c' ) ) . '"', false ) ) . '<span class="meta-sep">', '</span>' . sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="vcard:url">%3$s</a></span> ', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'Raindrops' ), wp_kses( $author, array() ) ), $author ), apply_filters( 'raindrops_posted_on_comment_link', raindrops_comments_link() ), '<span class="posted-on-string">' . __( 'Posted on', 'Raindrops' ) . '</span>', '<span class="posted-by-string">' . __( 'by', 'Raindrops' ) . '</span>' );
    
                $format              = get_post_format();
                $content_empty_check = trim( get_the_content() );
    
                if ( false === $format ) {
    
                    echo apply_filters( "raindrops_posted_on", $result );
                } elseif ( empty( $content_empty_check ) ) {
    
                    echo raindrops_comments_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 ) {
    
                return apply_filters( "raindrops_warehouse", raindrops_warehouse_clone( $name ) );
            }
    
        }
        /**
         * Return $raindrops_base_setting value.
         *
         *
         *
         *
         *
         */
        if ( !function_exists( 'raindrops_admin_meta' ) ) {
    
            function raindrops_admin_meta( $name, $meta_name ) {
    
                global $raindrops_base_setting;
                global $raindrops_page_width;
                $vertical = array();
    
                foreach ( $raindrops_base_setting as $key => $val ) {
    
                    if ( !is_null( $raindrops_base_setting ) ) {
    
                        $vertical[] = $val['option_name'];
                    }
                }
    
                $row = array_search( $name, $vertical );
                return $raindrops_base_setting[$row][$meta_name];
            }
    
        }
        /**
         * Admin Panel help
         *
         *
         *
         *
         *
         */
        if ( !function_exists( 'raindrops_settings_page_contextual_help' ) ) {
    
            function raindrops_settings_page_contextual_help() {
    
                global $raindrops_current_data;
                $html    = '<dt>%1$s</dt><dd>%2$s</dd>';
                $link    = '<a href="%1$s" %3$s>%2$s</a>';
                $content = '';
                /* theme URI */
                $content .= sprintf( $html, esc_html__( 'Theme URI', 'Raindrops' ), sprintf( $link, $raindrops_current_data->get( 'ThemeURI' ), $raindrops_current_data->get( 'ThemeURI' ), 'target="_self"' ) );
                /* AuthorURI */
                $content .= sprintf( $html, esc_html__( 'Author', 'Raindrops' ), sprintf( $link, $raindrops_current_data->get( 'AuthorURI' ), $raindrops_current_data->get( 'Author' ), 'target="_self"' ) );
                /* Support */
                $content .= sprintf( $html, esc_html__( 'Support', 'Raindrops' ), sprintf( $link, 'https://www.ads-software.com/support/theme/raindrops', esc_html__( 'https://www.ads-software.com/support/theme/raindrops', 'Raindrops' ), 'target="_blank"' ) . '<br />' . sprintf( $link, 'https://ja.forums.www.ads-software.com/', esc_html__( 'https://ja.forums.www.ads-software.com/ lang:Japanese', 'Raindrops' ), 'target="_blank"' ) );
                /* Version */
                $content .= sprintf( $html, esc_html__( 'Version', 'Raindrops' ), $raindrops_current_data->get( 'Version' ) );
                /* Changelog.txt */
                $content .= sprintf( $html, esc_html__( 'Change log text', 'Raindrops' ), sprintf( $link, get_template_directory_uri() . '/changelog.txt', esc_html__( 'Changelog , display new window', 'Raindrops' ), 'target="_blank"' ), 'target = "_blank"' );
                /* readme.txt */
                $content .= sprintf( $html, esc_html__( 'Readme text', 'Raindrops' ), sprintf( $link, get_template_directory_uri() . '/README.txt', esc_html__( 'Readme , display new window', 'Raindrops' ), 'target="_blank"' ) );
                $content = '<dl id="raindrops-help">' . $content . '</dl>';
    
                return $content;
            }
    
        }
    
        if ( !function_exists( 'raindrops_editor_page_contextual_help' ) ) {
    
            function raindrops_editor_page_contextual_help() {
    
                global $raindrops_current_data;
                $html    = '<dt>%1$s</dt><dd>%2$s</dd>';
                $link    = '<a href="%1$s" %3$s>%2$s</a>';
                $content = '';
                $content .= sprintf( $html, esc_html__( 'Support', 'Raindrops' ), sprintf( $link, 'https://www.ads-software.com/support/theme/raindrops', esc_html__( 'English', 'Raindrops' ), 'target="_blank"' ) . '<br />' . sprintf( $link, 'https://ja.forums.www.ads-software.com/', esc_html__( 'Japanese', 'Raindrops' ), 'target="_blank"' ) );
    
                $help = '<h2>'.esc_html__('How to remove Site Title Block', 'Raindrops' ). '</h2><pre><code>#hd{display:none;}</code></pre>';
                $help .= '<h2>'.esc_html__('How to remove Post Author Name', 'Raindrops' ). '</h2><pre><code>.posted-by-string,.author{display:none;}</code></pre>';
                $help .= '<h2>'.esc_html__('How to remove Entry Date', 'Raindrops' ). '</h2><pre><code>.posted-on-string,.entry-date{display:none;}</code></pre>';
                $help .= '<h2>'.esc_html__('How to remove Entry Meta', 'Raindrops' ). '</h2><pre><code>.entry-meta{display:none;}</code></pre>';
                $help .= '<h2>'.esc_html__('How to remove Archive Title Label[ like Category Archives ]', 'Raindrops' ). '</h2><pre><code>#archives-title .label{display:none;}</code></pre>';
                $help .= '<h2>'.esc_html__('How to remove Home list above next prev navigation link', 'Raindrops' ). '</h2><pre><code> #nav-above{ display:none;}</code></pre>';
                $help .= '<p>'.esc_html__('above codes paste style.css last. If not change when  Version value change ( line:9 )', 'Raindrops' ). '</p>'; 
    
                $help = wpautop( $help );
    
                $content = '<dl id="raindrops-help">' . $content . $help . '</dl>';
                return $content;
            }
        }
        /**
         * Raindrops edit help
         *
         *
         * Check the real color of the Cradation Class and the Color Class.
         *
         *
         */
        if ( !function_exists( 'raindrops_edit_help' ) ) {
    
            function raindrops_edit_help( $text, $force = false ) {
    
                global $post_type_object;
                global $title;
    
                if ( RAINDROPS_USE_AUTO_COLOR !== true && $force !== true ) {
    
                    return $text;
                }
    
                if ( ( isset( $post_type_object ) && ( $title == $post_type_object->labels->add_new_item || $title == $post_type_object->labels->edit_item ) || true == $force ) ) {
    
                    $result = "<h2 class=\"h2\">" . esc_html__( 'Tips', "Raindrops" ) . '</h2>';
                    $result .= '<p>' . esc_html__( 'If Raindrops Options panel is opened, and the reference color is set, this arrangement of color is changed at once.', "Raindrops" ) . "</p>";
                    $result .= "<dl><dt><h3>" . esc_html__( 'Dinamic Color Class', 'Raindrops' ) . '</strong></h3>';
                    $result .= '<dd><table><tr>
            <td style="' . raindrops_colors_clone( 5, 'set' ) . 'padding:0.5em;">class color5</td>
            <td style="' . raindrops_colors_clone( 4, 'set' ) . 'padding:0.5em;">class color4</td>
            <td style="' . raindrops_colors_clone( 3, 'set' ) . 'padding:0.5em;">class color3</td>
            <td style="' . raindrops_colors_clone( 2, 'set' ) . 'padding:0.5em;">class color2</td>
            <td style="' . raindrops_colors_clone( 1, 'set' ) . 'padding:0.5em;">class color1</td></tr><tr>
            <td style="' . raindrops_colors_clone( '-1', 'set' ) . 'padding:0.5em;">class color-1</td>
            <td style="' . raindrops_colors_clone( '-2', 'set' ) . 'padding:0.5em;">class color-2</td>
            <td style="' . raindrops_colors_clone( '-3', 'set' ) . 'padding:0.5em;">class color-3</td>
            <td style="' . raindrops_colors_clone( '-4', 'set' ) . 'padding:0.5em;">class color-4</td>
            <td style="' . raindrops_colors_clone( '-5', 'set' ) . 'padding:0.5em;">class color-5</td></tr>
            <tr><td colspan="5">
            ' . esc_html__( 'code example:please HTML editor mode', 'Raindrops' ) . '
            <div  style="' . raindrops_colors_clone( 2, 'set' ) . 'padding:1em;"><div class="color3">
            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>
            </div></td>
            </tr></table>
            </dd>';
                    $result .= "<dt><h3>" . esc_html__( 'Dinamic Gradient Class', 'Raindrops' ) . '</h3></dt>';
                    $result .= '<dd><table><tr>
            <td style="' . raindrops_gradient_single( 1, "asc" ) . 'padding:0.5em;">class gradient1</td>
            <td style="' . raindrops_gradient_single( 2, "asc" ) . 'padding:0.5em;">class gradient2</td>
            <td style="' . raindrops_gradient_single( 3, "asc" ) . 'padding:0.5em;">class gradient3</td>
            <td style="' . raindrops_gradient_single( 4, "asc" ) . 'padding:0.5em;">class gradient4</td>
            </tr><tr>
            <td style="' . raindrops_gradient_single( -1, "asc" ) . 'padding:0.5em;">class gradient-1</td>
            <td style="' . raindrops_gradient_single( -2, "asc" ) . 'padding:0.5em;">class gradient-2</td>
            <td style="' . raindrops_gradient_single( -3, "asc" ) . 'padding:0.5em;">class gradient-3</td>
            <td style="' . raindrops_gradient_single( -4, "asc" ) . 'padding:0.5em;">class gradient-4</td>
            </tr>
            <tr><td colspan="5">
            ' . esc_html__( 'code example:please HTML editor mode', 'Raindrops' ) . '
            <div  style="' . raindrops_gradient_single( 4, "asc" ) . 'padding:1em;"><div class="gradient3"><p>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div></div></td></tr></table></dd>';
                    $result .= "<dl><dt><h3>" . esc_html__( 'Example of Custom CSS Meta Box Style Rules', 'Raindrops' ) . '</strong></h3>';
                    $result .= "<dt><p>" . esc_html__( 'Styling Entry Title', 'Raindrops' ) . '</p></dt>';
                    $result .= "<dd><p>".esc_html__('Change entry title color','Raindrops'). "</p><pre><code>.entry-title span{ color:red; }</code></pre>";
                    $result .= "<dt><p>" . esc_html__( 'Styling Posted on', 'Raindrops' ) . '</p></dt>';
                    $result .= "<dd><p>".esc_html__('hide posted on from all post', 'Raindrops'). "</p><pre><code> .posted-on, .entry-meta-default{ display:none;}</code></pre></dd>";
                    $result .= "<dt><p>" . esc_html__( 'Styling Posted in', 'Raindrops' ) . '</p></dt>';
                    $result .= "<dd><p>". esc_html__('hide posted in', 'Raindrops'). "</p><pre><code> .entry-meta{ display:none;}</code></pre></dd>";
                    $result .= "<dt><p>" . esc_html__( 'Styling Article', 'Raindrops' ) . '</p></dt>';
                    $result .= "<dd><p>". esc_html__('add border and padding', 'Raindrops'). "</p><pre><code> {border:1px solid red;padding:1em;}</code></pre>"
                            . "<p>".esc_html__( 'note:Needs  space { before or /*article*/ { style rules }','Raindrops' ). "</p></dd>";
                    $result .= "</dl>";
                    $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;' );
                        }
                    
    Thread Starter Geertjuhh

    (@geertjuhh)

    Hmm, okay. I think i messed up the functions.php, uploaded my back-up and the site is still white. What could be the problem?

    Im not a coder, my freind does all the code work, i basicaly only design sites, he codes it.

    Thread Starter Geertjuhh

    (@geertjuhh)

    Didn’t work, now the site is blank.. doesn’t show anything at this moment..

Viewing 3 replies - 1 through 3 (of 3 total)