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/web20/web/wp-content/plugins/redirection/matches/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client2/web20/web/wp-content/plugins/redirection/matches/language.php
<?php

class Language_Match extends Red_Match {
	use FromNotFrom_Match;

	public $language;

	public function name() {
		return __( 'URL and language', 'redirection' );
	}

	public function save( array $details, $no_target_url = false ) {
		$data = array( 'language' => isset( $details['language'] ) ? $this->sanitize_language( $details['language'] ) : '' );

		return $this->save_data( $details, $no_target_url, $data );
	}

	private function sanitize_language( $language ) {
		$parts = explode( ',', str_replace( ' ', '', $language ) );
		return implode( ',', $parts );
	}

	public function is_match( $url ) {
		$matches = explode( ',', $this->language );
		$requested = Redirection_Request::get_accept_language();

		foreach ( $matches as $match ) {
			if ( in_array( $match, $requested, true ) ) {
				return true;
			}
		}

		return false;
	}

	public function get_data() {
		return array_merge( array(
			'language' => $this->language,
		), $this->get_from_data() );
	}

	public function load( $values ) {
		$values = $this->load_data( $values );
		$this->language = isset( $values['language'] ) ? $values['language'] : '';
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit