@@ -246,6 +246,7 @@ |
||
246 | 246 | |
247 | 247 | /** |
248 | 248 | * Returns true if a user has a connection to a particular service, false otherwise |
249 | + * @param string $service |
|
249 | 250 | */ |
250 | 251 | function is_enabled( $service, $_blog_id = false, $_user_id = false ) { |
251 | 252 | if ( !$_blog_id ) |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | } |
1075 | 1075 | /** |
1076 | 1076 | * Does the network allow admins to add new users. |
1077 | - * @return boolian |
|
1077 | + * @return boolean |
|
1078 | 1078 | */ |
1079 | 1079 | static function network_add_new_users( $option = null ) { |
1080 | 1080 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | * database which could be set to anything as opposed to what this function returns. |
1123 | 1123 | * @param bool $option |
1124 | 1124 | * |
1125 | - * @return boolean |
|
1125 | + * @return string |
|
1126 | 1126 | */ |
1127 | 1127 | public function is_main_network_option( $option ) { |
1128 | 1128 | // return '1' or '' |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1134 | 1134 | * |
1135 | 1135 | * @param string $option |
1136 | - * @return boolean |
|
1136 | + * @return string |
|
1137 | 1137 | */ |
1138 | 1138 | public function is_multisite( $option ) { |
1139 | 1139 | return (string) (bool) is_multisite(); |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | |
1232 | 1232 | /** |
1233 | 1233 | * Returns true if the site has file write access false otherwise. |
1234 | - * @return string ( '1' | '0' ) |
|
1234 | + * @return integer ( '1' | '0' ) |
|
1235 | 1235 | **/ |
1236 | 1236 | public static function file_system_write_access() { |
1237 | 1237 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2027,7 +2027,7 @@ discard block |
||
2027 | 2027 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
2028 | 2028 | * |
2029 | 2029 | * @param string $name Option name |
2030 | - * @param mixed $default (optional) |
|
2030 | + * @param boolean $default (optional) |
|
2031 | 2031 | */ |
2032 | 2032 | public static function get_option( $name, $default = false ) { |
2033 | 2033 | return Jetpack_Options::get_option( $name, $default ); |
@@ -2094,6 +2094,7 @@ discard block |
||
2094 | 2094 | * @param int $user_id |
2095 | 2095 | * @param string $token |
2096 | 2096 | * return bool |
2097 | + * @param boolean $is_master_user |
|
2097 | 2098 | */ |
2098 | 2099 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2099 | 2100 | // not designed for concurrent updates |
@@ -2488,6 +2489,7 @@ discard block |
||
2488 | 2489 | |
2489 | 2490 | /** |
2490 | 2491 | * Like core's get_file_data implementation, but caches the result. |
2492 | + * @param string $file |
|
2491 | 2493 | */ |
2492 | 2494 | public static function get_file_data( $file, $headers ) { |
2493 | 2495 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2511,6 +2513,9 @@ discard block |
||
2511 | 2513 | return $data; |
2512 | 2514 | } |
2513 | 2515 | |
2516 | + /** |
|
2517 | + * @param string $untranslated_tag |
|
2518 | + */ |
|
2514 | 2519 | public static function translate_module_tag( $untranslated_tag ) { |
2515 | 2520 | // Tags are aggregated by tools/build-module-headings-translations.php |
2516 | 2521 | // and output in modules/module-headings.php |
@@ -2803,6 +2808,9 @@ discard block |
||
2803 | 2808 | $this->sync->sync_all_module_options( $module ); |
2804 | 2809 | } |
2805 | 2810 | |
2811 | + /** |
|
2812 | + * @return string |
|
2813 | + */ |
|
2806 | 2814 | public static function deactivate_module( $module ) { |
2807 | 2815 | /** |
2808 | 2816 | * Fires when a module is deactivated. |
@@ -2841,6 +2849,9 @@ discard block |
||
2841 | 2849 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
2842 | 2850 | } |
2843 | 2851 | |
2852 | + /** |
|
2853 | + * @param string $module |
|
2854 | + */ |
|
2844 | 2855 | public static function enable_module_configurable( $module ) { |
2845 | 2856 | $module = Jetpack::get_module_slug( $module ); |
2846 | 2857 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2851,21 +2862,33 @@ discard block |
||
2851 | 2862 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2852 | 2863 | } |
2853 | 2864 | |
2865 | + /** |
|
2866 | + * @param string $module |
|
2867 | + */ |
|
2854 | 2868 | public static function module_configuration_load( $module, $method ) { |
2855 | 2869 | $module = Jetpack::get_module_slug( $module ); |
2856 | 2870 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2857 | 2871 | } |
2858 | 2872 | |
2873 | + /** |
|
2874 | + * @param string $module |
|
2875 | + */ |
|
2859 | 2876 | public static function module_configuration_head( $module, $method ) { |
2860 | 2877 | $module = Jetpack::get_module_slug( $module ); |
2861 | 2878 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2862 | 2879 | } |
2863 | 2880 | |
2881 | + /** |
|
2882 | + * @param string $module |
|
2883 | + */ |
|
2864 | 2884 | public static function module_configuration_screen( $module, $method ) { |
2865 | 2885 | $module = Jetpack::get_module_slug( $module ); |
2866 | 2886 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2867 | 2887 | } |
2868 | 2888 | |
2889 | + /** |
|
2890 | + * @param string $module |
|
2891 | + */ |
|
2869 | 2892 | public static function module_configuration_activation_screen( $module, $method ) { |
2870 | 2893 | $module = Jetpack::get_module_slug( $module ); |
2871 | 2894 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2873,6 +2896,9 @@ discard block |
||
2873 | 2896 | |
2874 | 2897 | /* Installation */ |
2875 | 2898 | |
2899 | + /** |
|
2900 | + * @param string $message |
|
2901 | + */ |
|
2876 | 2902 | public static function bail_on_activation( $message, $deactivate = true ) { |
2877 | 2903 | ?> |
2878 | 2904 | <!doctype html> |
@@ -3486,7 +3512,7 @@ discard block |
||
3486 | 3512 | * Add help to the Jetpack page |
3487 | 3513 | * |
3488 | 3514 | * @since Jetpack (1.2.3) |
3489 | - * @return false if not the Jetpack page |
|
3515 | + * @return false|null if not the Jetpack page |
|
3490 | 3516 | */ |
3491 | 3517 | function admin_help() { |
3492 | 3518 | $current_screen = get_current_screen(); |
@@ -4776,6 +4802,7 @@ discard block |
||
4776 | 4802 | /** |
4777 | 4803 | * Returns the requested Jetpack API URL |
4778 | 4804 | * |
4805 | + * @param string $relative_url |
|
4779 | 4806 | * @return string |
4780 | 4807 | */ |
4781 | 4808 | public static function api_url( $relative_url ) { |
@@ -5201,6 +5228,10 @@ discard block |
||
5201 | 5228 | return new WP_User( $token_details['user_id'] ); |
5202 | 5229 | } |
5203 | 5230 | |
5231 | + /** |
|
5232 | + * @param integer $timestamp |
|
5233 | + * @param string $nonce |
|
5234 | + */ |
|
5204 | 5235 | function add_nonce( $timestamp, $nonce ) { |
5205 | 5236 | global $wpdb; |
5206 | 5237 | static $nonces_used_this_request = array(); |
@@ -5406,6 +5437,9 @@ discard block |
||
5406 | 5437 | Jetpack::state( null, null, true ); |
5407 | 5438 | } |
5408 | 5439 | |
5440 | + /** |
|
5441 | + * @param string $file |
|
5442 | + */ |
|
5409 | 5443 | public static function check_privacy( $file ) { |
5410 | 5444 | static $is_site_publicly_accessible = null; |
5411 | 5445 | |
@@ -6387,8 +6421,8 @@ discard block |
||
6387 | 6421 | * - Absolute URLs `http://domain.com/feh.png` |
6388 | 6422 | * - Domain root relative URLs `/feh.png` |
6389 | 6423 | * |
6390 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6391 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6424 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6425 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6392 | 6426 | * |
6393 | 6427 | * @return mixed|string |
6394 | 6428 | */ |
@@ -6786,7 +6820,6 @@ discard block |
||
6786 | 6820 | } |
6787 | 6821 | |
6788 | 6822 | /** |
6789 | - * @param mixed $result Value for the user's option |
|
6790 | 6823 | * @return mixed |
6791 | 6824 | */ |
6792 | 6825 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -75,6 +75,9 @@ discard block |
||
75 | 75 | ) ); |
76 | 76 | } |
77 | 77 | |
78 | + /** |
|
79 | + * @param string $service_name |
|
80 | + */ |
|
78 | 81 | function get_connections( $service_name, $_blog_id = false, $_user_id = false ) { |
79 | 82 | $connections = Jetpack_Options::get_option( 'publicize_connections' ); |
80 | 83 | $connections_to_return = array(); |
@@ -100,6 +103,9 @@ discard block |
||
100 | 103 | return $connection; |
101 | 104 | } |
102 | 105 | |
106 | + /** |
|
107 | + * @param string $filter |
|
108 | + */ |
|
103 | 109 | function get_services( $filter ) { |
104 | 110 | if ( !in_array( $filter, array( 'all', 'connected' ) ) ) |
105 | 111 | $filter = 'all'; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | /** |
51 | 51 | * record_event |
52 | - * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required. |
|
52 | + * @param Tracks_Event $event Event object to send to Tracks. An array will be cast to object. Required. |
|
53 | 53 | * Properties are included directly in the pixel query string after light validation. |
54 | 54 | * @return mixed True on success, WP_Error on failure |
55 | 55 | */ |
@@ -74,6 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | /** |
76 | 76 | * Synchronously request the pixel |
77 | + * @param string $pixel |
|
77 | 78 | */ |
78 | 79 | static function record_pixel( $pixel ) { |
79 | 80 | // Add the Request Timestamp and URL terminator just before the HTTP request. |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @param string $event_name The name of the event |
38 | 38 | * @param array $properties Custom properties to send with the event |
39 | 39 | * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred |
40 | - * @return \Tracks_Event|\WP_Error |
|
40 | + * @return Tracks_Event |
|
41 | 41 | */ |
42 | 42 | function tracks_build_event_obj( $user |
43 | 43 | , $event_name |
@@ -78,7 +78,6 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * Record an event in Tracks - this is the preferred way to record events from PHP. |
80 | 80 | * |
81 | - * @param mixed $identity username, user_id, or WP_user object |
|
82 | 81 | * @param string $event_name The name of the event |
83 | 82 | * @param array $properties Custom properties to send with the event |
84 | 83 | * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred |
@@ -24,6 +24,9 @@ |
||
24 | 24 | self::record_user_event( 'module_deactivated', array( 'module' => $module ) ); |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $event_type |
|
29 | + */ |
|
27 | 30 | static function record_user_event( $event_type, $data ) { |
28 | 31 | |
29 | 32 | $user = wp_get_current_user(); |
@@ -51,6 +51,9 @@ |
||
51 | 51 | return $return; |
52 | 52 | } |
53 | 53 | |
54 | +/** |
|
55 | + * @param string $file |
|
56 | + */ |
|
54 | 57 | function github_gist_simple_embed( $id, $file ) { |
55 | 58 | $embed_url = $id . '.js' . $file; |
56 | 59 |