@@ -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; |
@@ -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 ) ) { |
@@ -1282,7 +1282,7 @@ discard block |
||
| 1282 | 1282 | /** |
| 1283 | 1283 | * Does the network allow admins to add new users. |
| 1284 | 1284 | * |
| 1285 | - * @return boolian |
|
| 1285 | + * @return boolean |
|
| 1286 | 1286 | */ |
| 1287 | 1287 | static function network_add_new_users( $option = null ) { |
| 1288 | 1288 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1392,7 +1392,7 @@ discard block |
||
| 1392 | 1392 | * |
| 1393 | 1393 | * @param bool $option |
| 1394 | 1394 | * |
| 1395 | - * @return boolean |
|
| 1395 | + * @return string |
|
| 1396 | 1396 | */ |
| 1397 | 1397 | public function is_main_network_option( $option ) { |
| 1398 | 1398 | // return '1' or '' |
@@ -1403,7 +1403,7 @@ discard block |
||
| 1403 | 1403 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1404 | 1404 | * |
| 1405 | 1405 | * @param string $option |
| 1406 | - * @return boolean |
|
| 1406 | + * @return string |
|
| 1407 | 1407 | */ |
| 1408 | 1408 | public function is_multisite( $option ) { |
| 1409 | 1409 | return (string) (bool) is_multisite(); |
@@ -1466,7 +1466,7 @@ discard block |
||
| 1466 | 1466 | /** |
| 1467 | 1467 | * Returns true if the site has file write access false otherwise. |
| 1468 | 1468 | * |
| 1469 | - * @return string ( '1' | '0' ) |
|
| 1469 | + * @return integer ( '1' | '0' ) |
|
| 1470 | 1470 | **/ |
| 1471 | 1471 | public static function file_system_write_access() { |
| 1472 | 1472 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2632,7 +2632,7 @@ discard block |
||
| 2632 | 2632 | * |
| 2633 | 2633 | * @param string $tag Tag as it appears in each module heading. |
| 2634 | 2634 | * |
| 2635 | - * @return mixed |
|
| 2635 | + * @return string |
|
| 2636 | 2636 | */ |
| 2637 | 2637 | public static function translate_module_tag( $tag ) { |
| 2638 | 2638 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2747,8 +2747,8 @@ discard block |
||
| 2747 | 2747 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2748 | 2748 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2749 | 2749 | * |
| 2750 | - * @param $string |
|
| 2751 | - * @return mixed |
|
| 2750 | + * @param string $string |
|
| 2751 | + * @return string|null |
|
| 2752 | 2752 | */ |
| 2753 | 2753 | public static function alias_directories( $string ) { |
| 2754 | 2754 | // ABSPATH has a trailing slash. |
@@ -2759,6 +2759,10 @@ discard block |
||
| 2759 | 2759 | return $string; |
| 2760 | 2760 | } |
| 2761 | 2761 | |
| 2762 | + /** |
|
| 2763 | + * @param boolean $redirect |
|
| 2764 | + * @param boolean $send_state_messages |
|
| 2765 | + */ |
|
| 2762 | 2766 | public static function activate_default_modules( |
| 2763 | 2767 | $min_version = false, |
| 2764 | 2768 | $max_version = false, |
@@ -3024,6 +3028,9 @@ discard block |
||
| 3024 | 3028 | _deprecated_function( __METHOD__, 'jetpack-4.2' ); |
| 3025 | 3029 | } |
| 3026 | 3030 | |
| 3031 | + /** |
|
| 3032 | + * @return string |
|
| 3033 | + */ |
|
| 3027 | 3034 | public static function deactivate_module( $module ) { |
| 3028 | 3035 | /** |
| 3029 | 3036 | * Fires when a module is deactivated. |
@@ -3042,6 +3049,9 @@ discard block |
||
| 3042 | 3049 | return self::update_active_modules( $new ); |
| 3043 | 3050 | } |
| 3044 | 3051 | |
| 3052 | + /** |
|
| 3053 | + * @param string $module |
|
| 3054 | + */ |
|
| 3045 | 3055 | public static function enable_module_configurable( $module ) { |
| 3046 | 3056 | $module = self::get_module_slug( $module ); |
| 3047 | 3057 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3070,6 +3080,10 @@ discard block |
||
| 3070 | 3080 | } |
| 3071 | 3081 | |
| 3072 | 3082 | /* Installation */ |
| 3083 | + |
|
| 3084 | + /** |
|
| 3085 | + * @param string $message |
|
| 3086 | + */ |
|
| 3073 | 3087 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3074 | 3088 | ?> |
| 3075 | 3089 | <!doctype html> |
@@ -3841,7 +3855,7 @@ discard block |
||
| 3841 | 3855 | * Add help to the Jetpack page |
| 3842 | 3856 | * |
| 3843 | 3857 | * @since Jetpack (1.2.3) |
| 3844 | - * @return false if not the Jetpack page |
|
| 3858 | + * @return false|null if not the Jetpack page |
|
| 3845 | 3859 | */ |
| 3846 | 3860 | function admin_help() { |
| 3847 | 3861 | $current_screen = get_current_screen(); |
@@ -5255,7 +5269,7 @@ discard block |
||
| 5255 | 5269 | * @param String $action The action name. |
| 5256 | 5270 | * @param Integer $user_id The user identifier. |
| 5257 | 5271 | * @param Integer $exp Expiration time in seconds. |
| 5258 | - * @return array |
|
| 5272 | + * @return boolean |
|
| 5259 | 5273 | */ |
| 5260 | 5274 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 5261 | 5275 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5575,7 +5589,6 @@ discard block |
||
| 5575 | 5589 | /** |
| 5576 | 5590 | * Report authentication status to the WP REST API. |
| 5577 | 5591 | * |
| 5578 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5579 | 5592 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5580 | 5593 | */ |
| 5581 | 5594 | public function wp_rest_authentication_errors( $value ) { |
@@ -5702,6 +5715,7 @@ discard block |
||
| 5702 | 5715 | * @param string $key |
| 5703 | 5716 | * @param string $value |
| 5704 | 5717 | * @param bool $restate private |
| 5718 | + * @return string |
|
| 5705 | 5719 | */ |
| 5706 | 5720 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5707 | 5721 | static $state = array(); |
@@ -5783,6 +5797,9 @@ discard block |
||
| 5783 | 5797 | return true; |
| 5784 | 5798 | } |
| 5785 | 5799 | |
| 5800 | + /** |
|
| 5801 | + * @param string $file |
|
| 5802 | + */ |
|
| 5786 | 5803 | public static function check_privacy( $file ) { |
| 5787 | 5804 | static $is_site_publicly_accessible = null; |
| 5788 | 5805 | |
@@ -5863,6 +5880,9 @@ discard block |
||
| 5863 | 5880 | } |
| 5864 | 5881 | } |
| 5865 | 5882 | |
| 5883 | + /** |
|
| 5884 | + * @param string $url |
|
| 5885 | + */ |
|
| 5866 | 5886 | public static function staticize_subdomain( $url ) { |
| 5867 | 5887 | |
| 5868 | 5888 | // Extract hostname from URL |
@@ -6363,9 +6383,7 @@ discard block |
||
| 6363 | 6383 | * |
| 6364 | 6384 | * Attached to `style_loader_src` filter. |
| 6365 | 6385 | * |
| 6366 | - * @param string $tag The tag that would link to the external asset. |
|
| 6367 | 6386 | * @param string $handle The registered handle of the script in question. |
| 6368 | - * @param string $href The url of the asset in question. |
|
| 6369 | 6387 | */ |
| 6370 | 6388 | public static function set_suffix_on_min( $src, $handle ) { |
| 6371 | 6389 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6607,8 +6625,8 @@ discard block |
||
| 6607 | 6625 | * - Absolute URLs `http://domain.com/feh.png` |
| 6608 | 6626 | * - Domain root relative URLs `/feh.png` |
| 6609 | 6627 | * |
| 6610 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6611 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6628 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6629 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6612 | 6630 | * |
| 6613 | 6631 | * @return mixed|string |
| 6614 | 6632 | */ |
@@ -6907,7 +6925,6 @@ discard block |
||
| 6907 | 6925 | } |
| 6908 | 6926 | |
| 6909 | 6927 | /** |
| 6910 | - * @param mixed $result Value for the user's option |
|
| 6911 | 6928 | * @return mixed |
| 6912 | 6929 | */ |
| 6913 | 6930 | function get_user_option_meta_box_order_dashboard( $sorted ) { |