| 1 |
<?php |
| 2 |
namespace Elementor\Core\Kits\Documents\Tabs; |
| 3 |
|
| 4 |
use Elementor\Controls_Manager; |
| 5 |
use Elementor\Group_Control_Background; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly |
| 9 |
} |
| 10 |
|
| 11 |
class Settings_Background extends Tab_Base { |
| 12 |
|
| 13 |
public function get_id() { |
| 14 |
return 'settings-background'; |
| 15 |
} |
| 16 |
|
| 17 |
public function get_title() { |
| 18 |
return esc_html__( 'Background', 'elementor' ); |
| 19 |
} |
| 20 |
|
| 21 |
public function get_group() { |
| 22 |
return 'settings'; |
| 23 |
} |
| 24 |
|
| 25 |
public function get_icon() { |
| 26 |
return 'eicon-background'; |
| 27 |
} |
| 28 |
|
| 29 |
public function get_help_url() { |
| 30 |
return 'https://go.elementor.com/global-background/'; |
| 31 |
} |
| 32 |
|
| 33 |
protected function register_tab_controls() { |
| 34 |
$this->start_controls_section( |
| 35 |
'section_background', |
| 36 |
[ |
| 37 |
'label' => $this->get_title(), |
| 38 |
'tab' => $this->get_id(), |
| 39 |
] |
| 40 |
); |
| 41 |
|
| 42 |
$this->add_group_control( |
| 43 |
Group_Control_Background::get_type(), |
| 44 |
[ |
| 45 |
'name' => 'body_background', |
| 46 |
'types' => [ 'classic', 'gradient' ], |
| 47 |
'selector' => '{{WRAPPER}}', |
| 48 |
'fields_options' => [ |
| 49 |
'background' => [ |
| 50 |
'frontend_available' => true, |
| 51 |
], |
| 52 |
'color' => [ |
| 53 |
'dynamic' => [], |
| 54 |
], |
| 55 |
'color_b' => [ |
| 56 |
'dynamic' => [], |
| 57 |
], |
| 58 |
], |
| 59 |
] |
| 60 |
); |
| 61 |
|
| 62 |
$this->add_control( |
| 63 |
'mobile_browser_background', |
| 64 |
[ |
| 65 |
'label' => esc_html__( 'Mobile Browser Background', 'elementor' ), |
| 66 |
'type' => Controls_Manager::COLOR, |
| 67 |
'description' => esc_html__( 'The `theme-color` meta tag will only be available in supported browsers and devices.', 'elementor' ), |
| 68 |
'separator' => 'before', |
| 69 |
] |
| 70 |
); |
| 71 |
|
| 72 |
$this->end_controls_section(); |
| 73 |
} |
| 74 |
} |
| 75 |
|