@@ -62,7 +62,7 @@ |
||
62 | 62 | } |
63 | 63 | // xxx::xxx |
64 | 64 | else { |
65 | - $fill = ':' . str_repeat('0:', 6 - $c2 - $c1); |
|
65 | + $fill = ':'.str_repeat('0:', 6 - $c2 - $c1); |
|
66 | 66 | $ip = str_replace('::', $fill, $ip); |
67 | 67 | } |
68 | 68 | return $ip; |
@@ -106,8 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | if ($ip_parts[1] !== '') { |
108 | 108 | return implode(':', $ip_parts); |
109 | - } |
|
110 | - else { |
|
109 | + } else { |
|
111 | 110 | return $ip_parts[0]; |
112 | 111 | } |
113 | 112 | } |
@@ -130,8 +129,7 @@ discard block |
||
130 | 129 | $ipv6_part = substr($ip, 0, $pos); |
131 | 130 | $ipv4_part = substr($ip, $pos + 1); |
132 | 131 | return array($ipv6_part, $ipv4_part); |
133 | - } |
|
134 | - else { |
|
132 | + } else { |
|
135 | 133 | return array($ip, ''); |
136 | 134 | } |
137 | 135 | } |
@@ -182,8 +180,7 @@ discard block |
||
182 | 180 | } |
183 | 181 | } |
184 | 182 | return true; |
185 | - } |
|
186 | - else { |
|
183 | + } else { |
|
187 | 184 | return false; |
188 | 185 | } |
189 | 186 | } |
@@ -29,5 +29,5 @@ |
||
29 | 29 | * @see Requests_Hooks::register |
30 | 30 | * @param Requests_Hooks $hooks Hook system |
31 | 31 | */ |
32 | - public function register(Requests_Hooks &$hooks); |
|
32 | + public function register(Requests_Hooks & $hooks); |
|
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | public function offsetGet($key) { |
52 | 52 | $key = strtolower($key); |
53 | - if (!isset($this->data[$key])) { |
|
53 | + if ( ! isset($this->data[$key])) { |
|
54 | 54 | return null; |
55 | 55 | } |
56 | 56 |
@@ -41,43 +41,43 @@ |
||
41 | 41 | */ |
42 | 42 | function random_bytes($bytes) |
43 | 43 | { |
44 | - try { |
|
45 | - $bytes = RandomCompat_intval($bytes); |
|
46 | - } catch (TypeError $ex) { |
|
47 | - throw new TypeError( |
|
48 | - 'random_bytes(): $bytes must be an integer' |
|
49 | - ); |
|
50 | - } |
|
44 | + try { |
|
45 | + $bytes = RandomCompat_intval($bytes); |
|
46 | + } catch (TypeError $ex) { |
|
47 | + throw new TypeError( |
|
48 | + 'random_bytes(): $bytes must be an integer' |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | |
52 | - if ($bytes < 1) { |
|
53 | - throw new Error( |
|
54 | - 'Length must be greater than 0' |
|
55 | - ); |
|
56 | - } |
|
52 | + if ($bytes < 1) { |
|
53 | + throw new Error( |
|
54 | + 'Length must be greater than 0' |
|
55 | + ); |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * $secure is passed by reference. If it's set to false, fail. Note |
|
60 | - * that this will only return false if this function fails to return |
|
61 | - * any data. |
|
62 | - * |
|
63 | - * @ref https://github.com/paragonie/random_compat/issues/6#issuecomment-119564973 |
|
64 | - */ |
|
65 | - $secure = true; |
|
66 | - $buf = openssl_random_pseudo_bytes($bytes, $secure); |
|
67 | - if ( |
|
68 | - $buf !== false |
|
69 | - && |
|
70 | - $secure |
|
71 | - && |
|
72 | - RandomCompat_strlen($buf) === $bytes |
|
73 | - ) { |
|
74 | - return $buf; |
|
75 | - } |
|
58 | + /** |
|
59 | + * $secure is passed by reference. If it's set to false, fail. Note |
|
60 | + * that this will only return false if this function fails to return |
|
61 | + * any data. |
|
62 | + * |
|
63 | + * @ref https://github.com/paragonie/random_compat/issues/6#issuecomment-119564973 |
|
64 | + */ |
|
65 | + $secure = true; |
|
66 | + $buf = openssl_random_pseudo_bytes($bytes, $secure); |
|
67 | + if ( |
|
68 | + $buf !== false |
|
69 | + && |
|
70 | + $secure |
|
71 | + && |
|
72 | + RandomCompat_strlen($buf) === $bytes |
|
73 | + ) { |
|
74 | + return $buf; |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * If we reach here, PHP has failed us. |
|
79 | - */ |
|
80 | - throw new Exception( |
|
81 | - 'Could not gather sufficient random data' |
|
82 | - ); |
|
77 | + /** |
|
78 | + * If we reach here, PHP has failed us. |
|
79 | + */ |
|
80 | + throw new Exception( |
|
81 | + 'Could not gather sufficient random data' |
|
82 | + ); |
|
83 | 83 | } |
@@ -39,43 +39,43 @@ |
||
39 | 39 | */ |
40 | 40 | function random_bytes($bytes) |
41 | 41 | { |
42 | - try { |
|
43 | - $bytes = RandomCompat_intval($bytes); |
|
44 | - } catch (TypeError $ex) { |
|
45 | - throw new TypeError( |
|
46 | - 'random_bytes(): $bytes must be an integer' |
|
47 | - ); |
|
48 | - } |
|
42 | + try { |
|
43 | + $bytes = RandomCompat_intval($bytes); |
|
44 | + } catch (TypeError $ex) { |
|
45 | + throw new TypeError( |
|
46 | + 'random_bytes(): $bytes must be an integer' |
|
47 | + ); |
|
48 | + } |
|
49 | 49 | |
50 | - if ($bytes < 1) { |
|
51 | - throw new Error( |
|
52 | - 'Length must be greater than 0' |
|
53 | - ); |
|
54 | - } |
|
50 | + if ($bytes < 1) { |
|
51 | + throw new Error( |
|
52 | + 'Length must be greater than 0' |
|
53 | + ); |
|
54 | + } |
|
55 | 55 | |
56 | - $buf = ''; |
|
57 | - $util = new COM('CAPICOM.Utilities.1'); |
|
58 | - $execCount = 0; |
|
56 | + $buf = ''; |
|
57 | + $util = new COM('CAPICOM.Utilities.1'); |
|
58 | + $execCount = 0; |
|
59 | 59 | |
60 | - /** |
|
61 | - * Let's not let it loop forever. If we run N times and fail to |
|
62 | - * get N bytes of random data, then CAPICOM has failed us. |
|
63 | - */ |
|
64 | - do { |
|
65 | - $buf .= base64_decode($util->GetRandom($bytes, 0)); |
|
66 | - if (RandomCompat_strlen($buf) >= $bytes) { |
|
67 | - /** |
|
68 | - * Return our random entropy buffer here: |
|
69 | - */ |
|
70 | - return RandomCompat_substr($buf, 0, $bytes); |
|
71 | - } |
|
72 | - ++$execCount; |
|
73 | - } while ($execCount < $bytes); |
|
60 | + /** |
|
61 | + * Let's not let it loop forever. If we run N times and fail to |
|
62 | + * get N bytes of random data, then CAPICOM has failed us. |
|
63 | + */ |
|
64 | + do { |
|
65 | + $buf .= base64_decode($util->GetRandom($bytes, 0)); |
|
66 | + if (RandomCompat_strlen($buf) >= $bytes) { |
|
67 | + /** |
|
68 | + * Return our random entropy buffer here: |
|
69 | + */ |
|
70 | + return RandomCompat_substr($buf, 0, $bytes); |
|
71 | + } |
|
72 | + ++$execCount; |
|
73 | + } while ($execCount < $bytes); |
|
74 | 74 | |
75 | - /** |
|
76 | - * If we reach here, PHP has failed us. |
|
77 | - */ |
|
78 | - throw new Exception( |
|
79 | - 'Could not gather sufficient random data' |
|
80 | - ); |
|
75 | + /** |
|
76 | + * If we reach here, PHP has failed us. |
|
77 | + */ |
|
78 | + throw new Exception( |
|
79 | + 'Could not gather sufficient random data' |
|
80 | + ); |
|
81 | 81 | } |
@@ -41,46 +41,46 @@ |
||
41 | 41 | */ |
42 | 42 | function random_bytes($bytes) |
43 | 43 | { |
44 | - try { |
|
45 | - $bytes = RandomCompat_intval($bytes); |
|
46 | - } catch (TypeError $ex) { |
|
47 | - throw new TypeError( |
|
48 | - 'random_bytes(): $bytes must be an integer' |
|
49 | - ); |
|
50 | - } |
|
44 | + try { |
|
45 | + $bytes = RandomCompat_intval($bytes); |
|
46 | + } catch (TypeError $ex) { |
|
47 | + throw new TypeError( |
|
48 | + 'random_bytes(): $bytes must be an integer' |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | |
52 | - if ($bytes < 1) { |
|
53 | - throw new Error( |
|
54 | - 'Length must be greater than 0' |
|
55 | - ); |
|
56 | - } |
|
52 | + if ($bytes < 1) { |
|
53 | + throw new Error( |
|
54 | + 'Length must be greater than 0' |
|
55 | + ); |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be |
|
60 | - * generated in one invocation. |
|
61 | - */ |
|
62 | - if ($bytes > 2147483647) { |
|
63 | - $buf = ''; |
|
64 | - for ($i = 0; $i < $bytes; $i += 1073741824) { |
|
65 | - $n = ($bytes - $i) > 1073741824 |
|
66 | - ? 1073741824 |
|
67 | - : $bytes - $i; |
|
68 | - $buf .= Sodium::randombytes_buf($n); |
|
69 | - } |
|
70 | - } else { |
|
71 | - $buf = Sodium::randombytes_buf($bytes); |
|
72 | - } |
|
58 | + /** |
|
59 | + * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be |
|
60 | + * generated in one invocation. |
|
61 | + */ |
|
62 | + if ($bytes > 2147483647) { |
|
63 | + $buf = ''; |
|
64 | + for ($i = 0; $i < $bytes; $i += 1073741824) { |
|
65 | + $n = ($bytes - $i) > 1073741824 |
|
66 | + ? 1073741824 |
|
67 | + : $bytes - $i; |
|
68 | + $buf .= Sodium::randombytes_buf($n); |
|
69 | + } |
|
70 | + } else { |
|
71 | + $buf = Sodium::randombytes_buf($bytes); |
|
72 | + } |
|
73 | 73 | |
74 | - if ($buf !== false) { |
|
75 | - if (RandomCompat_strlen($buf) === $bytes) { |
|
76 | - return $buf; |
|
77 | - } |
|
78 | - } |
|
74 | + if ($buf !== false) { |
|
75 | + if (RandomCompat_strlen($buf) === $bytes) { |
|
76 | + return $buf; |
|
77 | + } |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * If we reach here, PHP has failed us. |
|
82 | - */ |
|
83 | - throw new Exception( |
|
84 | - 'Could not gather sufficient random data' |
|
85 | - ); |
|
80 | + /** |
|
81 | + * If we reach here, PHP has failed us. |
|
82 | + */ |
|
83 | + throw new Exception( |
|
84 | + 'Could not gather sufficient random data' |
|
85 | + ); |
|
86 | 86 | } |
@@ -41,36 +41,36 @@ |
||
41 | 41 | */ |
42 | 42 | function random_bytes($bytes) |
43 | 43 | { |
44 | - try { |
|
45 | - $bytes = RandomCompat_intval($bytes); |
|
46 | - } catch (TypeError $ex) { |
|
47 | - throw new TypeError( |
|
48 | - 'random_bytes(): $bytes must be an integer' |
|
49 | - ); |
|
50 | - } |
|
44 | + try { |
|
45 | + $bytes = RandomCompat_intval($bytes); |
|
46 | + } catch (TypeError $ex) { |
|
47 | + throw new TypeError( |
|
48 | + 'random_bytes(): $bytes must be an integer' |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | |
52 | - if ($bytes < 1) { |
|
53 | - throw new Error( |
|
54 | - 'Length must be greater than 0' |
|
55 | - ); |
|
56 | - } |
|
52 | + if ($bytes < 1) { |
|
53 | + throw new Error( |
|
54 | + 'Length must be greater than 0' |
|
55 | + ); |
|
56 | + } |
|
57 | 57 | |
58 | - $buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); |
|
59 | - if ( |
|
60 | - $buf !== false |
|
61 | - && |
|
62 | - RandomCompat_strlen($buf) === $bytes |
|
63 | - ) { |
|
64 | - /** |
|
65 | - * Return our random entropy buffer here: |
|
66 | - */ |
|
67 | - return $buf; |
|
68 | - } |
|
58 | + $buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); |
|
59 | + if ( |
|
60 | + $buf !== false |
|
61 | + && |
|
62 | + RandomCompat_strlen($buf) === $bytes |
|
63 | + ) { |
|
64 | + /** |
|
65 | + * Return our random entropy buffer here: |
|
66 | + */ |
|
67 | + return $buf; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * If we reach here, PHP has failed us. |
|
72 | - */ |
|
73 | - throw new Exception( |
|
74 | - 'Could not gather sufficient random data' |
|
75 | - ); |
|
70 | + /** |
|
71 | + * If we reach here, PHP has failed us. |
|
72 | + */ |
|
73 | + throw new Exception( |
|
74 | + 'Could not gather sufficient random data' |
|
75 | + ); |
|
76 | 76 | } |
@@ -41,46 +41,46 @@ |
||
41 | 41 | */ |
42 | 42 | function random_bytes($bytes) |
43 | 43 | { |
44 | - try { |
|
45 | - $bytes = RandomCompat_intval($bytes); |
|
46 | - } catch (TypeError $ex) { |
|
47 | - throw new TypeError( |
|
48 | - 'random_bytes(): $bytes must be an integer' |
|
49 | - ); |
|
50 | - } |
|
44 | + try { |
|
45 | + $bytes = RandomCompat_intval($bytes); |
|
46 | + } catch (TypeError $ex) { |
|
47 | + throw new TypeError( |
|
48 | + 'random_bytes(): $bytes must be an integer' |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | |
52 | - if ($bytes < 1) { |
|
53 | - throw new Error( |
|
54 | - 'Length must be greater than 0' |
|
55 | - ); |
|
56 | - } |
|
52 | + if ($bytes < 1) { |
|
53 | + throw new Error( |
|
54 | + 'Length must be greater than 0' |
|
55 | + ); |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be |
|
60 | - * generated in one invocation. |
|
61 | - */ |
|
62 | - if ($bytes > 2147483647) { |
|
63 | - $buf = ''; |
|
64 | - for ($i = 0; $i < $bytes; $i += 1073741824) { |
|
65 | - $n = ($bytes - $i) > 1073741824 |
|
66 | - ? 1073741824 |
|
67 | - : $bytes - $i; |
|
68 | - $buf .= \Sodium\randombytes_buf($n); |
|
69 | - } |
|
70 | - } else { |
|
71 | - $buf = \Sodium\randombytes_buf($bytes); |
|
72 | - } |
|
58 | + /** |
|
59 | + * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be |
|
60 | + * generated in one invocation. |
|
61 | + */ |
|
62 | + if ($bytes > 2147483647) { |
|
63 | + $buf = ''; |
|
64 | + for ($i = 0; $i < $bytes; $i += 1073741824) { |
|
65 | + $n = ($bytes - $i) > 1073741824 |
|
66 | + ? 1073741824 |
|
67 | + : $bytes - $i; |
|
68 | + $buf .= \Sodium\randombytes_buf($n); |
|
69 | + } |
|
70 | + } else { |
|
71 | + $buf = \Sodium\randombytes_buf($bytes); |
|
72 | + } |
|
73 | 73 | |
74 | - if ($buf !== false) { |
|
75 | - if (RandomCompat_strlen($buf) === $bytes) { |
|
76 | - return $buf; |
|
77 | - } |
|
78 | - } |
|
74 | + if ($buf !== false) { |
|
75 | + if (RandomCompat_strlen($buf) === $bytes) { |
|
76 | + return $buf; |
|
77 | + } |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * If we reach here, PHP has failed us. |
|
82 | - */ |
|
83 | - throw new Exception( |
|
84 | - 'Could not gather sufficient random data' |
|
85 | - ); |
|
80 | + /** |
|
81 | + * If we reach here, PHP has failed us. |
|
82 | + */ |
|
83 | + throw new Exception( |
|
84 | + 'Could not gather sufficient random data' |
|
85 | + ); |
|
86 | 86 | } |
@@ -179,11 +179,13 @@ |
||
179 | 179 | $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; |
180 | 180 | |
181 | 181 | // Set text direction. |
182 | - if ( isset( $GLOBALS['text_direction'] ) ) |
|
183 | - $this->text_direction = $GLOBALS['text_direction']; |
|
182 | + if ( isset( $GLOBALS['text_direction'] ) ) { |
|
183 | + $this->text_direction = $GLOBALS['text_direction']; |
|
184 | + } |
|
184 | 185 | /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */ |
185 | - elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) |
|
186 | - $this->text_direction = 'rtl'; |
|
186 | + elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) { |
|
187 | + $this->text_direction = 'rtl'; |
|
188 | + } |
|
187 | 189 | |
188 | 190 | if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) { |
189 | 191 | $this->text_direction = 'ltr'; |
@@ -137,13 +137,13 @@ discard block |
||
137 | 137 | $this->weekday[6] = /* translators: weekday */ __('Saturday'); |
138 | 138 | |
139 | 139 | // The first letter of each day. |
140 | - $this->weekday_initial[ __( 'Sunday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Sunday initial' ); |
|
141 | - $this->weekday_initial[ __( 'Monday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'M', 'Monday initial' ); |
|
142 | - $this->weekday_initial[ __( 'Tuesday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'T', 'Tuesday initial' ); |
|
143 | - $this->weekday_initial[ __( 'Wednesday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'W', 'Wednesday initial' ); |
|
144 | - $this->weekday_initial[ __( 'Thursday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'T', 'Thursday initial' ); |
|
145 | - $this->weekday_initial[ __( 'Friday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'F', 'Friday initial' ); |
|
146 | - $this->weekday_initial[ __( 'Saturday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Saturday initial' ); |
|
140 | + $this->weekday_initial[__('Sunday')] = /* translators: one-letter abbreviation of the weekday */ _x('S', 'Sunday initial'); |
|
141 | + $this->weekday_initial[__('Monday')] = /* translators: one-letter abbreviation of the weekday */ _x('M', 'Monday initial'); |
|
142 | + $this->weekday_initial[__('Tuesday')] = /* translators: one-letter abbreviation of the weekday */ _x('T', 'Tuesday initial'); |
|
143 | + $this->weekday_initial[__('Wednesday')] = /* translators: one-letter abbreviation of the weekday */ _x('W', 'Wednesday initial'); |
|
144 | + $this->weekday_initial[__('Thursday')] = /* translators: one-letter abbreviation of the weekday */ _x('T', 'Thursday initial'); |
|
145 | + $this->weekday_initial[__('Friday')] = /* translators: one-letter abbreviation of the weekday */ _x('F', 'Friday initial'); |
|
146 | + $this->weekday_initial[__('Saturday')] = /* translators: one-letter abbreviation of the weekday */ _x('S', 'Saturday initial'); |
|
147 | 147 | |
148 | 148 | // Abbreviations for each day. |
149 | 149 | $this->weekday_abbrev[__('Sunday')] = /* translators: three-letter abbreviation of the weekday */ __('Sun'); |
@@ -155,46 +155,46 @@ discard block |
||
155 | 155 | $this->weekday_abbrev[__('Saturday')] = /* translators: three-letter abbreviation of the weekday */ __('Sat'); |
156 | 156 | |
157 | 157 | // The Months |
158 | - $this->month['01'] = /* translators: month name */ __( 'January' ); |
|
159 | - $this->month['02'] = /* translators: month name */ __( 'February' ); |
|
160 | - $this->month['03'] = /* translators: month name */ __( 'March' ); |
|
161 | - $this->month['04'] = /* translators: month name */ __( 'April' ); |
|
162 | - $this->month['05'] = /* translators: month name */ __( 'May' ); |
|
163 | - $this->month['06'] = /* translators: month name */ __( 'June' ); |
|
164 | - $this->month['07'] = /* translators: month name */ __( 'July' ); |
|
165 | - $this->month['08'] = /* translators: month name */ __( 'August' ); |
|
166 | - $this->month['09'] = /* translators: month name */ __( 'September' ); |
|
167 | - $this->month['10'] = /* translators: month name */ __( 'October' ); |
|
168 | - $this->month['11'] = /* translators: month name */ __( 'November' ); |
|
169 | - $this->month['12'] = /* translators: month name */ __( 'December' ); |
|
158 | + $this->month['01'] = /* translators: month name */ __('January'); |
|
159 | + $this->month['02'] = /* translators: month name */ __('February'); |
|
160 | + $this->month['03'] = /* translators: month name */ __('March'); |
|
161 | + $this->month['04'] = /* translators: month name */ __('April'); |
|
162 | + $this->month['05'] = /* translators: month name */ __('May'); |
|
163 | + $this->month['06'] = /* translators: month name */ __('June'); |
|
164 | + $this->month['07'] = /* translators: month name */ __('July'); |
|
165 | + $this->month['08'] = /* translators: month name */ __('August'); |
|
166 | + $this->month['09'] = /* translators: month name */ __('September'); |
|
167 | + $this->month['10'] = /* translators: month name */ __('October'); |
|
168 | + $this->month['11'] = /* translators: month name */ __('November'); |
|
169 | + $this->month['12'] = /* translators: month name */ __('December'); |
|
170 | 170 | |
171 | 171 | // The Months, genitive |
172 | - $this->month_genitive['01'] = /* translators: month name, genitive */ _x( 'January', 'genitive' ); |
|
173 | - $this->month_genitive['02'] = /* translators: month name, genitive */ _x( 'February', 'genitive' ); |
|
174 | - $this->month_genitive['03'] = /* translators: month name, genitive */ _x( 'March', 'genitive' ); |
|
175 | - $this->month_genitive['04'] = /* translators: month name, genitive */ _x( 'April', 'genitive' ); |
|
176 | - $this->month_genitive['05'] = /* translators: month name, genitive */ _x( 'May', 'genitive' ); |
|
177 | - $this->month_genitive['06'] = /* translators: month name, genitive */ _x( 'June', 'genitive' ); |
|
178 | - $this->month_genitive['07'] = /* translators: month name, genitive */ _x( 'July', 'genitive' ); |
|
179 | - $this->month_genitive['08'] = /* translators: month name, genitive */ _x( 'August', 'genitive' ); |
|
180 | - $this->month_genitive['09'] = /* translators: month name, genitive */ _x( 'September', 'genitive' ); |
|
181 | - $this->month_genitive['10'] = /* translators: month name, genitive */ _x( 'October', 'genitive' ); |
|
182 | - $this->month_genitive['11'] = /* translators: month name, genitive */ _x( 'November', 'genitive' ); |
|
183 | - $this->month_genitive['12'] = /* translators: month name, genitive */ _x( 'December', 'genitive' ); |
|
172 | + $this->month_genitive['01'] = /* translators: month name, genitive */ _x('January', 'genitive'); |
|
173 | + $this->month_genitive['02'] = /* translators: month name, genitive */ _x('February', 'genitive'); |
|
174 | + $this->month_genitive['03'] = /* translators: month name, genitive */ _x('March', 'genitive'); |
|
175 | + $this->month_genitive['04'] = /* translators: month name, genitive */ _x('April', 'genitive'); |
|
176 | + $this->month_genitive['05'] = /* translators: month name, genitive */ _x('May', 'genitive'); |
|
177 | + $this->month_genitive['06'] = /* translators: month name, genitive */ _x('June', 'genitive'); |
|
178 | + $this->month_genitive['07'] = /* translators: month name, genitive */ _x('July', 'genitive'); |
|
179 | + $this->month_genitive['08'] = /* translators: month name, genitive */ _x('August', 'genitive'); |
|
180 | + $this->month_genitive['09'] = /* translators: month name, genitive */ _x('September', 'genitive'); |
|
181 | + $this->month_genitive['10'] = /* translators: month name, genitive */ _x('October', 'genitive'); |
|
182 | + $this->month_genitive['11'] = /* translators: month name, genitive */ _x('November', 'genitive'); |
|
183 | + $this->month_genitive['12'] = /* translators: month name, genitive */ _x('December', 'genitive'); |
|
184 | 184 | |
185 | 185 | // Abbreviations for each month. |
186 | - $this->month_abbrev[ __( 'January' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Jan', 'January abbreviation' ); |
|
187 | - $this->month_abbrev[ __( 'February' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Feb', 'February abbreviation' ); |
|
188 | - $this->month_abbrev[ __( 'March' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Mar', 'March abbreviation' ); |
|
189 | - $this->month_abbrev[ __( 'April' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Apr', 'April abbreviation' ); |
|
190 | - $this->month_abbrev[ __( 'May' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'May', 'May abbreviation' ); |
|
191 | - $this->month_abbrev[ __( 'June' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Jun', 'June abbreviation' ); |
|
192 | - $this->month_abbrev[ __( 'July' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Jul', 'July abbreviation' ); |
|
193 | - $this->month_abbrev[ __( 'August' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Aug', 'August abbreviation' ); |
|
194 | - $this->month_abbrev[ __( 'September' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Sep', 'September abbreviation' ); |
|
195 | - $this->month_abbrev[ __( 'October' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Oct', 'October abbreviation' ); |
|
196 | - $this->month_abbrev[ __( 'November' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Nov', 'November abbreviation' ); |
|
197 | - $this->month_abbrev[ __( 'December' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Dec', 'December abbreviation' ); |
|
186 | + $this->month_abbrev[__('January')] = /* translators: three-letter abbreviation of the month */ _x('Jan', 'January abbreviation'); |
|
187 | + $this->month_abbrev[__('February')] = /* translators: three-letter abbreviation of the month */ _x('Feb', 'February abbreviation'); |
|
188 | + $this->month_abbrev[__('March')] = /* translators: three-letter abbreviation of the month */ _x('Mar', 'March abbreviation'); |
|
189 | + $this->month_abbrev[__('April')] = /* translators: three-letter abbreviation of the month */ _x('Apr', 'April abbreviation'); |
|
190 | + $this->month_abbrev[__('May')] = /* translators: three-letter abbreviation of the month */ _x('May', 'May abbreviation'); |
|
191 | + $this->month_abbrev[__('June')] = /* translators: three-letter abbreviation of the month */ _x('Jun', 'June abbreviation'); |
|
192 | + $this->month_abbrev[__('July')] = /* translators: three-letter abbreviation of the month */ _x('Jul', 'July abbreviation'); |
|
193 | + $this->month_abbrev[__('August')] = /* translators: three-letter abbreviation of the month */ _x('Aug', 'August abbreviation'); |
|
194 | + $this->month_abbrev[__('September')] = /* translators: three-letter abbreviation of the month */ _x('Sep', 'September abbreviation'); |
|
195 | + $this->month_abbrev[__('October')] = /* translators: three-letter abbreviation of the month */ _x('Oct', 'October abbreviation'); |
|
196 | + $this->month_abbrev[__('November')] = /* translators: three-letter abbreviation of the month */ _x('Nov', 'November abbreviation'); |
|
197 | + $this->month_abbrev[__('December')] = /* translators: three-letter abbreviation of the month */ _x('Dec', 'December abbreviation'); |
|
198 | 198 | |
199 | 199 | // The Meridiems |
200 | 200 | $this->meridiem['am'] = __('am'); |
@@ -206,33 +206,33 @@ discard block |
||
206 | 206 | // See https://secure.php.net/number_format |
207 | 207 | |
208 | 208 | /* translators: $thousands_sep argument for https://secure.php.net/number_format, default is , */ |
209 | - $thousands_sep = __( 'number_format_thousands_sep' ); |
|
209 | + $thousands_sep = __('number_format_thousands_sep'); |
|
210 | 210 | |
211 | - if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) { |
|
211 | + if (version_compare(PHP_VERSION, '5.4', '>=')) { |
|
212 | 212 | // Replace space with a non-breaking space to avoid wrapping. |
213 | - $thousands_sep = str_replace( ' ', ' ', $thousands_sep ); |
|
213 | + $thousands_sep = str_replace(' ', ' ', $thousands_sep); |
|
214 | 214 | } else { |
215 | 215 | // PHP < 5.4.0 does not support multiple bytes in thousands separator. |
216 | - $thousands_sep = str_replace( array( ' ', ' ' ), ' ', $thousands_sep ); |
|
216 | + $thousands_sep = str_replace(array(' ', ' '), ' ', $thousands_sep); |
|
217 | 217 | } |
218 | 218 | |
219 | - $this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep; |
|
219 | + $this->number_format['thousands_sep'] = ('number_format_thousands_sep' === $thousands_sep) ? ',' : $thousands_sep; |
|
220 | 220 | |
221 | 221 | /* translators: $dec_point argument for https://secure.php.net/number_format, default is . */ |
222 | - $decimal_point = __( 'number_format_decimal_point' ); |
|
222 | + $decimal_point = __('number_format_decimal_point'); |
|
223 | 223 | |
224 | - $this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point; |
|
224 | + $this->number_format['decimal_point'] = ('number_format_decimal_point' === $decimal_point) ? '.' : $decimal_point; |
|
225 | 225 | |
226 | 226 | // Set text direction. |
227 | - if ( isset( $GLOBALS['text_direction'] ) ) |
|
227 | + if (isset($GLOBALS['text_direction'])) |
|
228 | 228 | $this->text_direction = $GLOBALS['text_direction']; |
229 | 229 | /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */ |
230 | - elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) |
|
230 | + elseif ('rtl' == _x('ltr', 'text direction')) |
|
231 | 231 | $this->text_direction = 'rtl'; |
232 | 232 | |
233 | - if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) { |
|
233 | + if ('rtl' === $this->text_direction && strpos(get_bloginfo('version'), '-src')) { |
|
234 | 234 | $this->text_direction = 'ltr'; |
235 | - add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) ); |
|
235 | + add_action('all_admin_notices', array($this, 'rtl_src_admin_notice')); |
|
236 | 236 | } |
237 | 237 | } |
238 | 238 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function rtl_src_admin_notice() { |
246 | 246 | /* translators: %s: Name of the directory (build) */ |
247 | - echo '<div class="error"><p>' . sprintf( __( 'The %s directory of the develop repository must be used for RTL.' ), '<code>build</code>' ) . '</p></div>'; |
|
247 | + echo '<div class="error"><p>'.sprintf(__('The %s directory of the develop repository must be used for RTL.'), '<code>build</code>').'</p></div>'; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
@@ -395,10 +395,10 @@ discard block |
||
395 | 395 | */ |
396 | 396 | public function _strings_for_pot() { |
397 | 397 | /* translators: localized date format, see https://secure.php.net/date */ |
398 | - __( 'F j, Y' ); |
|
398 | + __('F j, Y'); |
|
399 | 399 | /* translators: localized time format, see https://secure.php.net/date */ |
400 | - __( 'g:i a' ); |
|
400 | + __('g:i a'); |
|
401 | 401 | /* translators: localized date and time format, see https://secure.php.net/date */ |
402 | - __( 'F j, Y g:i a' ); |
|
402 | + __('F j, Y g:i a'); |
|
403 | 403 | } |
404 | 404 | } |