??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/netecfwd.co.uk/wp-content/plugins/wpforms-lite/includes/functions/plugins.php
⬅ Kembali
<?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
);
}
Nama
Tipe
Ukuran
Diubah
Aksi
🐘 access.php
php
10.8 KB
2026-06-19 06:58
🐘 builder.php
php
1.4 KB
2026-06-19 06:58
🐘 checks.php
php
16.2 KB
2026-06-19 06:58
🐘 colors.php
php
4 KB
2026-06-19 06:58
🐘 data-presets.php
php
19.1 KB
2026-06-19 06:58
🐘 date-time.php
php
2.8 KB
2026-06-19 06:58
🐘 debug.php
php
5.3 KB
2026-06-19 06:58
🐘 education.php
php
2.9 KB
2026-06-19 06:58
🐘 escape-sanitize.php
php
18 KB
2026-06-19 06:58
🐘 filesystem-media.php
php
8.8 KB
2026-06-19 06:58
🐘 form-fields.php
php
19.2 KB
2026-06-19 06:58
🐘 forms.php
php
14.6 KB
2026-06-19 06:58
🐘 list.php
php
6.9 KB
2026-06-19 06:58
🐘 payments.php
php
21.8 KB
2026-06-19 06:58
🐘 plugins.php
php
2.4 KB
2026-06-19 06:58
🐘 privacy.php
php
2.5 KB
2026-06-19 06:58
🐘 providers.php
php
2 KB
2026-06-19 06:58
🐘 utilities.php
php
10.4 KB
2026-06-19 06:58