@@ -31,6 +31,9 @@ discard block |
||
31 | 31 | return apply_filters( 'wpinv_get_ip', $ip ); |
32 | 32 | } |
33 | 33 | |
34 | +/** |
|
35 | + * @return string |
|
36 | + */ |
|
34 | 37 | function wpinv_get_user_agent() { |
35 | 38 | if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
36 | 39 | $user_agent = sanitize_text_field( $_SERVER['HTTP_USER_AGENT'] ); |
@@ -110,6 +113,9 @@ discard block |
||
110 | 113 | return $status; |
111 | 114 | } |
112 | 115 | |
116 | +/** |
|
117 | + * @return string |
|
118 | + */ |
|
113 | 119 | function wpinv_get_currency() { |
114 | 120 | $currency = wpinv_get_option( 'currency', 'USD' ); |
115 | 121 | |
@@ -180,6 +186,9 @@ discard block |
||
180 | 186 | return apply_filters( 'wpinv_currency_symbol', $currency_symbol, $currency ); |
181 | 187 | } |
182 | 188 | |
189 | +/** |
|
190 | + * @return string |
|
191 | + */ |
|
183 | 192 | function wpinv_currency_position() { |
184 | 193 | $position = wpinv_get_option( 'currency_position', 'left' ); |
185 | 194 | |
@@ -198,6 +207,9 @@ discard block |
||
198 | 207 | return apply_filters( 'wpinv_decimal_separator', $decimal_sep ); |
199 | 208 | } |
200 | 209 | |
210 | +/** |
|
211 | + * @return integer |
|
212 | + */ |
|
201 | 213 | function wpinv_decimals() { |
202 | 214 | $decimals = apply_filters( 'wpinv_decimals', wpinv_get_option( 'decimals', 2 ) ); |
203 | 215 | |
@@ -308,6 +320,9 @@ discard block |
||
308 | 320 | return $price; |
309 | 321 | } |
310 | 322 | |
323 | +/** |
|
324 | + * @return string |
|
325 | + */ |
|
311 | 326 | function wpinv_format_amount( $amount, $decimals = NULL, $calculate = false ) { |
312 | 327 | $thousands_sep = wpinv_thousands_separator(); |
313 | 328 | $decimal_sep = wpinv_decimal_separator(); |
@@ -357,6 +372,9 @@ discard block |
||
357 | 372 | return apply_filters( 'wpinv_sanitize_key', $key, $raw_key ); |
358 | 373 | } |
359 | 374 | |
375 | +/** |
|
376 | + * @return string |
|
377 | + */ |
|
360 | 378 | function wpinv_get_file_extension( $str ) { |
361 | 379 | $parts = explode( '.', $str ); |
362 | 380 | return end( $parts ); |
@@ -561,6 +579,9 @@ discard block |
||
561 | 579 | return strlen( $str ); |
562 | 580 | } |
563 | 581 | |
582 | +/** |
|
583 | + * @param string $str |
|
584 | + */ |
|
564 | 585 | function wpinv_utf8_strtolower( $str, $encoding = 'UTF-8' ) { |
565 | 586 | if ( function_exists( 'mb_strtolower' ) ) { |
566 | 587 | return mb_strtolower( $str, $encoding ); |
@@ -569,6 +590,9 @@ discard block |
||
569 | 590 | return strtolower( $str ); |
570 | 591 | } |
571 | 592 | |
593 | +/** |
|
594 | + * @param string $str |
|
595 | + */ |
|
572 | 596 | function wpinv_utf8_strtoupper( $str, $encoding = 'UTF-8' ) { |
573 | 597 | if ( function_exists( 'mb_strtoupper' ) ) { |
574 | 598 | return mb_strtoupper( $str, $encoding ); |
@@ -646,7 +670,7 @@ discard block |
||
646 | 670 | * |
647 | 671 | * @param string $str The string being decoded. |
648 | 672 | * @param string $encoding The encoding parameter is the character encoding. Default "UTF-8". |
649 | - * @return string The width of string. |
|
673 | + * @return integer The width of string. |
|
650 | 674 | */ |
651 | 675 | function wpinv_utf8_strwidth( $str, $encoding = 'UTF-8' ) { |
652 | 676 | if ( function_exists( 'mb_strwidth' ) ) { |