@@ -66,6 +66,9 @@ discard block |
||
| 66 | 66 | return self::$_instances[ $id ]; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | + /** |
|
| 70 | + * @param string $id |
|
| 71 | + */ |
|
| 69 | 72 | protected function __construct( $id, $title = '', $module_unique_affix = '' ) { |
| 70 | 73 | $this->_id = $id; |
| 71 | 74 | $this->_title = $title; |
@@ -275,7 +278,7 @@ discard block |
||
| 275 | 278 | * @since 2.0.0 |
| 276 | 279 | * |
| 277 | 280 | * @param string $id |
| 278 | - * @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin). |
|
| 281 | + * @param integer|null $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin). |
|
| 279 | 282 | * |
| 280 | 283 | * @return bool |
| 281 | 284 | */ |
@@ -37,6 +37,9 @@ discard block |
||
| 37 | 37 | private static $CNT = 0; |
| 38 | 38 | private static $_HOOKED_FOOTER = false; |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $id |
|
| 42 | + */ |
|
| 40 | 43 | private function __construct( $id, $on = false, $echo = false ) { |
| 41 | 44 | $this->_id = $id; |
| 42 | 45 | |
@@ -142,6 +145,9 @@ discard block |
||
| 142 | 145 | return $this->_file_start; |
| 143 | 146 | } |
| 144 | 147 | |
| 148 | + /** |
|
| 149 | + * @param boolean $wrapper |
|
| 150 | + */ |
|
| 145 | 151 | private function _log( &$message, $type = 'log', $wrapper ) { |
| 146 | 152 | if ( ! $this->is_on() ) { |
| 147 | 153 | return; |
@@ -193,14 +199,23 @@ discard block |
||
| 193 | 199 | } |
| 194 | 200 | } |
| 195 | 201 | |
| 202 | + /** |
|
| 203 | + * @param string $message |
|
| 204 | + */ |
|
| 196 | 205 | function log( $message, $wrapper = false ) { |
| 197 | 206 | $this->_log( $message, 'log', $wrapper ); |
| 198 | 207 | } |
| 199 | 208 | |
| 209 | + /** |
|
| 210 | + * @param string $message |
|
| 211 | + */ |
|
| 200 | 212 | function info( $message, $wrapper = false ) { |
| 201 | 213 | $this->_log( $message, 'info', $wrapper ); |
| 202 | 214 | } |
| 203 | 215 | |
| 216 | + /** |
|
| 217 | + * @param string $message |
|
| 218 | + */ |
|
| 204 | 219 | function warn( $message, $wrapper = false ) { |
| 205 | 220 | $this->_log( $message, 'warn', $wrapper ); |
| 206 | 221 | } |
@@ -291,7 +291,7 @@ |
||
| 291 | 291 | * |
| 292 | 292 | * @param \FS_Plugin_Tag $new_version |
| 293 | 293 | * |
| 294 | - * @return object |
|
| 294 | + * @return stdClass |
|
| 295 | 295 | */ |
| 296 | 296 | function get_update_details( FS_Plugin_Tag $new_version ) {
|
| 297 | 297 | $update = new stdClass(); |
@@ -395,7 +395,7 @@ |
||
| 395 | 395 | * |
| 396 | 396 | * @param string $key |
| 397 | 397 | * |
| 398 | - * @return bool|mixed |
|
| 398 | + * @return boolean |
|
| 399 | 399 | */ |
| 400 | 400 | private function is_multisite_option( $key ) { |
| 401 | 401 | if ( ! isset( self::$_NETWORK_OPTIONS_MAP ) ) { |
@@ -40,16 +40,25 @@ discard block |
||
| 40 | 40 | include_once fs_get_template_path( $path ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $path |
|
| 45 | + */ |
|
| 43 | 46 | function fs_require_template( $path, &$params = null ) { |
| 44 | 47 | $VARS = &$params; |
| 45 | 48 | require fs_get_template_path( $path ); |
| 46 | 49 | } |
| 47 | 50 | |
| 51 | + /** |
|
| 52 | + * @param string $path |
|
| 53 | + */ |
|
| 48 | 54 | function fs_require_once_template( $path, &$params = null ) { |
| 49 | 55 | $VARS = &$params; |
| 50 | 56 | require_once fs_get_template_path( $path ); |
| 51 | 57 | } |
| 52 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $path |
|
| 61 | + */ |
|
| 53 | 62 | function fs_get_template( $path, &$params = null ) { |
| 54 | 63 | ob_start(); |
| 55 | 64 | |
@@ -93,6 +102,10 @@ discard block |
||
| 93 | 102 | return $asset_url; |
| 94 | 103 | } |
| 95 | 104 | |
| 105 | + /** |
|
| 106 | + * @param string $handle |
|
| 107 | + * @param string $path |
|
| 108 | + */ |
|
| 96 | 109 | function fs_enqueue_local_style( $handle, $path, $deps = array(), $ver = false, $media = 'all' ) { |
| 97 | 110 | wp_enqueue_style( $handle, fs_asset_url( WP_FS__DIR_CSS . '/' . trim( $path, '/' ) ), $deps, $ver, $media ); |
| 98 | 111 | } |
@@ -112,7 +125,7 @@ discard block |
||
| 112 | 125 | if ( ! function_exists( 'fs_request_get' ) ) { |
| 113 | 126 | /** |
| 114 | 127 | * @param string $key |
| 115 | - * @param mixed $def |
|
| 128 | + * @param boolean $def |
|
| 116 | 129 | * @param string|bool $type Since 1.2.1.7 - when set to 'get' will look for the value passed via querystring, when |
| 117 | 130 | * set to 'post' will look for the value passed via the POST request's body, otherwise, |
| 118 | 131 | * will check if the parameter was passed in any of the two. |
@@ -147,6 +160,10 @@ discard block |
||
| 147 | 160 | } |
| 148 | 161 | |
| 149 | 162 | if ( ! function_exists( 'fs_request_get_bool' ) ) { |
| 163 | + |
|
| 164 | + /** |
|
| 165 | + * @param string $key |
|
| 166 | + */ |
|
| 150 | 167 | function fs_request_get_bool( $key, $def = false ) { |
| 151 | 168 | if ( ! isset( $_REQUEST[ $key ] ) ) { |
| 152 | 169 | return $def; |
@@ -239,6 +256,10 @@ discard block |
||
| 239 | 256 | #endregion |
| 240 | 257 | |
| 241 | 258 | if ( ! function_exists( 'fs_is_plugin_page' ) ) { |
| 259 | + |
|
| 260 | + /** |
|
| 261 | + * @param string $page_slug |
|
| 262 | + */ |
|
| 242 | 263 | function fs_is_plugin_page( $page_slug ) { |
| 243 | 264 | return ( is_admin() && $page_slug === fs_request_get( 'page' ) ); |
| 244 | 265 | } |
@@ -415,7 +436,7 @@ discard block |
||
| 415 | 436 | * @since ~1.1.3 |
| 416 | 437 | * |
| 417 | 438 | * @param string $actionurl URL to add nonce action. |
| 418 | - * @param int|string $action Optional. Nonce action name. Default -1. |
|
| 439 | + * @param integer $action Optional. Nonce action name. Default -1. |
|
| 419 | 440 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
| 420 | 441 | * |
| 421 | 442 | * @return string Escaped URL with nonce action added. |
@@ -1283,7 +1304,7 @@ discard block |
||
| 1283 | 1304 | * @param string $tag The name of the filter hook. |
| 1284 | 1305 | * @param mixed $value The value on which the filters hooked to `$tag` are applied on. |
| 1285 | 1306 | * |
| 1286 | - * @return mixed The filtered value after all hooked functions are applied to it. |
|
| 1307 | + * @return string The filtered value after all hooked functions are applied to it. |
|
| 1287 | 1308 | * |
| 1288 | 1309 | * @uses apply_filters() |
| 1289 | 1310 | */ |
@@ -50,7 +50,7 @@ |
||
| 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; |
@@ -93,6 +93,9 @@ discard block |
||
| 93 | 93 | return self::$_instances[ $key ]; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string $id |
|
| 98 | + */ |
|
| 96 | 99 | protected function __construct( |
| 97 | 100 | $id, |
| 98 | 101 | $title = '', |
@@ -285,7 +288,7 @@ discard block |
||
| 285 | 288 | * @author Vova Feldman (@svovaf) |
| 286 | 289 | * @since 1.0.9 |
| 287 | 290 | * |
| 288 | - * @param $id |
|
| 291 | + * @param string $id |
|
| 289 | 292 | * |
| 290 | 293 | * @return bool |
| 291 | 294 | */ |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | * @author Vova Feldman (@svovaf) |
| 45 | 45 | * @since 1.1.6 |
| 46 | 46 | * |
| 47 | - * @param $id |
|
| 47 | + * @param string $id |
|
| 48 | 48 | * |
| 49 | 49 | * @return FS_Cache_Manager |
| 50 | 50 | */ |
@@ -110,6 +110,10 @@ |
||
| 110 | 110 | return self::$_instances[ $key ]; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $id |
|
| 115 | + * @param string $secondary_id |
|
| 116 | + */ |
|
| 113 | 117 | protected function __construct( $id, $secondary_id, $network_level_or_blog_id = false ) { |
| 114 | 118 | $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK ); |
| 115 | 119 | |