@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | } |
877 | 877 | /** |
878 | 878 | * Does the network allow admins to add new users. |
879 | - * @return boolian |
|
879 | + * @return boolean |
|
880 | 880 | */ |
881 | 881 | static function network_add_new_users( $option = null ) { |
882 | 882 | return (bool) get_site_option( 'add_new_users' ); |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | * database which could be set to anything as opposed to what this function returns. |
977 | 977 | * @param bool $option |
978 | 978 | * |
979 | - * @return boolean |
|
979 | + * @return string |
|
980 | 980 | */ |
981 | 981 | public function is_main_network_option( $option ) { |
982 | 982 | // return '1' or '' |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
988 | 988 | * |
989 | 989 | * @param string $option |
990 | - * @return boolean |
|
990 | + * @return string |
|
991 | 991 | */ |
992 | 992 | public function is_multisite( $option ) { |
993 | 993 | return (string) (bool) is_multisite(); |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | |
1046 | 1046 | /** |
1047 | 1047 | * Returns true if the site has file write access false otherwise. |
1048 | - * @return string ( '1' | '0' ) |
|
1048 | + * @return integer ( '1' | '0' ) |
|
1049 | 1049 | **/ |
1050 | 1050 | public static function file_system_write_access() { |
1051 | 1051 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
1620 | 1620 | * |
1621 | 1621 | * @param string $name Option name |
1622 | - * @param mixed $default (optional) |
|
1622 | + * @param boolean $default (optional) |
|
1623 | 1623 | */ |
1624 | 1624 | public static function get_option( $name, $default = false ) { |
1625 | 1625 | return Jetpack_Options::get_option( $name, $default ); |
@@ -1629,6 +1629,7 @@ discard block |
||
1629 | 1629 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
1630 | 1630 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
1631 | 1631 | * $name must be a registered option name. |
1632 | + * @param string $name |
|
1632 | 1633 | */ |
1633 | 1634 | public static function create_nonce( $name ) { |
1634 | 1635 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1686,6 +1687,7 @@ discard block |
||
1686 | 1687 | * @param int $user_id |
1687 | 1688 | * @param string $token |
1688 | 1689 | * return bool |
1690 | + * @param boolean $is_master_user |
|
1689 | 1691 | */ |
1690 | 1692 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1691 | 1693 | // not designed for concurrent updates |
@@ -2080,6 +2082,7 @@ discard block |
||
2080 | 2082 | |
2081 | 2083 | /** |
2082 | 2084 | * Like core's get_file_data implementation, but caches the result. |
2085 | + * @param string $file |
|
2083 | 2086 | */ |
2084 | 2087 | public static function get_file_data( $file, $headers ) { |
2085 | 2088 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2108,7 +2111,7 @@ discard block |
||
2108 | 2111 | * |
2109 | 2112 | * @param string $tag Tag as it appears in each module heading. |
2110 | 2113 | * |
2111 | - * @return mixed |
|
2114 | + * @return string |
|
2112 | 2115 | */ |
2113 | 2116 | public static function translate_module_tag( $tag ) { |
2114 | 2117 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2121,7 +2124,7 @@ discard block |
||
2121 | 2124 | * |
2122 | 2125 | * @param array $modules |
2123 | 2126 | * |
2124 | - * @return string|void |
|
2127 | + * @return string |
|
2125 | 2128 | */ |
2126 | 2129 | public static function get_translated_modules( $modules ) { |
2127 | 2130 | foreach ( $modules as $index => $module ) { |
@@ -2409,6 +2412,9 @@ discard block |
||
2409 | 2412 | _deprecated_function( __METHOD__, 'jeptack-4.2' ); |
2410 | 2413 | } |
2411 | 2414 | |
2415 | + /** |
|
2416 | + * @return string |
|
2417 | + */ |
|
2412 | 2418 | public static function deactivate_module( $module ) { |
2413 | 2419 | /** |
2414 | 2420 | * Fires when a module is deactivated. |
@@ -2437,6 +2443,9 @@ discard block |
||
2437 | 2443 | return self::update_active_modules( $new ); |
2438 | 2444 | } |
2439 | 2445 | |
2446 | + /** |
|
2447 | + * @param string $module |
|
2448 | + */ |
|
2440 | 2449 | public static function enable_module_configurable( $module ) { |
2441 | 2450 | $module = Jetpack::get_module_slug( $module ); |
2442 | 2451 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2447,21 +2456,33 @@ discard block |
||
2447 | 2456 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2448 | 2457 | } |
2449 | 2458 | |
2459 | + /** |
|
2460 | + * @param string $module |
|
2461 | + */ |
|
2450 | 2462 | public static function module_configuration_load( $module, $method ) { |
2451 | 2463 | $module = Jetpack::get_module_slug( $module ); |
2452 | 2464 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2453 | 2465 | } |
2454 | 2466 | |
2467 | + /** |
|
2468 | + * @param string $module |
|
2469 | + */ |
|
2455 | 2470 | public static function module_configuration_head( $module, $method ) { |
2456 | 2471 | $module = Jetpack::get_module_slug( $module ); |
2457 | 2472 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2458 | 2473 | } |
2459 | 2474 | |
2475 | + /** |
|
2476 | + * @param string $module |
|
2477 | + */ |
|
2460 | 2478 | public static function module_configuration_screen( $module, $method ) { |
2461 | 2479 | $module = Jetpack::get_module_slug( $module ); |
2462 | 2480 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2463 | 2481 | } |
2464 | 2482 | |
2483 | + /** |
|
2484 | + * @param string $module |
|
2485 | + */ |
|
2465 | 2486 | public static function module_configuration_activation_screen( $module, $method ) { |
2466 | 2487 | $module = Jetpack::get_module_slug( $module ); |
2467 | 2488 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2469,6 +2490,9 @@ discard block |
||
2469 | 2490 | |
2470 | 2491 | /* Installation */ |
2471 | 2492 | |
2493 | + /** |
|
2494 | + * @param string $message |
|
2495 | + */ |
|
2472 | 2496 | public static function bail_on_activation( $message, $deactivate = true ) { |
2473 | 2497 | ?> |
2474 | 2498 | <!doctype html> |
@@ -3102,7 +3126,7 @@ discard block |
||
3102 | 3126 | * Add help to the Jetpack page |
3103 | 3127 | * |
3104 | 3128 | * @since Jetpack (1.2.3) |
3105 | - * @return false if not the Jetpack page |
|
3129 | + * @return false|null if not the Jetpack page |
|
3106 | 3130 | */ |
3107 | 3131 | function admin_help() { |
3108 | 3132 | $current_screen = get_current_screen(); |
@@ -4137,6 +4161,7 @@ discard block |
||
4137 | 4161 | /** |
4138 | 4162 | * Returns the requested Jetpack API URL |
4139 | 4163 | * |
4164 | + * @param string $relative_url |
|
4140 | 4165 | * @return string |
4141 | 4166 | */ |
4142 | 4167 | public static function api_url( $relative_url ) { |
@@ -4281,7 +4306,8 @@ discard block |
||
4281 | 4306 | * Note these tokens are unique per call, NOT static per site for connecting. |
4282 | 4307 | * |
4283 | 4308 | * @since 2.6 |
4284 | - * @return array |
|
4309 | + * @param string $action |
|
4310 | + * @return string |
|
4285 | 4311 | */ |
4286 | 4312 | public function generate_secrets( $action, $exp = 600 ) { |
4287 | 4313 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4607,6 +4633,10 @@ discard block |
||
4607 | 4633 | return new WP_User( $token_details['user_id'] ); |
4608 | 4634 | } |
4609 | 4635 | |
4636 | + /** |
|
4637 | + * @param integer $timestamp |
|
4638 | + * @param string $nonce |
|
4639 | + */ |
|
4610 | 4640 | function add_nonce( $timestamp, $nonce ) { |
4611 | 4641 | global $wpdb; |
4612 | 4642 | static $nonces_used_this_request = array(); |
@@ -4752,6 +4782,7 @@ discard block |
||
4752 | 4782 | * @param string $key |
4753 | 4783 | * @param string $value |
4754 | 4784 | * @param bool $restate private |
4785 | + * @return string |
|
4755 | 4786 | */ |
4756 | 4787 | public static function state( $key = null, $value = null, $restate = false ) { |
4757 | 4788 | static $state = array(); |
@@ -4808,6 +4839,9 @@ discard block |
||
4808 | 4839 | Jetpack::state( null, null, true ); |
4809 | 4840 | } |
4810 | 4841 | |
4842 | + /** |
|
4843 | + * @param string $file |
|
4844 | + */ |
|
4811 | 4845 | public static function check_privacy( $file ) { |
4812 | 4846 | static $is_site_publicly_accessible = null; |
4813 | 4847 | |
@@ -5536,8 +5570,8 @@ discard block |
||
5536 | 5570 | * - Absolute URLs `http://domain.com/feh.png` |
5537 | 5571 | * - Domain root relative URLs `/feh.png` |
5538 | 5572 | * |
5539 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
5540 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5573 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5574 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5541 | 5575 | * |
5542 | 5576 | * @return mixed|string |
5543 | 5577 | */ |
@@ -5828,7 +5862,7 @@ discard block |
||
5828 | 5862 | * |
5829 | 5863 | * @param string $option_name |
5830 | 5864 | * |
5831 | - * @return bool |
|
5865 | + * @return false|null |
|
5832 | 5866 | */ |
5833 | 5867 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
5834 | 5868 | // Bail if Jump Start has already been dismissed |
@@ -5919,7 +5953,6 @@ discard block |
||
5919 | 5953 | } |
5920 | 5954 | |
5921 | 5955 | /** |
5922 | - * @param mixed $result Value for the user's option |
|
5923 | 5956 | * @return mixed |
5924 | 5957 | */ |
5925 | 5958 | function get_user_option_meta_box_order_dashboard( $sorted ) { |