403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.46
Web Server : Apache
System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : infrafs ( 43850)
PHP Version : 8.2.29
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/infrafs/bike/wp-content/plugins/colibri-page-builder/extend-builder/shortcodes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/infrafs/bike/wp-content/plugins/colibri-page-builder/extend-builder/shortcodes/wrapper.php
<?php

namespace ExtendBuilder;

add_shortcode( 'colibri_wrapper', '\ExtendBuilder\colibri_wrapper' );
add_shortcode( 'colibri_wrapper_state', '\ExtendBuilder\colibri_wrapper_state' );

add_shortcode( 'colibri_wp_action', function ( $attrs , $content = null) {
	$atts = shortcode_atts(
		array(
			"name" => "",
		),
		$attrs
	);

	ob_start();
	do_action( 'colibri_wp_action_' . $atts['name'], $attrs );
	return ob_get_clean();
} );

function get_current_wrapper() {
	return colibri_cache_get( 'colibri_current_wrapper_data', array(
		"current_wrapper"
	) );
}

function set_current_wrapper( $data ) {
	colibri_cache_set( 'colibri_current_wrapper_data', $data );
}

function get_current_wrapper_name() {
	$colibri_wrapper_data = get_current_wrapper();
	return array_get_value( $colibri_wrapper_data, 'current_wrapper.name', false );
}

function set_current_wrapper_data( $atts ) {
	$colibri_wrapper_data = get_current_wrapper();
	array_set_value( $colibri_wrapper_data, 'current_wrapper', $atts );
	set_current_wrapper( $colibri_wrapper_data );
}

function colibri_wrapper_state( $attrs, $content = null ) {
	$atts = shortcode_atts(
		array(
			"name" => "",
		),
		$attrs
	);

	$should_render = apply_filters( "colibri_wrapper_state_should_render", true, array(
		"wrapper" => get_current_wrapper_name(),
		"state"   => $atts
	) );
	if ( $should_render ) {
		return do_shortcode( $content );
	}
}


function colibri_wrapper( $attrs, $content = null ) {
	ob_start();
	$atts = shortcode_atts(
		array(
			"name"  => "",
			"state" => "",
		),
		$attrs
	);

	set_current_wrapper_data( $atts );

	$name = $atts['name'];

	do_action( "colibri_wrapper_before_$name" );

	$content = urldecode( $content );
	echo do_shortcode( wp_kses_post($content) );

	do_action( "colibri_wrapper_after_$name" );

	$content = ob_get_contents();
	ob_end_clean();
    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	return $content;
}

Youez - 2016 - github.com/yon3zu
LinuXploit