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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/stando/www/wp-content/plugins/google-analytics-premium/pro/includes/admin/settings.php
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function monsterinsights_detect_uninstalled_addons( $settings ) {
	$network_license = get_site_option( 'monsterinsights_license', false );
	$local_license   = get_option( 'monsterinsights_license', false );
	
	if ( current_user_can( 'monsterinsights_save_settings' ) ) {
		if ( ( monsterinsights_is_network_active() && ! empty( $network_license ) ) || ( monsterinsights_is_network_active() && empty( $network_license ) && ! empty( $local_license ) ) || ( ! monsterinsights_is_network_active() && ! empty( $local_license ) ) ) {
			// Show notices they can install
			if ( ! class_exists( 'MonsterInsights_Social' ) ) {
				$settings['social']['social_notice']['id'] = 'social_notice';
				$settings['social']['social_notice']['type'] = 'notice';
				$settings['social']['social_notice']['desc'] = sprintf( esc_html__( 'In order to use the social tracking features, please %1$sinstall and activate%2$s the social addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_EU_Compliance' ) ) {
				$settings['eucompliance']['eucompliance_notice']['id'] = 'eucompliance_notice';
				$settings['eucompliance']['eucompliance_notice']['type'] = 'notice';
				$settings['eucompliance']['eucompliance_notice']['desc'] = sprintf( esc_html__( 'In order to use the EU Compliance features, please %1$sinstall and activate%2$s the EU Compliance addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Ads' ) ) {
				$settings['ads']['ads_notice']['id'] = 'ads_notice';
				$settings['ads']['ads_notice']['type'] = 'notice';
				$settings['ads']['ads_notice']['desc'] = sprintf( esc_html__( 'In order to use the ads tracking features, please %1$sinstall and activate%2$s the ads addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Forms' ) ) {
				$settings['forms']['forms_notice']['id'] = 'forms_notice';
				$settings['forms']['forms_notice']['type'] = 'notice';
				$settings['forms']['forms_notice']['desc'] = sprintf( esc_html__( 'In order to use the forms tracking features, please %1$sinstall and activate%2$s the forms addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_eCommerce' ) ) {
				$settings['ecommerce']['ecommerce_notice']['id'] = 'ecommerce_notice';
				$settings['ecommerce']['ecommerce_notice']['type'] = 'notice';
				$settings['ecommerce']['ecommerce_notice']['desc'] = sprintf( esc_html__( 'In order to use the ecommerce tracking features, please %1$sinstall and activate%2$s the ecommerce addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Media' ) ) {
				$settings['media']['media_notice']['id'] = 'media_notice';
				$settings['media']['media_notice']['type'] = 'notice';
				$settings['media']['media_notice']['desc'] = sprintf( esc_html__( 'In order to use the media tracking features, please %1$sinstall and activate%2$s the media addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Membership' ) ) {
				$settings['memberships']['memberships_notice']['id'] = 'memberships_notice';
				$settings['memberships']['memberships_notice']['type'] = 'notice';
				$settings['memberships']['memberships_notice']['desc'] = sprintf( esc_html__( 'In order to use the membership tracking features, please %1$sinstall and activate%2$s the membership addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Dimensions' ) ) {
				$settings['dimensions']['dimensions_notice']['id'] = 'dimensions_notice';
				$settings['dimensions']['dimensions_notice']['type'] = 'notice';
				$settings['dimensions']['dimensions_notice']['desc'] = sprintf( esc_html__( 'In order to use the dimensions tracking features, please %1$sinstall and activate%2$s the dimensions addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Performance' ) ) {
				$settings['performance']['performance_notice']['id'] = 'performance_notice';
				$settings['performance']['performance_notice']['type'] = 'notice';
				$settings['performance']['performance_notice']['desc'] = sprintf( esc_html__( 'In order to use the performance tracking features, please %1$sinstall and activate%2$s the performance addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_AMP' ) ) {
				$settings['amp']['amp_notice']['id'] = 'amp_notice';
				$settings['amp']['amp_notice']['type'] = 'notice';
				$settings['amp']['amp_notice']['desc'] = sprintf( esc_html__( 'In order to use the AMP integration, please %1$sinstall and activate%2$s the AMP addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Google_Optimize' ) ) {
				$settings['goptimize']['goptimize_notice']['id'] = 'goptimize_notice';
				$settings['goptimize']['goptimize_notice']['type'] = 'notice';
				$settings['goptimize']['goptimize_notice']['desc'] = sprintf( esc_html__( 'In order to use the Google Optimize integration, please %1$sinstall and activate%2$s the Google Optimize addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_FB_Instant_Articles' ) ) {
				$settings['fbia']['fbia_notice']['id'] = 'fbia_notice';
				$settings['fbia']['fbia_notice']['type'] = 'notice';
				$settings['fbia']['fbia_notice']['desc'] = sprintf( esc_html__( 'In order to use the Facebook Instant Articles integration features, please %1$sinstall and activate%2$s the Facebook Instant Articles addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Bounce_Reduction' ) ) {
				$settings['bounce']['bounce_notice']['id'] = 'bounce_notice';
				$settings['bounce']['fbounce_notice']['type'] = 'notice';
				$settings['bounce']['bounce_notice']['desc'] = sprintf( esc_html__( 'In order to use the Bounce Reduction addon features, please %1$sinstall and activate%2$s the Bounce Reduction addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Reporting' ) ) {
				$settings['reporting']['reporting_notice']['id'] = 'reporting_notice';
				$settings['reporting']['reporting_notice']['type'] = 'notice';
				$settings['reporting']['reporting_notice']['desc'] = sprintf( esc_html__( 'In order to use the reporting features, please %1$sinstall and activate%2$s the reporting addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
			if ( ! class_exists( 'MonsterInsights_Notifications' ) ) {
				$settings['notifications']['notifications_notice']['id'] = 'notifications_notice';
				$settings['notifications']['notifications_notice']['type'] = 'notice';
				$settings['notifications']['notifications_notice']['desc'] = sprintf( esc_html__( 'In order to use the notifications features, please %1$sinstall and activate%2$s the notifications addon.', 'ga-premium'), '<a href="' . admin_url( 'admin.php?page=monsterinsights_addons' ) . '"  >', '</a>' );
			}
		} else {
			// Show enter license key notice
			if ( ! class_exists( 'MonsterInsights_Social' ) ) {
				$settings['social']['social_notice']['id'] = 'social_notice';
				$settings['social']['social_notice']['type'] = 'notice';
				$settings['social']['social_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_EU_Compliance' ) ) {
				$settings['eucompliance']['eucompliance_notice']['id'] = 'eucompliance_notice';
				$settings['eucompliance']['eucompliance_notice']['type'] = 'notice';
				$settings['eucompliance']['eucompliance_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Ads' ) ) {
				$settings['ads']['ads_notice']['id'] = 'ads_notice';
				$settings['ads']['ads_notice']['type'] = 'notice';
				$settings['ads']['ads_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Forms' ) ) {
				$settings['forms']['forms_notice']['id'] = 'forms_notice';
				$settings['forms']['forms_notice']['type'] = 'notice';
				$settings['forms']['forms_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_eCommerce' ) ) {
				$settings['ecommerce']['ecommerce_notice']['id'] = 'ecommerce_notice';
				$settings['ecommerce']['ecommerce_notice']['type'] = 'notice';
				$settings['ecommerce']['ecommerce_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Media' ) ) {
				$settings['media']['media_notice']['id'] = 'media_notice';
				$settings['media']['media_notice']['type'] = 'notice';
				$settings['media']['media_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Membership' ) ) {
				$settings['memberships']['memberships_notice']['id'] = 'memberships_notice';
				$settings['memberships']['memberships_notice']['type'] = 'notice';
				$settings['memberships']['memberships_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Dimensions' ) ) {
				$settings['dimensions']['dimensions_notice']['id'] = 'dimensions_notice';
				$settings['dimensions']['dimensions_notice']['type'] = 'notice';
				$settings['dimensions']['dimensions_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Performance' ) ) {
				$settings['performance']['performance_notice']['id'] = 'performance_notice';
				$settings['performance']['performance_notice']['type'] = 'notice';
				$settings['performance']['performance_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_AMP' ) ) {
				$settings['amp']['amp_notice']['id'] = 'amp_notice';
				$settings['amp']['amp_notice']['type'] = 'notice';
				$settings['amp']['amp_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Google_Optimize' ) ) {
				$settings['goptimize']['goptimize_notice']['id'] = 'goptimize_notice';
				$settings['goptimize']['goptimize_notice']['type'] = 'notice';
				$settings['goptimize']['goptimize_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_FB_Instant_Articles' ) ) {
				$settings['fbia']['fbia_notice']['id'] = 'fbia_notice';
				$settings['fbia']['fbia_notice']['type'] = 'notice';
				$settings['fbia']['fbia_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Bounce_Reduction' ) ) {
				$settings['bounce']['bounce_notice']['id'] = 'bounce_notice';
				$settings['bounce']['bounce_notice']['type'] = 'notice';
				$settings['bounce']['bounce_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Reporting' ) ) {
				$settings['reporting']['reporting_notice']['id'] = 'reporting_notice';
				$settings['reporting']['reporting_notice']['type'] = 'notice';
				$settings['reporting']['reporting_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
			if ( ! class_exists( 'MonsterInsights_Notifications' ) ) {
				$settings['notifications']['notifications_notice']['id'] = 'notifications_notice';
				$settings['notifications']['notifications_notice']['type'] = 'notice';
				$settings['notifications']['notifications_notice']['desc'] = esc_html__( 'In order to use these pro features, please enter your license key.', 'ga-premium' );
			}
		}
	} else {
		// Doesn't have permissions
		if ( ! class_exists( 'MonsterInsights_Social' ) ) {
			$settings['social']['social_notice']['id'] = 'social_notice';
			$settings['social']['social_notice']['type'] = 'notice';
			$settings['social']['social_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Ads' ) ) {
			$settings['ads']['ads_notice']['id'] = 'ads_notice';
			$settings['ads']['ads_notice']['type'] = 'notice';
			$settings['ads']['ads_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Forms' ) ) {
			$settings['forms']['forms_notice']['id'] = 'forms_notice';
			$settings['forms']['forms_notice']['type'] = 'notice';
			$settings['forms']['forms_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_eCommerce' ) ) {
			$settings['ecommerce']['ecommerce_notice']['id'] = 'ecommerce_notice';
			$settings['ecommerce']['ecommerce_notice']['type'] = 'notice';
			$settings['ecommerce']['ecommerce_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Media' ) ) {
			$settings['media']['media_notice']['id'] = 'media_notice';
			$settings['media']['media_notice']['type'] = 'notice';
			$settings['media']['media_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Membership' ) ) {
			$settings['memberships']['memberships_notice']['id'] = 'memberships_notice';
			$settings['memberships']['memberships_notice']['type'] = 'notice';
			$settings['memberships']['memberships_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Dimensions' ) ) {
			$settings['dimensions']['dimensions_notice']['id'] = 'dimensions_notice';
			$settings['dimensions']['dimensions_notice']['type'] = 'notice';
			$settings['dimensions']['dimensions_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Performance' ) ) {
			$settings['performance']['performance_notice']['id'] = 'performance_notice';
			$settings['performance']['performance_notice']['type'] = 'notice';
			$settings['performance']['performance_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_AMP' ) ) {
			$settings['amp']['amp_notice']['id'] = 'amp_notice';
			$settings['amp']['amp_notice']['type'] = 'notice';
			$settings['amp']['amp_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Google_Optimize' ) ) {
			$settings['goptimize']['goptimize_notice']['id'] = 'goptimize_notice';
			$settings['goptimize']['goptimize_notice']['type'] = 'notice';
			$settings['goptimize']['goptimize_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_FB_Instant_Articles' ) ) {
			$settings['fbia']['fbia_notice']['id'] = 'fbia_notice';
			$settings['fbia']['fbia_notice']['type'] = 'notice';
			$settings['fbia']['fbia_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Bounce_Reduction' ) ) {
			$settings['bounce']['bounce_notice']['id'] = 'bounce_notice';
			$settings['bounce']['bounce_notice']['type'] = 'notice';
			$settings['bounce']['bounce_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Reporting' ) ) {
			$settings['reporting']['reporting_notice']['id'] = 'reporting_notice';
			$settings['reporting']['reporting_notice']['type'] = 'notice';
			$settings['reporting']['reporting_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
		if ( ! class_exists( 'MonsterInsights_Notifications' ) ) {
			$settings['notifications']['notifications_notice']['id'] = 'notifications_notice';
			$settings['notifications']['notifications_notice']['type'] = 'notice';
			$settings['notifications']['notifications_notice']['desc'] = esc_html__( 'In order to use these pro features, please ask your webmaster to install the necessary addon.', 'ga-premium' );
		}
	}
	return $settings;
}
add_action( 'monsterinsights_registered_settings', 'monsterinsights_detect_uninstalled_addons', 99999, 1 );

function monsterinsights_registered_settings_filter( $settings ) {
	
	// UserID
	$url   = 'https://www.monsterinsights.com/docs/how-to-setup-user-tracking/';
	$settings['demographics']['userid'] = array(
			'id'          => 'userid',
			'name'        => __( 'Enable User ID tracking', 'ga-premium' ),
			'desc'        => sprintf( esc_html__( 'To the extent that Google allows webmasters to discern single users, this setting allows you to identify users by their WordPress user ID if logged in. To use this feature, you will need to turn this feature on in Google Analytics. %1$sClick here%2$s for step by step directions.' , 'ga-premium' ), '<a href="' . esc_attr( $url ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>'),
			'type' 		  => 'checkbox',
	);
	
	$settings['compatibility']['gatracker_compatibility_mode'] = array(
		'id'          => 'gatracker_compatibility_mode',
		'name'        => __( 'Enable _gaTracker Compatibility', 'ga-premium' ),
		'desc'        => sprintf( esc_html__( 'This enables MonsterInsights to work with plugins that use ga() and don\'t support %s' , 'ga-premium' ), '<code>__gaTracker</code>' ),
		'type'        => 'checkbox',
	);

	return $settings;
}
add_filter( 'monsterinsights_registered_settings', 'monsterinsights_registered_settings_filter' );

haha - 2025