晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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 : /proc/self/root/home/stando/www/wp-content/plugins/wpseo-local/deprecated/ |
Upload File : |
<?php
/**
* Yoast SEO: Local plugin file.
*
* Contains all the deprecated functions.
*
* @package WPSEO_Local/Deprecated
*/
/**
* Generates output for formatted address.
*
* @deprecated 3.3.1. Use WPSEO_Local_Address_Format->get_address_format() instead.
*
* @param string $business_address The address of the business.
* @param bool $oneline Whether to show the address on one line or not.
* @param string $business_zipcode The business zipcode.
* @param string $business_city The business city.
* @param string $business_state The business state.
* @param bool $show_state Whether to show the state or not.
* @param bool $escape_output Whether to escape the output or not.
* @param bool $use_tags Whether to use HTML tags in the outpput or not.
*
* @return string
*/
function wpseo_local_get_address_format( $business_address = '', $oneline = false, $business_zipcode = '', $business_city = '', $business_state = '', $show_state = false, $escape_output = false, $use_tags = true ) {
_deprecated_function( 'wpseo_local_get_address_format', '3.3.1', 'WPSEO_Local_Address_Format->get_address_format()' );
$options = get_option( 'wpseo_local' );
$address_format = 'address-state-postal';
if ( ! empty( $options['address_format'] ) ) {
$address_format = $options['address_format'];
}
$address_details = array(
'business_address' => $business_address,
'oneline' => $oneline,
'business_zipcode' => $business_zipcode,
'business_city' => $business_city,
'business_state' => $business_state,
'show_state' => $show_state,
'escape_output' => $escape_output,
'use_tags' => $use_tags,
);
$format = new WPSEO_Local_Address_Format();
$output = $format->get_address_format( $address_format, $address_details );
return trim( $output );
}
/**
* Get the custom marker from categories or general Local SEO settings.
*
* @deprecated 4.7 Use WPSEO_Local_Locations_Repository->get_custom_marker() instead.
*
* @param int $post_id The post id.
*
* @return false|string
*/
function wpseo_local_get_custom_marker( $post_id = null ) {
_deprecated_function( 'wpseo_local_get_custom_marker', '4.5', 'WPSEO_Local_Locations_Repository->get_custom_marker()' );
$repo = new WPSEO_Local_Locations_Repository();
return $repo->cb_postmeta_custom_marker( $post_id );
}
/**
* Get the location details
*
* @deprecated 4.7 Use WPSEO_Local_Locations_Repository->get() instead.
*
* @param string $location_id Optional. Only use this when multiple locations are enabled in the website.
*
* @return array|bool Array with location details.
*/
function wpseo_get_location_details( $location_id = '' ) {
_deprecated_function( 'wpseo_get_location_details', '4.5', 'WPSEO_Local_Locations_Repository->get()' );
$options = get_option( 'wpseo_local' );
$location_details = array();
if ( wpseo_has_multiple_locations() && $location_id == '' ) {
return false;
}
elseif ( wpseo_has_multiple_locations() ) {
if ( $location_id == null ) {
return false;
}
$location_details = array(
'business_address' => get_post_meta( $location_id, '_wpseo_business_address', true ),
'business_city' => get_post_meta( $location_id, '_wpseo_business_city', true ),
'business_state' => get_post_meta( $location_id, '_wpseo_business_state', true ),
'business_zipcode' => get_post_meta( $location_id, '_wpseo_business_zipcode', true ),
'business_country' => get_post_meta( $location_id, '_wpseo_business_country', true ),
'business_phone' => get_post_meta( $location_id, '_wpseo_business_phone', true ),
'business_phone_2nd' => get_post_meta( $location_id, '_wpseo_business_phone_2nd', true ),
'business_coords_lat' => get_post_meta( $location_id, '_wpseo_coordinates_lat', true ),
'business_coords_long' => get_post_meta( $location_id, '_wpseo_coordinates_long', true ),
);
}
elseif ( wpseo_has_multiple_locations() ) {
$location_details = array(
'business_address' => $options['location_address'],
'business_city' => $options['location_city'],
'business_state' => $options['location_state'],
'business_zipcode' => $options['location_zipcode'],
'business_country' => $options['location_country'],
'business_phone' => $options['location_phone'],
'business_phone_2nd' => isset( $options['location_phone_2nd'] ) ? $options['location_phone_2nd'] : '',
'business_coords_lat' => $options['location_coords_lat'],
'business_coords_long' => $options['location_coords_long'],
);
}
return $location_details;
}
/**
* Returns the API Browser key
*
* @deprecated 11.9 Use WPSEO_Local_Api_Keys_Repository->get_api_key() instead.
*
* @return string
*/
function yoast_wpseo_local_get_api_key_browser() {
_deprecated_function( 'yoast_wpseo_local_get_api_key_browser', '11.9', 'WPSEO_Local_Api_Keys_Repository->get_api_key()' );
$api_repository = new WPSEO_Local_Api_Keys_Repository();
$api_key = $api_repository->get_api_key( 'browser' );
return $api_key;
}
/**
* Returns the API Server key
*
* @deprecated 11.9 Use WPSEO_Local_Api_Keys_Repository->get_api_key() instead.
*
* @return string
*/
function yoast_wpseo_local_get_api_key_server() {
_deprecated_function( 'yoast_wpseo_local_get_api_key_server', '11.9', 'WPSEO_Local_Api_Keys_Repository->get_api_key()' );
$api_repository = new WPSEO_Local_Api_Keys_Repository();
$api_key = $api_repository->get_api_key( 'server' );
return $api_key;
}
/**
* Geocode the given address.
*
* @param string $address The address that needs to be geocoded.
*
* @return array|WP_Error
*/
function wpseo_geocode_address( $address ) {
_deprecated_function( 'wpseo_geocode_address', '12.1' );
$geocode_url = 'https://maps.google.com/maps/api/geocode/json?address=' . urlencode( $address ) . '&oe=utf8&sensor=false';
$api_repository = new WPSEO_Local_Api_Keys_Repository();
$api_key = $api_repository->get_api_key( 'browser' );
if ( ! empty( $api_key ) ) {
$geocode_url .= '&key=' . $api_key;
}
$response = wp_remote_get( $geocode_url );
if ( is_wp_error( $response ) || $response['response']['code'] != 200 || empty( $response['body'] ) ) {
return new WP_Error( 'wpseo-no-response', "Didn't receive a response from Maps API" );
}
$response_body = json_decode( $response['body'] );
if ( 'OK' !== $response_body->status ) {
$error_code = 'wpseo-zero-results';
if ( $response_body->status === 'OVER_QUERY_LIMIT' ) {
$error_code = 'wpseo-query-limit';
}
return new WP_Error( $error_code, $response_body->status );
}
return $response_body;
}