403Webshell
Server IP : 3.96.16.70  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/arrivealive.org/wp-content/plugins/everest-forms/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/arrivealive.org/wp-content/plugins/everest-forms/includes/class-evf-shortcodes.php
<?php
/**
 * Shortcodes
 *
 * @package EverestForms\Classes
 * @version 1.0.0
 */

defined( 'ABSPATH' ) || exit;

/**
 * EverestForms Shortcodes class.
 */
class EVF_Shortcodes {

	/**
	 * Init shortcodes.
	 */
	public static function init() {
		self::init_shortcode_hooks();

		$shortcodes = array(
			'everest_form' => __CLASS__ . '::form',
		);

		foreach ( $shortcodes as $shortcode => $function ) {
			add_shortcode( apply_filters( "{$shortcode}_shortcode_tag", $shortcode ), $function );
		}
	}

	/**
	 * Shortcode Wrapper.
	 *
	 * @param string[] $function Callback function.
	 * @param array    $atts     Attributes. Default to empty array.
	 * @param array    $wrapper  Customer wrapper data.
	 *
	 * @return string
	 */
	public static function shortcode_wrapper(
		$function,
		$atts = array(),
		$wrapper = array(
			'class'  => 'everest-forms',
			'before' => null,
			'after'  => null,
		)
	) {
		$form_id        = isset( $atts['id'] ) ? $atts['id'] : '';
		$is_theme_style = get_post_meta( $form_id, 'everest_forms_enable_theme_style', true );
		if ( 'default' === $is_theme_style ) {
			$wrapper['class'] .= ' evf-frontend-form-default';
			wp_register_style( 'evf-frontend-default-css', EVF()->plugin_url() . '/assets/css/everest-forms-default-frontend.css', array(), EVF_VERSION );
			wp_enqueue_style( 'evf-frontend-default-css' );
		}
		ob_start();

		$wrap_before = empty( $wrapper['before'] ) ? '<div class="' . esc_attr( $wrapper['class'] ) . '">' : $wrapper['before'];
		echo wp_kses_post( $wrap_before );
		call_user_func( $function, $atts );
		$wrap_after = empty( $wrapper['after'] ) ? '</div>' : $wrapper['after'];
		echo wp_kses_post( $wrap_after );

		return ob_get_clean();
	}

	/**
	 * Form shortcode.
	 *
	 * @param  array $atts Attributes.
	 * @return string
	 */
	public static function form( $atts ) {
		return self::shortcode_wrapper( array( 'EVF_Shortcode_Form', 'output' ), $atts );
	}

	/**
	 * Initialize shortcode.
	 */
	public static function init_shortcode_hooks() {
		self::shortcode_wrapper( array( 'EVF_Shortcode_Form', 'hooks' ) );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit