@@ -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 |