@@ -1406,7 +1406,7 @@ discard block |
||
1406 | 1406 | * @author Vova Feldman (@svovaf) |
1407 | 1407 | * @since 1.0.1 |
1408 | 1408 | * |
1409 | - * @param $plugin_file |
|
1409 | + * @param string $plugin_file |
|
1410 | 1410 | * |
1411 | 1411 | * @return false|Freemius |
1412 | 1412 | */ |
@@ -3356,10 +3356,16 @@ discard block |
||
3356 | 3356 | return ! empty( $options[ $key ] ) ? $options[ $key ] : $default; |
3357 | 3357 | } |
3358 | 3358 | |
3359 | + /** |
|
3360 | + * @param string $key |
|
3361 | + */ |
|
3359 | 3362 | private function get_bool_option( &$options, $key, $default = false ) { |
3360 | 3363 | return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default; |
3361 | 3364 | } |
3362 | 3365 | |
3366 | + /** |
|
3367 | + * @param string $key |
|
3368 | + */ |
|
3363 | 3369 | private function get_numeric_option( &$options, $key, $default = false ) { |
3364 | 3370 | return isset( $options[ $key ] ) && is_numeric( $options[ $key ] ) ? $options[ $key ] : $default; |
3365 | 3371 | } |
@@ -5707,7 +5713,7 @@ discard block |
||
5707 | 5713 | * @author Vova Feldman (@svovaf) |
5708 | 5714 | * @since 1.0.4 |
5709 | 5715 | * |
5710 | - * @return mixed Plugin secret key. |
|
5716 | + * @return string Plugin secret key. |
|
5711 | 5717 | */ |
5712 | 5718 | function get_secret_key() { |
5713 | 5719 | return $this->_plugin->secret_key; |
@@ -7451,7 +7457,7 @@ discard block |
||
7451 | 7457 | * @author Vova Feldman (@svovaf) |
7452 | 7458 | * @since 1.2.0 |
7453 | 7459 | * |
7454 | - * @param array|string $actions Collection of AJAX actions. |
|
7460 | + * @param string $actions Collection of AJAX actions. |
|
7455 | 7461 | * @param number|null $module_id |
7456 | 7462 | * |
7457 | 7463 | * @return bool |
@@ -8075,7 +8081,7 @@ discard block |
||
8075 | 8081 | * |
8076 | 8082 | * @param array $override_with |
8077 | 8083 | * |
8078 | - * @return array |
|
8084 | + * @return string|boolean |
|
8079 | 8085 | */ |
8080 | 8086 | function get_opt_in_params( $override_with = array() ) { |
8081 | 8087 | $this->_logger->entrance(); |
@@ -9593,8 +9599,6 @@ discard block |
||
9593 | 9599 | * @since 1.0.1 |
9594 | 9600 | * |
9595 | 9601 | * @param string $tag The name of the action to be executed. |
9596 | - * @param mixed $arg,... Optional. Additional arguments which are passed on to the |
|
9597 | - * functions hooked to the action. Default empty. |
|
9598 | 9602 | * |
9599 | 9603 | * @uses do_action() |
9600 | 9604 | */ |
@@ -10410,7 +10414,7 @@ discard block |
||
10410 | 10414 | * @author Vova Feldman (@svovaf) |
10411 | 10415 | * @since 1.0.5 |
10412 | 10416 | * |
10413 | - * @param bool|number $plugin_id |
|
10417 | + * @param boolean $plugin_id |
|
10414 | 10418 | * @param bool $flush Since 1.1.7.3 |
10415 | 10419 | * @param int $expiration Since 1.2.2.7 |
10416 | 10420 | * |
@@ -12668,8 +12672,8 @@ discard block |
||
12668 | 12672 | * @author Vova Feldman (@svovaf) |
12669 | 12673 | * @since 1.0.0 |
12670 | 12674 | * |
12671 | - * @param $label |
|
12672 | - * @param $url |
|
12675 | + * @param string $label |
|
12676 | + * @param string $url |
|
12673 | 12677 | * @param bool $external |
12674 | 12678 | * @param int $priority |
12675 | 12679 | * @param bool $key |
@@ -18,6 +18,9 @@ |
||
18 | 18 | */ |
19 | 19 | class FS_Customizer_Support_Section extends WP_Customize_Section { |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $id |
|
23 | + */ |
|
21 | 24 | function __construct( $manager, $id, $args = array() ) { |
22 | 25 | $manager->register_section_type( 'FS_Customizer_Support_Section' ); |
23 | 26 |
@@ -38,16 +38,25 @@ discard block |
||
38 | 38 | include_once fs_get_template_path( $path ); |
39 | 39 | } |
40 | 40 | |
41 | + /** |
|
42 | + * @param string $path |
|
43 | + */ |
|
41 | 44 | function fs_require_template( $path, &$params = null ) { |
42 | 45 | $VARS = &$params; |
43 | 46 | require fs_get_template_path( $path ); |
44 | 47 | } |
45 | 48 | |
49 | + /** |
|
50 | + * @param string $path |
|
51 | + */ |
|
46 | 52 | function fs_require_once_template( $path, &$params = null ) { |
47 | 53 | $VARS = &$params; |
48 | 54 | require_once fs_get_template_path( $path ); |
49 | 55 | } |
50 | 56 | |
57 | + /** |
|
58 | + * @param string $path |
|
59 | + */ |
|
51 | 60 | function fs_get_template( $path, &$params = null ) { |
52 | 61 | ob_start(); |
53 | 62 | |
@@ -91,10 +100,18 @@ discard block |
||
91 | 100 | return $asset_url; |
92 | 101 | } |
93 | 102 | |
103 | + /** |
|
104 | + * @param string $handle |
|
105 | + * @param string $path |
|
106 | + */ |
|
94 | 107 | function fs_enqueue_local_style( $handle, $path, $deps = array(), $ver = false, $media = 'all' ) { |
95 | 108 | wp_enqueue_style( $handle, fs_asset_url( WP_FS__DIR_CSS . '/' . trim( $path, '/' ) ), $deps, $ver, $media ); |
96 | 109 | } |
97 | 110 | |
111 | + /** |
|
112 | + * @param string $handle |
|
113 | + * @param string $path |
|
114 | + */ |
|
98 | 115 | function fs_enqueue_local_script( $handle, $path, $deps = array(), $ver = false, $in_footer = 'all' ) { |
99 | 116 | wp_enqueue_script( $handle, fs_asset_url( WP_FS__DIR_JS . '/' . trim( $path, '/' ) ), $deps, $ver, $in_footer ); |
100 | 117 | } |
@@ -134,6 +151,9 @@ discard block |
||
134 | 151 | return $value; |
135 | 152 | } |
136 | 153 | |
154 | + /** |
|
155 | + * @param string $key |
|
156 | + */ |
|
137 | 157 | function fs_request_has( $key ) { |
138 | 158 | return isset( $_REQUEST[ $key ] ); |
139 | 159 | } |
@@ -178,6 +198,9 @@ discard block |
||
178 | 198 | return false; |
179 | 199 | } |
180 | 200 | |
201 | + /** |
|
202 | + * @param string $action |
|
203 | + */ |
|
181 | 204 | function fs_request_is_action( $action, $action_key = 'action' ) { |
182 | 205 | return ( strtolower( $action ) === fs_get_action( $action_key ) ); |
183 | 206 | } |
@@ -216,6 +239,9 @@ discard block |
||
216 | 239 | return true; |
217 | 240 | } |
218 | 241 | |
242 | + /** |
|
243 | + * @param string $page_slug |
|
244 | + */ |
|
219 | 245 | function fs_is_plugin_page( $page_slug ) { |
220 | 246 | return ( is_admin() && $page_slug === fs_request_get( 'page' ) ); |
221 | 247 | } |
@@ -357,7 +383,7 @@ discard block |
||
357 | 383 | * @since ~1.1.3 |
358 | 384 | * |
359 | 385 | * @param string $actionurl URL to add nonce action. |
360 | - * @param int|string $action Optional. Nonce action name. Default -1. |
|
386 | + * @param integer $action Optional. Nonce action name. Default -1. |
|
361 | 387 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
362 | 388 | * |
363 | 389 | * @return string Escaped URL with nonce action added. |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @param bool $exit If true, exit after redirect (Since 1.2.1.5). |
51 | 51 | * @param int $status Status code to use. |
52 | 52 | * |
53 | - * @return bool False if $location is not set |
|
53 | + * @return null|boolean False if $location is not set |
|
54 | 54 | */ |
55 | 55 | function fs_redirect( $location, $exit = true, $status = 302 ) { |
56 | 56 | global $is_IIS; |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | * @param string $tag The name of the filter hook. |
479 | 479 | * @param mixed $value The value on which the filters hooked to `$tag` are applied on. |
480 | 480 | * |
481 | - * @return mixed The filtered value after all hooked functions are applied to it. |
|
481 | + * @return string|boolean The filtered value after all hooked functions are applied to it. |
|
482 | 482 | * |
483 | 483 | * @uses apply_filters() |
484 | 484 | */ |
@@ -121,6 +121,10 @@ discard block |
||
121 | 121 | return self::$_instances[ $key ]; |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param string $module_type |
|
126 | + * @param string $module_unique_affix |
|
127 | + */ |
|
124 | 128 | protected function __construct( $module_id, $module_type, $module_unique_affix ) { |
125 | 129 | $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK ); |
126 | 130 | |
@@ -133,10 +137,16 @@ discard block |
||
133 | 137 | |
134 | 138 | #region Helpers |
135 | 139 | |
140 | + /** |
|
141 | + * @param string $key |
|
142 | + */ |
|
136 | 143 | private function get_option( &$options, $key, $default = false ) { |
137 | 144 | return ! empty( $options[ $key ] ) ? $options[ $key ] : $default; |
138 | 145 | } |
139 | 146 | |
147 | + /** |
|
148 | + * @param string $key |
|
149 | + */ |
|
140 | 150 | private function get_bool_option( &$options, $key, $default = false ) { |
141 | 151 | return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default; |
142 | 152 | } |
@@ -57,6 +57,9 @@ discard block |
||
57 | 57 | return self::$_instances[ $id ]; |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param string $id |
|
62 | + */ |
|
60 | 63 | protected function __construct( $id, $title = '', $module_unique_affix = '' ) { |
61 | 64 | $this->_id = $id; |
62 | 65 | $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->_id . '_data', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK ); |
@@ -267,7 +270,7 @@ discard block |
||
267 | 270 | * @author Vova Feldman (@svovaf) |
268 | 271 | * @since 1.0.9 |
269 | 272 | * |
270 | - * @param $id |
|
273 | + * @param string $id |
|
271 | 274 | * |
272 | 275 | * @return bool |
273 | 276 | */ |
@@ -81,6 +81,10 @@ discard block |
||
81 | 81 | return self::$_instances[ $key ]; |
82 | 82 | } |
83 | 83 | |
84 | + /** |
|
85 | + * @param string $id |
|
86 | + * @param string $secondary_id |
|
87 | + */ |
|
84 | 88 | protected function __construct( $id, $secondary_id ) { |
85 | 89 | $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK ); |
86 | 90 | |
@@ -205,7 +209,7 @@ discard block |
||
205 | 209 | * @since 1.0.7 |
206 | 210 | * |
207 | 211 | * @param string $key |
208 | - * @param mixed $default |
|
212 | + * @param false|null $default |
|
209 | 213 | * |
210 | 214 | * @return bool|\FS_Plugin |
211 | 215 | */ |
@@ -143,7 +143,7 @@ |
||
143 | 143 | * @author Vova Feldman (@svovaf) |
144 | 144 | * @since 1.0.6 |
145 | 145 | * |
146 | - * @param bool|FS_Plugin $module |
|
146 | + * @param FS_Plugin $module |
|
147 | 147 | * @param bool $flush |
148 | 148 | * |
149 | 149 | * @return bool|\FS_Plugin |