Файловый менеджер - Редактировать - /home/digitalm/invisalign/wp-content/themes/healthy-smiles/kits/traits/var-group-controls/background.php
Назад
<?php namespace HealthySmilesSpace\Kits\Traits\VarGroupControls; use HealthySmilesSpace\Core\Utils\Utils; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Background trait. * * Allows to use a group control background with css vars. * * @since 1.0.0 */ trait Background { /** * Add background group control with css vars. * * @since 1.0.0 * * @param string $key Control key. * @param array $args Control arguments. */ protected function var_group_control_background( $key = '', $args = array() ) { $devices = Utils::get_devices(); list( $name, $prefix ) = $this->get_control_parameters( $key, 'background', 'bg' ); $default_args = array( 'name' => $name, 'types' => array( 'classic', 'gradient', ), 'fields_options' => array( 'background' => array( 'frontend_available' => true, ), 'color' => array( 'dynamic' => array(), 'selectors' => array( ':root' => "--{$prefix}-color: {{VALUE}};", ), ), 'color_b' => array( 'dynamic' => array(), 'default' => '', ), 'gradient_angle' => array( 'selectors' => array( ':root' => "--{$prefix}-color: transparent;" . "--{$prefix}-image: linear-gradient({{SIZE}}{{UNIT}}, {{color.VALUE}} {{color_stop.SIZE}}{{color_stop.UNIT}}, {{color_b.VALUE}} {{color_b_stop.SIZE}}{{color_b_stop.UNIT}});", ), ), 'gradient_position' => array( 'selectors' => array( ':root' => "--{$prefix}-color: transparent;" . "--{$prefix}-image: radial-gradient(at {{VALUE}}, {{color.VALUE}} {{color_stop.SIZE}}{{color_stop.UNIT}}, {{color_b.VALUE}} {{color_b_stop.SIZE}}{{color_b_stop.UNIT}});", ), ), 'image' => array( 'selectors' => array( ':root' => "--{$prefix}-image: url(\"{{URL}}\");", ), ), 'position' => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{VALUE}};", ), ), 'xpos' => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{SIZE}}{{UNIT}} {{ypos.SIZE}}{{ypos.UNIT}};", ), 'device_args' => array( $devices['tablet'] => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{SIZE}}{{UNIT}} {{ypos_tablet.SIZE}}{{ypos_tablet.UNIT}};", ), ), $devices['mobile'] => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{SIZE}}{{UNIT}} {{ypos_mobile.SIZE}}{{ypos_mobile.UNIT}};", ), ), ), ), 'ypos' => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{xpos.SIZE}}{{xpos.UNIT}} {{SIZE}}{{UNIT}};", ), 'device_args' => array( $devices['tablet'] => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{xpos_tablet.SIZE}}{{xpos_tablet.UNIT}} {{SIZE}}{{UNIT}};", ), ), $devices['mobile'] => array( 'selectors' => array( ':root' => "--{$prefix}-position: {{xpos_mobile.SIZE}}{{xpos_mobile.UNIT}} {{SIZE}}{{UNIT}};", ), ), ), ), 'attachment' => array( 'selectors' => array( ':root' => "--{$prefix}-attachment: {{VALUE}};", ), ), 'repeat' => array( 'selectors' => array( ':root' => "--{$prefix}-repeat: {{VALUE}};", ), ), 'size' => array( 'selectors' => array( ':root' => "--{$prefix}-size: {{VALUE}};", ), ), 'bg_width' => array( 'selectors' => array( ':root' => "--{$prefix}-size: {{SIZE}}{{UNIT}} auto;", ), 'device_args' => array( $devices['tablet'] => array( 'selectors' => array( ':root' => "--{$prefix}-size: {{SIZE}}{{UNIT}} auto;", ), ), $devices['mobile'] => array( 'selectors' => array( ':root' => "--{$prefix}-size: {{SIZE}}{{UNIT}} auto;", ), ), ), ), ), ); $this->add_group_control( Group_Control_Background::get_type(), array_replace_recursive( $default_args, $args ) ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.04 |
proxy
|
phpinfo
|
Настройка