PATH:
home
/
centosnipponia
/
public_html
/
BAK_doohannl
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
elementor
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Elementor icon list widget. * * Elementor widget that displays a bullet list with any chosen icons and texts. * * @since 1.0.0 */ class aThemes_Elementor_Food_Menu extends Widget_Base { /** * Get widget name. * * Retrieve icon list widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'athemes-elementor-food-menu'; } /** * Get widget title. * * Retrieve icon list widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'aThemes: Food menu', 'sydney' ); } /** * Get widget icon. * * Retrieve icon list widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-menu-card'; } /** * Get widget categories. * * Retrieve the list of categories the icon list widget belongs to. * * Used to determine where to display the widget in the editor. * * @since 1.0.0 * @access public * * @return array Widget categories. */ public function get_categories() { return [ 'sydney-elements' ]; } /** * Register icon list widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * @access protected */ protected function register_controls() { $this->start_controls_section( 'section_food_menu', [ 'label' => __( 'Food menu', 'sydney' ), ] ); $repeater = new Repeater(); $repeater->add_control( 'image', [ 'label' => __( 'Item image', 'sydney' ), 'type' => Controls_Manager::MEDIA, 'label_block' => true, 'placeholder' => '', ] ); $repeater->add_control( 'name', [ 'label' => __( 'Item name', 'sydney' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => '', 'default' => '', ] ); $repeater->add_control( 'description', [ 'label' => __( 'Description', 'sydney' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => '', 'default' => '', ] ); $repeater->add_control( 'price', [ 'label' => __( 'Price', 'sydney' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => '', 'default' => '', ] ); $this->add_control( 'food_menu_list', [ 'label' => '', 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [], 'title_field' => '{{{ name }}}', ] ); $this->add_control( 'view', [ 'label' => __( 'View', 'sydney' ), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional', ] ); $this->end_controls_section(); //Name styles $this->start_controls_section( 'section_name_style', [ 'label' => __( 'Name', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'name_color', [ 'label' => __( 'Color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .food-item-name' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'name_typography', 'selector' => '{{WRAPPER}} .food-item-name', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); //End name styles //desc styles $this->start_controls_section( 'section_desc_style', [ 'label' => __( 'Description', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'desc_color', [ 'label' => __( 'Color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .food-item-desc' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'selector' => '{{WRAPPER}} .food-item-desc', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); //End position styles //Position styles $this->start_controls_section( 'section_price_style', [ 'label' => __( 'Price', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'price_color', [ 'label' => __( 'Color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .food-item-price' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'price_typography', 'selector' => '{{WRAPPER}} .food-item-price', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); //End position styles } /** * Render icon list widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings(); ?> <div class="widget-sydney-food-menu"> <?php foreach ( $settings['food_menu_list'] as $index => $item ) : ?> <div class="food-menu-item"> <div class="row"> <?php if ( $item['image']['url'] ) : ?> <?php $image_alt = sydney_image_alt( $item['image']['url'] ); ?> <div class="col-md-3 col-xs-3"> <img src="<?php echo esc_url( $item['image']['url'] ); ?>" alt="<?php echo esc_attr( $image_alt ); ?>"/> </div> <?php endif; ?> <div class="col-md-7 col-xs-7"> <h5 class="food-item-name"><?php echo esc_html( $item['name'] ); ?></h5> <p class="food-item-desc"><?php echo wp_kses_post( $item['description'] ); ?></p> </div> <div class="col-md-2 col-xs-2"> <div class="food-item-price"><?php echo esc_html( $item['price'] ); ?></div> </div> </div> </div> <?php endforeach; ?> </div> <?php } /** * Render icon list widget output in the editor. * * Written as a Backbone JavaScript template and used to generate the live preview. * * @since 1.0.0 * @access protected */ protected function content_template() { } } Plugin::instance()->widgets_manager->register_widget_type( new aThemes_Elementor_Food_Menu() );
[+]
..
[-] block-animated-heading.php
[edit]
[-] block-contact-form7.php
[edit]
[-] block-dual-buttons.php
[edit]
[-] block-dual-heading.php
[edit]
[-] block-food-menu.php
[edit]
[-] block-hotspots.php
[edit]
[-] block-ninjaforms.php
[edit]
[-] block-wpforms.php
[edit]
[-] .htaccess.disabled
[edit]