@@ -1018,7 +1018,7 @@ discard block |
||
| 1018 | 1018 | } |
| 1019 | 1019 | /** |
| 1020 | 1020 | * Does the network allow admins to add new users. |
| 1021 | - * @return boolian |
|
| 1021 | + * @return boolean |
|
| 1022 | 1022 | */ |
| 1023 | 1023 | static function network_add_new_users( $option = null ) { |
| 1024 | 1024 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | * database which could be set to anything as opposed to what this function returns. |
| 1067 | 1067 | * @param bool $option |
| 1068 | 1068 | * |
| 1069 | - * @return boolean |
|
| 1069 | + * @return string |
|
| 1070 | 1070 | */ |
| 1071 | 1071 | public function is_main_network_option( $option ) { |
| 1072 | 1072 | // return '1' or '' |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1078 | 1078 | * |
| 1079 | 1079 | * @param string $option |
| 1080 | - * @return boolean |
|
| 1080 | + * @return string |
|
| 1081 | 1081 | */ |
| 1082 | 1082 | public function is_multisite( $option ) { |
| 1083 | 1083 | return (string) (bool) is_multisite(); |
@@ -1175,7 +1175,7 @@ discard block |
||
| 1175 | 1175 | |
| 1176 | 1176 | /** |
| 1177 | 1177 | * Returns true if the site has file write access false otherwise. |
| 1178 | - * @return string ( '1' | '0' ) |
|
| 1178 | + * @return integer ( '1' | '0' ) |
|
| 1179 | 1179 | **/ |
| 1180 | 1180 | public static function file_system_write_access() { |
| 1181 | 1181 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1985,7 +1985,7 @@ discard block |
||
| 1985 | 1985 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
| 1986 | 1986 | * |
| 1987 | 1987 | * @param string $name Option name |
| 1988 | - * @param mixed $default (optional) |
|
| 1988 | + * @param boolean $default (optional) |
|
| 1989 | 1989 | */ |
| 1990 | 1990 | public static function get_option( $name, $default = false ) { |
| 1991 | 1991 | return Jetpack_Options::get_option( $name, $default ); |
@@ -1995,6 +1995,7 @@ discard block |
||
| 1995 | 1995 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
| 1996 | 1996 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
| 1997 | 1997 | * $name must be a registered option name. |
| 1998 | + * @param string $name |
|
| 1998 | 1999 | */ |
| 1999 | 2000 | public static function create_nonce( $name ) { |
| 2000 | 2001 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -2052,6 +2053,7 @@ discard block |
||
| 2052 | 2053 | * @param int $user_id |
| 2053 | 2054 | * @param string $token |
| 2054 | 2055 | * return bool |
| 2056 | + * @param boolean $is_master_user |
|
| 2055 | 2057 | */ |
| 2056 | 2058 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2057 | 2059 | // not designed for concurrent updates |
@@ -2446,6 +2448,7 @@ discard block |
||
| 2446 | 2448 | |
| 2447 | 2449 | /** |
| 2448 | 2450 | * Like core's get_file_data implementation, but caches the result. |
| 2451 | + * @param string $file |
|
| 2449 | 2452 | */ |
| 2450 | 2453 | public static function get_file_data( $file, $headers ) { |
| 2451 | 2454 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2474,7 +2477,7 @@ discard block |
||
| 2474 | 2477 | * |
| 2475 | 2478 | * @param string $tag Tag as it appears in each module heading. |
| 2476 | 2479 | * |
| 2477 | - * @return mixed |
|
| 2480 | + * @return string |
|
| 2478 | 2481 | */ |
| 2479 | 2482 | public static function translate_module_tag( $tag ) { |
| 2480 | 2483 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2792,6 +2795,9 @@ discard block |
||
| 2792 | 2795 | $this->sync->sync_all_module_options( $module ); |
| 2793 | 2796 | } |
| 2794 | 2797 | |
| 2798 | + /** |
|
| 2799 | + * @return string |
|
| 2800 | + */ |
|
| 2795 | 2801 | public static function deactivate_module( $module ) { |
| 2796 | 2802 | /** |
| 2797 | 2803 | * Fires when a module is deactivated. |
@@ -2830,6 +2836,9 @@ discard block |
||
| 2830 | 2836 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
| 2831 | 2837 | } |
| 2832 | 2838 | |
| 2839 | + /** |
|
| 2840 | + * @param string $module |
|
| 2841 | + */ |
|
| 2833 | 2842 | public static function enable_module_configurable( $module ) { |
| 2834 | 2843 | $module = Jetpack::get_module_slug( $module ); |
| 2835 | 2844 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2840,21 +2849,33 @@ discard block |
||
| 2840 | 2849 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
| 2841 | 2850 | } |
| 2842 | 2851 | |
| 2852 | + /** |
|
| 2853 | + * @param string $module |
|
| 2854 | + */ |
|
| 2843 | 2855 | public static function module_configuration_load( $module, $method ) { |
| 2844 | 2856 | $module = Jetpack::get_module_slug( $module ); |
| 2845 | 2857 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
| 2846 | 2858 | } |
| 2847 | 2859 | |
| 2860 | + /** |
|
| 2861 | + * @param string $module |
|
| 2862 | + */ |
|
| 2848 | 2863 | public static function module_configuration_head( $module, $method ) { |
| 2849 | 2864 | $module = Jetpack::get_module_slug( $module ); |
| 2850 | 2865 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
| 2851 | 2866 | } |
| 2852 | 2867 | |
| 2868 | + /** |
|
| 2869 | + * @param string $module |
|
| 2870 | + */ |
|
| 2853 | 2871 | public static function module_configuration_screen( $module, $method ) { |
| 2854 | 2872 | $module = Jetpack::get_module_slug( $module ); |
| 2855 | 2873 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
| 2856 | 2874 | } |
| 2857 | 2875 | |
| 2876 | + /** |
|
| 2877 | + * @param string $module |
|
| 2878 | + */ |
|
| 2858 | 2879 | public static function module_configuration_activation_screen( $module, $method ) { |
| 2859 | 2880 | $module = Jetpack::get_module_slug( $module ); |
| 2860 | 2881 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2862,6 +2883,9 @@ discard block |
||
| 2862 | 2883 | |
| 2863 | 2884 | /* Installation */ |
| 2864 | 2885 | |
| 2886 | + /** |
|
| 2887 | + * @param string $message |
|
| 2888 | + */ |
|
| 2865 | 2889 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2866 | 2890 | ?> |
| 2867 | 2891 | <!doctype html> |
@@ -3475,7 +3499,7 @@ discard block |
||
| 3475 | 3499 | * Add help to the Jetpack page |
| 3476 | 3500 | * |
| 3477 | 3501 | * @since Jetpack (1.2.3) |
| 3478 | - * @return false if not the Jetpack page |
|
| 3502 | + * @return false|null if not the Jetpack page |
|
| 3479 | 3503 | */ |
| 3480 | 3504 | function admin_help() { |
| 3481 | 3505 | $current_screen = get_current_screen(); |
@@ -4791,6 +4815,7 @@ discard block |
||
| 4791 | 4815 | /** |
| 4792 | 4816 | * Returns the requested Jetpack API URL |
| 4793 | 4817 | * |
| 4818 | + * @param string $relative_url |
|
| 4794 | 4819 | * @return string |
| 4795 | 4820 | */ |
| 4796 | 4821 | public static function api_url( $relative_url ) { |
@@ -4932,7 +4957,8 @@ discard block |
||
| 4932 | 4957 | * Note these tokens are unique per call, NOT static per site for connecting. |
| 4933 | 4958 | * |
| 4934 | 4959 | * @since 2.6 |
| 4935 | - * @return array |
|
| 4960 | + * @param string $action |
|
| 4961 | + * @return string |
|
| 4936 | 4962 | */ |
| 4937 | 4963 | public function generate_secrets( $action ) { |
| 4938 | 4964 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -5253,6 +5279,10 @@ discard block |
||
| 5253 | 5279 | return new WP_User( $token_details['user_id'] ); |
| 5254 | 5280 | } |
| 5255 | 5281 | |
| 5282 | + /** |
|
| 5283 | + * @param integer $timestamp |
|
| 5284 | + * @param string $nonce |
|
| 5285 | + */ |
|
| 5256 | 5286 | function add_nonce( $timestamp, $nonce ) { |
| 5257 | 5287 | global $wpdb; |
| 5258 | 5288 | static $nonces_used_this_request = array(); |
@@ -5458,6 +5488,9 @@ discard block |
||
| 5458 | 5488 | Jetpack::state( null, null, true ); |
| 5459 | 5489 | } |
| 5460 | 5490 | |
| 5491 | + /** |
|
| 5492 | + * @param string $file |
|
| 5493 | + */ |
|
| 5461 | 5494 | public static function check_privacy( $file ) { |
| 5462 | 5495 | static $is_site_publicly_accessible = null; |
| 5463 | 5496 | |
@@ -5785,7 +5818,7 @@ discard block |
||
| 5785 | 5818 | /** |
| 5786 | 5819 | * Pings the WordPress.com Mirror Site for the specified options. |
| 5787 | 5820 | * |
| 5788 | - * @param string|array $option_names The option names to request from the WordPress.com Mirror Site |
|
| 5821 | + * @param string[] $option_names The option names to request from the WordPress.com Mirror Site |
|
| 5789 | 5822 | * |
| 5790 | 5823 | * @return array An associative array of the option values as stored in the WordPress.com Mirror Site |
| 5791 | 5824 | */ |
@@ -5809,7 +5842,7 @@ discard block |
||
| 5809 | 5842 | /** |
| 5810 | 5843 | * Fetch the filtered array of options that we should compare to determine an identity crisis. |
| 5811 | 5844 | * |
| 5812 | - * @return array An array of options to check. |
|
| 5845 | + * @return string[] An array of options to check. |
|
| 5813 | 5846 | */ |
| 5814 | 5847 | public static function identity_crisis_options_to_check() { |
| 5815 | 5848 | return array( |
@@ -6481,8 +6514,8 @@ discard block |
||
| 6481 | 6514 | * - Absolute URLs `http://domain.com/feh.png` |
| 6482 | 6515 | * - Domain root relative URLs `/feh.png` |
| 6483 | 6516 | * |
| 6484 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6485 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6517 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6518 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6486 | 6519 | * |
| 6487 | 6520 | * @return mixed|string |
| 6488 | 6521 | */ |
@@ -6790,7 +6823,7 @@ discard block |
||
| 6790 | 6823 | * |
| 6791 | 6824 | * @param string $option_name |
| 6792 | 6825 | * |
| 6793 | - * @return bool |
|
| 6826 | + * @return false|null |
|
| 6794 | 6827 | */ |
| 6795 | 6828 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
| 6796 | 6829 | // Bail if Jump Start has already been dismissed |
@@ -6881,7 +6914,6 @@ discard block |
||
| 6881 | 6914 | } |
| 6882 | 6915 | |
| 6883 | 6916 | /** |
| 6884 | - * @param mixed $result Value for the user's option |
|
| 6885 | 6917 | * @return mixed |
| 6886 | 6918 | */ |
| 6887 | 6919 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -253,6 +253,8 @@ |
||
| 253 | 253 | * And we'll magically convert it to a list. This has the added benefit |
| 254 | 254 | * of including itemprops for the recipe schema. |
| 255 | 255 | * |
| 256 | + * @param string $content |
|
| 257 | + * @param string $type |
|
| 256 | 258 | * @return string content formatted as a list item |
| 257 | 259 | */ |
| 258 | 260 | static function output_list_content( $content, $type ) { |
@@ -102,9 +102,9 @@ |
||
| 102 | 102 | * Parameters are the same as preg_replace, with an added optional search param for improved performance |
| 103 | 103 | * |
| 104 | 104 | * @param String $pattern |
| 105 | - * @param String $replacement |
|
| 106 | 105 | * @param String $content |
| 107 | 106 | * @param String $search |
| 107 | + * @param string $callback |
|
| 108 | 108 | * @return String $content |
| 109 | 109 | */ |
| 110 | 110 | function jetpack_preg_replace_callback_outside_tags( $pattern, $callback, $content, $search = null ) { |