| @@ -7,13 +7,13 @@ | ||
| 7 | 7 | // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- usk_ / BDTUSK_ / ultimate-store-kit- are this plugin's established public prefixes. Ultimate Store Kit Pro calls into these names, as does third-party integration code, so renaming them is a breaking change. Plugin Check only recognises prefixes derived verbatim from the slug and so reports them as unprefixed. |
| 8 | 8 | |
| 9 | 9 | use UltimateStoreKit\Base\Support\Optional; |
| 10 | 10 | |
| 11 | -if (! function_exists('usk_optional')) { | |
| 11 | +if (! function_exists('ultimate_store_kit_optional')) { | |
| 12 | 12 | /** |
| 13 | 13 | * Provide access to optional objects. |
| 14 | 14 | * |
| 15 | - * Named usk_optional() rather than optional(): the unprefixed name is the | |
| 15 | + * Named ultimate_store_kit_optional() rather than optional(): the unprefixed name is the | |
| 16 | 16 | * Laravel helper, which any plugin bundling illuminate/support also declares. |
| 17 | 17 | * Behind a function_exists() guard the first declaration wins, so an |
| 18 | 18 | * unprefixed version would silently hand this plugin a foreign Optional class. |
| 19 | 19 | * |
| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | * @param mixed $value |
| 21 | 21 | * @param callable|null $callback |
| 22 | 22 | * @return mixed |
| 23 | 23 | */ |
| 24 | - function usk_optional($value = null, ?callable $callback = null) { | |
| 24 | + function ultimate_store_kit_optional($value = null, ?callable $callback = null) { | |
| 25 | 25 | if (is_null($callback)) { |
| 26 | 26 | return new Optional($value); |
| 27 | 27 | } elseif (! is_null($value)) { |
| 28 | 28 | return $callback($value); |