GRAYBYTE WORDPRESS FILE MANAGER7911

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/woocommerce/src/StoreApi/Utilities/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/woocommerce/src/StoreApi/Utilities//ArrayUtils.php
<?php
namespace Automattic\WooCommerce\StoreApi\Utilities;

/**
 * ArrayUtils class used for custom functions to operate on arrays
 */
class ArrayUtils {
	/**
	 * Join a string with a natural language conjunction at the end.
	 *
	 * @param array $array  The array to join together with the natural language conjunction.
	 * @param bool  $enclose_items_with_quotes Whether each item in the array should be enclosed within quotation marks.
	 *
	 * @return string a string containing a list of items and a natural language conjuction.
	 */
	public static function natural_language_join( $array, $enclose_items_with_quotes = false ) {
		if ( true === $enclose_items_with_quotes ) {
			$array = array_map(
				function ( $item ) {
					return '"' . $item . '"';
				},
				$array
			);
		}
		$last = array_pop( $array );
		if ( $array ) {
			return sprintf(
				/* translators: 1: The first n-1 items of a list 2: the last item in the list. */
				__( '%1$s and %2$s', 'woocommerce' ),
				implode( ', ', $array ),
				$last
			);
		}
		return $last;
	}

	/**
	 * Check if a string contains any of the items in an array.
	 *
	 * @param string $needle The string to check.
	 * @param array  $haystack  The array of items to check for.
	 *
	 * @return bool true if the string contains any of the items in the array, false otherwise.
	 */
	public static function string_contains_array( $needle, $haystack ) {
		foreach ( $haystack as $item ) {
			if ( false !== strpos( $needle, $item ) ) {
				return true;
			}
		}
		return false;
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:19
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:19
giriqfky / giriqfky
0644
ArrayUtils.php
1.494 KB
April 30 2024 19:35:34
giriqfky / giriqfky
0644
CartController.php
47.534 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
CheckoutTrait.php
10.727 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
DraftOrderTrait.php
1.765 KB
September 04 2024 20:34:26
giriqfky / giriqfky
0644
JsonWebToken.php
5.072 KB
August 27 2024 23:04:44
giriqfky / giriqfky
0644
LocalPickupUtils.php
3.175 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
NoticeHandler.php
2.021 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
OrderAuthorizationTrait.php
2.28 KB
February 06 2024 22:01:42
giriqfky / giriqfky
0644
OrderController.php
31.083 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
Pagination.php
2.051 KB
December 27 2023 00:45:02
giriqfky / giriqfky
0644
PaymentUtils.php
3.649 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
ProductItemTrait.php
2.95 KB
December 27 2023 00:45:02
giriqfky / giriqfky
0644
ProductQuery.php
19.02 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
ProductQueryFilters.php
8.011 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
QuantityLimits.php
9.87 KB
April 09 2025 15:56:48
giriqfky / giriqfky
0644
RateLimits.php
6.142 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
SanitizationUtils.php
0.775 KB
February 27 2024 18:59:46
giriqfky / giriqfky
0644
ValidationUtils.php
1.729 KB
December 27 2023 00:45:02
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF