编辑:dynamic-css.php
<?php /** * Dynamic-css. * * @author ThemeFusion * @copyright (c) Copyright by ThemeFusion * @link https://avada.com * @package Avada * @subpackage Core */ // Do not allow directly accessing this file. if ( ! defined( 'ABSPATH' ) ) { exit( 'Direct script access denied.' ); } /** * Format of the $css array: * $css['media-query']['element']['property'] = value * * If no media query is required then set it to 'global' * * If we want to add multiple values for the same property then we have to make it an array like this: * $css[media-query][element]['property'][] = value1 * $css[media-query][element]['property'][] = value2 * * Multiple values defined as an array above will be parsed separately. * * @param array $original_css The existing CSS. */ function avada_dynamic_css_array( $original_css = [] ) { global $avada_dynamic_css_array_added; if ( true === $avada_dynamic_css_array_added ) { return $original_css; } $css = []; $c_page_id = Avada()->fusion_library->get_page_id(); $dynamic_css_helpers = Fusion_Dynamic_CSS::get_instance()->get_helpers(); $side_header_width = ( 'top' === fusion_get_option( 'header_position' ) ) ? 0 : intval( Avada()->settings->get( 'side_header_width' ) ); /** * Single Post Slideshow. */ if ( Avada()->settings->get( 'slideshow_smooth_height' ) || ( 'auto' === fusion_get_option( 'fimg[width]', $c_page_id ) && 'half' === fusion_get_option( 'portfolio_featured_image_width' ) ) ) { $css['global']['.fusion-post-slider.fusion-flexslider,.fusion-post-slideshow.fusion-flexslider']['overflow'] = 'hidden'; } // Responsive mode. if ( fusion_get_option( 'responsive' ) ) { /* * Top Header Only Responsive Styles. */ $sidebar_order = apply_filters( 'fusion_responsive_sidebar_order', explode( ',', fusion_get_option( 'responsive_sidebar_order' ) ) ); $sidebar_break_point = '@media only screen and (max-width: ' . ( intval( $side_header_width ) + intval( Avada()->settings->get( 'sidebar_break_point' ) ) ) . 'px)'; foreach ( $sidebar_order as $key => $element ) { $css[ $sidebar_break_point ][ '.has-sidebar #' . $element ]['order'] = $key + 1; if ( 0 < $key ) { $css[ $sidebar_break_point ][ '.has-sidebar #' . $element ]['margin-top'] = '50px'; } } /* @media only screen and ( max-width: $content_break_point ) */ $mq_max_sh_cbp = '@media only screen and (max-width: ' . ( intval( $side_header_width ) + intval( Avada()->settings->get( 'content_break_point' ) ) ) . 'px)'; $sliding_bar_position = Avada()->settings->get( 'slidingbar_position' ); if ( fusion_get_page_option( 'fallback', $c_page_id ) ) { $css[ $mq_max_sh_cbp ]['#sliders-container']['display'] = 'none'; $css[ $mq_max_sh_cbp ]['#fallback-slide']['display'] = 'block'; } // Mobile Logo. if ( Avada()->settings->get( 'mobile_logo', 'url' ) ) { $mq_max_shbp = '@media only screen and (max-width: ' . intval( Avada()->settings->get( 'side_header_break_point' ) ) . 'px)'; $css[ $mq_max_shbp ]['#side-header .fusion-mobile-logo-1 .fusion-standard-logo,.fusion-mobile-logo-1 .fusion-standard-logo']['display'] = 'none'; $css[ $mq_max_shbp ]['#side-header .fusion-mobile-logo,.fusion-mobile-logo']['display'] = 'inline-block'; } // Sliding bar position already set above for sliding bar desktop calcs. if ( Avada()->settings->get( 'slidingbar_widgets' ) && Avada()->settings->get( 'mobile_slidingbar_widgets' ) ) { // On mobile for left/right sliding bar the width should be 100vw - triangle toggle width. $sliding_bar_width = '100vw'; $sliding_bar_closed_position = '-' . $sliding_bar_width; $sliding_bar_toggle_width = '56px'; // 20px added for scroll bar. if ( 'menu' === Avada()->settings->get( 'slidingbar_toggle_style' ) ) { $sliding_bar_toggle_width = '0'; } if ( $sliding_bar_toggle_width ) { $sliding_bar_closed_position = 'calc(' . $sliding_bar_toggle_width . ' - ' . $sliding_bar_width . ')'; $sliding_bar_width = 'calc(' . $sliding_bar_width . ' - ' . $sliding_bar_toggle_width . ')'; } $css[ $mq_max_sh_cbp ]['.fusion-sliding-bar-position-left .fusion-sliding-bar,.fusion-sliding-bar-position-right .fusion-sliding-bar']['width'] = $sliding_bar_width; $css[ $mq_max_sh_cbp ]['.fusion-sliding-bar-position-left,.fusion-sliding-bar-position-right '][ $sliding_bar_position ] = $sliding_bar_closed_position; } } if ( is_single() && fusion_get_page_option( 'fimg[width]', $c_page_id ) ) { if ( 'auto' !== fusion_get_page_option( 'fimg[width]', $c_page_id ) ) { $css['global'][ '#post-' . $c_page_id . ' .fusion-post-slideshow' ]['max-width'] = fusion_get_page_option( 'fimg[width]', $c_page_id ); } else { $css['global']['.fusion-post-slideshow .flex-control-nav']['position'] = 'relative'; $css['global']['.fusion-post-slideshow .flex-control-nav']['text-align'] = 'center'; $css['global']['.fusion-post-slideshow .flex-control-nav']['margin-top'] = '10px'; $css['global'][ '#post-' . $c_page_id . ' .fusion-post-slideshow img' ]['width'] = Fusion_Sanitize::size( fusion_get_page_option( 'fimg[width]', $c_page_id ) ); } if ( false === strpos( fusion_get_page_option( 'fimg[width]', $c_page_id ), '%' ) ) { $css['global'][ '#post-' . $c_page_id . ' .fusion-post-slideshow img' ]['max-width'] = Fusion_Sanitize::size( fusion_get_page_option( 'fimg[width]', $c_page_id ) ); } } if ( is_single() && fusion_get_page_option( 'fimg[height]', $c_page_id ) ) { $css['global'][ '#post-' . $c_page_id . ' .fusion-post-slideshow img,#post-' . $c_page_id . ' .fusion-post-slideshow' ]['max-height'] = fusion_get_page_option( 'fimg[height]', $c_page_id ); $css['global'][ '#post-' . $c_page_id . ' .fusion-post-slideshow .slides' ]['max-height'] = '100%'; } if ( class_exists( 'WooCommerce' ) ) { $css['global']['.woocommerce-invalid:after']['content'] = "'" . wp_strip_all_tags( __( 'Please enter correct details for this required field.', 'Avada' ), true ) . "'"; } if ( is_page_template( 'contact.php' ) && Avada()->settings->get( 'gmap_address' ) && Avada()->settings->get( 'status_gmap' ) ) { $css['global']['.avada-google-map']['width'] = Fusion_Sanitize::size( Avada()->settings->get( 'gmap_dimensions', 'width' ) ); $css['global']['.avada-google-map']['margin'] = '0 auto'; $gmap_height = ( Avada()->settings->get( 'gmap_dimensions', 'height' ) ) ? Avada()->settings->get( 'gmap_dimensions', 'height' ) : '415px'; $css['global']['.avada-google-map']['height'] = Fusion_Sanitize::size( $gmap_height ); } elseif ( is_page_template( 'contact-2.php' ) && Avada()->settings->get( 'gmap_address' ) && Avada()->settings->get( 'status_gmap' ) ) { $css['global']['.avada-google-map']['margin'] = '0 auto'; $css['global']['.avada-google-map']['margin-top'] = '55px'; $css['global']['.avada-google-map']['height'] = '415px !important'; $css['global']['.avada-google-map']['width'] = '940px !important'; } /** * Hack to fix font-names using '+' instead of ' '. * This happens when using WPML coupled with the string-translation plugin. * FIxes #3309 */ if ( defined( 'WPML_PLUGIN_FILE' ) || defined( 'ICL_PLUGIN_FILE' ) || class_exists( 'SitePress' ) ) { foreach ( $css as $media_query => $elements ) { foreach ( $elements as $element => $properties ) { foreach ( $properties as $property => $value ) { if ( 'font-family' === $property ) { $css[ $media_query ][ $element ][ $property ] = str_replace( '+', ' ', $value ); } } } } } if ( Avada()->settings->get( 'link_decoration' ) ) { $exclusions = Avada()->settings->get( 'link_decoration_exclusion' ); $is_builder = ( function_exists( 'fusion_is_preview_frame' ) && fusion_is_preview_frame() ) || ( function_exists( 'fusion_is_builder_frame' ) && fusion_is_builder_frame() ); if ( ! ( $is_builder && 'awb_off_canvas' === get_post_type() && in_array( 'off_canvas', $exclusions, true ) ) ) { $base_selector = '.awb-link-decoration #wrapper a'; $end_selector = ':not(.awb-no-decoration,.fusion-builder-module-control,#fusion-edit-slider-options-action-button,#fusion-edit-slider-action-button):not([data-filter], .pagination *, .flex-next, .flex-prev, .awb-image-hotspots-hotspot, .fusion-social-network-icon, .awb-text-path a, .fb-icon-element, .avada-button-select, .fusion-countdown-link, .fusion-button-bar, .tag-cloud-link)'; $end_selector = Avada()->settings->get( 'image_rollover' ) ? $end_selector . ':not(.fusion-rollover-link, .fusion-rollover-gallery, .fusion-rollover-title-link)' : $end_selector; $end_selector = class_exists( 'Woocommerce' ) ? $end_selector . ':not([class^="star"], [role="tab"] *, .catalog-ordering *, .view-cart *, .woocommerce-side-nav *, .wc-forward, .remove, .fusion-post-card-cart-add-to-cart, .add_to_cart_button, .show_details_button, .product_type_external, .fusion-view-cart, .fusion-quick-view, .fusion-update-cart)' : $end_selector; $end_selector = class_exists( 'Tribe__Events__Main' ) ? $end_selector . ':not(.tribe-common-c-btn-icon, .tribe-common-c-btn-border-small, .tribe-events-c-view-selector__list-item-link, .tribe-events-c-nav__list-item *)' : $end_selector; $end_selector = in_array( 'breadcrumbs', $exclusions, true ) ? $end_selector . ':not(.fusion-breadcrumb-link)' : $end_selector; $end_selector = in_array( 'breadcrumbs', $exclusions, true ) && function_exists( 'yoast_breadcrumb' ) ? $end_selector . ':not(.awb-yoast-breadcrumbs *)' : $end_selector; $end_selector = in_array( 'breadcrumbs', $exclusions, true ) && function_exists( 'rank_math_get_breadcrumbs' ) ? $end_selector . ':not(.awb-rankmath-breadcrumbs *)' : $end_selector; $end_selector = in_array( 'buttons', $exclusions, true ) ? $end_selector . ':not(.fusion-button, .tribe-button)' : $end_selector; $end_selector = in_array( 'headings', $exclusions, true ) ? $end_selector . ':not(:where(h1 *, h2 *, h3 *, h4 *, h5 *, h6 *), .heading-link)' : $end_selector; $end_selector = in_array( 'menus', $exclusions, true ) ? $end_selector . ':not(.awb-menu__main-a, .awb-menu__sub-a, .awb-submenu__main-a, .awb-submenu__sub-a, .fusion-header *, .fusion-secondary-header *)' : $end_selector; $end_selector = in_array( 'tabstoggles', $exclusions, true ) ? $end_selector . ':not([role="tab"], [role="button"])' : $end_selector; $end_selector = in_array( 'tocs', $exclusions, true ) ? $end_selector . ':not(.awb-toc-el__item-anchor)' : $end_selector; $selectors[] = $base_selector . $end_selector; if ( ! in_array( 'off_canvas', $exclusions, true ) && class_exists( 'AWB_Off_Canvas' ) && false !== AWB_Off_Canvas::is_enabled() ) { $selectors[] = '.awb-link-decoration .awb-off-canvas-wrap a' . $end_selector; } foreach( $selectors as $selector ) { $css['global'][ $selector ]['text-decoration-line'] = 'var(--awb-link_decoration_line)'; $css['global'][ $selector ]['text-decoration-style'] = 'var(--awb-link_decoration_style)'; $css['global'][ $selector ]['text-decoration-thickness'] = 'var(--awb-link_decoration_thickness)'; $css['global'][ $selector ]['text-underline-offset'] = 'var(--awb-link_decoration_underline_offset)'; $css['global'][ $selector ]['transition-property'] = 'text-decoration,color,background-color,border-color'; $selector = $selector . ':hover,' . $selector . ':focus'; $css['global'][ $selector ]['text-decoration-line'] = 'var(--awb-link_decoration_line_hover)'; $css['global'][ $selector ]['text-decoration-style'] = 'var(--awb-link_decoration_style_hover)'; $css['global'][ $selector ]['text-decoration-thickness'] = 'var(--awb-link_decoration_thickness_hover)'; $css['global'][ $selector ]['text-underline-offset'] = 'var(--awb-link_decoration_underline_offset_hover)'; } } } $avada_dynamic_css_array_added = true; $css = array_replace_recursive( $css, $original_css ); return apply_filters( 'avada_dynamic_css_array', $css ); } add_filter( 'fusion_dynamic_css_array', 'avada_dynamic_css_array', 999 );
保存文件
位置:
home
/
londongranite
/
public_html
/
wp-content
/
themes
/
Avada
/
includes
批量上传
创建
创建
批量权限
批量删除
名称
权限
大小
修改时间
操作
↑ 返回上级
-
-
-
-
admin-screens
drwxr-xr-x
-
2026-08-17 03:50
权限
删除
重命名
avada-app
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
cli
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
importer
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
lib
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
ls-skins
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
metaboxes
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
options
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
plugins
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
typography
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
upgrade
drwxr-xr-x
-
2026-07-29 18:04
权限
删除
重命名
avada-functions.php
-rw-r--r--
74.83 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
avada-tgm.php
-rw-r--r--
7.43 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-admin-bar.php
-rw-r--r--
6.14 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-admin-notices.php
-rw-r--r--
3.17 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-admin.php
-rw-r--r--
71.98 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-autoload.php
-rw-r--r--
7.52 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-avadaredux-migration.php
-rw-r--r--
53.22 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-avadaredux-no-init.php
-rw-r--r--
1.26 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-block-editor.php
-rw-r--r--
20.85 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-blog.php
-rw-r--r--
6.99 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-eventscalendar.php
-rw-r--r--
21.25 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-fonts.php
-rw-r--r--
1.44 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-google-fonts.php
-rw-r--r--
16.76 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-googlemap.php
-rw-r--r--
16.82 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-gravity-forms-tags-merger.php
-rw-r--r--
8.66 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-head.php
-rw-r--r--
20.38 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-helper.php
-rw-r--r--
7.5 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-images.php
-rw-r--r--
12.12 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-init.php
-rw-r--r--
27.48 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-layout.php
-rw-r--r--
8.63 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-maintenance.php
-rw-r--r--
2.13 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-megamenu-framework.php
-rw-r--r--
53.15 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-megamenu.php
-rw-r--r--
7.65 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-migrate.php
-rw-r--r--
18.71 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-multiple-featured-images.php
-rw-r--r--
1.48 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-nav-walker-megamenu.php
-rw-r--r--
13.03 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-options.php
-rw-r--r--
5.68 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-output-callbacks.php
-rw-r--r--
1.48 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-page-options.php
-rw-r--r--
16.11 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-partial-refresh-callbacks.php
-rw-r--r--
5.91 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-portfolio.php
-rw-r--r--
1.79 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-privacy-embeds.php
-rw-r--r--
43.01 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-pwa.php
-rw-r--r--
10.1 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-scripts.php
-rw-r--r--
59.24 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-sermon-manager.php
-rw-r--r--
3.22 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-server-rules.php
-rw-r--r--
10.01 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-settings.php
-rw-r--r--
800 B
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-slider-revolution.php
-rw-r--r--
8.69 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-system-status.php
-rw-r--r--
13.13 KB
2026-07-29 18:05
编辑
下载
权限
删除
重命名
class-avada-taxonomy-meta.php
-rw-r--r--
39.95 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-template.php
-rw-r--r--
20.62 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-tgm-plugin-activation.php
-rw-r--r--
127.64 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-upgrade.php
-rw-r--r--
15.44 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-woocommerce-variations.php
-rw-r--r--
20.62 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada-woocommerce.php
-rw-r--r--
81.33 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-avada.php
-rw-r--r--
16.82 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-acf.php
-rw-r--r--
3.42 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-cloudflare-turnstile.php
-rw-r--r--
8.97 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-custom-auth-pages.php
-rw-r--r--
10.5 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-global-colors.php
-rw-r--r--
9.69 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-global-typography.php
-rw-r--r--
15.88 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-google-recaptcha.php
-rw-r--r--
12.68 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-maintenance-mode.php
-rw-r--r--
13.96 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-performance-wizard.php
-rw-r--r--
75.01 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-prebuilt-websites.php
-rw-r--r--
6.71 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-setup-wizard.php
-rw-r--r--
77.2 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-site-data.php
-rw-r--r--
19.5 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-awb-views-count.php
-rw-r--r--
21.15 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-builder-demos-theme-options.php
-rw-r--r--
3.19 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-builder-migrate.php
-rw-r--r--
100.2 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-builder-redux-options.php
-rw-r--r--
4.74 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-deprecate-pyre-po.php
-rw-r--r--
11.19 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-dynamic-css-from-options.php
-rw-r--r--
22.12 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-gfonts-downloader.php
-rw-r--r--
9.5 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
class-fusion-languages-updater-api.php
-rw-r--r--
6.38 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
custom-functions.php
-rw-r--r--
10.92 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
deprecated.php
-rw-r--r--
12.47 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
dynamic-css-helpers.php
-rw-r--r--
21.56 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
dynamic-css.php
-rw-r--r--
11.85 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
error_log
-rw-r--r--
15.76 KB
2026-08-17 06:52
编辑
下载
权限
删除
重命名
fusion-shared-options.php
-rw-r--r--
32.25 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名
wc-functions.php
-rw-r--r--
2.99 KB
2026-07-29 18:04
编辑
下载
权限
删除
重命名