' . $css . ''; } function labo_boots_raindrops_keep_content_width( $return_value ) { return false; } /** * * @param array $args * @return string */ function boots_remove_fallback_cb( $args ) { $args[ 'fallback_cb' ] = ''; return $args; } /** * * @param type $html * @return type */ function boots_hash_link_change( $html ) { return str_replace( 'href="#doc3"', 'href="#"', $html ); } /** * Determination of depth of color * @param type $r * @param type $g * @param type $b * @return float value 0-255 */ function boots_darkness( $r, $g, $b ) { $r = $r * 299; $g = $g * 587; $b = $b * 114; $result = ( $r + $g + $b ) / 1000; return $result; } /** * * @global type $raindrops_current_theme_slug * @param type $classes * @return type */ function boots_body_classes( $classes ) { global $raindrops_current_theme_slug; $boots_page_width = raindrops_warehouse_clone( "raindrops_page_width" ); if ( empty( $boots_page_width ) ) { $boots_page_width = 'doc5'; } $classes[] = 'page-width-' . $boots_page_width; $classes[] = 'child-' . $raindrops_current_theme_slug; return apply_filters( 'boots_body_classes', $classes ); } function boots_uninstall() { global $parent_theme_settings; update_option( 'raindrops_theme_settings', $parent_theme_settings ); } /** * Overwrite Parent default colors * @param type $val * @return type * */ if ( !function_exists( 'raindrops_child_fallback_footer_color_default' ) ) { function raindrops_child_fallback_footer_color_default() { global $raindrops_child_base_setting_args; return $raindrops_child_base_setting_args[ 'raindrops_footer_color' ][ 'option_value' ]; } } if ( !function_exists( 'raindrops_child_fallback_hyperlink_color_default' ) ) { function raindrops_child_fallback_hyperlink_color_default() { global $raindrops_child_base_setting_args; return $raindrops_child_base_setting_args[ 'raindrops_hyperlink_color' ][ 'option_value' ]; } } if ( !function_exists( 'raindrops_child_fallback_fonts_color_default' ) ) { function raindrops_child_fallback_fonts_color_default() { global $raindrops_child_base_setting_args; return $raindrops_child_base_setting_args[ 'raindrops_default_fonts_color' ][ 'option_value' ]; } } if ( !function_exists( 'raindrops_child_fallback_footer_link_color' ) ) { function raindrops_child_fallback_footer_link_color() { global $raindrops_child_base_setting_args; return $raindrops_child_base_setting_args[ 'raindrops_footer_link_color' ][ 'option_value' ]; } } if ( !function_exists( 'raindrops_child_fallback_header_textcolor' ) ) { function raindrops_child_fallback_header_textcolor() { global $raindrops_child_base_setting_args; return get_theme_mod( 'header_textcolor', 'ffffff' ); } } function boots_extend_style() { raindrops_register_styles( "boots" ); /** * Set boots default value for Customizer */ add_filter( 'raindrops_fallback_footer_color_default', 'raindrops_child_fallback_footer_color_default' ); add_filter( 'raindrops_fallback_hyperlink_color_default', 'raindrops_child_fallback_hyperlink_color_default' ); add_filter( 'raindrops_fallback_fonts_color_default', 'raindrops_child_fallback_fonts_color_default' ); add_filter( 'raindrops_fallback_footer_link_color', 'raindrops_child_fallback_footer_link_color' ); add_filter( 'raindrops_fallback_header_textcolor', 'raindrops_child_fallback_header_textcolor' ); add_filter( 'raindrops_color_type_default_color', 'raindrops_child_fallback_fonts_color_default' ); add_filter( 'raindrops_color_type_default_link_color', 'raindrops_child_fallback_hyperlink_color_default' ); add_filter( 'raindrops_color_type_default_footer_link_color', 'raindrops_child_fallback_footer_link_color' ); } add_action( 'wp_enqueue_scripts', 'boots_scripts' ); function boots_scripts() { global $boots_current_data_version; if ( !is_user_logged_in() ) { $boots_current_data_version = null; } $script_file_uri = get_theme_file_uri( 'boots.js' ); if ( file_exists( get_stylesheet_directory() . '/boots.js' ) ) { wp_register_script( 'boots-script', $script_file_uri, array( 'jquery', 'jquery-migrate' ), $boots_current_data_version, true ); wp_enqueue_script( 'boots-script' ); } } function boots_header_args( $args ) { $args[ 'default-image' ] = ''; return $args; } /** * Block editor */ add_action( 'enqueue_block_editor_assets', 'boots_block_editor_style' ); function boots_block_editor_style() { $dinamic_css = boots_dinamic_style_for_blockeditor(); if ( is_user_logged_in() && current_user_can( 'edit_posts' ) ) { wp_enqueue_style( 'raindrops-block-editor', get_theme_file_uri( 'style.css' ) ); wp_add_inline_style( 'raindrops-block-editor', $dinamic_css ); } } function boots_dinamic_style_for_blockeditor(){ $style =<<