@@ -885,7 +885,7 @@ discard block |
||
| 885 | 885 | } |
| 886 | 886 | /** |
| 887 | 887 | * Does the network allow admins to add new users. |
| 888 | - * @return boolian |
|
| 888 | + * @return boolean |
|
| 889 | 889 | */ |
| 890 | 890 | static function network_add_new_users( $option = null ) { |
| 891 | 891 | return (bool) get_site_option( 'add_new_users' ); |
@@ -990,7 +990,7 @@ discard block |
||
| 990 | 990 | * database which could be set to anything as opposed to what this function returns. |
| 991 | 991 | * @param bool $option |
| 992 | 992 | * |
| 993 | - * @return boolean |
|
| 993 | + * @return string |
|
| 994 | 994 | */ |
| 995 | 995 | public function is_main_network_option( $option ) { |
| 996 | 996 | // return '1' or '' |
@@ -1001,7 +1001,7 @@ discard block |
||
| 1001 | 1001 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1002 | 1002 | * |
| 1003 | 1003 | * @param string $option |
| 1004 | - * @return boolean |
|
| 1004 | + * @return string |
|
| 1005 | 1005 | */ |
| 1006 | 1006 | public function is_multisite( $option ) { |
| 1007 | 1007 | return (string) (bool) is_multisite(); |
@@ -1063,7 +1063,7 @@ discard block |
||
| 1063 | 1063 | |
| 1064 | 1064 | /** |
| 1065 | 1065 | * Returns true if the site has file write access false otherwise. |
| 1066 | - * @return string ( '1' | '0' ) |
|
| 1066 | + * @return integer ( '1' | '0' ) |
|
| 1067 | 1067 | **/ |
| 1068 | 1068 | public static function file_system_write_access() { |
| 1069 | 1069 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1272,6 +1272,7 @@ discard block |
||
| 1272 | 1272 | * @access public |
| 1273 | 1273 | * @static |
| 1274 | 1274 | * |
| 1275 | + * @param string $feature |
|
| 1275 | 1276 | * @return bool True if plan supports feature, false if not |
| 1276 | 1277 | */ |
| 1277 | 1278 | public static function active_plan_supports( $feature ) { |
@@ -1761,7 +1762,7 @@ discard block |
||
| 1761 | 1762 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
| 1762 | 1763 | * |
| 1763 | 1764 | * @param string $name Option name |
| 1764 | - * @param mixed $default (optional) |
|
| 1765 | + * @param boolean $default (optional) |
|
| 1765 | 1766 | */ |
| 1766 | 1767 | public static function get_option( $name, $default = false ) { |
| 1767 | 1768 | return Jetpack_Options::get_option( $name, $default ); |
@@ -1771,6 +1772,7 @@ discard block |
||
| 1771 | 1772 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
| 1772 | 1773 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
| 1773 | 1774 | * $name must be a registered option name. |
| 1775 | + * @param string $name |
|
| 1774 | 1776 | */ |
| 1775 | 1777 | public static function create_nonce( $name ) { |
| 1776 | 1778 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1828,6 +1830,7 @@ discard block |
||
| 1828 | 1830 | * @param int $user_id |
| 1829 | 1831 | * @param string $token |
| 1830 | 1832 | * return bool |
| 1833 | + * @param boolean $is_master_user |
|
| 1831 | 1834 | */ |
| 1832 | 1835 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 1833 | 1836 | // not designed for concurrent updates |
@@ -2222,6 +2225,7 @@ discard block |
||
| 2222 | 2225 | |
| 2223 | 2226 | /** |
| 2224 | 2227 | * Like core's get_file_data implementation, but caches the result. |
| 2228 | + * @param string $file |
|
| 2225 | 2229 | */ |
| 2226 | 2230 | public static function get_file_data( $file, $headers ) { |
| 2227 | 2231 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2250,7 +2254,7 @@ discard block |
||
| 2250 | 2254 | * |
| 2251 | 2255 | * @param string $tag Tag as it appears in each module heading. |
| 2252 | 2256 | * |
| 2253 | - * @return mixed |
|
| 2257 | + * @return string |
|
| 2254 | 2258 | */ |
| 2255 | 2259 | public static function translate_module_tag( $tag ) { |
| 2256 | 2260 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2263,7 +2267,7 @@ discard block |
||
| 2263 | 2267 | * |
| 2264 | 2268 | * @param array $modules |
| 2265 | 2269 | * |
| 2266 | - * @return string|void |
|
| 2270 | + * @return string |
|
| 2267 | 2271 | */ |
| 2268 | 2272 | public static function get_translated_modules( $modules ) { |
| 2269 | 2273 | foreach ( $modules as $index => $module ) { |
@@ -2589,6 +2593,9 @@ discard block |
||
| 2589 | 2593 | return self::update_active_modules( $new ); |
| 2590 | 2594 | } |
| 2591 | 2595 | |
| 2596 | + /** |
|
| 2597 | + * @param string $module |
|
| 2598 | + */ |
|
| 2592 | 2599 | public static function enable_module_configurable( $module ) { |
| 2593 | 2600 | $module = Jetpack::get_module_slug( $module ); |
| 2594 | 2601 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2599,21 +2606,33 @@ discard block |
||
| 2599 | 2606 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
| 2600 | 2607 | } |
| 2601 | 2608 | |
| 2609 | + /** |
|
| 2610 | + * @param string $module |
|
| 2611 | + */ |
|
| 2602 | 2612 | public static function module_configuration_load( $module, $method ) { |
| 2603 | 2613 | $module = Jetpack::get_module_slug( $module ); |
| 2604 | 2614 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
| 2605 | 2615 | } |
| 2606 | 2616 | |
| 2617 | + /** |
|
| 2618 | + * @param string $module |
|
| 2619 | + */ |
|
| 2607 | 2620 | public static function module_configuration_head( $module, $method ) { |
| 2608 | 2621 | $module = Jetpack::get_module_slug( $module ); |
| 2609 | 2622 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
| 2610 | 2623 | } |
| 2611 | 2624 | |
| 2625 | + /** |
|
| 2626 | + * @param string $module |
|
| 2627 | + */ |
|
| 2612 | 2628 | public static function module_configuration_screen( $module, $method ) { |
| 2613 | 2629 | $module = Jetpack::get_module_slug( $module ); |
| 2614 | 2630 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
| 2615 | 2631 | } |
| 2616 | 2632 | |
| 2633 | + /** |
|
| 2634 | + * @param string $module |
|
| 2635 | + */ |
|
| 2617 | 2636 | public static function module_configuration_activation_screen( $module, $method ) { |
| 2618 | 2637 | $module = Jetpack::get_module_slug( $module ); |
| 2619 | 2638 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2621,6 +2640,9 @@ discard block |
||
| 2621 | 2640 | |
| 2622 | 2641 | /* Installation */ |
| 2623 | 2642 | |
| 2643 | + /** |
|
| 2644 | + * @param string $message |
|
| 2645 | + */ |
|
| 2624 | 2646 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2625 | 2647 | ?> |
| 2626 | 2648 | <!doctype html> |
@@ -3265,7 +3287,7 @@ discard block |
||
| 3265 | 3287 | * Add help to the Jetpack page |
| 3266 | 3288 | * |
| 3267 | 3289 | * @since Jetpack (1.2.3) |
| 3268 | - * @return false if not the Jetpack page |
|
| 3290 | + * @return false|null if not the Jetpack page |
|
| 3269 | 3291 | */ |
| 3270 | 3292 | function admin_help() { |
| 3271 | 3293 | $current_screen = get_current_screen(); |
@@ -4263,6 +4285,7 @@ discard block |
||
| 4263 | 4285 | /** |
| 4264 | 4286 | * Returns the requested Jetpack API URL |
| 4265 | 4287 | * |
| 4288 | + * @param string $relative_url |
|
| 4266 | 4289 | * @return string |
| 4267 | 4290 | */ |
| 4268 | 4291 | public static function api_url( $relative_url ) { |
@@ -4407,7 +4430,8 @@ discard block |
||
| 4407 | 4430 | * Note these tokens are unique per call, NOT static per site for connecting. |
| 4408 | 4431 | * |
| 4409 | 4432 | * @since 2.6 |
| 4410 | - * @return array |
|
| 4433 | + * @param string $action |
|
| 4434 | + * @return string |
|
| 4411 | 4435 | */ |
| 4412 | 4436 | public function generate_secrets( $action, $exp = 600 ) { |
| 4413 | 4437 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4733,6 +4757,10 @@ discard block |
||
| 4733 | 4757 | return new WP_User( $token_details['user_id'] ); |
| 4734 | 4758 | } |
| 4735 | 4759 | |
| 4760 | + /** |
|
| 4761 | + * @param integer $timestamp |
|
| 4762 | + * @param string $nonce |
|
| 4763 | + */ |
|
| 4736 | 4764 | function add_nonce( $timestamp, $nonce ) { |
| 4737 | 4765 | global $wpdb; |
| 4738 | 4766 | static $nonces_used_this_request = array(); |
@@ -4878,6 +4906,7 @@ discard block |
||
| 4878 | 4906 | * @param string $key |
| 4879 | 4907 | * @param string $value |
| 4880 | 4908 | * @param bool $restate private |
| 4909 | + * @return string |
|
| 4881 | 4910 | */ |
| 4882 | 4911 | public static function state( $key = null, $value = null, $restate = false ) { |
| 4883 | 4912 | static $state = array(); |
@@ -4934,6 +4963,9 @@ discard block |
||
| 4934 | 4963 | Jetpack::state( null, null, true ); |
| 4935 | 4964 | } |
| 4936 | 4965 | |
| 4966 | + /** |
|
| 4967 | + * @param string $file |
|
| 4968 | + */ |
|
| 4937 | 4969 | public static function check_privacy( $file ) { |
| 4938 | 4970 | static $is_site_publicly_accessible = null; |
| 4939 | 4971 | |
@@ -5678,8 +5710,8 @@ discard block |
||
| 5678 | 5710 | * - Absolute URLs `http://domain.com/feh.png` |
| 5679 | 5711 | * - Domain root relative URLs `/feh.png` |
| 5680 | 5712 | * |
| 5681 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 5682 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 5713 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 5714 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 5683 | 5715 | * |
| 5684 | 5716 | * @return mixed|string |
| 5685 | 5717 | */ |
@@ -5970,7 +6002,7 @@ discard block |
||
| 5970 | 6002 | * |
| 5971 | 6003 | * @param string $option_name |
| 5972 | 6004 | * |
| 5973 | - * @return bool |
|
| 6005 | + * @return false|null |
|
| 5974 | 6006 | */ |
| 5975 | 6007 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
| 5976 | 6008 | // Bail if Jump Start has already been dismissed |
@@ -6061,7 +6093,6 @@ discard block |
||
| 6061 | 6093 | } |
| 6062 | 6094 | |
| 6063 | 6095 | /** |
| 6064 | - * @param mixed $result Value for the user's option |
|
| 6065 | 6096 | * @return mixed |
| 6066 | 6097 | */ |
| 6067 | 6098 | function get_user_option_meta_box_order_dashboard( $sorted ) { |