Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > woocommerce > > src > > Blocks > Utils
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 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
BlockHooksTrait.php | File | 7059 bytes | July 30 2024 19:31:16. | |
BlockTemplateUtils.php | File | 31727 bytes | May 12 2025 21:07:28. | |
BlocksSharedState.php | File | 4339 bytes | June 23 2025 19:46:28. | |
BlocksWpQuery.php | File | 2133 bytes | December 27 2023 00:45:02. | |
CartCheckoutUtils.php | File | 14989 bytes | May 12 2025 21:07:28. | |
MiniCartUtils.php | File | 3594 bytes | November 14 2024 01:17:00. | |
ProductAvailabilityUtils.php | File | 1320 bytes | June 23 2025 19:46:28. | |
ProductDataUtils.php | File | 455 bytes | June 23 2025 19:46:28. | |
ProductGalleryUtils.php | File | 5802 bytes | June 23 2025 19:46:28. | |
StyleAttributesUtils.php | File | 23677 bytes | May 12 2025 21:07:28. | |
Utils.php | File | 1240 bytes | December 27 2023 00:45:02. |
<?php namespace Automattic\WooCommerce\Blocks\Utils; /** * Utils class */ class Utils { /** * Compare the current WordPress version with a given version. It's a wrapper around `version-compare` * that additionally takes into account the suffix (like `-RC1`). * For example: version 6.3 is considered lower than 6.3-RC2, so you can do * wp_version_compare( '6.3', '>=' ) and that will return true for 6.3-RC2. * * @param string $version The version to compare against. * @param string|null $operator Optional. The comparison operator. Defaults to null. * @return bool|int Returns true if the current WordPress version satisfies the comparison, false otherwise. */ public static function wp_version_compare( $version, $operator = null ) { $current_wp_version = get_bloginfo( 'version' ); if ( preg_match( '/^([0-9]+\.[0-9]+)/', $current_wp_version, $matches ) ) { $current_wp_version = (float) $matches[1]; } // Replace non-alphanumeric characters with a dot. $current_wp_version = preg_replace( '/[^0-9a-zA-Z\.]+/i', '.', $current_wp_version ); $version = preg_replace( '/[^0-9a-zA-Z\.]+/i', '.', $version ); return version_compare( $current_wp_version, $version, $operator ); } }
SILENT KILLER Tool