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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/stando/public_html/wp-content/plugins/wpseo-local/classes/admin/class-map-settings.php
<?php
/**
 * Yoast SEO: Local plugin file.
 *
 * @package WPSEO_Local\Admin\
 * @since   4.1
 * @ToDo    CHECK THE @SINCE VERSION NUMBER!!!!!!!!
 */

if ( ! defined( 'WPSEO_LOCAL_VERSION' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	exit();
}

if ( ! class_exists( 'WPSEO_Local_Admin_Map_Settings' ) ) {

	/**
	 * WPSEO_Local_Admin_Map_Settings class.
	 *
	 * Build the WPSEO Local admin form.
	 *
	 * @since   4.0
	 */
	class WPSEO_Local_Admin_Map_Settings {

		/**
		 * Holds the slug for this settings tab.
		 *
		 * @var string
		 */
		private $slug = 'maps_settings';

		/**
		 * Holds WPSEO Local Core instance.
		 *
		 * @var mixed
		 */
		private $wpseo_local_core;

		/**
		 * Stores the options for this plugin.
		 *
		 * @var mixed
		 */
		private $options;

		/**
		 * Holds the API keys repository.
		 *
		 * @var WPSEO_Local_Api_Keys_Repository
		 */
		private $api_repository;

		/**
		 * WPSEO_Local_Admin_Map_Settings constructor.
		 */
		public function __construct() {
			$this->get_core();
			$this->get_timezone_repository();
			$this->get_options();
			$this->api_repository = new WPSEO_Local_Api_Keys_Repository();

			add_filter( 'wpseo_local_admin_tabs', array( $this, 'create_tab' ) );
			add_filter( 'wpseo_local_admin_help_center_video', array( $this, 'set_video' ) );

			add_action( 'wpseo_local_admin_' . $this->slug . '_content', array( $this, 'maps_settings' ), 10 );
			add_action( 'wpseo_local_admin_' . $this->slug . '_content', array( $this, 'store_locator' ), 10 );
		}

		/**
		 * Set WPSEO Local Core instance in local property
		 */
		private function get_core() {
			global $wpseo_local_core;
			$this->wpseo_local_core = $wpseo_local_core;
		}

		/**
		 * Set WPSEO Local Core Timezone Repository in local property
		 */
		private function get_timezone_repository() {
			$wpseo_local_timezone_repository       = new WPSEO_Local_Timezone_Repository();
			$this->wpseo_local_timezone_repository = $wpseo_local_timezone_repository;
		}

		/**
		 * Get wpseo_local options.
		 */
		private function get_options() {
			$this->options = get_option( 'wpseo_local' );
		}

		/**
		 * @param array $tabs Array holding the tabs.
		 *
		 * @return mixed
		 */
		public function create_tab( $tabs ) {
			$tabs[ $this->slug ] = __( 'Maps settings', 'yoast-local-seo' );

			return $tabs;
		}

		/**
		 * @param array $videos Array holding the videos for the help center.
		 *
		 * @return mixed
		 */
		public function set_video( $videos ) {
			$videos[ $this->slug ] = 'https://yoa.st/screencast-local-settings-api-keys';

			return $videos;
		}

		/**
		 * Advanced settings section.
		 */
		public function maps_settings() {
			$api_key_browser = $this->api_repository->get_api_key( 'browser' );
			$api_key         = $this->api_repository->get_api_key();

			if ( ( empty( $api_key ) && empty( $api_key_browser ) ) || empty( $api_key_browser ) ) {
				echo '<p>' . __( 'In order to use the Maps settings, you should set an API key. You can add an API key in the API settings tab, which allows you to change the Maps settings here.', 'yoast-local-seo' ) . '</p>';
			}

			if ( ! empty( $api_key_browser ) || ! empty( $api_key ) ) {
				$select_options = array(
					'METRIC'   => __( 'Kilometers', 'yoast-local-seo' ),
					'IMPERIAL' => __( 'Miles', 'yoast-local-seo' ),
				);
				WPSEO_Local_Admin_Wrappers::select(
					'unit_system',
					__( 'Measurement system', 'yoast-local-seo' ),
					$select_options
				);

				$select_options = array(
					'HYBRID'    => __( 'Hybrid', 'yoast-local-seo' ),
					'SATELLITE' => __( 'Satellite', 'yoast-local-seo' ),
					'ROADMAP'   => __( 'Roadmap', 'yoast-local-seo' ),
					'TERRAIN'   => __( 'Terrain', 'yoast-local-seo' ),
				);
				WPSEO_Local_Admin_Wrappers::select(
					'map_view_style',
					__( 'Default map style', 'yoast-local-seo' ),
					$select_options
				);

				WPSEO_Local_Admin_Page::section_before( 'wpseo-local-custom-marker', null, 'wpseo-local-custom_marker-wrapper' );
				echo '<label class="textinput" for="custom_marker">' . esc_html__( 'Custom marker', 'yoast-local-seo' ) . ':</label>';
				WPSEO_Local_Admin_Wrappers::hidden( 'custom_marker' );

				$show_marker = ! empty( $this->options['custom_marker'] );
				echo '<img src="' . ( isset( $this->options['custom_marker'] ) ? esc_url( wp_get_attachment_url( $this->options['custom_marker'] ) ) : '' ) . '" id="custom_marker_image_container" class="wpseo-local-hide-button' . ( ( false === $show_marker ) ? ' hidden' : '' ) . '">';
				echo '<br class="wpseo-local-hide-button' . ( ( false === $show_marker ) ? ' hidden' : '' ) . '">';
				echo '<p style="border: none;">';
				echo '<a href="javascript:" class="set_custom_images button" data-id="custom_marker">' . esc_html__( 'Set custom marker image', 'yoast-local-seo' ) . '</a>';
				echo ' <a href="javascript:" class="remove_custom_image wpseo-local-hide-button' . ( ( false === $show_marker ) ? ' hidden' : '' ) . '" style="color: #a00 !important;" data-id="custom_marker">' . esc_html__( 'Remove marker', 'yoast-local-seo' ) . '</a>';
				echo '</p>';
				if ( true == $show_marker ) {
					$this->wpseo_local_core->check_custom_marker_size( $this->options['custom_marker'] );
				}
				else {
					echo '<p style="border:none;">' . esc_html__( 'The custom marker should be 100x100 px. If the image exceeds those dimensions it could (partially) cover the info popup.', 'yoast-local-seo' ) . '</p>';
				}

				WPSEO_Local_Admin_Page::section_after(); // End wpseo-local-custom-marker section.
			}
		}

		/**
		 * Store locator settings section.
		 */
		public function store_locator() {
			$api_key_browser = $this->api_repository->get_api_key( 'browser' );
			$api_key         = $this->api_repository->get_api_key( 'server' );

			if ( ! empty( $api_key_browser ) || ! empty( $api_key ) ) {
				WPSEO_Local_Admin_Page::section_before( 'sl-settings', 'clear: both; ' . ( wpseo_has_multiple_locations() ? '' : 'display: none;' ) );
				echo '<h3>' . esc_html__( 'Store locator settings', 'yoast-local-seo' ) . '</h3>';
				WPSEO_Local_Admin_Wrappers::textinput( 'sl_num_results', __( 'Number of results', 'yoast-local-seo' ) );

				// Chosen allows us to clear a set option (to pass no value), but to do that it requires an empty option.
				$countries = ( array( '' => '' ) + WPSEO_Local_Frontend::get_country_array() );

				WPSEO_Local_Admin_Wrappers::select( 'default_country', __( 'Primary country', 'yoast-local-seo' ), $countries );

				echo '<p style="border:none;" class="label desc">' . esc_html__( 'From which country does your business mainly operate? This will improve the accuracy of the store locator.', 'yoast-local-seo' ) . '</p>';
				WPSEO_Local_Admin_Wrappers::textinput( 'show_route_label', __( '"Show route" label', 'yoast-local-seo' ), '', array( 'placeholder' => __( 'Show route', 'yoast-local-seo' ) ) );

				if ( true === is_ssl() ) {
					Yoast_Form::get_instance()->toggle_switch(
						'detect_location',
						array(
							'on'  => __( 'On', 'yoast-local-seo' ),
							'off' => __( 'Off', 'yoast-local-seo' ),
						),
						__( 'Location detection', 'yoast-local-seo' )
					);

					echo '<p>' . __( 'Automatically detect the user\'s location as the starting point.', 'yoast-local-seo' ) . '</p>';
				}
				else {
					echo '<label class="checkbox" for="detect_location">Location detection: (disabled)</label>';
					echo '<p style="border:none; margin-bottom: 0;"><em>';
					printf(
						/* translators: 1: link open tag; 2: link close tag. */
						esc_html__( 'This option only works on HTTPS websites. Using HTTPS is important, read more about it in the %1$sYoast KB%2$s', 'yoast-local-seo' ),
						'<a href="https://yoa.st/local-seo-https">',
						'</a>'
					);
					echo '</em></p>';
				}
				WPSEO_Local_Admin_Page::section_after(); // End Store Locator settings.
			}
		}
	}
}

haha - 2025