晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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/www/wp-content/plugins/google-analytics-premium/includes/admin/pages/ |
Upload File : |
<?php
/**
* Settings class.
*
* @since 6.0.0
*
* @package MonsterInsights
* @subpackage Settings
* @author Chris Christoff
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
function monsterinsights_is_settings_page() {
$current_screen = get_current_screen();
global $admin_page_hooks;
if ( ! is_object( $current_screen ) || empty( $current_screen->id ) || empty( $admin_page_hooks ) ) {
return false;
}
$settings_page = false;
if ( ! empty( $admin_page_hooks['monsterinsights_settings'] ) && $current_screen->id === $admin_page_hooks['monsterinsights_settings'] ) {
$settings_page = true;
}
if ( ! empty( $admin_page_hooks['monsterinsights_reports'] ) && $current_screen->id === $admin_page_hooks['monsterinsights_reports'] ) {
$settings_page = true;
}
if ( $current_screen->id === 'toplevel_page_monsterinsights_settings' ) {
$settings_page = true;
}
if ( $current_screen->id === 'insights_page_monsterinsights_settings' ) {
$settings_page = true;
}
if ( $current_screen->id === 'insights_page_monsterinsights_tracking' ) {
$settings_page = true;
}
if ( ! empty( $current_screen->base ) && strpos( $current_screen->base, 'monsterinsights_network' ) !== false ) {
$settings_page = true;
}
return $settings_page;
}
/**
* Callback to output the MonsterInsights settings page.
*
* @since 6.0.0
* @access public
*
* @return void
*/
function monsterinsights_settings_page() {
/**
* Developer Alert:
*
* Per the README, this is considered an internal hook and should
* not be used by other developers. This hook's behavior may be modified
* or the hook may be removed at any time, without warning.
*/
do_action( 'monsterinsights_head' );
?>
<?php echo monsterinsights_ublock_notice(); ?>
<!-- Tabs -->
<h1 id="monsterinsights-settings-page-main-nav" class="monsterinsights-main-nav-container monsterinsights-nav-container" data-container="#monsterinsights-settings-pages">
<a class="monsterinsights-main-nav-item monsterinsights-nav-item monsterinsights-spacing-item" href="#"> </a>
<a class="monsterinsights-main-nav-item monsterinsights-nav-item monsterinsights-active" href="#monsterinsights-main-tab-general" title="<?php echo esc_attr( __( 'General', 'google-analytics-for-wordpress' ) ); ?>">
<?php echo esc_html__( 'General', 'google-analytics-for-wordpress' ); ?>
</a>
<a class="monsterinsights-main-nav-item monsterinsights-nav-item" href="<?php echo admin_url('admin.php?page=monsterinsights_tracking#monsterinsights-main-tab-tracking?monsterinsights-sub-tab-engagement');?>" title="<?php echo esc_attr( __( 'Tracking', 'google-analytics-for-wordpress' ) ); ?>">
<?php echo esc_html__( 'Tracking', 'google-analytics-for-wordpress' ); ?>
</a>
</h1>
<!-- Tab Panels -->
<div id="monsterinsights-settings-pages" class="monsterinsights-main-nav-tabs monsterinsights-nav-tabs wrap" data-navigation="#monsterinsights-settings-page-main-nav">
<h1 class="monsterinsights-hideme"></h1><!-- so wp notices are below the nav bar -->
<div id="monsterinsights-main-tab-general" class="monsterinsights-main-nav-tab monsterinsights-nav-tab monsterinsights-active">
<?php monsterinsights_settings_general_tab(); ?>
</div>
</div>
<?php
}
/**
* Saves Settings
*
* @since 6.0.0
* @access public
*
* @return null Return early if not fixing the broken migration
*/
function monsterinsights_save_general_settings_page() {
if ( ! monsterinsights_is_settings_page() ) {
return;
}
// Check if user pressed the 'Update' button and nonce is valid
if ( ! isset( $_POST['monsterinsights-settings-submit'] ) ) {
return;
}
if ( ! wp_verify_nonce( $_POST['monsterinsights-settings-nonce'], 'monsterinsights-settings-nonce' ) ) {
return;
}
if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
return;
}
if ( ! empty( $_POST['monsterinsights_settings_tab'] ) && $_POST['monsterinsights_settings_tab'] === 'general' ) {
/**
* Developer Alert:
*
* Per the README, this is considered an internal hook and should
* not be used by other developers. This hook's behavior may be modified
* or the hook may be removed at any time, without warning.
*/
do_action( 'monsterinsights_settings_save_general' );
}
}
add_action( 'current_screen', 'monsterinsights_save_general_settings_page' );
/**
* Outputs a WordPress style notification to tell the user settings were saved
*
* @since 6.0.0
* @access public
*
* @return void
*/
function monsterinsights_updated_settings() {
echo monsterinsights_get_message( 'success', esc_html__( 'Settings saved successfully.', 'google-analytics-for-wordpress' ) );
}
/**
* Outputs a WordPress style notification to tell the user their UA code was bad.
*
* @since 6.0.3
* @access public
*
* @return void
*/
function monsterinsights_invalid_ua_code() {
echo monsterinsights_get_message( 'error', esc_html__( 'Invalid UA code.', 'google-analytics-for-wordpress' ) );
}
/**
* Outputs a checkbox for settings.
*
* Do not use this in other plugins. We may remove this at any time
* without forwarning and without consideration for backwards compatibility.
*
* This is to be considered a private function, for MonsterInsights use only.
*
* @since 6.0.0
* @access public
*
* @return void
*/
function monsterinsights_make_checkbox( $option_id, $title = '', $description = '' ) {
$option_value = monsterinsights_get_option( $option_id, 0 );
$option_class = str_replace( '_', '-', $option_id );
ob_start();
?>
<tr id="monsterinsights-input-<?php echo esc_attr( $option_class ); ?>">
<?php if ( !empty ( $title ) ) { ?>
<th scope="row">
<label for="monsterinsights-<?php echo esc_attr( $option_class ); ?>"><?php echo $title; ?></label>
</th>
<?php } ?>
<td>
<input type="checkbox" id="monsterinsights-<?php echo esc_attr( $option_class ); ?>" name="<?php echo esc_attr( $option_id ); ?>" <?php checked( $option_value, 1 ); ?> />
<?php if ( ! empty ( $description ) ) { ?>
<p class="description">
<?php echo $description; ?>
</p>
<?php } ?>
</td>
</tr>
<?php
$input_field = ob_get_contents();
ob_end_clean();
return $input_field;
}