403Webshell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.146
Web Server : Apache
System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : karinebmkh ( 644538)
PHP Version : 8.4.22
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/karinebmkh/www/wp-content/plugins/divi-pixel/includes/modules/PriceListItem/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/karinebmkh/www/wp-content/plugins/divi-pixel/includes/modules/PriceListItem/PriceListItem.php
<?php

class DIPI_PriceListItem extends DIPI_Builder_Module
{

    public $slug = 'dipi_price_list_item';
    public $vb_support = 'on';
    public $type = 'child';
    public $child_title_var = 'title';
    public $child_title_fallback_var = 'admin';
	
	public function init()
    {
        $this->name = esc_html__('Pixel Price List', 'dipi-divi-pixel');
    }

    public function get_settings_modal_toggles()
    {
        return [
            'general' => [
                'toggles' => [
                    'content' => esc_html__('Content', 'dipi-divi-pixel'),
                ],
            ],
        ];
    }

    public function get_fields()
    {
        return array(
            
            'title' => array(
                'label' => esc_html__('Title', 'dipi-divi-pixel'),
                'type' => 'text',
                'description' => esc_html__('The title of the item.', 'dipi-divi-pixel'),
                'toggle_slug' => 'content',
                'default'    => esc_html__('Title', 'dipi-divi-pixel'),
            ),

            'price' => array(
                'label' => esc_html__('Price', 'dipi-divi-pixel'),
                'type' => 'text',
                'description' => esc_html__('The price of the item.', 'dipi-divi-pixel'),
                'toggle_slug' => 'content',
                'default'    => esc_html__('$9.95', 'dipi-divi-pixel'),
            ),

            'content' => array(
                'label' => esc_html__('Description', 'dipi-divi-pixel'),
                'type' => 'tiny_mce',
                'description' => esc_html__('The (optional) description for this item.', 'dipi-divi-pixel'),
                'toggle_slug' => 'content',
            ),

            'image' => array(
                'label' => esc_html__('Image', 'dipi-divi-pixel'),
                'type' => 'upload',
                'description' => esc_html__('The (optional) image for this item.', 'dipi-divi-pixel'),
                'toggle_slug' => 'content',
                'upload_button_text' => esc_attr__('Upload Image', 'dipi-divi-pixel'),
                'choose_text' => esc_attr__('Choose Image', 'dipi-divi-pixel'),
                'update_text' => esc_attr__('Update Image', 'dipi-divi-pixel'),
                'hide_metadata' => true,
            ),
        );
    }

    public function get_advanced_fields_config()
    {
        $advanced_fields = [];
        $advanced_fields['fonts'] = false;
        $advanced_fields['text'] = false;
        $advanced_fields['text_shadow'] = false;
        $advanced_fields['filters'] = false;

        $advanced_fields['margin_padding'] = [
            'css' => [
                'important' => 'all',
            ],
        ];

        return $advanced_fields;
	}

    public function _render_image() {
        if (!$this->props['image'] || "" === $this->props['image']){
            return;
        } else {
            $output = sprintf(
                '<div class="dipi_price_list_image_wrapper">
                    <img src="%1$s" alt="%2$s"/>
                </div>',
                $this->props['image'],
                $this->props['title']
            );

            return $output;

        }
    }

    public function render( $attrs, $content = null, $render_slug ) {
		$output = sprintf(
			'<div class="dipi_price_list_item_wrapper">
        		%1$s
        		<div class="dipi_price_list_text_wrapper">
        			<div class="dipi_price_list_header">
        				<div class="dipi_price_list_title">%2$s</div>
                        <div class="dipi_price_list_separator"></div>
        				<div class="dipi_price_list_price">%3$s</div>
        			</div>
        			<div class="dipi_price_list_content">
                        %4$s
        			</div>
        		</div>
        	</div>',
        	$this->_render_image(),
        	$this->props['title'],
            $this->props['price'],
            $this->sanitize_content($this->props['content'])
        );

        return $output;
    }
    
    public function apply_css($render_slug) {
        ET_Builder_Element::set_style( $render_slug, array(
            'selector' => "%%order_class%% .dipi_price_list_separator",
            'declaration' => "border-bottom-style: 'dotted';",
        ));
    }

}
new DIPI_PriceListItem;

Youez - 2016 - github.com/yon3zu
LinuXploit