@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | } |
1044 | 1044 | /** |
1045 | 1045 | * Does the network allow admins to add new users. |
1046 | - * @return boolian |
|
1046 | + * @return boolean |
|
1047 | 1047 | */ |
1048 | 1048 | static function network_add_new_users( $option = null ) { |
1049 | 1049 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | * database which could be set to anything as opposed to what this function returns. |
1153 | 1153 | * @param bool $option |
1154 | 1154 | * |
1155 | - * @return boolean |
|
1155 | + * @return string |
|
1156 | 1156 | */ |
1157 | 1157 | public function is_main_network_option( $option ) { |
1158 | 1158 | // return '1' or '' |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1164 | 1164 | * |
1165 | 1165 | * @param string $option |
1166 | - * @return boolean |
|
1166 | + * @return string |
|
1167 | 1167 | */ |
1168 | 1168 | public function is_multisite( $option ) { |
1169 | 1169 | return (string) (bool) is_multisite(); |
@@ -1225,7 +1225,7 @@ discard block |
||
1225 | 1225 | |
1226 | 1226 | /** |
1227 | 1227 | * Returns true if the site has file write access false otherwise. |
1228 | - * @return string ( '1' | '0' ) |
|
1228 | + * @return integer ( '1' | '0' ) |
|
1229 | 1229 | **/ |
1230 | 1230 | public static function file_system_write_access() { |
1231 | 1231 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1469,6 +1469,7 @@ discard block |
||
1469 | 1469 | * @access public |
1470 | 1470 | * @static |
1471 | 1471 | * |
1472 | + * @param string $feature |
|
1472 | 1473 | * @return bool True if plan supports feature, false if not |
1473 | 1474 | */ |
1474 | 1475 | public static function active_plan_supports( $feature ) { |
@@ -2019,6 +2020,7 @@ discard block |
||
2019 | 2020 | * @param int $user_id |
2020 | 2021 | * @param string $token |
2021 | 2022 | * return bool |
2023 | + * @param boolean $is_master_user |
|
2022 | 2024 | */ |
2023 | 2025 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2024 | 2026 | // not designed for concurrent updates |
@@ -2416,6 +2418,7 @@ discard block |
||
2416 | 2418 | |
2417 | 2419 | /** |
2418 | 2420 | * Like core's get_file_data implementation, but caches the result. |
2421 | + * @param string $file |
|
2419 | 2422 | */ |
2420 | 2423 | public static function get_file_data( $file, $headers ) { |
2421 | 2424 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2461,7 +2464,7 @@ discard block |
||
2461 | 2464 | * |
2462 | 2465 | * @param string $tag Tag as it appears in each module heading. |
2463 | 2466 | * |
2464 | - * @return mixed |
|
2467 | + * @return string |
|
2465 | 2468 | */ |
2466 | 2469 | public static function translate_module_tag( $tag ) { |
2467 | 2470 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2564,8 +2567,8 @@ discard block |
||
2564 | 2567 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2565 | 2568 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2566 | 2569 | * |
2567 | - * @param $string |
|
2568 | - * @return mixed |
|
2570 | + * @param string $string |
|
2571 | + * @return string|null |
|
2569 | 2572 | */ |
2570 | 2573 | public static function alias_directories( $string ) { |
2571 | 2574 | // ABSPATH has a trailing slash. |
@@ -2844,6 +2847,9 @@ discard block |
||
2844 | 2847 | return self::update_active_modules( $new ); |
2845 | 2848 | } |
2846 | 2849 | |
2850 | + /** |
|
2851 | + * @param string $module |
|
2852 | + */ |
|
2847 | 2853 | public static function enable_module_configurable( $module ) { |
2848 | 2854 | $module = Jetpack::get_module_slug( $module ); |
2849 | 2855 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2859,21 +2865,33 @@ discard block |
||
2859 | 2865 | ); |
2860 | 2866 | } |
2861 | 2867 | |
2868 | + /** |
|
2869 | + * @param string $module |
|
2870 | + */ |
|
2862 | 2871 | public static function module_configuration_load( $module, $method ) { |
2863 | 2872 | $module = Jetpack::get_module_slug( $module ); |
2864 | 2873 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2865 | 2874 | } |
2866 | 2875 | |
2876 | + /** |
|
2877 | + * @param string $module |
|
2878 | + */ |
|
2867 | 2879 | public static function module_configuration_head( $module, $method ) { |
2868 | 2880 | $module = Jetpack::get_module_slug( $module ); |
2869 | 2881 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2870 | 2882 | } |
2871 | 2883 | |
2884 | + /** |
|
2885 | + * @param string $module |
|
2886 | + */ |
|
2872 | 2887 | public static function module_configuration_screen( $module, $method ) { |
2873 | 2888 | $module = Jetpack::get_module_slug( $module ); |
2874 | 2889 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2875 | 2890 | } |
2876 | 2891 | |
2892 | + /** |
|
2893 | + * @param string $module |
|
2894 | + */ |
|
2877 | 2895 | public static function module_configuration_activation_screen( $module, $method ) { |
2878 | 2896 | $module = Jetpack::get_module_slug( $module ); |
2879 | 2897 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2881,6 +2899,9 @@ discard block |
||
2881 | 2899 | |
2882 | 2900 | /* Installation */ |
2883 | 2901 | |
2902 | + /** |
|
2903 | + * @param string $message |
|
2904 | + */ |
|
2884 | 2905 | public static function bail_on_activation( $message, $deactivate = true ) { |
2885 | 2906 | ?> |
2886 | 2907 | <!doctype html> |
@@ -3649,7 +3670,7 @@ discard block |
||
3649 | 3670 | * Add help to the Jetpack page |
3650 | 3671 | * |
3651 | 3672 | * @since Jetpack (1.2.3) |
3652 | - * @return false if not the Jetpack page |
|
3673 | + * @return false|null if not the Jetpack page |
|
3653 | 3674 | */ |
3654 | 3675 | function admin_help() { |
3655 | 3676 | $current_screen = get_current_screen(); |
@@ -4795,6 +4816,7 @@ discard block |
||
4795 | 4816 | /** |
4796 | 4817 | * Returns the requested Jetpack API URL |
4797 | 4818 | * |
4819 | + * @param string $relative_url |
|
4798 | 4820 | * @return string |
4799 | 4821 | */ |
4800 | 4822 | public static function api_url( $relative_url ) { |
@@ -5001,7 +5023,8 @@ discard block |
||
5001 | 5023 | * Note these tokens are unique per call, NOT static per site for connecting. |
5002 | 5024 | * |
5003 | 5025 | * @since 2.6 |
5004 | - * @return array |
|
5026 | + * @param string $action |
|
5027 | + * @return boolean |
|
5005 | 5028 | */ |
5006 | 5029 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5007 | 5030 | if ( ! $user_id ) { |
@@ -5557,7 +5580,6 @@ discard block |
||
5557 | 5580 | /** |
5558 | 5581 | * Report authentication status to the WP REST API. |
5559 | 5582 | * |
5560 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5561 | 5583 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5562 | 5584 | */ |
5563 | 5585 | public function wp_rest_authentication_errors( $value ) { |
@@ -5567,6 +5589,10 @@ discard block |
||
5567 | 5589 | return $this->rest_authentication_status; |
5568 | 5590 | } |
5569 | 5591 | |
5592 | + /** |
|
5593 | + * @param integer $timestamp |
|
5594 | + * @param string $nonce |
|
5595 | + */ |
|
5570 | 5596 | function add_nonce( $timestamp, $nonce ) { |
5571 | 5597 | global $wpdb; |
5572 | 5598 | static $nonces_used_this_request = array(); |
@@ -5712,6 +5738,7 @@ discard block |
||
5712 | 5738 | * @param string $key |
5713 | 5739 | * @param string $value |
5714 | 5740 | * @param bool $restate private |
5741 | + * @return string |
|
5715 | 5742 | */ |
5716 | 5743 | public static function state( $key = null, $value = null, $restate = false ) { |
5717 | 5744 | static $state = array(); |
@@ -5770,6 +5797,9 @@ discard block |
||
5770 | 5797 | Jetpack::state( null, null, true ); |
5771 | 5798 | } |
5772 | 5799 | |
5800 | + /** |
|
5801 | + * @param string $file |
|
5802 | + */ |
|
5773 | 5803 | public static function check_privacy( $file ) { |
5774 | 5804 | static $is_site_publicly_accessible = null; |
5775 | 5805 | |
@@ -6395,9 +6425,7 @@ discard block |
||
6395 | 6425 | * |
6396 | 6426 | * Attached to `style_loader_src` filter. |
6397 | 6427 | * |
6398 | - * @param string $tag The tag that would link to the external asset. |
|
6399 | 6428 | * @param string $handle The registered handle of the script in question. |
6400 | - * @param string $href The url of the asset in question. |
|
6401 | 6429 | */ |
6402 | 6430 | public static function set_suffix_on_min( $src, $handle ) { |
6403 | 6431 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6566,8 +6594,8 @@ discard block |
||
6566 | 6594 | * - Absolute URLs `http://domain.com/feh.png` |
6567 | 6595 | * - Domain root relative URLs `/feh.png` |
6568 | 6596 | * |
6569 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6570 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6597 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6598 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6571 | 6599 | * |
6572 | 6600 | * @return mixed|string |
6573 | 6601 | */ |
@@ -6796,7 +6824,7 @@ discard block |
||
6796 | 6824 | * |
6797 | 6825 | * @param string $option_name |
6798 | 6826 | * |
6799 | - * @return bool |
|
6827 | + * @return false|null |
|
6800 | 6828 | */ |
6801 | 6829 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
6802 | 6830 | // Bail if Jump Start has already been dismissed |
@@ -6885,7 +6913,6 @@ discard block |
||
6885 | 6913 | } |
6886 | 6914 | |
6887 | 6915 | /** |
6888 | - * @param mixed $result Value for the user's option |
|
6889 | 6916 | * @return mixed |
6890 | 6917 | */ |
6891 | 6918 | function get_user_option_meta_box_order_dashboard( $sorted ) { |