/
home
/
techb158
/
public_html
/
wp-content
/
themes
/
engitech
/
inc
/
backend
/
elementor-widgets
/
/home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets
mkdir
upload
Name
Size
Mode
Actions
header/
-
0777
rm
accordions.php
9892
0666
edit
dl
rm
button.php
8489
0666
edit
dl
rm
contact-form7.php
8729
0666
edit
dl
rm
contact-info.php
9163
0666
edit
dl
rm
countdown.php
7877
0666
edit
dl
rm
counter-2.php
9834
0666
edit
dl
rm
counter-3.php
7603
0666
edit
dl
rm
counter.php
7504
0666
edit
dl
rm
domain-checker.php
7504
0666
edit
dl
rm
domain-list.php
10105
0666
edit
dl
rm
flip-box.php
8752
0666
edit
dl
rm
heading.php
6623
0666
edit
dl
rm
icon-box-1.php
10038
0666
edit
dl
rm
icon-box-2.php
13998
0666
edit
dl
rm
icon-box-3.php
12324
0666
edit
dl
rm
image-box.php
4265
0666
edit
dl
rm
image-carousel.php
9825
0666
edit
dl
rm
industries-carousel.php
12905
0666
edit
dl
rm
message-box.php
8221
0666
edit
dl
rm
number-box.php
11844
0666
edit
dl
rm
portfolio-carousel.php
15209
0666
edit
dl
rm
portfolio-filter.php
16064
0666
edit
dl
rm
post-carousel.php
12004
0666
edit
dl
rm
post-grid.php
10268
0666
edit
dl
rm
pricing-table-2.php
15246
0666
edit
dl
rm
pricing-table-3.php
14353
0666
edit
dl
rm
pricing-table.php
17700
0666
edit
dl
rm
progress-bars.php
8535
0666
edit
dl
rm
service-box-1.php
11643
0666
edit
dl
rm
service-box-2.php
13750
0666
edit
dl
rm
social-share.php
10712
0666
edit
dl
rm
support-box.php
11836
0666
edit
dl
rm
switcher.php
5182
0666
edit
dl
rm
tab-titles-2.php
5390
0666
edit
dl
rm
tab-titles.php
8635
0666
edit
dl
rm
tabs.php
7505
0666
edit
dl
rm
team.php
12265
0666
edit
dl
rm
tech-box.php
10130
0666
edit
dl
rm
testimonial-carousel-2.php
15712
0666
edit
dl
rm
testimonial-carousel-3.php
10548
0666
edit
dl
rm
testimonial-carousel.php
14241
0666
edit
dl
rm
video-button.php
7987
0666
edit
dl
rm
widgets.php
3988
0666
edit
dl
rm
Edit:
/home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets/icon-box-1.php
(10038B)
<?php namespace Elementor; // Custom widgets must be defined in the Elementor namespace if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly (security measure) /** * Widget Name: Icon Box 1 */ class Engitech_IconBox extends Widget_Base{ // The get_name() method is a simple one, you just need to return a widget name that will be used in the code. public function get_name() { return 'iiconbox1'; } // The get_title() method, which again, is a very simple one, you need to return the widget title that will be displayed as the widget label. public function get_title() { return __( 'Engitech Icon Box 1', 'engitech' ); } // The get_icon() method, is an optional but recommended method, it lets you set the widget icon. you can use any of the eicon or font-awesome icons, simply return the class name as a string. public function get_icon() { return 'eicon-icon-box'; } // The get_categories method, lets you set the category of the widget, return the category name as a string. public function get_categories() { return [ 'category_engitech' ]; } protected function _register_controls() { //Content Service box $this->start_controls_section( 'content_section', [ 'label' => __( 'Icon Box', 'engitech' ), ] ); $this->add_responsive_control( 'align', [ 'label' => __( 'Alignment', 'engitech' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'engitech' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'engitech' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'engitech' ), 'icon' => 'fa fa-align-right', ] ], // 'prefix_class' => 'engitech%s-align-', 'selectors' => [ '{{WRAPPER}}' => 'text-align: {{VALUE}};', ], ] ); $this->add_control( 'icon_type', [ 'label' => __( 'Icon Type', 'engitech' ), 'type' => Controls_Manager::SELECT, 'default' => 'font', 'options' => [ 'font' => __( 'Font Icon', 'engitech' ), 'image' => __( 'Image Icon', 'engitech' ), 'class' => __( 'Custom Icon', 'engitech' ), ] ] ); $this->add_control( 'icon_font', [ 'label' => __( 'Icon', 'engitech' ), 'type' => Controls_Manager::ICONS, 'label_block' => true, 'fa4compatibility' => 'icon', 'default' => [ 'value' => 'fas fa-star', 'library' => 'fa-solid', ], 'condition' => [ 'icon_type' => 'font', ] ] ); $this->add_control( 'icon_image', [ 'label' => esc_html__( 'Photo', 'engitech' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => get_template_directory_uri().'/images/analysis.png', ], 'condition' => [ 'icon_type' => 'image', ] ] ); $this->add_control( 'icon_class', [ 'label' => __( 'Custom Class', 'engitech' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'flaticon-report', 'engitech' ), 'condition' => [ 'icon_type' => 'class', ] ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'engitech' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Content Marketing', 'engitech' ), 'label_block' => true, ] ); $this->add_control( 'des', [ 'label' => 'Description', 'type' => Controls_Manager::TEXTAREA, 'default' => __( 'You can provide the answers that your potential customers are trying to find, so you can become the industry.', 'engitech' ), ] ); $this->add_control( 'link', [ 'label' => __( 'Link', 'engitech' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'engitech' ), ] ); $this->end_controls_section(); //Style $this->start_controls_section( 'style_icon_section', [ 'label' => __( 'Icon', 'engitech' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'icon_size', [ 'label' => __( 'Size', 'engitech' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, ], ], 'default' => [ 'unit' => 'px', 'size' => 50, ], 'selectors' => [ '{{WRAPPER}} .icon-main i, {{WRAPPER}} .icon-main span:before' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .icon-main img, {{WRAPPER}} .icon-main svg' => 'width: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'icon_space', [ 'label' => __( 'Spacing', 'engitech' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .icon-main' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'icon_color', [ 'label' => __( 'Color', 'engitech' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .icon-main i, {{WRAPPER}} .icon-main span' => 'color: {{VALUE}};', '{{WRAPPER}} .icon-main svg' => 'fill: {{VALUE}};', ], 'condition' => [ 'icon_type' => ['font','class'] ] ] ); $this->end_controls_section(); $this->start_controls_section( 'style_content_section', [ 'label' => __( 'Content', 'engitech' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); //Title $this->add_control( 'heading_title', [ 'label' => __( 'Title', 'engitech' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'title_space', [ 'label' => __( 'Spacing', 'engitech' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .icon-box-s1 h5' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'title_color', [ 'label' => __( 'Color', 'engitech' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .icon-box-s1 h5' => 'color: {{VALUE}};', ] ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .icon-box-s1 h5', ] ); //Line $this->add_control( 'heading_line', [ 'label' => __( 'Line', 'engitech' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'line_space', [ 'label' => __( 'Spacing', 'engitech' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .icon-box-s1 .line-box' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'line_color', [ 'label' => __( 'Color', 'engitech' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .icon-box-s1 .line-box' => 'background: {{VALUE}};', ] ] ); $this->add_control( 'line_hover_color', [ 'label' => __( 'Hover Color', 'engitech' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .icon-box-s1 .line-box:after' => 'background: {{VALUE}};', ] ] ); //Description $this->add_control( 'heading_des', [ 'label' => __( 'Description', 'engitech' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'des_color', [ 'label' => __( 'Color', 'engitech' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .icon-box-s1 p' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'des_typography', 'selector' => '{{WRAPPER}} .icon-box-s1 p', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $title = $settings['title']; if ( ! empty( $settings['link']['url'] ) ) { $this->add_render_attribute( 'iconbox', 'href', $settings['link']['url'] ); if ( $settings['link']['is_external'] ) { $this->add_render_attribute( 'iconbox', 'target', '_blank' ); } if ( $settings['link']['nofollow'] ) { $this->add_render_attribute( 'iconbox', 'rel', 'nofollow' ); } if( !$settings['btn_text'] ) { $title = '<a '. $this->get_render_attribute_string( 'iconbox' ).'>'. $settings['title'] . '</a>'; }else{ $title = $settings['title']; } } ?> <div class="icon-box-s1"> <div class="icon-main"> <?php if( $settings['icon_type'] == 'font' ) { Icons_Manager::render_icon( $settings['icon_font'], [ 'aria-hidden' => 'true' ] ); } ?> <?php if( $settings['icon_type'] == 'image' ) { ?><img src="<?php echo esc_attr( $settings['icon_image']['url'] ); ?>" alt="<?php echo esc_attr( $settings['title'] ); ?>"><?php } ?> <?php if( $settings['icon_type'] == 'class' ) { ?><span class="<?php echo esc_attr( $settings['icon_class'] ); ?>"></span><?php } ?> </div> <h5><?php echo $title; ?></h5> <div class="line-box"></div> <p><?php echo $settings['des']; ?></p> </div> <?php } protected function _content_template() {} } // After the Schedule class is defined, I must register the new widget class with Elementor: Plugin::instance()->widgets_manager->register_widget_type( new Engitech_IconBox() );
Save
cmd:
run