@@ -27,6 +27,9 @@ |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | + /** |
|
31 | + * @param string $key |
|
32 | + */ |
|
30 | 33 | protected function get_locale( $key ) { |
31 | 34 | if ( 'locale' == $key ) { |
32 | 35 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
@@ -59,9 +59,7 @@ |
||
59 | 59 | * Get individual setting |
60 | 60 | * |
61 | 61 | * @param sting $name |
62 | - * @param string $type |
|
63 | 62 | * @param string or array $callback |
64 | - * @param boolean $is_constant |
|
65 | 63 | * @return value of the setting |
66 | 64 | */ |
67 | 65 | static function get( $name ) { |
@@ -79,6 +79,9 @@ |
||
79 | 79 | // maybe trigger force_sync |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param string $check_sum_id |
|
84 | + */ |
|
82 | 85 | static function sync_if_has_changed( $check_sum_id, $values ) { |
83 | 86 | $current_check_sum = self::get_check_sum( $values ); |
84 | 87 | if ( Jetpack_Options::get_option( $check_sum_id ) !== $current_check_sum ) { |
@@ -1027,7 +1027,7 @@ discard block |
||
1027 | 1027 | } |
1028 | 1028 | /** |
1029 | 1029 | * Does the network allow admins to add new users. |
1030 | - * @return boolian |
|
1030 | + * @return boolean |
|
1031 | 1031 | */ |
1032 | 1032 | static function network_add_new_users( $option = null ) { |
1033 | 1033 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | * database which could be set to anything as opposed to what this function returns. |
1076 | 1076 | * @param bool $option |
1077 | 1077 | * |
1078 | - * @return boolean |
|
1078 | + * @return string |
|
1079 | 1079 | */ |
1080 | 1080 | public function is_main_network_option( $option ) { |
1081 | 1081 | // return '1' or '' |
@@ -1086,7 +1086,7 @@ discard block |
||
1086 | 1086 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1087 | 1087 | * |
1088 | 1088 | * @param string $option |
1089 | - * @return boolean |
|
1089 | + * @return string |
|
1090 | 1090 | */ |
1091 | 1091 | public function is_multisite( $option ) { |
1092 | 1092 | return (string) (bool) is_multisite(); |
@@ -1725,7 +1725,7 @@ discard block |
||
1725 | 1725 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
1726 | 1726 | * |
1727 | 1727 | * @param string $name Option name |
1728 | - * @param mixed $default (optional) |
|
1728 | + * @param boolean $default (optional) |
|
1729 | 1729 | */ |
1730 | 1730 | public static function get_option( $name, $default = false ) { |
1731 | 1731 | return Jetpack_Options::get_option( $name, $default ); |
@@ -1735,6 +1735,7 @@ discard block |
||
1735 | 1735 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
1736 | 1736 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
1737 | 1737 | * $name must be a registered option name. |
1738 | + * @param string $name |
|
1738 | 1739 | */ |
1739 | 1740 | public static function create_nonce( $name ) { |
1740 | 1741 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1792,6 +1793,7 @@ discard block |
||
1792 | 1793 | * @param int $user_id |
1793 | 1794 | * @param string $token |
1794 | 1795 | * return bool |
1796 | + * @param boolean $is_master_user |
|
1795 | 1797 | */ |
1796 | 1798 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1797 | 1799 | // not designed for concurrent updates |
@@ -2186,6 +2188,7 @@ discard block |
||
2186 | 2188 | |
2187 | 2189 | /** |
2188 | 2190 | * Like core's get_file_data implementation, but caches the result. |
2191 | + * @param string $file |
|
2189 | 2192 | */ |
2190 | 2193 | public static function get_file_data( $file, $headers ) { |
2191 | 2194 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2214,7 +2217,7 @@ discard block |
||
2214 | 2217 | * |
2215 | 2218 | * @param string $tag Tag as it appears in each module heading. |
2216 | 2219 | * |
2217 | - * @return mixed |
|
2220 | + * @return string |
|
2218 | 2221 | */ |
2219 | 2222 | public static function translate_module_tag( $tag ) { |
2220 | 2223 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2527,6 +2530,9 @@ discard block |
||
2527 | 2530 | do_action( "jetpack_activate_module_$module", $module ); |
2528 | 2531 | } |
2529 | 2532 | |
2533 | + /** |
|
2534 | + * @return string |
|
2535 | + */ |
|
2530 | 2536 | public static function deactivate_module( $module ) { |
2531 | 2537 | /** |
2532 | 2538 | * Fires when a module is deactivated. |
@@ -2565,6 +2571,9 @@ discard block |
||
2565 | 2571 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
2566 | 2572 | } |
2567 | 2573 | |
2574 | + /** |
|
2575 | + * @param string $module |
|
2576 | + */ |
|
2568 | 2577 | public static function enable_module_configurable( $module ) { |
2569 | 2578 | $module = Jetpack::get_module_slug( $module ); |
2570 | 2579 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2575,21 +2584,33 @@ discard block |
||
2575 | 2584 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2576 | 2585 | } |
2577 | 2586 | |
2587 | + /** |
|
2588 | + * @param string $module |
|
2589 | + */ |
|
2578 | 2590 | public static function module_configuration_load( $module, $method ) { |
2579 | 2591 | $module = Jetpack::get_module_slug( $module ); |
2580 | 2592 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2581 | 2593 | } |
2582 | 2594 | |
2595 | + /** |
|
2596 | + * @param string $module |
|
2597 | + */ |
|
2583 | 2598 | public static function module_configuration_head( $module, $method ) { |
2584 | 2599 | $module = Jetpack::get_module_slug( $module ); |
2585 | 2600 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2586 | 2601 | } |
2587 | 2602 | |
2603 | + /** |
|
2604 | + * @param string $module |
|
2605 | + */ |
|
2588 | 2606 | public static function module_configuration_screen( $module, $method ) { |
2589 | 2607 | $module = Jetpack::get_module_slug( $module ); |
2590 | 2608 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2591 | 2609 | } |
2592 | 2610 | |
2611 | + /** |
|
2612 | + * @param string $module |
|
2613 | + */ |
|
2593 | 2614 | public static function module_configuration_activation_screen( $module, $method ) { |
2594 | 2615 | $module = Jetpack::get_module_slug( $module ); |
2595 | 2616 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2597,6 +2618,9 @@ discard block |
||
2597 | 2618 | |
2598 | 2619 | /* Installation */ |
2599 | 2620 | |
2621 | + /** |
|
2622 | + * @param string $message |
|
2623 | + */ |
|
2600 | 2624 | public static function bail_on_activation( $message, $deactivate = true ) { |
2601 | 2625 | ?> |
2602 | 2626 | <!doctype html> |
@@ -3183,7 +3207,7 @@ discard block |
||
3183 | 3207 | * Add help to the Jetpack page |
3184 | 3208 | * |
3185 | 3209 | * @since Jetpack (1.2.3) |
3186 | - * @return false if not the Jetpack page |
|
3210 | + * @return false|null if not the Jetpack page |
|
3187 | 3211 | */ |
3188 | 3212 | function admin_help() { |
3189 | 3213 | $current_screen = get_current_screen(); |
@@ -4455,6 +4479,7 @@ discard block |
||
4455 | 4479 | /** |
4456 | 4480 | * Returns the requested Jetpack API URL |
4457 | 4481 | * |
4482 | + * @param string $relative_url |
|
4458 | 4483 | * @return string |
4459 | 4484 | */ |
4460 | 4485 | public static function api_url( $relative_url ) { |
@@ -4879,6 +4904,10 @@ discard block |
||
4879 | 4904 | return new WP_User( $token_details['user_id'] ); |
4880 | 4905 | } |
4881 | 4906 | |
4907 | + /** |
|
4908 | + * @param integer $timestamp |
|
4909 | + * @param string $nonce |
|
4910 | + */ |
|
4882 | 4911 | function add_nonce( $timestamp, $nonce ) { |
4883 | 4912 | global $wpdb; |
4884 | 4913 | static $nonces_used_this_request = array(); |
@@ -5084,6 +5113,9 @@ discard block |
||
5084 | 5113 | Jetpack::state( null, null, true ); |
5085 | 5114 | } |
5086 | 5115 | |
5116 | + /** |
|
5117 | + * @param string $file |
|
5118 | + */ |
|
5087 | 5119 | public static function check_privacy( $file ) { |
5088 | 5120 | static $is_site_publicly_accessible = null; |
5089 | 5121 | |
@@ -6110,8 +6142,8 @@ discard block |
||
6110 | 6142 | * - Absolute URLs `http://domain.com/feh.png` |
6111 | 6143 | * - Domain root relative URLs `/feh.png` |
6112 | 6144 | * |
6113 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6114 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6145 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6146 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6115 | 6147 | * |
6116 | 6148 | * @return mixed|string |
6117 | 6149 | */ |
@@ -6507,7 +6539,6 @@ discard block |
||
6507 | 6539 | } |
6508 | 6540 | |
6509 | 6541 | /** |
6510 | - * @param mixed $result Value for the user's option |
|
6511 | 6542 | * @return mixed |
6512 | 6543 | */ |
6513 | 6544 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | /** |
58 | 58 | * Returns true if the site has file write access false otherwise. |
59 | - * @return string ( '1' | '0' ) |
|
59 | + * @return integer ( '1' | '0' ) |
|
60 | 60 | **/ |
61 | 61 | public static function file_system_write_access() { |
62 | 62 | if ( ! function_exists( 'get_filesystem_method' ) ) { |