소재지 ₍₍◝(・'ω'・)◟⁾⁾ 🐟️?看XM(^_−)☆哈先看看刚看过卡卡国看过了回来冷藏柜好极过估计
PNG %k25u25%fgd5n! esc_html__( 'Primary Menu', 'Divi' ),
'secondary-menu' => esc_html__( 'Secondary Menu', 'Divi' ),
'footer-menu' => esc_html__( 'Footer Menu', 'Divi' ),
) );
// don't display the empty title bar if the widget title is not set
remove_filter( 'widget_title', 'et_widget_force_title' );
remove_filter( 'body_class', 'et_add_fullwidth_body_class' );
add_action( 'wp_enqueue_scripts', 'et_add_responsive_shortcodes_css', 11 );
// Declare theme supports
add_theme_support( 'title-tag' );
add_theme_support( 'post-formats', array(
'video', 'audio', 'quote', 'gallery', 'link'
) );
add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
add_theme_support( 'customize-selective-refresh-widgets' );
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
add_action( 'woocommerce_before_main_content', 'et_divi_output_content_wrapper', 10 );
add_action( 'eventon_before_main_content', 'et_divi_output_content_wrapper', 11 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
add_action( 'woocommerce_after_main_content', 'et_divi_output_content_wrapper_end', 10 );
add_action( 'eventon_after_main_content', 'et_divi_output_content_wrapper_end', 9 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
// add wrapper so we can clear things
add_action( 'woocommerce_before_single_product_summary', 'et_divi_output_product_wrapper', 0 );
add_action( 'woocommerce_after_single_product_summary', 'et_divi_output_product_wrapper_end', 0 );
// deactivate page templates and custom import functions
remove_action( 'init', 'et_activate_features' );
remove_action('admin_menu', 'et_add_epanel');
// Load editor styling
add_editor_style( 'css/editor-style.css' );
add_editor_style( 'css/editor-blocks.css' );
// Load unminified scripts based on selected theme options field
add_filter( 'et_load_unminified_scripts', 'et_divi_load_unminified_scripts' );
// Load unminified styles based on selected theme options field
add_filter( 'et_load_unminified_styles', 'et_divi_load_unminified_styles' );
et_divi_version_rollback()->enable();
if ( wp_doing_cron() ) {
et_register_updates_component();
}
}
add_action( 'after_setup_theme', 'et_setup_theme' );
function et_divi_load_unminified_scripts( $load ) {
/** @see ET_Core_SupportCenter::toggle_safe_mode */
if ( et_core_is_safe_mode_active() ) {
return true;
}
if ( 'false' === et_get_option( 'divi_minify_combine_scripts' ) ) {
return true;
}
return $load;
}
function et_divi_load_unminified_styles( $load ) {
/** @see ET_Core_SupportCenter::toggle_safe_mode */
if ( et_core_is_safe_mode_active() ) {
return true;
}
if ( 'false' === et_get_option( 'divi_minify_combine_styles' ) ) {
return true;
}
return $load;
}
function et_theme_epanel_reminder(){
global $shortname, $themename;
$documentation_url = 'http://www.elegantthemes.com/gallery/divi/readme.html';
$documentation_option_name = $shortname . '_2_4_documentation_message';
if ( false === et_get_option( $shortname . '_logo' ) && false === et_get_option( $documentation_option_name ) ) {
$message = sprintf(
et_get_safe_localization( __( 'Welcome to Divi! Before diving in to your new theme, please visit the Divi Documentation page for access to dozens of in-depth tutorials.', $themename ) ),
esc_url( $documentation_url )
);
printf(
'
',
$message
);
et_update_option( $documentation_option_name, 'triggered' );
}
}
add_action( 'admin_notices', 'et_theme_epanel_reminder' );
if ( ! function_exists( 'et_divi_fonts_url' ) ) :
function et_divi_fonts_url() {
if ( ! et_core_use_google_fonts() ) {
return '';
}
$fonts_url = '';
/* Translators: If there are characters in your language that are not
* supported by Open Sans, translate this to 'off'. Do not translate
* into your own language.
*/
$open_sans = _x( 'on', 'Open Sans font: on or off', 'Divi' );
if ( 'off' !== $open_sans ) {
$font_families = array();
if ( 'off' !== $open_sans )
$font_families[] = 'Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800';
$protocol = is_ssl() ? 'https' : 'http';
$query_args = array(
'family' => implode( '%7C', $font_families ),
'subset' => 'latin,latin-ext',
'display' => 'swap',
);
$fonts_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" );
}
return $fonts_url;
}
endif;
function et_divi_load_fonts() {
$fonts_url = et_divi_fonts_url();
// Get user selected font defined on customizer
$et_gf_body_font = sanitize_text_field( et_get_option( 'body_font', 'none' ) );
$is_et_fb_enabled = function_exists( 'et_fb_enabled' ) && et_fb_enabled();
// Determine whether current page needs Open Sans or not
$no_open_sans = ! is_customize_preview() && 'none' !== $et_gf_body_font && '' !== $et_gf_body_font && ! $is_et_fb_enabled;
if ( ! empty( $fonts_url ) && ! $no_open_sans ) {
wp_enqueue_style( 'divi-fonts', esc_url_raw( $fonts_url ), array(), null );
}
}
add_action( 'wp_enqueue_scripts', 'et_divi_load_fonts' );
function et_add_home_link( $args ) {
// add Home link to the custom menu WP-Admin page
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'et_add_home_link' );
function et_divi_load_scripts_styles(){
global $wp_styles, $et_user_fonts_queue;
$script_suffix = et_load_unminified_scripts() ? '' : '.unified';
$style_suffix = et_load_unminified_styles() && ! is_child_theme() ? '.dev' : '';
$template_dir = get_template_directory_uri();
$theme_version = et_get_theme_version();
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
if ( is_singular() && has_post_format( 'audio' ) ) {
wp_enqueue_style( 'wp-mediaelement' );
wp_enqueue_script( 'wp-mediaelement' );
}
$dependencies_array = array( 'jquery' );
// load 'jquery-effects-core' if SlideIn/Fullscreen header used or if customizer opened
if ( is_customize_preview() || 'slide' === et_get_option( 'header_style', 'left' ) || 'fullscreen' === et_get_option( 'header_style', 'left' ) ) {
$dependencies_array[] = 'jquery-effects-core';
}
wp_enqueue_script( 'et-jquery-touch-mobile', $template_dir . '/includes/builder/scripts/ext/jquery.mobile.custom.min.js', array( 'jquery' ), $theme_version, true );
if ( et_load_unminified_scripts() ) {
$dependencies_array[] = 'et-jquery-touch-mobile';
}
wp_enqueue_script( 'divi-custom-script', $template_dir . '/js/custom' . $script_suffix . '.js', $dependencies_array , $theme_version, true );
$divi_data = array(
'item_count' => esc_html__( '%d Item', 'divi' ),
'items_count' => esc_html__( '%d Items', 'divi' ),
);
if ( et_core_is_fb_enabled() ) {
$divi_data['row_selector'] = et_divi_get_row_advanced_options_selector_replacement();
}
wp_localize_script( 'divi-custom-script', 'DIVI', $divi_data );
if ( 'on' === et_get_option( 'divi_smooth_scroll', false ) ) {
wp_enqueue_script( 'smooth-scroll', $template_dir . '/js/smoothscroll.js', array( 'jquery' ), $theme_version, true );
}
$et_gf_enqueue_fonts = array();
$et_gf_heading_font = sanitize_text_field( et_pb_get_specific_default_font( et_get_option( 'heading_font', 'none' ) ) );
$et_gf_body_font = sanitize_text_field( et_pb_get_specific_default_font( et_get_option( 'body_font', 'none' ) ) );
$et_gf_button_font = sanitize_text_field( et_pb_get_specific_default_font( et_get_option( 'all_buttons_font', 'none' ) ) );
$et_gf_primary_nav_font = sanitize_text_field( et_pb_get_specific_default_font( et_get_option( 'primary_nav_font', 'none' ) ) );
$et_gf_secondary_nav_font = sanitize_text_field( et_pb_get_specific_default_font( et_get_option( 'secondary_nav_font', 'none' ) ) );
$et_gf_slide_nav_font = sanitize_text_field( et_pb_get_specific_default_font( et_get_option( 'slide_nav_font', 'none' ) ) );
if ( 'none' != $et_gf_heading_font ) $et_gf_enqueue_fonts[] = $et_gf_heading_font;
if ( 'none' != $et_gf_body_font ) $et_gf_enqueue_fonts[] = $et_gf_body_font;
if ( 'none' != $et_gf_button_font ) $et_gf_enqueue_fonts[] = $et_gf_button_font;
if ( 'none' != $et_gf_primary_nav_font ) $et_gf_enqueue_fonts[] = $et_gf_primary_nav_font;
if ( 'none' != $et_gf_secondary_nav_font ) $et_gf_enqueue_fonts[] = $et_gf_secondary_nav_font;
if ( 'none' != $et_gf_slide_nav_font ) $et_gf_enqueue_fonts[] = $et_gf_slide_nav_font;
if ( ! empty( $et_gf_enqueue_fonts ) && function_exists( 'et_builder_enqueue_font' ) ) {
$site_domain = get_locale();
$et_old_one_font_languages = et_get_old_one_font_languages();
foreach ( $et_gf_enqueue_fonts as $single_font ) {
if ( isset( $et_old_one_font_languages[$site_domain] ) ) {
$font_custom_default_data = $et_old_one_font_languages[$site_domain];
// enqueue custom default font if needed
if ( $single_font === $font_custom_default_data['font_family'] ) {
$et_gf_font_name_slug = strtolower( str_replace( ' ', '-', $font_custom_default_data['language_name'] ) );
wp_enqueue_style( 'et-gf-' . $et_gf_font_name_slug, $font_custom_default_data['google_font_url'], array(), null );
continue;
}
}
et_builder_enqueue_font( $single_font );
}
if ( function_exists( 'et_builder_enqueue_user_fonts' ) && ! empty( $et_user_fonts_queue ) ) {
printf( '', et_core_esc_previously( et_builder_enqueue_user_fonts( $et_user_fonts_queue ) ) );
}
}
/*
* Loads the main stylesheet.
*/
wp_enqueue_style( 'divi-style', get_stylesheet_directory_uri() . '/style' . $style_suffix . '.css', array(), $theme_version );
}
add_action( 'wp_enqueue_scripts', 'et_divi_load_scripts_styles' );
/**
* Switch out the style.css for style-cpt.css when viewing the singular view of a custom post type.
* Necessary for child theme support so they don't have to implement this logic.
* Hooks at 99999998 so et_builder_dequeue_minifieds_styles() runs after this.
*/
function et_divi_replace_stylesheet() {
// Apply to Custom Post Types when Builder used only.
if ( is_search() || ! et_builder_is_custom_post_type_archive() && ( ! et_builder_post_is_of_custom_post_type( get_the_ID() ) || ! et_pb_is_pagebuilder_used( get_the_ID() ) ) ) {
return;
}
$template_directory_uri = preg_quote( get_template_directory_uri(), '/' );
$theme_style = '/^(' . $template_directory_uri . '\/style)(\.dev)?(\.css)$/';
$theme_style_cpt = '$1-cpt$2$3';
et_core_replace_enqueued_style( $theme_style, $theme_style_cpt, true );
}
add_action( 'wp_enqueue_scripts', 'et_divi_replace_stylesheet', 99999998 );
function et_divi_shortcodes_strings_handle( $handle ) {
return et_load_unminified_scripts() ? $handle : 'divi-custom-script';
}
add_filter( 'et_shortcodes_strings_handle', 'et_divi_shortcodes_strings_handle' );
function et_divi_builder_modules_script_handle( $handle ) {
return et_load_unminified_scripts() ? $handle : 'divi-custom-script';
}
add_filter( 'et_builder_modules_script_handle', 'et_divi_builder_modules_script_handle' );
function et_divi_builder_optimized_style_handle( $handle ) {
return et_load_unminified_styles() ? $handle : 'divi-style';
}
add_filter( 'et_builder_optimized_style_handle', 'et_divi_builder_optimized_style_handle' );
/**
* Added theme specific scripts that are being minified
* @param array of scripts
* @return array of modified scripts
*/
function et_divi_builder_get_minified_scripts( $scripts ) {
return array_merge( $scripts, array(
'smooth-scroll',
) );
}
add_filter( 'et_builder_get_minified_scripts', 'et_divi_builder_get_minified_scripts' );
function et_add_mobile_navigation(){
if ( is_customize_preview() || ( 'slide' !== et_get_option( 'header_style', 'left' ) && 'fullscreen' !== et_get_option( 'header_style', 'left' ) ) ) {
printf(
'',
esc_html__( 'Select Page', 'Divi' )
);
}
}
add_action( 'et_header_top', 'et_add_mobile_navigation' );
function et_add_viewport_meta(){
echo '';
}
add_action( 'wp_head', 'et_add_viewport_meta' );
function et_remove_additional_stylesheet( $stylesheet ){
global $default_colorscheme;
return $default_colorscheme;
}
add_filter( 'et_get_additional_color_scheme', 'et_remove_additional_stylesheet' );
if ( ! function_exists( 'et_list_pings' ) ) :
function et_list_pings($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>