@@ -117,6 +117,9 @@ discard block |
||
| 117 | 117 | ( ( false === strpos( $pPath, '.' ) ) ? '.' . self::FORMAT : '' ) . $query; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | + /** |
|
| 121 | + * @param string $pCanonizedPath |
|
| 122 | + */ |
|
| 120 | 123 | abstract function MakeRequest( $pCanonizedPath, $pMethod = 'GET', $pParams = array() ); |
| 121 | 124 | |
| 122 | 125 | /** |
@@ -149,6 +152,9 @@ discard block |
||
| 149 | 152 | return $result; |
| 150 | 153 | } |
| 151 | 154 | |
| 155 | + /** |
|
| 156 | + * @param string $pPath |
|
| 157 | + */ |
|
| 152 | 158 | public function Api( $pPath, $pMethod = 'GET', $pParams = array() ) {
|
| 153 | 159 | return $this->_Api( $this->CanonizePath( $pPath ), $pMethod, $pParams ); |
| 154 | 160 | } |
@@ -523,6 +523,12 @@ |
||
| 523 | 523 | return $fields; |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | + /** |
|
| 527 | + * @param string $key |
|
| 528 | + * @param string $default |
|
| 529 | + * |
|
| 530 | + * @return string |
|
| 531 | + */ |
|
| 526 | 532 | function get_setting_from_gallery( $gallery, $key, $default ) { |
| 527 | 533 | global $current_foogallery; |
| 528 | 534 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * Register myself so that all associated JS and CSS files can be found and automatically included |
| 33 | 33 | * @param $extensions |
| 34 | 34 | * |
| 35 | - * @return array |
|
| 35 | + * @return string[] |
|
| 36 | 36 | */ |
| 37 | 37 | function register_myself( $extensions ) { |
| 38 | 38 | $extensions[] = __FILE__; |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * Build up the arguments needed for rendering this gallery template |
| 208 | 208 | * |
| 209 | 209 | * @param $args |
| 210 | - * @return array |
|
| 210 | + * @return boolean |
|
| 211 | 211 | */ |
| 212 | 212 | function build_gallery_template_arguments( $args ) { |
| 213 | 213 | $args = foogallery_gallery_template_setting( 'thumbnail_dimensions', array() ); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * Register myself so that all associated JS and CSS files can be found and automatically included |
| 52 | 52 | * @param $extensions |
| 53 | 53 | * |
| 54 | - * @return array |
|
| 54 | + * @return string[] |
|
| 55 | 55 | */ |
| 56 | 56 | function register_myself( $extensions ) { |
| 57 | 57 | $extensions[] = __FILE__; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | * Build up the arguments needed for rendering this gallery template |
| 284 | 284 | * |
| 285 | 285 | * @param $args |
| 286 | - * @return array |
|
| 286 | + * @return boolean |
|
| 287 | 287 | */ |
| 288 | 288 | function build_gallery_template_arguments( $args ) { |
| 289 | 289 | $args = foogallery_gallery_template_setting( 'thumbnail_size', 'thumbnail' ); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * Register myself so that all associated JS and CSS files can be found and automatically included |
| 41 | 41 | * @param $extensions |
| 42 | 42 | * |
| 43 | - * @return array |
|
| 43 | + * @return string[] |
|
| 44 | 44 | */ |
| 45 | 45 | function register_myself( $extensions ) { |
| 46 | 46 | $extensions[] = __FILE__; |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | * Build up the arguments needed for rendering this gallery template |
| 294 | 294 | * |
| 295 | 295 | * @param $args |
| 296 | - * @return array |
|
| 296 | + * @return boolean |
|
| 297 | 297 | */ |
| 298 | 298 | function build_gallery_template_arguments( $args ) { |
| 299 | 299 | $args = foogallery_gallery_template_setting( 'thumbnail_dimensions', array() ); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * Register myself so that all associated JS and CSS files can be found and automatically included |
| 66 | 66 | * @param $extensions |
| 67 | 67 | * |
| 68 | - * @return array |
|
| 68 | + * @return string[] |
|
| 69 | 69 | */ |
| 70 | 70 | function register_myself( $extensions ) {
|
| 71 | 71 | $extensions[] = __FILE__; |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | * Build up the arguments needed for rendering this gallery template |
| 377 | 377 | * |
| 378 | 378 | * @param $args |
| 379 | - * @return array |
|
| 379 | + * @return boolean |
|
| 380 | 380 | */ |
| 381 | 381 | function build_gallery_template_arguments( $args ) {
|
| 382 | 382 | $args = foogallery_gallery_template_setting( 'thumbnail_size', array() ); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * Register myself so that all associated JS and CSS files can be found and automatically included |
| 41 | 41 | * @param $extensions |
| 42 | 42 | * |
| 43 | - * @return array |
|
| 43 | + * @return string[] |
|
| 44 | 44 | */ |
| 45 | 45 | function register_myself( $extensions ) { |
| 46 | 46 | $extensions[] = __FILE__; |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | * Build up the arguments needed for rendering this gallery template |
| 294 | 294 | * |
| 295 | 295 | * @param $args |
| 296 | - * @return array |
|
| 296 | + * @return boolean |
|
| 297 | 297 | */ |
| 298 | 298 | function build_gallery_template_arguments( $args ) { |
| 299 | 299 | $args = foogallery_gallery_template_setting( 'thumbnail_dimensions', array() ); |
@@ -200,6 +200,10 @@ discard block |
||
| 200 | 200 | die(); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | + /** |
|
| 204 | + * @param string $shortcode |
|
| 205 | + * @param string $id_attrib |
|
| 206 | + */ |
|
| 203 | 207 | function echo_findings_for_shortcode( $shortcode, $id_attrib ) { |
| 204 | 208 | echo '<h3>[' . $shortcode . '] Shortcodes</h3>'; |
| 205 | 209 | |
@@ -232,6 +236,10 @@ discard block |
||
| 232 | 236 | } |
| 233 | 237 | } |
| 234 | 238 | |
| 239 | + /** |
|
| 240 | + * @param string $shortcode |
|
| 241 | + * @param string $id_attrib |
|
| 242 | + */ |
|
| 235 | 243 | function echo_replacements_for_shortcode( $shortcode, $id_attrib ) { |
| 236 | 244 | echo '<h3>[' . $shortcode . '] Shortcodes</h3>'; |
| 237 | 245 | |
@@ -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. |