403Webshell
Server IP : 5.129.245.98  /  Your IP : 216.73.217.19
Web Server : Apache/2.4.66 (Debian)
System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/rehub-framework/gutenberg/blocks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/rehub-framework/gutenberg/blocks/class-promobox.php
<?php

namespace Rehub\Gutenberg\Blocks;

defined( 'ABSPATH' ) OR exit;

class PromoBox extends Basic {
	protected $name = 'promo-box';

	protected $attributes = array(
		'title'               => array(
			'type'    => 'string',
			'default' => 'Sample title',
		),
		'content'             => array(
			'type'    => 'string',
			'default' => 'Sample content',
		),
		'backgroundColor'     => array(
			'type'    => 'string',
			'default' => '#f8f8f8',
		),
		'textColor'           => array(
			'type'    => 'string',
			'default' => '#333',
		),
		'showBorder'          => array(
			'type'    => 'boolean',
			'default' => false,
		),
		'borderSize'          => array(
			'type'    => 'number',
			'default' => 1,
		),
		'borderColor'         => array(
			'type'    => 'string',
			'default' => '#dddddd',
		),
		'showHighlightBorder' => array(
			'type'    => 'boolean',
			'default' => false,
		),
		'highlightColor'      => array(
			'type'    => 'string',
			'default' => '#fb7203',
		),
		'highlightPosition'   => array(
			'type'    => 'string',
			'default' => 'Left',
		),
		'showButton'          => array(
			'type'    => 'boolean',
			'default' => false,
		),
		'buttonText'          => array(
			'type'    => 'string',
			'default' => 'Purchase Now',
		),
		'buttonLink'          => array(
			'type'    => 'string',
			'default' => '',
		),
	);

	protected function render( $settings = array(), $inner_content = '' ) {
		if ( ! function_exists( 'wpsm_promobox_shortcode' ) ) {
			return;
		}

		$attributes = array(
			'background'  => $settings['backgroundColor'],
			'title'       => $settings['title'],
			'description' => $settings['content'],
			'text_color'  => $settings['textColor'],
		);

		if ( $settings['showBorder'] ) {
			$attributes['border_size']  = $settings['borderSize'] . 'px';
			$attributes['border_color'] = $settings['borderColor'];
		}

		if ( $settings['showHighlightBorder'] ) {
			$attributes['highligh_color']     = $settings['highlightColor'];
			$attributes['highlight_position'] = strtolower( $settings['highlightPosition'] );
		}

		if ( $settings['showButton'] ) {
			$attributes['button_link'] = $settings['buttonLink'];
			$attributes['button_text'] = $settings['buttonText'];
		}

		echo wpsm_promobox_shortcode( $attributes );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit