| @@ -603,32 +603,31 @@ | ||
| 603 | 603 | */ |
| 604 | 604 | protected function get_inline_custom_css( $id, $settings ) { |
| 605 | 605 | $css = ''; |
| 606 | 606 | |
| 607 | - $arguments = array( '', $settings ); | |
| 608 | - if ( ! isset( $settings['customcss'] ) ) { | |
| 609 | - return $arguments; | |
| 610 | - } | |
| 611 | - | |
| 612 | 607 | $classes = array(); |
| 613 | 608 | $css = '<style type="text/css" name="visualizer-custom-css" id="customcss-' . $id . '">'; |
| 614 | - foreach ( $settings['customcss'] as $name => $element ) { | |
| 615 | - $attributes = array(); | |
| 616 | - foreach ( $element as $property => $value ) { | |
| 617 | - $attributes[] = $this->handle_css_property( $property, $value ); | |
| 609 | + if ( ! empty( $settings['customcss'] ) ) { | |
| 610 | + foreach ( $settings['customcss'] as $name => $element ) { | |
| 611 | + $attributes = array(); | |
| 612 | + foreach ( $element as $property => $value ) { | |
| 613 | + $attributes[] = $this->handle_css_property( $property, $value ); | |
| 614 | + } | |
| 615 | + $class_name = $id . $name; | |
| 616 | + $properties = implode( ' !important; ', array_filter( $attributes ) ); | |
| 617 | + if ( ! empty( $properties ) ) { | |
| 618 | + $css .= '.' . $class_name . ' {' . $properties . ' !important;}'; | |
| 619 | + $classes[ $name ] = $class_name; | |
| 620 | + } | |
| 618 | 621 | } |
| 619 | - $class_name = $id . $name; | |
| 620 | - $properties = implode( ' !important; ', array_filter( $attributes ) ); | |
| 621 | - if ( ! empty( $properties ) ) { | |
| 622 | - $css .= '.' . $class_name . ' {' . $properties . ' !important;}'; | |
| 623 | - $classes[ $name ] = $class_name; | |
| 624 | - } | |
| 622 | + $settings['cssClassNames'] = $classes; | |
| 625 | 623 | } |
| 626 | - $css .= '</style>'; | |
| 627 | 624 | |
| 628 | - $settings['cssClassNames'] = $classes; | |
| 625 | + $img_path = VISUALIZER_ABSURL . 'images'; | |
| 626 | + $css .= ".locker,.locker-loader{position:absolute;top:0;left:0;width:100%;height:100%}.locker{z-index:1000;opacity:.8;background-color:#fff;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}.locker-loader{z-index:1001;background:url($img_path/ajax-loader.gif) no-repeat center center}.dt-button{display:none!important}.visualizer-front-container.visualizer-lazy-render{content-visibility: auto;}"; | |
| 627 | + $css .= '</style>'; | |
| 629 | 628 | |
| 630 | - $arguments = array( $css, $settings ); | |
| 629 | + $arguments = array( $css, $settings ); | |
| 631 | 630 | apply_filters_ref_array( 'visualizer_inline_css', array( &$arguments ) ); |
| 632 | 631 | |
| 633 | 632 | return $arguments; |
| 634 | 633 | } |