@@ -196,7 +196,7 @@ |
||
| 196 | 196 | /** |
| 197 | 197 | * Just authenticates with the given Jetpack credentials. |
| 198 | 198 | * |
| 199 | - * @return bool|IXR_Error |
|
| 199 | + * @return string |
|
| 200 | 200 | */ |
| 201 | 201 | function test_connection() { |
| 202 | 202 | return JETPACK__VERSION; |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | } |
| 1027 | 1027 | /** |
| 1028 | 1028 | * Does the network allow admins to add new users. |
| 1029 | - * @return boolian |
|
| 1029 | + * @return boolean |
|
| 1030 | 1030 | */ |
| 1031 | 1031 | static function network_add_new_users( $option = null ) { |
| 1032 | 1032 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1074,7 +1074,7 @@ discard block |
||
| 1074 | 1074 | * database which could be set to anything as opposed to what this function returns. |
| 1075 | 1075 | * @param bool $option |
| 1076 | 1076 | * |
| 1077 | - * @return boolean |
|
| 1077 | + * @return string |
|
| 1078 | 1078 | */ |
| 1079 | 1079 | public function is_main_network_option( $option ) { |
| 1080 | 1080 | // return '1' or '' |
@@ -1085,7 +1085,7 @@ discard block |
||
| 1085 | 1085 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1086 | 1086 | * |
| 1087 | 1087 | * @param string $option |
| 1088 | - * @return boolean |
|
| 1088 | + * @return string |
|
| 1089 | 1089 | */ |
| 1090 | 1090 | public function is_multisite( $option ) { |
| 1091 | 1091 | return (string) (bool) is_multisite(); |
@@ -1724,7 +1724,7 @@ discard block |
||
| 1724 | 1724 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
| 1725 | 1725 | * |
| 1726 | 1726 | * @param string $name Option name |
| 1727 | - * @param mixed $default (optional) |
|
| 1727 | + * @param boolean $default (optional) |
|
| 1728 | 1728 | */ |
| 1729 | 1729 | public static function get_option( $name, $default = false ) { |
| 1730 | 1730 | return Jetpack_Options::get_option( $name, $default ); |
@@ -1734,6 +1734,7 @@ discard block |
||
| 1734 | 1734 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
| 1735 | 1735 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
| 1736 | 1736 | * $name must be a registered option name. |
| 1737 | + * @param string $name |
|
| 1737 | 1738 | */ |
| 1738 | 1739 | public static function create_nonce( $name ) { |
| 1739 | 1740 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1791,6 +1792,7 @@ discard block |
||
| 1791 | 1792 | * @param int $user_id |
| 1792 | 1793 | * @param string $token |
| 1793 | 1794 | * return bool |
| 1795 | + * @param boolean $is_master_user |
|
| 1794 | 1796 | */ |
| 1795 | 1797 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 1796 | 1798 | // not designed for concurrent updates |
@@ -2185,6 +2187,7 @@ discard block |
||
| 2185 | 2187 | |
| 2186 | 2188 | /** |
| 2187 | 2189 | * Like core's get_file_data implementation, but caches the result. |
| 2190 | + * @param string $file |
|
| 2188 | 2191 | */ |
| 2189 | 2192 | public static function get_file_data( $file, $headers ) { |
| 2190 | 2193 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2213,7 +2216,7 @@ discard block |
||
| 2213 | 2216 | * |
| 2214 | 2217 | * @param string $tag Tag as it appears in each module heading. |
| 2215 | 2218 | * |
| 2216 | - * @return mixed |
|
| 2219 | + * @return string |
|
| 2217 | 2220 | */ |
| 2218 | 2221 | public static function translate_module_tag( $tag ) { |
| 2219 | 2222 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2529,6 +2532,9 @@ discard block |
||
| 2529 | 2532 | do_action( "jetpack_activate_module_$module", $module ); |
| 2530 | 2533 | } |
| 2531 | 2534 | |
| 2535 | + /** |
|
| 2536 | + * @return string |
|
| 2537 | + */ |
|
| 2532 | 2538 | public static function deactivate_module( $module ) { |
| 2533 | 2539 | /** |
| 2534 | 2540 | * Fires when a module is deactivated. |
@@ -2567,6 +2573,9 @@ discard block |
||
| 2567 | 2573 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
| 2568 | 2574 | } |
| 2569 | 2575 | |
| 2576 | + /** |
|
| 2577 | + * @param string $module |
|
| 2578 | + */ |
|
| 2570 | 2579 | public static function enable_module_configurable( $module ) { |
| 2571 | 2580 | $module = Jetpack::get_module_slug( $module ); |
| 2572 | 2581 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2577,21 +2586,33 @@ discard block |
||
| 2577 | 2586 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
| 2578 | 2587 | } |
| 2579 | 2588 | |
| 2589 | + /** |
|
| 2590 | + * @param string $module |
|
| 2591 | + */ |
|
| 2580 | 2592 | public static function module_configuration_load( $module, $method ) { |
| 2581 | 2593 | $module = Jetpack::get_module_slug( $module ); |
| 2582 | 2594 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
| 2583 | 2595 | } |
| 2584 | 2596 | |
| 2597 | + /** |
|
| 2598 | + * @param string $module |
|
| 2599 | + */ |
|
| 2585 | 2600 | public static function module_configuration_head( $module, $method ) { |
| 2586 | 2601 | $module = Jetpack::get_module_slug( $module ); |
| 2587 | 2602 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
| 2588 | 2603 | } |
| 2589 | 2604 | |
| 2605 | + /** |
|
| 2606 | + * @param string $module |
|
| 2607 | + */ |
|
| 2590 | 2608 | public static function module_configuration_screen( $module, $method ) { |
| 2591 | 2609 | $module = Jetpack::get_module_slug( $module ); |
| 2592 | 2610 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
| 2593 | 2611 | } |
| 2594 | 2612 | |
| 2613 | + /** |
|
| 2614 | + * @param string $module |
|
| 2615 | + */ |
|
| 2595 | 2616 | public static function module_configuration_activation_screen( $module, $method ) { |
| 2596 | 2617 | $module = Jetpack::get_module_slug( $module ); |
| 2597 | 2618 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2599,6 +2620,9 @@ discard block |
||
| 2599 | 2620 | |
| 2600 | 2621 | /* Installation */ |
| 2601 | 2622 | |
| 2623 | + /** |
|
| 2624 | + * @param string $message |
|
| 2625 | + */ |
|
| 2602 | 2626 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2603 | 2627 | ?> |
| 2604 | 2628 | <!doctype html> |
@@ -3185,7 +3209,7 @@ discard block |
||
| 3185 | 3209 | * Add help to the Jetpack page |
| 3186 | 3210 | * |
| 3187 | 3211 | * @since Jetpack (1.2.3) |
| 3188 | - * @return false if not the Jetpack page |
|
| 3212 | + * @return false|null if not the Jetpack page |
|
| 3189 | 3213 | */ |
| 3190 | 3214 | function admin_help() { |
| 3191 | 3215 | $current_screen = get_current_screen(); |
@@ -4480,6 +4504,7 @@ discard block |
||
| 4480 | 4504 | /** |
| 4481 | 4505 | * Returns the requested Jetpack API URL |
| 4482 | 4506 | * |
| 4507 | + * @param string $relative_url |
|
| 4483 | 4508 | * @return string |
| 4484 | 4509 | */ |
| 4485 | 4510 | public static function api_url( $relative_url ) { |
@@ -4906,6 +4931,10 @@ discard block |
||
| 4906 | 4931 | return new WP_User( $token_details['user_id'] ); |
| 4907 | 4932 | } |
| 4908 | 4933 | |
| 4934 | + /** |
|
| 4935 | + * @param integer $timestamp |
|
| 4936 | + * @param string $nonce |
|
| 4937 | + */ |
|
| 4909 | 4938 | function add_nonce( $timestamp, $nonce ) { |
| 4910 | 4939 | global $wpdb; |
| 4911 | 4940 | static $nonces_used_this_request = array(); |
@@ -5111,6 +5140,9 @@ discard block |
||
| 5111 | 5140 | Jetpack::state( null, null, true ); |
| 5112 | 5141 | } |
| 5113 | 5142 | |
| 5143 | + /** |
|
| 5144 | + * @param string $file |
|
| 5145 | + */ |
|
| 5114 | 5146 | public static function check_privacy( $file ) { |
| 5115 | 5147 | static $is_site_publicly_accessible = null; |
| 5116 | 5148 | |
@@ -5438,7 +5470,7 @@ discard block |
||
| 5438 | 5470 | /** |
| 5439 | 5471 | * Pings the WordPress.com Mirror Site for the specified options. |
| 5440 | 5472 | * |
| 5441 | - * @param string|array $option_names The option names to request from the WordPress.com Mirror Site |
|
| 5473 | + * @param string[] $option_names The option names to request from the WordPress.com Mirror Site |
|
| 5442 | 5474 | * |
| 5443 | 5475 | * @return array An associative array of the option values as stored in the WordPress.com Mirror Site |
| 5444 | 5476 | */ |
@@ -5462,7 +5494,7 @@ discard block |
||
| 5462 | 5494 | /** |
| 5463 | 5495 | * Fetch the filtered array of options that we should compare to determine an identity crisis. |
| 5464 | 5496 | * |
| 5465 | - * @return array An array of options to check. |
|
| 5497 | + * @return string[] An array of options to check. |
|
| 5466 | 5498 | */ |
| 5467 | 5499 | public static function identity_crisis_options_to_check() { |
| 5468 | 5500 | return array( |
@@ -6133,8 +6165,8 @@ discard block |
||
| 6133 | 6165 | * - Absolute URLs `http://domain.com/feh.png` |
| 6134 | 6166 | * - Domain root relative URLs `/feh.png` |
| 6135 | 6167 | * |
| 6136 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6137 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6168 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6169 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6138 | 6170 | * |
| 6139 | 6171 | * @return mixed|string |
| 6140 | 6172 | */ |
@@ -6530,7 +6562,6 @@ discard block |
||
| 6530 | 6562 | } |
| 6531 | 6563 | |
| 6532 | 6564 | /** |
| 6533 | - * @param mixed $result Value for the user's option |
|
| 6534 | 6565 | * @return mixed |
| 6535 | 6566 | */ |
| 6536 | 6567 | function get_user_option_meta_box_order_dashboard( $sorted ) { |