@@ -58,6 +58,9 @@ discard block |
||
| 58 | 58 | die(); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $token |
|
| 63 | + */ |
|
| 61 | 64 | public function verify_token($token){ |
| 62 | 65 | |
| 63 | 66 | $remote = wp_remote_get("https://api.vimeo.com/oauth/verify", array( |
@@ -145,6 +148,9 @@ discard block |
||
| 145 | 148 | return $this->error_response("Unrecognized Vimeo url."); |
| 146 | 149 | } |
| 147 | 150 | |
| 151 | + /** |
|
| 152 | + * @param string $id |
|
| 153 | + */ |
|
| 148 | 154 | public function fetch_video($id) { |
| 149 | 155 | if (!is_numeric($id)) { |
| 150 | 156 | return $this->error_response("Invalid video id supplied."); |
@@ -182,6 +188,10 @@ discard block |
||
| 182 | 188 | return $response; |
| 183 | 189 | } |
| 184 | 190 | |
| 191 | + /** |
|
| 192 | + * @param string $type |
|
| 193 | + * @param string $id |
|
| 194 | + */ |
|
| 185 | 195 | public function fetch_stream($type, $id, $page = 1, $offset = 0) { |
| 186 | 196 | $supports = array("album", "channel", "user"); |
| 187 | 197 | |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | /** |
| 931 | 931 | * Returns an attachment field friendly name, based on a field name that is passed in |
| 932 | 932 | * |
| 933 | - * @param $field |
|
| 933 | + * @param string $field |
|
| 934 | 934 | * |
| 935 | 935 | * @return string |
| 936 | 936 | */ |
@@ -1095,8 +1095,8 @@ discard block |
||
| 1095 | 1095 | /** |
| 1096 | 1096 | * Create a FooGallery and return the ID |
| 1097 | 1097 | * |
| 1098 | - * @param $template |
|
| 1099 | - * @param $attachment_ids |
|
| 1098 | + * @param string $template |
|
| 1099 | + * @param string $attachment_ids |
|
| 1100 | 1100 | * |
| 1101 | 1101 | * @return int |
| 1102 | 1102 | */ |
@@ -89,6 +89,9 @@ |
||
| 89 | 89 | |
| 90 | 90 | private static $instance; |
| 91 | 91 | |
| 92 | + /** |
|
| 93 | + * @return boolean |
|
| 94 | + */ |
|
| 92 | 95 | public static function get_instance() { |
| 93 | 96 | if ( ! isset( self::$instance ) && ! ( self::$instance instanceof FooGallery_Plugin ) ) { |
| 94 | 97 | self::$instance = new FooGallery_Plugin(); |
@@ -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 | } |
@@ -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. |