403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/clients/client2/safemyident.de/web/app/mu-plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client2/safemyident.de/web/app/mu-plugins/identityvpn-integration.php
<?php
/**
 * IdentityVPN – Theme-Einbindung / theme integration snippet.
 *
 * Diesen Inhalt in die functions.php des Themes `safe-my-ident` übernehmen
 * (oder als kleines mu-plugin laden). Registriert die Seiten-Templates und
 * lädt die IdentityVPN-Assets nur auf der VPN-Seite.
 *
 * Add this to the `safe-my-ident` theme's functions.php (or load as a small
 * mu-plugin). Registers the page templates and loads the IdentityVPN assets
 * only on the VPN page.
 *
 * Die Fonts (Anton/Poppins/Inter) und Bootstrap 5 werden bereits vom Theme
 * global geladen – hier kommt nur das seiten­spezifische Stylesheet hinzu.
 *
 * @package safe-my-ident
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Seiten-Template im aktiven Theme-Ordner ablegen:
 *   page-identityvpn.php     (DE)
 *   page-identityvpn-en.php  (EN)
 * Danach erscheinen sie im Seiten-Editor unter „Template“.
 *
 * Assets erwartet unter: /assets/identityvpn/ (css + js) im Theme.
 */
add_action(
	'wp_enqueue_scripts',
	static function (): void {
		// Nur auf der IdentityVPN-Seite laden.
		$is_vpn = is_page( array( 'vpn', 'identityvpn' ) )
			|| is_page_template( 'page-identityvpn.php' )
			|| is_page_template( 'page-identityvpn-en.php' );

		if ( ! $is_vpn ) {
			return;
		}

		$base = get_stylesheet_directory_uri() . '/assets/identityvpn';
		$ver  = '1.0.0';

		wp_enqueue_style( 'identityvpn', $base . '/css/identityvpn.css', array(), $ver );
		wp_enqueue_script( 'identityvpn', $base . '/js/identityvpn.js', array(), $ver, true );
	},
	20
);

/**
 * Meta-Description + hreflang für die VPN-Seite ausgeben.
 * Output meta description + hreflang for the VPN page.
 */
add_action(
	'wp_head',
	static function (): void {
		if ( ! ( is_page_template( 'page-identityvpn.php' ) || is_page_template( 'page-identityvpn-en.php' ) ) ) {
			return;
		}
		$is_en = is_page_template( 'page-identityvpn-en.php' );

		$desc = $is_en
			? 'IdentityVPN by SafeMyIdent: WireGuard-based Identity-as-a-Service. Control exit country, exit IP, routing profile and rotation via dashboard or REST API.'
			: 'IdentityVPN von SafeMyIdent: WireGuard-basierter Identity-as-a-Service. Exit-Land, Exit-IP, Routingprofil und Rotation per Dashboard oder REST-API selbst steuern.';

		printf( '<meta name="description" content="%s">' . "\n", esc_attr( $desc ) );
		echo '<link rel="alternate" hreflang="de" href="https://www.safemyident.de/vpn/">' . "\n";
		echo '<link rel="alternate" hreflang="en" href="https://www.safemyident.de/en/vpn/">' . "\n";
		echo '<link rel="alternate" hreflang="x-default" href="https://www.safemyident.de/vpn/">' . "\n";
	},
	1
);

/**
 * Pi-Checkout-Button für einen Plan rendern (Shortcode-Alternative).
 * Render a Pi checkout button for a plan.
 *
 * Verwendung im Template: echo ivpn_pi_button( 'professional', 'monthly', 'Mit Pi zahlen' );
 * Der Button wird von pi-checkout.js (Plugin „IdentityVPN – Pi Network Payments“) angesteuert.
 *
 * @param string $plan  starter|professional|business
 * @param string $cycle monthly|yearly
 * @param string $label Button-Text.
 */
function ivpn_pi_button( string $plan, string $cycle = 'monthly', string $label = 'Mit Pi zahlen' ): string {
	return sprintf(
		'<button type="button" class="btn btn-ghost-dark w-100 mt-2" data-pi-checkout data-plan="%s" data-cycle="%s"><i class="bi bi-currency-bitcoin me-1"></i>%s</button>',
		esc_attr( $plan ),
		esc_attr( $cycle ),
		esc_html( $label )
	);
}

Youez - 2016 - github.com/yon3zu
LinuXploit