AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.135.215.71   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/themes/sammy/elementor/widgets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/themes/sammy/elementor/widgets/contact-info-2.php
<?php

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Typography;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Podover_Elementor_Contact_Info_2 extends Widget_Base {

	public function get_name() {
		return 'podover_elementor_contact_info_2';
	}

	public function get_title() {
		return esc_html__( 'Contact Info 2', 'podover' );
	}

	public function get_icon() {
		return 'eicon-email-field';
	}

	public function get_categories() {
		return [ 'podover' ];
	}

	public function get_script_depends() {
		return [ '' ];
	}

	protected function register_controls() {

		/**
		 * Content Tab
		 */
		$this->start_controls_section(
			'section_content',
			[
				'label' => esc_html__( 'Content', 'podover' ),
				
			]
		);

			$this->add_control(
				'icon',
				[
					'label' => esc_html__( 'Class Icon', 'podover' ),
					'type' => \Elementor\Controls_Manager::ICONS,
					'default' 	=> [
						'value' 	=> 'flaticon flaticon-email',
						'library' 	=> 'all',
					],
				]
			);

			$this->add_control(
				'label',
				[
					'label' => esc_html__( 'Label', 'podover' ),
					'type' => \Elementor\Controls_Manager::TEXT,
					'default' => esc_html__('', 'podover'),
				]
			);



			$repeater = new \Elementor\Repeater();

				$repeater->add_control(
					'type',
					[
						'label' => esc_html__( 'Type', 'podover' ),
						'type' => Controls_Manager::SELECT,
						'default' => 'email',
						'options' => [
							'email' => esc_html__('Email', 'podover'),
							'phone' => esc_html__('Phone', 'podover'),
							'link' => esc_html__('Link', 'podover'),
							'text' => esc_html__('Text', 'podover'),
						]
					]
				);

				$repeater->add_control(
					'email_label',
					[
						'label'   => esc_html__( 'Email Label', 'podover' ),
						'type'    => \Elementor\Controls_Manager::TEXT,
						'description' => esc_html__( '[email protected]', 'podover' ),
						'condition' => [
							'type' => 'email',
						]

					]
				);

				$repeater->add_control(
					'email_address',
					[
						'label'   => esc_html__( 'Email Adress', 'podover' ),
						'type'    => \Elementor\Controls_Manager::TEXT,
						'description' => esc_html__( '[email protected]', 'podover' ),
						'condition' => [
							'type' => 'email',
						]

					]
				);


				$repeater->add_control(
					'phone_label',
					[
						'label'   => esc_html__( 'Phone Label', 'podover' ),
						'type'    => \Elementor\Controls_Manager::TEXT,
						'description' => esc_html__( '+012 (345) 678', 'podover' ),
						'condition' => [
							'type' => 'phone',
						]

					]
				);

				$repeater->add_control(
					'phone_address',
					[
						'label'   => esc_html__( 'Phone Adress', 'podover' ),
						'type'    => \Elementor\Controls_Manager::TEXT,
						'description' => esc_html__( '+012345678', 'podover' ),
						'condition' => [
							'type' => 'phone',
						]

					]
				);

				$repeater->add_control(
					'link_label',
					[
						'label'   => esc_html__( 'Link Label', 'podover' ),
						'type'    => \Elementor\Controls_Manager::TEXT,
						'description' => esc_html__( 'https://your-domain.com', 'podover' ),
						'condition' => [
							'type' => 'link',
						]

					]
				);

				$repeater->add_control(
					'link_address',
					[
						'label'   => esc_html__( 'Link Adress', 'podover' ),
						'type'    => \Elementor\Controls_Manager::URL,
						'description' => esc_html__( 'https://your-domain.com', 'podover' ),
						'condition' => [
							'type' => 'link',
						],
						'show_external' => false,
						'default' => [
							'url' => '#',
							'is_external' => false,
							'nofollow' => false,
						],

					]
				);

				$repeater->add_control(
					'text',
					[
						'label'   => esc_html__( 'Text', 'podover' ),
						'type'    => \Elementor\Controls_Manager::TEXT,
						'description' => esc_html__( 'Your text', 'podover' ),
						'condition' => [
							'type' => 'text',
						]

					]
				);

				$this->add_control(
					'items_info',
					[
						'label'       => esc_html__( 'Items Info', 'podover' ),
						'type'        => Controls_Manager::REPEATER,
						'fields'      => $repeater->get_controls(),
						'default' => [
							[
								'type' => 'email',
								'email_label' => esc_html__('[email protected]', 'podover'),
								'email_address' => esc_html__('[email protected]', 'podover'),
							],
							
						],
						'title_field' => '{{{ type }}}',
					]
				);

				$this->add_responsive_control(
				'align',
				[
					'label' => esc_html__( 'Alignment', 'podover' ),
					'type' => Controls_Manager::CHOOSE,
					'options' => [
						'left' => [
							'title' => esc_html__( 'Left', 'podover' ),
							'icon' => 'eicon-text-align-left',
						],
						'center' => [
							'title' => esc_html__( 'Center', 'podover' ),
							'icon' => 'eicon-text-align-center',
						],
						'right' => [
							'title' => esc_html__( 'Right', 'podover' ),
							'icon' => 'eicon-text-align-right',
						],
					],
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2' => 'text-align: {{VALUE}};',
					],
					'default'	=> 'center',
					'separator' => 'before'
				]
			);

			$this->add_control(
			'show_line_left',
				[
					'label' => esc_html__( 'Show Line left', 'podover' ),
					'type' => \Elementor\Controls_Manager::SWITCHER,
					'label_on' => esc_html__( 'Show', 'podover' ),
					'label_off' => esc_html__( 'Hide', 'podover' ),
					'return_value' => 'yes',
					'default' => 'no',
				]
			);

			$this->add_control(
			'show_line_right',
				[
					'label' => esc_html__( 'Show Line right', 'podover' ),
					'type' => \Elementor\Controls_Manager::SWITCHER,
					'label_on' => esc_html__( 'Show', 'podover' ),
					'label_off' => esc_html__( 'Hide', 'podover' ),
					'return_value' => 'yes',
					'default' => 'no',
				]
			);

			

		$this->end_controls_section(); 
		// End Content Tab



		/**
		 * Icon Style Tab
		 */
		$this->start_controls_section(
			'section_icon_style',
			[
				'label' => esc_html__( 'Icon', 'podover' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

			$this->add_control(
				'icon_fontsize',
				[
					'label' => esc_html__( 'Font Size', 'podover' ),
					'type' => Controls_Manager::SLIDER,
					'size_units' => [ 'px' ],
					'range' => [
						'px' => [
							'min' => 1,
							'max' => 300,
							'step' => 1,
						]
					],
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .icon' => 'font-size: {{SIZE}}{{UNIT}};',
					],
				]
			);

			$this->add_control(
				'icon_color',
				[
					'label' => esc_html__( 'Color', 'podover' ),
					'type' => Controls_Manager::COLOR,
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .icon' => 'color : {{VALUE}};',
					],
				]
			);

			$this->add_responsive_control(
				'icon_margin',
				[
					'label' => esc_html__( 'Margin', 'podover' ),
					'type' => Controls_Manager::DIMENSIONS,
					'size_units' => [ 'px', 'em', '%' ],
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					],
				]
			);

			$this->add_control(
			'icon_width',
			[
				'label' 		=> esc_html__( 'Width', 'podover' ),
				'type' 			=> Controls_Manager::SLIDER,
				'size_units' 	=> [ 'px' ],
				'range' => [
					'px' => [
						'min' 	=> 1,
						'max' 	=> 300,
						'step' 	=> 1,
					]
				],
				'selectors' 	=> [
					'{{WRAPPER}} .ova-contact-info-2 .icon' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',

				],
			]
			);

			$this->add_group_control(
					\Elementor\Group_Control_Border::get_type(),
					[
						'name' 		=> 'border_icon',
						'label' 	=> esc_html__( 'Border', 'podover' ),
						'selector' 	=> '{{WRAPPER}}  .ova-contact-info-2 .icon ',
					]
				);

			$this->add_responsive_control(
				'border_radius_contact_info_2',
				array(
					'label'      => esc_html__( 'Border Radius', 'podover' ),
					'type'       => Controls_Manager::DIMENSIONS,
					'size_units' => array( 'px', '%' ),
					'selectors'  => array(
						'{{WRAPPER}} .ova-contact-info-2 .icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					),
				)
			);


		$this->end_controls_section(); // End Icon Style Tab

		/**
		 * Label Style Tab
		 */
		$this->start_controls_section(
			'section_label_style',
			[
				'label' => esc_html__( 'Label', 'podover' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

			
			$this->add_control(
				'label_color',
				[
					'label' => esc_html__( 'Color', 'podover' ),
					'type' => Controls_Manager::COLOR,
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .contact .label' => 'color : {{VALUE}};',
					],
				]
			);

			$this->add_group_control(
				Group_Control_Typography::get_type(),
				[
					'name' => 'label_typography',
					'selector' => '{{WRAPPER}} .ova-contact-info-2 .contact .label',
				]
			);

			$this->add_responsive_control(
				'label_margin',
				[
					'label' => esc_html__( 'Margin', 'podover' ),
					'type' => Controls_Manager::DIMENSIONS,
					'size_units' => [ 'px', 'em', '%' ],
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .contact .label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					],
				]
			);

		$this->end_controls_section(); // End Label Style Tab


		/**
		 * Info Style Tab
		 */
		$this->start_controls_section(
			'section_info_style',
			[
				'label' => esc_html__( 'Info', 'podover' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

			

			$this->add_control(
				'info_color',
				[
					'label' => esc_html__( 'Color', 'podover' ),
					'type' => Controls_Manager::COLOR,
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .contact .info .item' => 'color : {{VALUE}};',
						'{{WRAPPER}} .ova-contact-info-2 .contact .info .item a' => 'color : {{VALUE}};',
					],
				]
			);

			$this->add_control(
				'info_color_hover',
				[
					'label' => esc_html__( 'Link Color hover', 'podover' ),
					'type' => Controls_Manager::COLOR,
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .contact .info .item a:hover' => 'color : {{VALUE}};',
					],
				]
			);

			$this->add_group_control(
				Group_Control_Typography::get_type(),
				[
					'name' => 'info_typography',
					'selector' => '{{WRAPPER}} .ova-contact-info-2 .contact .info .item, {{WRAPPER}} .ova-contact-info-2 .contact .info .item a',
				]
			);

			$this->add_responsive_control(
				'info_margin',
				[
					'label' => esc_html__( 'Margin', 'podover' ),
					'type' => Controls_Manager::DIMENSIONS,
					'size_units' => [ 'px', 'em', '%' ],
					'selectors' => [
						'{{WRAPPER}} .ova-contact-info-2 .contact .info .item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					],
				]
			);

		$this->end_controls_section(); // End Label Style Tab

		/**
		 * Info Style Line
		 */
		$this->start_controls_section(
			'section_style_line',
			[
				'label' => esc_html__( 'Line', 'podover' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

			$this->start_controls_tabs(
				'style_tabs'
			);

				$this->start_controls_tab(
					'style_left_tab',
					[
						'label' => esc_html__( 'Left', 'podover' ),
					]
				);

					$this->add_responsive_control(
						'line_width_before',
						[
							'label' 		=> esc_html__( 'Width', 'podover' ),
							'type' 			=> Controls_Manager::SLIDER,
							'size_units' 	=> [ 'px' ],
							'range' => [
								'px' => [
									'min' 	=> 1,
									'max' 	=> 300,
									'step' 	=> 1,
								]
							],
							'selectors' 	=> [
								'{{WRAPPER}} .ova-contact-info-2::before' => 'width: {{SIZE}}{{UNIT}};content: "";',

							],
							'condition' => [
								'show_line_left' => 'yes',
							],

						]
					);

					$this->add_responsive_control(
						'line_height_before',
						[
							'label' 		=> esc_html__( 'Height', 'podover' ),
							'type' 			=> Controls_Manager::SLIDER,
							'size_units' 	=> [ 'px','%' ],
							'range' => [
								'px' => [
									'min' 	=> 1,
									'max' 	=> 300,
									'step' 	=> 1,
								]
							],
							'selectors' 	=> [
								'{{WRAPPER}} .ova-contact-info-2::before' => 'height: {{SIZE}}{{UNIT}}',

							],
							'condition' => [
								'show_line_left' => 'yes',
							],
						]
					);

				$this->end_controls_tab();

				$this->start_controls_tab(
					'style_right_tab',
					[
						'label' => esc_html__( 'Right', 'podover' ),
					]
				);

			

				$this->add_responsive_control(
					'line_width_after',
					[
						'label' 		=> esc_html__( 'Width', 'podover' ),
						'type' 			=> Controls_Manager::SLIDER,
						'size_units' 	=> [ 'px' ],
						'range' => [
							'px' => [
								'min' 	=> 1,
								'max' 	=> 300,
								'step' 	=> 1,
							]
						],
						'selectors' 	=> [
							'{{WRAPPER}} .ova-contact-info-2::after' => 'width: {{SIZE}}{{UNIT}};content: "";',

						],
						'condition' => [
							'show_line_right' => 'yes',
						],

					]
				);

				$this->add_responsive_control(
					'line_height_after',
					[
						'label' 		=> esc_html__( 'Height', 'podover' ),
						'type' 			=> Controls_Manager::SLIDER,
						'size_units' 	=> [ 'px','%' ],
						'range' => [
							'px' => [
								'min' 	=> 1,
								'max' 	=> 300,
								'step' 	=> 1,
							]
						],
						'selectors' 	=> [
							'{{WRAPPER}} .ova-contact-info-2::after' => 'height: {{SIZE}}{{UNIT}}',

						],
						'condition' => [
							'show_line_right' => 'yes',
						],
					]
				);
				$this->end_controls_tab();
			$this->end_controls_tabs();


		$this->end_controls_section(); // End Line Style Tab

	}

	protected function render() {

		$settings = $this->get_settings();

		$icon 		= $settings['icon']		? $settings['icon'] 	: '';
		$label 		= $settings['label'] 	? $settings['label'] 	: '';
		$items_info = $settings['items_info'];
		
		?>
			<div class="ova-contact-info-2">
				
				<?php if( $icon['value'] ){ ?>
					<div class="icon">
						<?php \Elementor\Icons_Manager::render_icon( $icon, [ 'aria-hidden' => 'true' ] ); ?>
					</div>	
				<?php } ?>
				

				<div class="contact">
					
					<?php if( $label ){ ?>
						<div class="label">
							<?php echo esc_html( $label ); ?>
						</div>
					<?php } ?>

					<ul class="info">
						<?php foreach( $items_info as $item ):

							$type 	= $item['type'];
							
							?>

								<li class="item">

									<?php switch ( $type ) {

										case 'email':

											$email_address = $item['email_address'];
											$email_label = $item['email_label'];
											if( $email_address && $email_label ){
											?>
												<a href="mailto:<?php echo esc_attr( $email_address ) ?> ">
													<?php echo esc_html( $email_label ); ?>
												</a>
											<?php
											}
											break;

										case 'phone':

											$phone_address = $item['phone_address'];
											$phone_label = $item['phone_label'];
											if( $phone_address && $phone_label ){
											?>
												<a href="tel:<?php echo esc_attr( $phone_address ) ?> ">
													<?php echo esc_html( $phone_label ); ?>
												</a>
											<?php
											}
											break;

										case 'link':

											$this->add_render_attribute( 'title' );

											$link_address = $item['link_address']['url'];
											$link_label = $item['link_label'];

											$title = $item['link_label'] ? $item['link_label'] : '';

											if ( ! empty( $item['link_address']['url'] ) ) {

												$this->add_link_attributes( 'url', $item['link_address'] );

												echo sprintf( '<a %1$s>%2$s</a>', $this->get_render_attribute_string( 'url' ), $title );

											}else{

												echo esc_html( $title );

											}
											
											break;

										case 'text':
											$text = $item['text'];
											?>
												<?php echo esc_html( $text ); ?>
											<?php
											break;
										default:
											break;
									} ?>
								</li>
							
						<?php endforeach; ?>
					</ul>

				</div>

			</div>

		<?php
	}
// end render
}


$widgets_manager->register( new Podover_Elementor_Contact_Info_2() );


Anon7 - 2022
AnonSec Team