📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-26 11:52:34
📂
/
/
home
/
pallabnv
/
public_html
/
wp-content__3bb9dea
/
themes
/
berich
/
elements
/
widgets
✏️
Editing: pxl_button.php
<?php $templates_df = ['0' => esc_html__('None', 'berich')]; $templates = $templates_df + berich_get_templates_option('page') ; pxl_add_custom_widget( array( 'name' => 'pxl_button', 'title' => esc_html__('Case Button', 'berich' ), 'icon' => 'eicon-button', 'categories' => array('pxltheme-core'), 'params' => array( 'sections' => array( array( 'name' => 'section_content', 'label' => esc_html__('Content', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 'controls' => array( array( 'name' => 'btn_style', 'label' => esc_html__('Type', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'btn-default', 'options' => [ 'btn-default' => esc_html__('Default', 'berich' ), 'btn-slip' => esc_html__('Slip Secondary', 'berich' ), 'btn-slip-primary' => esc_html__('Slip Primary', 'berich' ), 'btn-icon-box' => esc_html__('Icon Box', 'berich' ), 'btn-moema' => esc_html__('Moema', 'berich' ), 'btn-outline-dark' => esc_html__('Outline Dark', 'berich' ), 'btn-gradient' => esc_html__('Gradient', 'berich' ), ], ), array( 'name' => 'text', 'label' => esc_html__('Text', 'berich' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__('Click Here', 'berich'), ), array( 'name' => 'btn_action', 'label' => esc_html__('Action', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'pxl-atc-link', 'options' => [ 'pxl-atc-link' => esc_html__('Link', 'berich' ), 'pxl-atc-popup' => esc_html__('Popup', 'berich' ), ], ), array( 'name' => 'link', 'label' => esc_html__('Link', 'berich' ), 'type' => \Elementor\Controls_Manager::URL, 'default' => [ 'url' => '#', ], 'condition' => [ 'btn_action' => ['pxl-atc-link'], ], ), array( 'name' => 'popup_template', 'label' => esc_html__('Select Popup Template', 'berich'), 'type' => 'select', 'options' => $templates, 'default' => 'df', 'description' => 'Add new tab template: "<a href="' . esc_url( admin_url( 'edit.php?post_type=pxl-template' ) ) . '" target="_blank">Click Here</a>"', 'condition' => [ 'btn_action' => ['pxl-atc-popup'], ], ), array( 'name' => 'align', 'label' => esc_html__('Alignment', 'berich' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'control_type' => 'responsive', 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'berich' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => esc_html__('Center', 'berich' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => esc_html__('Right', 'berich' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' => esc_html__('Justified', 'berich' ), 'icon' => 'fa fa-align-justify', ], ], 'prefix_class' => 'elementor-align-', 'default' => '', 'selectors' => [ '{{WRAPPER}} .pxl-button' => 'text-align: {{VALUE}}', ], ), array( 'name' => 'btn_icon', 'label' => esc_html__('Icon', 'berich' ), 'type' => \Elementor\Controls_Manager::ICONS, 'label_block' => true, 'fa4compatibility' => 'icon', ), array( 'name' => 'icon_align', 'label' => esc_html__('Icon Position', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'left', 'options' => [ 'left' => esc_html__('Before', 'berich' ), 'right' => esc_html__('After', 'berich' ), ], ), ), ), array( 'name' => 'section_style_button', 'label' => esc_html__('Button Normal', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array_merge( array( array( 'name' => 'color', 'label' => esc_html__('Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'color: {{VALUE}};', ], ), array( 'name' => 'btn_bg_color', 'label' => esc_html__('Background Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'background-color: {{VALUE}};', '{{WRAPPER}} .pxl-button .btn.btn-gradient' => '--gradient-color-from: {{VALUE}};', ], ), array( 'name' => 'btn_bg_color_to', 'label' => esc_html__('Background Color Gradient', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn.btn-gradient' => '--gradient-color-to: {{VALUE}};', ], 'condition' => [ 'btn_style' => ['btn-gradient'], ], ), array( 'name' => 'btn_typography', 'label' => esc_html__('Typography', 'berich' ), 'type' => \Elementor\Group_Control_Typography::get_type(), 'control_type' => 'group', 'selector' => '{{WRAPPER}} .pxl-button .btn', ), array( 'name' => 'btn_box_shadow', 'label' => esc_html__( 'Box Shadow', 'berich' ), 'type' => \Elementor\Group_Control_Box_Shadow::get_type(), 'control_type' => 'group', 'selector' => '{{WRAPPER}} .pxl-button .btn', ), array( 'name' => 'border_type', 'label' => esc_html__( 'Border Type', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ '' => esc_html__( 'None', 'berich' ), 'solid' => esc_html__( 'Solid', 'berich' ), 'double' => esc_html__( 'Double', 'berich' ), 'dotted' => esc_html__( 'Dotted', 'berich' ), 'dashed' => esc_html__( 'Dashed', 'berich' ), 'groove' => esc_html__( 'Groove', 'berich' ), ], 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'border-style: {{VALUE}} !important;', ], 'condition' => [ 'btn_style' => ['btn-default'], ], ), array( 'name' => 'border_width', 'label' => esc_html__( 'Border Width', 'berich' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'condition' => [ 'border_type!' => '', 'btn_style' => ['btn-default'], ], 'responsive' => true, ), array( 'name' => 'border_color', 'label' => esc_html__( 'Border Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'border-color: {{VALUE}} !important;', ], 'condition' => [ 'border_type!' => '', 'btn_style' => ['btn-default'], ], ), ), array( array( 'name' => 'btn_border_radius', 'label' => esc_html__('Border Radius', 'berich' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ), array( 'name' => 'btn_padding', 'label' => esc_html__('Padding', 'berich' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .pxl-button .btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'control_type' => 'responsive', ), array( 'name' => 'text_inner_margin', 'label' => esc_html__('Text Inner Margin', 'berich' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .pxl-button .btn .pxl--btn-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'control_type' => 'responsive', ), array( 'name' => 'btn_full_width', 'label' => esc_html__( 'Full Width', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'btn-block-inline' => esc_html__( 'No', 'berich' ), 'btn-block' => esc_html__( 'Yes', 'berich' ), ], 'default' => 'btn-block-inline', ), ) ), ), array( 'name' => 'section_style_button_hover', 'label' => esc_html__('Button Hover', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'color_hover', 'label' => esc_html__('Color Hover', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn:hover, {{WRAPPER}} .pxl-button .btn:focus' => 'color: {{VALUE}};', ], ), array( 'name' => 'btn_bg_color_hover', 'label' => esc_html__('Background Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn:hover, {{WRAPPER}} .pxl-button .btn:focus' => 'background-color: {{VALUE}};', ], 'condition' => [ 'btn_style!' => ['btn-slip','btn-slip-primary','btn-gradient'], ], ), array( 'name' => 'btn_bg_color_hover_slip', 'label' => esc_html__('Background Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn.btn-slip:before, {{WRAPPER}} .pxl-button .btn.btn-slip-primary:before' => 'background-color: {{VALUE}};', ], 'condition' => [ 'btn_style' => ['btn-slip','btn-slip-primary'], ], ), array( 'name' => 'btn_border_radius_hover', 'label' => esc_html__('Border Radius', 'berich' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .pxl-button .btn:hover, {{WRAPPER}} .pxl-button .btn:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ), array( 'name' => 'btn_box_shadow_hover', 'label' => esc_html__( 'Box Shadow', 'berich' ), 'type' => \Elementor\Group_Control_Box_Shadow::get_type(), 'control_type' => 'group', 'selector' => '{{WRAPPER}} .pxl-button .btn:hover, {{WRAPPER}} .pxl-button .btn:focus', ), array( 'name' => 'btn_text_effect', 'label' => esc_html__('Text Effect', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '', 'options' => [ '' => esc_html__('Default', 'berich' ), 'btn-text-nina' => esc_html__('Nina', 'berich' ), 'btn-text-nanuk' => esc_html__('Nanuk', 'berich' ) ], 'condition' => [ 'btn_style' => ['btn-default'], ], ), ), ), array( 'name' => 'section_style_icon', 'label' => esc_html__('Icon', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'icon_color', 'label' => esc_html__('Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-button .btn i' => 'color: {{VALUE}};', '{{WRAPPER}} .pxl-button .btn svg' => 'fill: {{VALUE}};', ], ), array( 'name' => 'icon_font_size', 'label' => esc_html__('Font Size', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-button .btn i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .pxl-button .btn svg' => 'height: {{SIZE}}{{UNIT}};', ], ), array( 'name' => 'icon_space_left', 'label' => esc_html__('Icon Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'default' => [ 'size' => 9, ], 'selectors' => [ '{{WRAPPER}} .pxl-button .pxl-icon--left i, {{WRAPPER}} .pxl-button .pxl-icon--left svg' => 'margin-right: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_align' => ['left'], ], ), array( 'name' => 'icon_space_right', 'label' => esc_html__('Icon Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'default' => [ 'size' => 9, ], 'selectors' => [ '{{WRAPPER}} .pxl-button .pxl-icon--right i, {{WRAPPER}} .pxl-button .pxl-icon--right svg' => 'margin-left: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_align' => ['right'], ], ), array( 'name' => 'icon_box_color', 'label' => esc_html__( 'Box Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .btn.pxl-icon-active i' => 'background-color: {{VALUE}};', ], ), array( 'name' => 'icon_box_width', 'label' => esc_html__('Box Width', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .btn.pxl-icon-active i' => 'width: {{SIZE}}{{UNIT}};', ], ), array( 'name' => 'icon_box_height', 'label' => esc_html__('Box Height', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .btn.pxl-icon-active i' => 'height: {{SIZE}}{{UNIT}};', ], ), array( 'name' => 'icon_border_radius', 'label' => esc_html__('Border Radius', 'berich' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .btn.pxl-icon-active i' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ), ), ), berich_widget_animation_settings(), ), ), ), berich_get_class_widget_path() );
💾 Save Changes
❌ Cancel