SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > > wpforms-lite > > includes > functions


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins//wpforms-lite//includes/functions

NameTypeSizeLast ModifiedActions
access.php File 10729 bytes June 05 2025 16:54:44.
builder.php File 1410 bytes June 17 2025 13:49:02.
checks.php File 16176 bytes July 31 2025 14:13:36.
colors.php File 4067 bytes November 28 2023 16:59:36.
data-presets.php File 19488 bytes February 16 2023 18:36:38.
date-time.php File 2892 bytes June 05 2025 16:54:44.
debug.php File 5350 bytes July 31 2025 14:13:36.
education.php File 2963 bytes June 17 2025 13:49:02.
escape-sanitize.php File 14233 bytes January 28 2025 17:46:12.
filesystem-media.php File 6758 bytes April 24 2025 14:53:30.
form-fields.php File 17322 bytes July 31 2025 14:13:36.
forms.php File 13846 bytes July 31 2025 14:13:36.
list.php File 7040 bytes June 13 2024 16:24:36.
payments.php File 22279 bytes July 31 2025 14:13:36.
plugins.php File 2432 bytes June 05 2025 16:54:44.
privacy.php File 2576 bytes February 27 2025 17:40:00.
providers.php File 2040 bytes June 05 2025 16:54:44.
utilities.php File 8743 bytes June 05 2025 16:54:44.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins//wpforms-lite//includes/functions/plugins.php

<?php
/**
 * Helper functions to perform various plugins and addons related actions.
 *
 * @since 1.8.2.2
 */

use WPForms\Requirements\Requirements;

/**
 * Check if addon met requirements.
 *
 * @since 1.8.2.2
 *
 * @param array $requirements Addon requirements.
 *
 * @return bool
 */
function wpforms_requirements( array $requirements ): bool {

	return Requirements::get_instance()->validate( $requirements );
}

/**
 * Determine if an addon is active and passed all requirements.
 *
 * @since 1.9.2
 *
 * @param string $addon_slug Addon slug without `wpforms-` prefix.
 *
 * @return bool
 */
function wpforms_is_addon_initialized( string $addon_slug ): bool {

	$basename = sprintf( 'wpforms-%1$s/wpforms-%1$s.php', $addon_slug );

	if ( is_multisite() ) {
		$active_plugins = (array) get_option( 'active_plugins', [] );

		if ( in_array( $basename, $active_plugins, true ) ) {
			return true;
		}
	}

	return Requirements::get_instance()->is_validated( $basename );
}

/**
 * Check addon requirements and activate addon or plugin.
 *
 * @since 1.8.4
 * @since 1.9.2 Keep addons active even if they don't meet requirements.
 *
 * @param string $plugin Path to the plugin file relative to the plugins' directory.
 *
 * @return null|WP_Error Null on success, WP_Error on invalid file.
 */
function wpforms_activate_plugin( string $plugin ) {

	$activate = activate_plugin( $plugin );

	if ( is_wp_error( $activate ) ) {
		return $activate;
	}

	$requirements = Requirements::get_instance();

	if ( $requirements->is_validated( $plugin ) ) {
		return null;
	}

	return new WP_Error( 'wpforms_addon_incompatible', $requirements->get_notice( $plugin ) );
}

/**
 * Compares two "PHP-standardized" version number strings.
 *
 * Removes any "-RCn", "-beta" from version numbers first.
 *
 * @since 1.9.4
 *
 * @param string $version1 Version number.
 * @param string $version2 Version number.
 * @param string $operator Comparison operator.
 *
 * @return bool
 */
function wpforms_version_compare( $version1, $version2, $operator ): bool {

	// If the version is not a string, return false.
	if ( ! is_string( $version1 ) || ! is_string( $version2 ) ) {
		return false;
	}

	// Strip dash and anything after it.
	$clean_version_number = function ( $version ) {
		return preg_replace( '/-.+/', '', $version );
	};

	return version_compare(
		$clean_version_number( $version1 ),
		$clean_version_number( $version2 ),
		$operator
	);
}

SILENT KILLER Tool