@@ -136,6 +136,9 @@ discard block |
||
136 | 136 | do_action( 'wpinv_after_template_part', $template_name, $template_path, $located, $args ); |
137 | 137 | } |
138 | 138 | |
139 | +/** |
|
140 | + * @param string $template_name |
|
141 | + */ |
|
139 | 142 | function wpinv_get_template_html( $template_name, $args = array(), $template_path = '', $default_path = '' ) { |
140 | 143 | ob_start(); |
141 | 144 | wpinv_get_template( $template_name, $args, $template_path, $default_path ); |
@@ -168,6 +171,10 @@ discard block |
||
168 | 171 | return apply_filters( 'wpinv_locate_template', $template, $template_name, $template_path ); |
169 | 172 | } |
170 | 173 | |
174 | +/** |
|
175 | + * @param string $slug |
|
176 | + * @param boolean $name |
|
177 | + */ |
|
171 | 178 | function wpinv_get_template_part( $slug, $name = null, $load = true ) { |
172 | 179 | do_action( 'get_template_part_' . $slug, $slug, $name ); |
173 | 180 | |
@@ -867,6 +874,9 @@ discard block |
||
867 | 874 | return apply_filters( 'wpinv_get_watermark', $output, $id ); |
868 | 875 | } |
869 | 876 | |
877 | +/** |
|
878 | + * @param integer $id |
|
879 | + */ |
|
870 | 880 | function wpinv_get_watermark( $id ) { |
871 | 881 | if ( !$id > 0 ) { |
872 | 882 | return NULL; |
@@ -161,6 +161,9 @@ |
||
161 | 161 | wp_redirect( $redirect_to ); |
162 | 162 | } |
163 | 163 | |
164 | +/** |
|
165 | + * @param integer $user_id |
|
166 | + */ |
|
164 | 167 | function wpinv_login_user( $user_id ) { |
165 | 168 | if ( is_user_logged_in() ) { |
166 | 169 | return true; |
@@ -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' ) ) { |