@@ -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,10 +102,18 @@ 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 | } |
| 99 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $handle |
|
| 115 | + * @param string $path |
|
| 116 | + */ |
|
| 100 | 117 | function fs_enqueue_local_script( $handle, $path, $deps = array(), $ver = false, $in_footer = 'all' ) { |
| 101 | 118 | wp_enqueue_script( $handle, fs_asset_url( WP_FS__DIR_JS . '/' . trim( $path, '/' ) ), $deps, $ver, $in_footer ); |
| 102 | 119 | } |
@@ -141,6 +158,10 @@ discard block |
||
| 141 | 158 | } |
| 142 | 159 | |
| 143 | 160 | if ( ! function_exists( 'fs_request_has' ) ) { |
| 161 | + |
|
| 162 | + /** |
|
| 163 | + * @param string $key |
|
| 164 | + */ |
|
| 144 | 165 | function fs_request_has( $key ) { |
| 145 | 166 | return isset( $_REQUEST[ $key ] ); |
| 146 | 167 | } |
@@ -195,6 +216,10 @@ discard block |
||
| 195 | 216 | } |
| 196 | 217 | |
| 197 | 218 | if ( ! function_exists( 'fs_request_is_action' ) ) { |
| 219 | + |
|
| 220 | + /** |
|
| 221 | + * @param string $action |
|
| 222 | + */ |
|
| 198 | 223 | function fs_request_is_action( $action, $action_key = 'action' ) { |
| 199 | 224 | return ( strtolower( $action ) === fs_get_action( $action_key ) ); |
| 200 | 225 | } |
@@ -239,6 +264,10 @@ discard block |
||
| 239 | 264 | #endregion |
| 240 | 265 | |
| 241 | 266 | if ( ! function_exists( 'fs_is_plugin_page' ) ) { |
| 267 | + |
|
| 268 | + /** |
|
| 269 | + * @param string $page_slug |
|
| 270 | + */ |
|
| 242 | 271 | function fs_is_plugin_page( $page_slug ) { |
| 243 | 272 | return ( is_admin() && $page_slug === fs_request_get( 'page' ) ); |
| 244 | 273 | } |
@@ -405,7 +434,7 @@ discard block |
||
| 405 | 434 | * @since ~1.1.3 |
| 406 | 435 | * |
| 407 | 436 | * @param string $actionurl URL to add nonce action. |
| 408 | - * @param int|string $action Optional. Nonce action name. Default -1. |
|
| 437 | + * @param integer $action Optional. Nonce action name. Default -1. |
|
| 409 | 438 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
| 410 | 439 | * |
| 411 | 440 | * @return string Escaped URL with nonce action added. |