@@ -308,7 +308,7 @@ |
||
| 308 | 308 | * @since 8.7.0 |
| 309 | 309 | * |
| 310 | 310 | * @param array|string $data the data to be encoded. |
| 311 | - * @return boolean|string The encoded string on success, false on failure |
|
| 311 | + * @return false|string The encoded string on success, false on failure |
|
| 312 | 312 | */ |
| 313 | 313 | public function encrypt_data_to_wpcom( $data ) { |
| 314 | 314 | |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 911 | 911 | * |
| 912 | 912 | * @param $domains |
| 913 | - * @return array |
|
| 913 | + * @return string[] |
|
| 914 | 914 | */ |
| 915 | 915 | function allow_wpcom_domain( $domains ) { |
| 916 | 916 | if ( empty( $domains ) ) { |
@@ -1292,7 +1292,7 @@ discard block |
||
| 1292 | 1292 | /** |
| 1293 | 1293 | * Does the network allow admins to add new users. |
| 1294 | 1294 | * |
| 1295 | - * @return boolian |
|
| 1295 | + * @return boolean |
|
| 1296 | 1296 | */ |
| 1297 | 1297 | static function network_add_new_users( $option = null ) { |
| 1298 | 1298 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1402,7 +1402,7 @@ discard block |
||
| 1402 | 1402 | * |
| 1403 | 1403 | * @param bool $option |
| 1404 | 1404 | * |
| 1405 | - * @return boolean |
|
| 1405 | + * @return string |
|
| 1406 | 1406 | */ |
| 1407 | 1407 | public function is_main_network_option( $option ) { |
| 1408 | 1408 | // return '1' or '' |
@@ -1413,7 +1413,7 @@ discard block |
||
| 1413 | 1413 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1414 | 1414 | * |
| 1415 | 1415 | * @param string $option |
| 1416 | - * @return boolean |
|
| 1416 | + * @return string |
|
| 1417 | 1417 | */ |
| 1418 | 1418 | public function is_multisite( $option ) { |
| 1419 | 1419 | return (string) (bool) is_multisite(); |
@@ -1476,7 +1476,7 @@ discard block |
||
| 1476 | 1476 | /** |
| 1477 | 1477 | * Returns true if the site has file write access false otherwise. |
| 1478 | 1478 | * |
| 1479 | - * @return string ( '1' | '0' ) |
|
| 1479 | + * @return integer ( '1' | '0' ) |
|
| 1480 | 1480 | **/ |
| 1481 | 1481 | public static function file_system_write_access() { |
| 1482 | 1482 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2197,7 +2197,7 @@ discard block |
||
| 2197 | 2197 | * @param int $user_id The user id. |
| 2198 | 2198 | * @param string $token The user token. |
| 2199 | 2199 | * @param bool $is_master_user Whether the user is the master user. |
| 2200 | - * @return bool |
|
| 2200 | + * @return boolean|null |
|
| 2201 | 2201 | */ |
| 2202 | 2202 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2203 | 2203 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2642,7 +2642,7 @@ discard block |
||
| 2642 | 2642 | * |
| 2643 | 2643 | * @param string $tag Tag as it appears in each module heading. |
| 2644 | 2644 | * |
| 2645 | - * @return mixed |
|
| 2645 | + * @return string |
|
| 2646 | 2646 | */ |
| 2647 | 2647 | public static function translate_module_tag( $tag ) { |
| 2648 | 2648 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2814,8 +2814,8 @@ discard block |
||
| 2814 | 2814 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2815 | 2815 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2816 | 2816 | * |
| 2817 | - * @param $string |
|
| 2818 | - * @return mixed |
|
| 2817 | + * @param string $string |
|
| 2818 | + * @return string|null |
|
| 2819 | 2819 | */ |
| 2820 | 2820 | public static function alias_directories( $string ) { |
| 2821 | 2821 | // ABSPATH has a trailing slash. |
@@ -2826,6 +2826,10 @@ discard block |
||
| 2826 | 2826 | return $string; |
| 2827 | 2827 | } |
| 2828 | 2828 | |
| 2829 | + /** |
|
| 2830 | + * @param boolean $redirect |
|
| 2831 | + * @param boolean $send_state_messages |
|
| 2832 | + */ |
|
| 2829 | 2833 | public static function activate_default_modules( |
| 2830 | 2834 | $min_version = false, |
| 2831 | 2835 | $max_version = false, |
@@ -3109,6 +3113,9 @@ discard block |
||
| 3109 | 3113 | return self::update_active_modules( $new ); |
| 3110 | 3114 | } |
| 3111 | 3115 | |
| 3116 | + /** |
|
| 3117 | + * @param string $module |
|
| 3118 | + */ |
|
| 3112 | 3119 | public static function enable_module_configurable( $module ) { |
| 3113 | 3120 | $module = self::get_module_slug( $module ); |
| 3114 | 3121 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3137,6 +3144,10 @@ discard block |
||
| 3137 | 3144 | } |
| 3138 | 3145 | |
| 3139 | 3146 | /* Installation */ |
| 3147 | + |
|
| 3148 | + /** |
|
| 3149 | + * @param string $message |
|
| 3150 | + */ |
|
| 3140 | 3151 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3141 | 3152 | ?> |
| 3142 | 3153 | <!doctype html> |
@@ -3908,7 +3919,7 @@ discard block |
||
| 3908 | 3919 | * Add help to the Jetpack page |
| 3909 | 3920 | * |
| 3910 | 3921 | * @since Jetpack (1.2.3) |
| 3911 | - * @return false if not the Jetpack page |
|
| 3922 | + * @return false|null if not the Jetpack page |
|
| 3912 | 3923 | */ |
| 3913 | 3924 | function admin_help() { |
| 3914 | 3925 | $current_screen = get_current_screen(); |
@@ -5020,6 +5031,9 @@ discard block |
||
| 5020 | 5031 | return $url; |
| 5021 | 5032 | } |
| 5022 | 5033 | |
| 5034 | + /** |
|
| 5035 | + * @param string $actionurl |
|
| 5036 | + */ |
|
| 5023 | 5037 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
| 5024 | 5038 | $actionurl = str_replace( '&', '&', $actionurl ); |
| 5025 | 5039 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5322,7 +5336,7 @@ discard block |
||
| 5322 | 5336 | * @param String $action The action name. |
| 5323 | 5337 | * @param Integer $user_id The user identifier. |
| 5324 | 5338 | * @param Integer $exp Expiration time in seconds. |
| 5325 | - * @return array |
|
| 5339 | + * @return boolean |
|
| 5326 | 5340 | */ |
| 5327 | 5341 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 5328 | 5342 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5642,7 +5656,6 @@ discard block |
||
| 5642 | 5656 | /** |
| 5643 | 5657 | * Report authentication status to the WP REST API. |
| 5644 | 5658 | * |
| 5645 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5646 | 5659 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5647 | 5660 | */ |
| 5648 | 5661 | public function wp_rest_authentication_errors( $value ) { |
@@ -5769,6 +5782,7 @@ discard block |
||
| 5769 | 5782 | * @param string $key |
| 5770 | 5783 | * @param string $value |
| 5771 | 5784 | * @param bool $restate private |
| 5785 | + * @return string |
|
| 5772 | 5786 | */ |
| 5773 | 5787 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5774 | 5788 | static $state = array(); |
@@ -5850,6 +5864,9 @@ discard block |
||
| 5850 | 5864 | return true; |
| 5851 | 5865 | } |
| 5852 | 5866 | |
| 5867 | + /** |
|
| 5868 | + * @param string $file |
|
| 5869 | + */ |
|
| 5853 | 5870 | public static function check_privacy( $file ) { |
| 5854 | 5871 | static $is_site_publicly_accessible = null; |
| 5855 | 5872 | |
@@ -5930,6 +5947,9 @@ discard block |
||
| 5930 | 5947 | } |
| 5931 | 5948 | } |
| 5932 | 5949 | |
| 5950 | + /** |
|
| 5951 | + * @param string $url |
|
| 5952 | + */ |
|
| 5933 | 5953 | public static function staticize_subdomain( $url ) { |
| 5934 | 5954 | |
| 5935 | 5955 | // Extract hostname from URL |
@@ -6430,9 +6450,7 @@ discard block |
||
| 6430 | 6450 | * |
| 6431 | 6451 | * Attached to `style_loader_src` filter. |
| 6432 | 6452 | * |
| 6433 | - * @param string $tag The tag that would link to the external asset. |
|
| 6434 | 6453 | * @param string $handle The registered handle of the script in question. |
| 6435 | - * @param string $href The url of the asset in question. |
|
| 6436 | 6454 | */ |
| 6437 | 6455 | public static function set_suffix_on_min( $src, $handle ) { |
| 6438 | 6456 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6639,8 +6657,8 @@ discard block |
||
| 6639 | 6657 | * - Absolute URLs `http://domain.com/feh.png` |
| 6640 | 6658 | * - Domain root relative URLs `/feh.png` |
| 6641 | 6659 | * |
| 6642 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6643 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6660 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6661 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6644 | 6662 | * |
| 6645 | 6663 | * @return mixed|string |
| 6646 | 6664 | */ |
@@ -6962,7 +6980,6 @@ discard block |
||
| 6962 | 6980 | } |
| 6963 | 6981 | |
| 6964 | 6982 | /** |
| 6965 | - * @param mixed $result Value for the user's option |
|
| 6966 | 6983 | * @return mixed |
| 6967 | 6984 | */ |
| 6968 | 6985 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -50,6 +50,7 @@ |
||
| 50 | 50 | * Perform the IXR request. |
| 51 | 51 | * |
| 52 | 52 | * @param string[] ...$args IXR args. |
| 53 | + * @param string $args |
|
| 53 | 54 | * |
| 54 | 55 | * @return bool True if request succeeded, false otherwise. |
| 55 | 56 | */ |
@@ -25,6 +25,7 @@ |
||
| 25 | 25 | * The rest of the arguments are the params specified to the method. |
| 26 | 26 | * |
| 27 | 27 | * @param string[] ...$args IXR args. |
| 28 | + * @param string $args |
|
| 28 | 29 | */ |
| 29 | 30 | public function addCall( ...$args ) { |
| 30 | 31 | $method_name = array_shift( $args ); |
@@ -433,6 +433,9 @@ |
||
| 433 | 433 | ); |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | + /** |
|
| 437 | + * @param string $column |
|
| 438 | + */ |
|
| 436 | 439 | function _build_date_range_query( $column, $range, $where ) { |
| 437 | 440 | global $wpdb; |
| 438 | 441 | |
@@ -15,6 +15,9 @@ |
||
| 15 | 15 | exit; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | +/** |
|
| 19 | + * @param string $file_pattern |
|
| 20 | + */ |
|
| 18 | 21 | function wpcom_rest_api_v2_load_plugin_files( $file_pattern ) { |
| 19 | 22 | $plugins = glob( dirname( __FILE__ ) . '/' . $file_pattern ); |
| 20 | 23 | |
@@ -174,6 +174,7 @@ |
||
| 174 | 174 | * @since 1.3 |
| 175 | 175 | * @var string $guid VideoPress unique identifier |
| 176 | 176 | * @var int $maxwidth maximum requested video width. final width and height are calculated on VideoPress servers based on the aspect ratio of the original video upload. |
| 177 | + * @param string $guid |
|
| 177 | 178 | */ |
| 178 | 179 | public function __construct( $guid, $maxwidth = 640 ) { |
| 179 | 180 | $this->guid = $guid; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * Singleton implementation |
| 44 | 44 | * |
| 45 | - * @return object |
|
| 45 | + * @return Jetpack_Photon|null |
|
| 46 | 46 | */ |
| 47 | 47 | public static function instance() { |
| 48 | 48 | if ( ! is_a( self::$instance, 'Jetpack_Photon' ) ) { |
@@ -1382,7 +1382,7 @@ discard block |
||
| 1382 | 1382 | * after ourselves without breaking anyone else's filters. |
| 1383 | 1383 | * |
| 1384 | 1384 | * @internal |
| 1385 | - * @return true |
|
| 1385 | + * @return boolean |
|
| 1386 | 1386 | */ |
| 1387 | 1387 | public function override_image_downsize_in_rest_edit_context() { |
| 1388 | 1388 | return true; |