PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.5
YayMail – WooCommerce Email Customizer v4.4.5
4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 All 57 releases
← All changes | vendor-prefixed/src/Support/Slug.php +6 -6 4.4.1 → 4.4.5 View file →
@@ -1,9 +1,9 @@
1 1 <?php
2 2
3 3 namespace YayMailScoped\YayCommerce\AdminShell\Support;
4 4
5 -\defined('ABSPATH') || exit;
5 +defined('ABSPATH') || exit;
6 6 /**
7 7 * Slug utilities.
8 8 *
9 9 * Plugin slugs can contain characters that are valid in wp_options keys
@@ -24,17 +24,17 @@
24 24 * - Return '_' for empty / all-special input (never empty string)
25 25 *
26 26 * Idempotent: to_var_name( to_var_name( $x ) ) === to_var_name( $x ).
27 27 */
28 - public static function to_var_name(string $slug) : string
28 + public static function to_var_name(string $slug): string
29 29 {
30 - $name = \preg_replace('/[^A-Za-z0-9_]/', '_', $slug);
31 - $name = \preg_replace('/_+/', '_', (string) $name);
32 - $name = \trim((string) $name, '_');
30 + $name = preg_replace('/[^A-Za-z0-9_]/', '_', $slug);
31 + $name = preg_replace('/_+/', '_', (string) $name);
32 + $name = trim((string) $name, '_');
33 33 if ('' === $name) {
34 34 return '_';
35 35 }
36 - if (\preg_match('/^\\d/', $name)) {
36 + if (preg_match('/^\d/', $name)) {
37 37 $name = '_' . $name;
38 38 }
39 39 return $name;
40 40 }