File "terms-policy.php"

Full Path: /home/flipjqml/onlinebetsolution.com/wp-content/plugins/cyarb-toolkit/widgets/terms-policy.php
File size: 3.51 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/**
 * Information Area Widget
 */

namespace Elementor;

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

class Cyarb_Information_Area extends Widget_Base {

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

	public function get_title() {
        return esc_html__( 'Information Area', 'cyarb-toolkit' );
    }

	public function get_icon() {
        return 'eicon-info-circle-o';
    }

	public function get_categories() {
        return [ 'cyarb-elements' ];
    }

	protected function register_controls() {

        $this->start_controls_section(
			'Cyarb_Information_Area',
			[
				'label' => esc_html__( 'Cyarb Information Area', 'cyarb-toolkit' ),
				'tab' => Controls_Manager::TAB_CONTENT,
			]
        );

            $this->add_control(
                'privacy_content',
                [
                    'label'=>__('Add Description', 'cyarb-toolkit'),
                    'type'=>Controls_Manager:: WYSIWYG,
                    'description' => __('This text editor for p, ul','cyarb-toolkit'),
                ]
            );

        $this->end_controls_section();

        $this->start_controls_section(
			'section_style',
			[
				'label' => esc_html__( 'Style', 'cyarb-toolkit' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
        );
        
            $this->add_control(
                'title_color',
                [
                    'label' => esc_html__( 'Title Color', 'cyarb-toolkit' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} .privacy-policy-content h4, .terms-conditions-content h4' => 'color: {{VALUE}}',
                    ],
                ]
            );

            $this->add_group_control(
                Group_Control_Typography::get_type(),
                [
                    'name' => 'title_typography',
                    'label' => __( 'Title Typography', 'cyarb-toolkit' ),
                    'selector' => '{{WRAPPER}} .privacy-policy-content h4, .terms-conditions-content h4',
                ]
            );

            $this->add_control(
                'content_color',
                [
                    'label' => esc_html__( 'Content Color', 'cyarb-toolkit' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} p, .privacy-policy-content ul li, .privacy-policy-content ol li, .terms-conditions-content ul li, .terms-conditions-content ol li' => 'color: {{VALUE}}',
                    ],
                ]
            );
            
            $this->add_group_control(
                Group_Control_Typography::get_type(),
                [
                    'name' => 'content_typography',
                    'label' => __( 'Content Typography', 'cyarb-toolkit' ),
                    'selector' => '{{WRAPPER}} p, .privacy-policy-content ul li, .privacy-policy-content ol li, .terms-conditions-content ul li, .terms-conditions-content ol li',
                ]

            );
            
        $this->end_controls_section();
    }

	protected function render() {

        $settings = $this->get_settings_for_display();

        ?>
        <div class="container">
            <?php echo wp_kses_post( $settings['privacy_content'] ); ?>
        </div>
        <?php
	}

}

Plugin::instance()->widgets_manager->register_widget_type( new Cyarb_Information_Area );