@@ -1099,7 +1099,7 @@ discard block |
||
| 1099 | 1099 | } |
| 1100 | 1100 | /** |
| 1101 | 1101 | * Does the network allow admins to add new users. |
| 1102 | - * @return boolian |
|
| 1102 | + * @return boolean |
|
| 1103 | 1103 | */ |
| 1104 | 1104 | static function network_add_new_users( $option = null ) { |
| 1105 | 1105 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | * database which could be set to anything as opposed to what this function returns. |
| 1148 | 1148 | * @param bool $option |
| 1149 | 1149 | * |
| 1150 | - * @return boolean |
|
| 1150 | + * @return string |
|
| 1151 | 1151 | */ |
| 1152 | 1152 | public function is_main_network_option( $option ) { |
| 1153 | 1153 | // return '1' or '' |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1159 | 1159 | * |
| 1160 | 1160 | * @param string $option |
| 1161 | - * @return boolean |
|
| 1161 | + * @return string |
|
| 1162 | 1162 | */ |
| 1163 | 1163 | public function is_multisite( $option ) { |
| 1164 | 1164 | return (string) (bool) is_multisite(); |
@@ -1256,7 +1256,7 @@ discard block |
||
| 1256 | 1256 | |
| 1257 | 1257 | /** |
| 1258 | 1258 | * Returns true if the site has file write access false otherwise. |
| 1259 | - * @return string ( '1' | '0' ) |
|
| 1259 | + * @return integer ( '1' | '0' ) |
|
| 1260 | 1260 | **/ |
| 1261 | 1261 | public static function file_system_write_access() { |
| 1262 | 1262 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2053,7 +2053,7 @@ discard block |
||
| 2053 | 2053 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
| 2054 | 2054 | * |
| 2055 | 2055 | * @param string $name Option name |
| 2056 | - * @param mixed $default (optional) |
|
| 2056 | + * @param boolean $default (optional) |
|
| 2057 | 2057 | */ |
| 2058 | 2058 | public static function get_option( $name, $default = false ) { |
| 2059 | 2059 | return Jetpack_Options::get_option( $name, $default ); |
@@ -2063,6 +2063,7 @@ discard block |
||
| 2063 | 2063 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
| 2064 | 2064 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
| 2065 | 2065 | * $name must be a registered option name. |
| 2066 | + * @param string $name |
|
| 2066 | 2067 | */ |
| 2067 | 2068 | public static function create_nonce( $name ) { |
| 2068 | 2069 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -2120,6 +2121,7 @@ discard block |
||
| 2120 | 2121 | * @param int $user_id |
| 2121 | 2122 | * @param string $token |
| 2122 | 2123 | * return bool |
| 2124 | + * @param boolean $is_master_user |
|
| 2123 | 2125 | */ |
| 2124 | 2126 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2125 | 2127 | // not designed for concurrent updates |
@@ -2514,6 +2516,7 @@ discard block |
||
| 2514 | 2516 | |
| 2515 | 2517 | /** |
| 2516 | 2518 | * Like core's get_file_data implementation, but caches the result. |
| 2519 | + * @param string $file |
|
| 2517 | 2520 | */ |
| 2518 | 2521 | public static function get_file_data( $file, $headers ) { |
| 2519 | 2522 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2542,7 +2545,7 @@ discard block |
||
| 2542 | 2545 | * |
| 2543 | 2546 | * @param string $tag Tag as it appears in each module heading. |
| 2544 | 2547 | * |
| 2545 | - * @return mixed |
|
| 2548 | + * @return string |
|
| 2546 | 2549 | */ |
| 2547 | 2550 | public static function translate_module_tag( $tag ) { |
| 2548 | 2551 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2857,6 +2860,9 @@ discard block |
||
| 2857 | 2860 | $this->sync->sync_all_module_options( $module ); |
| 2858 | 2861 | } |
| 2859 | 2862 | |
| 2863 | + /** |
|
| 2864 | + * @return string |
|
| 2865 | + */ |
|
| 2860 | 2866 | public static function deactivate_module( $module ) { |
| 2861 | 2867 | /** |
| 2862 | 2868 | * Fires when a module is deactivated. |
@@ -2895,6 +2901,9 @@ discard block |
||
| 2895 | 2901 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
| 2896 | 2902 | } |
| 2897 | 2903 | |
| 2904 | + /** |
|
| 2905 | + * @param string $module |
|
| 2906 | + */ |
|
| 2898 | 2907 | public static function enable_module_configurable( $module ) { |
| 2899 | 2908 | $module = Jetpack::get_module_slug( $module ); |
| 2900 | 2909 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2905,21 +2914,33 @@ discard block |
||
| 2905 | 2914 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
| 2906 | 2915 | } |
| 2907 | 2916 | |
| 2917 | + /** |
|
| 2918 | + * @param string $module |
|
| 2919 | + */ |
|
| 2908 | 2920 | public static function module_configuration_load( $module, $method ) { |
| 2909 | 2921 | $module = Jetpack::get_module_slug( $module ); |
| 2910 | 2922 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
| 2911 | 2923 | } |
| 2912 | 2924 | |
| 2925 | + /** |
|
| 2926 | + * @param string $module |
|
| 2927 | + */ |
|
| 2913 | 2928 | public static function module_configuration_head( $module, $method ) { |
| 2914 | 2929 | $module = Jetpack::get_module_slug( $module ); |
| 2915 | 2930 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
| 2916 | 2931 | } |
| 2917 | 2932 | |
| 2933 | + /** |
|
| 2934 | + * @param string $module |
|
| 2935 | + */ |
|
| 2918 | 2936 | public static function module_configuration_screen( $module, $method ) { |
| 2919 | 2937 | $module = Jetpack::get_module_slug( $module ); |
| 2920 | 2938 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
| 2921 | 2939 | } |
| 2922 | 2940 | |
| 2941 | + /** |
|
| 2942 | + * @param string $module |
|
| 2943 | + */ |
|
| 2923 | 2944 | public static function module_configuration_activation_screen( $module, $method ) { |
| 2924 | 2945 | $module = Jetpack::get_module_slug( $module ); |
| 2925 | 2946 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2927,6 +2948,9 @@ discard block |
||
| 2927 | 2948 | |
| 2928 | 2949 | /* Installation */ |
| 2929 | 2950 | |
| 2951 | + /** |
|
| 2952 | + * @param string $message |
|
| 2953 | + */ |
|
| 2930 | 2954 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2931 | 2955 | ?> |
| 2932 | 2956 | <!doctype html> |
@@ -3540,7 +3564,7 @@ discard block |
||
| 3540 | 3564 | * Add help to the Jetpack page |
| 3541 | 3565 | * |
| 3542 | 3566 | * @since Jetpack (1.2.3) |
| 3543 | - * @return false if not the Jetpack page |
|
| 3567 | + * @return false|null if not the Jetpack page |
|
| 3544 | 3568 | */ |
| 3545 | 3569 | function admin_help() { |
| 3546 | 3570 | $current_screen = get_current_screen(); |
@@ -4830,6 +4854,7 @@ discard block |
||
| 4830 | 4854 | /** |
| 4831 | 4855 | * Returns the requested Jetpack API URL |
| 4832 | 4856 | * |
| 4857 | + * @param string $relative_url |
|
| 4833 | 4858 | * @return string |
| 4834 | 4859 | */ |
| 4835 | 4860 | public static function api_url( $relative_url ) { |
@@ -5254,6 +5279,10 @@ discard block |
||
| 5254 | 5279 | return new WP_User( $token_details['user_id'] ); |
| 5255 | 5280 | } |
| 5256 | 5281 | |
| 5282 | + /** |
|
| 5283 | + * @param integer $timestamp |
|
| 5284 | + * @param string $nonce |
|
| 5285 | + */ |
|
| 5257 | 5286 | function add_nonce( $timestamp, $nonce ) { |
| 5258 | 5287 | global $wpdb; |
| 5259 | 5288 | static $nonces_used_this_request = array(); |
@@ -5459,6 +5488,9 @@ discard block |
||
| 5459 | 5488 | Jetpack::state( null, null, true ); |
| 5460 | 5489 | } |
| 5461 | 5490 | |
| 5491 | + /** |
|
| 5492 | + * @param string $file |
|
| 5493 | + */ |
|
| 5462 | 5494 | public static function check_privacy( $file ) { |
| 5463 | 5495 | static $is_site_publicly_accessible = null; |
| 5464 | 5496 | |
@@ -6488,8 +6520,8 @@ discard block |
||
| 6488 | 6520 | * - Absolute URLs `http://domain.com/feh.png` |
| 6489 | 6521 | * - Domain root relative URLs `/feh.png` |
| 6490 | 6522 | * |
| 6491 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6492 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6523 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6524 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6493 | 6525 | * |
| 6494 | 6526 | * @return mixed|string |
| 6495 | 6527 | */ |
@@ -6885,7 +6917,6 @@ discard block |
||
| 6885 | 6917 | } |
| 6886 | 6918 | |
| 6887 | 6919 | /** |
| 6888 | - * @param mixed $result Value for the user's option |
|
| 6889 | 6920 | * @return mixed |
| 6890 | 6921 | */ |
| 6891 | 6922 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | /** |
| 138 | 138 | * Plugin options getter |
| 139 | 139 | * |
| 140 | - * @param string|array $option Option name |
|
| 141 | - * @param mixed $default Default value |
|
| 140 | + * @param string $option Option name |
|
| 141 | + * @param string $default Default value |
|
| 142 | 142 | * |
| 143 | 143 | * @return mixed Option value |
| 144 | 144 | */ |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * |
| 165 | 165 | * @param string $url |
| 166 | 166 | * |
| 167 | - * @return boolean |
|
| 167 | + * @return integer |
|
| 168 | 168 | */ |
| 169 | 169 | function soundcloud_url_has_tracklist( $url ) { |
| 170 | 170 | return preg_match( '/^(.+?)\/(sets|groups|playlists)\/(.+?)$/', $url ); |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param string $key |
|
| 32 | + */ |
|
| 30 | 33 | protected function get_locale( $key ) { |
| 31 | 34 | if ( 'locale' == $key ) { |
| 32 | 35 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
@@ -4,12 +4,27 @@ |
||
| 4 | 4 | require_once dirname( __FILE__ ) . '/class.json-api-site-base.php'; |
| 5 | 5 | |
| 6 | 6 | abstract class Abstract_Jetpack_Site extends SAL_Site { |
| 7 | + |
|
| 8 | + /** |
|
| 9 | + * @param string $name |
|
| 10 | + */ |
|
| 7 | 11 | abstract protected function get_constant( $name ); |
| 8 | 12 | |
| 13 | + /** |
|
| 14 | + * @param string $feature_name |
|
| 15 | + */ |
|
| 9 | 16 | abstract protected function current_theme_supports( $feature_name ); |
| 10 | 17 | |
| 18 | + /** |
|
| 19 | + * @param string $feature_name |
|
| 20 | + */ |
|
| 11 | 21 | abstract protected function get_theme_support( $feature_name ); |
| 12 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $name |
|
| 25 | + * |
|
| 26 | + * @return string |
|
| 27 | + */ |
|
| 13 | 28 | abstract protected function get_mock_option( $name ); |
| 14 | 29 | |
| 15 | 30 | abstract protected function get_jetpack_version(); |