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/l10n.php

<?php

/**
 * Retrieves an associative array of languages to which
 * this plugin is translated.
 *
 * @return array Array of languages.
 */
function wpcf7_l10n() {
	static $l10n = array();

	if ( ! empty( $l10n ) ) {
		return $l10n;
	}

	if ( ! is_admin() ) {
		return $l10n;
	}

	require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );

	$api = translations_api( 'plugins', array(
		'slug' => 'contact-form-7',
		'version' => WPCF7_VERSION,
	) );

	if ( is_wp_error( $api )
	or empty( $api['translations'] ) ) {
		return $l10n;
	}

	foreach ( (array) $api['translations'] as $translation ) {
		if ( ! empty( $translation['language'] )
		and ! empty( $translation['english_name'] ) ) {
			$l10n[$translation['language']] = $translation['english_name'];
		}
	}

	return $l10n;
}


/**
 * Returns true if the given locale code looks valid.
 *
 * @param string $locale Locale code.
 */
function wpcf7_is_valid_locale( $locale ) {
	if ( ! is_string( $locale ) ) {
		return false;
	}

	$pattern = '/^[a-z]{2,3}(?:_[a-zA-Z_]{2,})?$/';
	return (bool) preg_match( $pattern, $locale );
}


/**
 * Returns true if the given locale is an RTL language.
 */
function wpcf7_is_rtl( $locale = '' ) {
	static $rtl_locales = array(
		'ar' => 'Arabic',
		'ary' => 'Moroccan Arabic',
		'azb' => 'South Azerbaijani',
		'fa_IR' => 'Persian',
		'haz' => 'Hazaragi',
		'he_IL' => 'Hebrew',
		'ps' => 'Pashto',
		'ug_CN' => 'Uighur',
	);

	if ( empty( $locale )
	and function_exists( 'is_rtl' ) ) {
		return is_rtl();
	}

	if ( empty( $locale ) ) {
		$locale = determine_locale();
	}

	return isset( $rtl_locales[$locale] );
}


/**
 * Loads a translation file into the plugin's text domain.
 *
 * @param string $locale Locale code.
 * @return bool True on success, false on failure.
 */
function wpcf7_load_textdomain( $locale = '' ) {
	$mofile = path_join(
		WP_LANG_DIR . '/plugins/',
		sprintf( '%s-%s.mo', WPCF7_TEXT_DOMAIN, $locale )
	);

	return load_textdomain( WPCF7_TEXT_DOMAIN, $mofile, $locale );
}


/**
 * Unloads translations for the plugin's text domain.
 *
 * @param bool $reloadable Whether the text domain can be loaded
 *             just-in-time again.
 * @return bool True on success, false on failure.
 */
function wpcf7_unload_textdomain( $reloadable = false ) {
	return unload_textdomain( WPCF7_TEXT_DOMAIN, $reloadable );
}


/**
 * Switches translation locale, calls the callback, then switches back
 * to the original locale.
 *
 * @param string $locale Locale code.
 * @param callable $callback The callable to be called.
 * @param mixed $args Parameters to be passed to the callback.
 * @return mixed The return value of the callback.
 */
function wpcf7_switch_locale( $locale, callable $callback, ...$args ) {
	static $available_locales = null;

	if ( ! isset( $available_locales ) ) {
		$available_locales = array_merge(
			array( 'en_US' ),
			get_available_languages()
		);
	}

	$previous_locale = determine_locale();

	$do_switch_locale = (
		$locale !== $previous_locale &&
		in_array( $locale, $available_locales, true ) &&
		in_array( $previous_locale, $available_locales, true )
	);

	if ( $do_switch_locale ) {
		wpcf7_unload_textdomain();
		switch_to_locale( $locale );
		wpcf7_load_textdomain( $locale );
	}

	$result = call_user_func( $callback, ...$args );

	if ( $do_switch_locale ) {
		wpcf7_unload_textdomain( true );
		restore_previous_locale();
		wpcf7_load_textdomain( $previous_locale );
	}

	return $result;
}

SILENT KILLER Tool