SILENT KILLERPanel

Current Path: > home > transcarter > public_html > wp-content > > plugins > leadin > public > utils > >


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter/public_html/wp-content//plugins/leadin/public/utils//

NameTypeSizeLast ModifiedActions
class-proxyutils.php File 2000 bytes July 17 2025 21:06:25.
class-queryparameters.php File 2283 bytes July 17 2025 21:06:25.
class-requestutils.php File 1113 bytes July 17 2025 21:06:25.
class-shortcoderenderutils.php File 4883 bytes July 17 2025 21:06:25.
class-versions.php File 1567 bytes July 17 2025 21:06:25.

Reading File: /home/transcarter/public_html/wp-content//plugins/leadin/public/utils///class-queryparameters.php

<?php

namespace Leadin\utils;

/**
 * Class containing utility functions for the sanitizing and getting query parameters.
 */
class QueryParameters {

	/**
	 * Return a text sanitized, unslashed query parameter by its key, validated with a nonce.
	 *
	 * @param String $key Key for the query parameter to return.
	 * @param String $nonce_action  Name of the nonce action to verify the given nonce against.
	 * @param String $nonce_arg Query parmeter the nonce is in.
	 */
	public static function get_param( $key, $nonce_action, $nonce_arg = '_wpnonce' ) {
		if (
			isset( $_GET[ $key ] ) &&
			isset( $_GET[ $nonce_arg ] ) &&
			wp_verify_nonce( sanitize_text_field( wp_unslash( ( $_GET[ $nonce_arg ] ) ) ), $nonce_action )
		) {
			return sanitize_text_field( wp_unslash( ( $_GET[ $key ] ) ) );
		}

		return null;
	}

	/**
	 * Return an array sanitized, unslashed query parameter by its key, validated with a nonce.
	 *
	 * @param String $key Key for the query parameter to return.
	 * @param String $nonce_action  Name of the nonce action to verify the given nonce against.
	 * @param String $nonce_arg Query parmeter the nonce is in.
	 */
	public static function get_param_array( $key, $nonce_action, $nonce_arg = '_wpnonce' ) {
		if (
			isset( $_GET[ $key ] ) &&
			isset( $_GET[ $nonce_arg ] ) &&
			wp_verify_nonce( sanitize_text_field( wp_unslash( ( $_GET[ $nonce_arg ] ) ) ), $nonce_action )
		) {
			return array_map( 'sanitize_text_field', wp_unslash( $_GET[ $key ] ) );
		}

		return array();
	}

	/**
	 * Return an associative array of query param keys and values given an array of keys
	 * that are sanitized and validated against a nonce
	 *
	 * @param String $keys Array of keys to fetch query parameter values for.
	 * @param String $nonce_action  Name of the nonce action to verify the given nonce against.
	 * @param String $nonce_arg Query parmeter the nonce is in.
	 */
	public static function get_parameters( $keys, $nonce_action, $nonce_arg = '_wpnonce' ) {
		$query_params = array_reduce(
			$keys,
			function( $result, $key ) use ( $nonce_arg, $nonce_action ) {
				$query_param = QueryParameters::get_param( $key, $nonce_action, $nonce_arg );

				$result[ $key ] = $query_param;
				return $result;
			},
			array()
		);

		return $query_params;
	}
}


SILENT KILLER Tool