@@ -111,7 +111,7 @@ |
||
| 111 | 111 | /** |
| 112 | 112 | * Iterates through expected items ( plugins or themes ) and compares them to actual results. |
| 113 | 113 | * |
| 114 | - * @param $items 'plugin' or 'theme' |
|
| 114 | + * @param string $items 'plugin' or 'theme' |
|
| 115 | 115 | */ |
| 116 | 116 | private function log_items( $items ) { |
| 117 | 117 | |
@@ -65,7 +65,6 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * @param string $file __FILE__ |
| 68 | - * @param string $option, Option name to sync |
|
| 69 | 68 | * @param string $option ... |
| 70 | 69 | */ |
| 71 | 70 | static function sync_options( $file, $option /*, $option, ... */ ) { |
@@ -76,8 +75,6 @@ discard block |
||
| 76 | 75 | } |
| 77 | 76 | /** |
| 78 | 77 | * @param string $file __FILE__ |
| 79 | - * @param string $option, Option name to sync |
|
| 80 | - * @param string $option ... |
|
| 81 | 78 | */ |
| 82 | 79 | static function sync_constant( $file, $constant ) { |
| 83 | 80 | if ( is_network_admin() ) return; |
@@ -353,6 +350,9 @@ discard block |
||
| 353 | 350 | $this->transition_post_status_action( 'delete', $post->post_status, $post ); |
| 354 | 351 | } |
| 355 | 352 | |
| 353 | + /** |
|
| 354 | + * @param string $new_status |
|
| 355 | + */ |
|
| 356 | 356 | function transition_post_status_action( $new_status, $old_status, $post ) { |
| 357 | 357 | $sync = $this->get_post_sync_operation( $new_status, $old_status, $post, $this->sync_conditions['posts'] ); |
| 358 | 358 | if ( !$sync ) { |
@@ -737,6 +737,11 @@ discard block |
||
| 737 | 737 | /* Options Sync */ |
| 738 | 738 | |
| 739 | 739 | /* Ah... so much simpler than Posts and Comments :) */ |
| 740 | + |
|
| 741 | + /** |
|
| 742 | + * @param string $file |
|
| 743 | + * @param string $option |
|
| 744 | + */ |
|
| 740 | 745 | function options( $file, $option /*, $option, ... */ ) { |
| 741 | 746 | $options = func_get_args(); |
| 742 | 747 | $file = array_shift( $options ); |
@@ -844,6 +849,7 @@ discard block |
||
| 844 | 849 | |
| 845 | 850 | /** |
| 846 | 851 | * Returns default values of Constants |
| 852 | + * @param string $constant |
|
| 847 | 853 | */ |
| 848 | 854 | function default_constant( $constant ) { |
| 849 | 855 | switch( $constant ) { |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | * Our [portfolio] shortcode. |
| 394 | 394 | * Prints Portfolio data styled to look good on *any* theme. |
| 395 | 395 | * |
| 396 | - * @return portfolio_shortcode_html |
|
| 396 | + * @return string |
|
| 397 | 397 | */ |
| 398 | 398 | static function portfolio_shortcode( $atts ) { |
| 399 | 399 | // Default attributes |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | * The Portfolio shortcode loop. |
| 527 | 527 | * |
| 528 | 528 | * @todo add theme color styles |
| 529 | - * @return html |
|
| 529 | + * @return string |
|
| 530 | 530 | */ |
| 531 | 531 | static function portfolio_shortcode_html( $atts ) { |
| 532 | 532 | |
@@ -618,6 +618,7 @@ discard block |
||
| 618 | 618 | /** |
| 619 | 619 | * Individual project class |
| 620 | 620 | * |
| 621 | + * @param integer $portfolio_index_number |
|
| 621 | 622 | * @return string |
| 622 | 623 | */ |
| 623 | 624 | static function get_project_class( $portfolio_index_number, $columns ) { |
@@ -725,7 +726,7 @@ discard block |
||
| 725 | 726 | /** |
| 726 | 727 | * Displays the author of the current portfolio project. |
| 727 | 728 | * |
| 728 | - * @return html |
|
| 729 | + * @return string |
|
| 729 | 730 | */ |
| 730 | 731 | static function get_project_author() { |
| 731 | 732 | $html = '<div class="project-author"><span>' . esc_html__( 'Author:', 'jetpack' ) . '</span> '; |
@@ -738,7 +739,7 @@ discard block |
||
| 738 | 739 | /** |
| 739 | 740 | * Display the featured image if it's available |
| 740 | 741 | * |
| 741 | - * @return html |
|
| 742 | + * @return string|null |
|
| 742 | 743 | */ |
| 743 | 744 | static function get_portfolio_thumbnail_link( $post_id ) { |
| 744 | 745 | if ( has_post_thumbnail( $post_id ) ) { |
@@ -24,6 +24,9 @@ |
||
| 24 | 24 | self::record_user_event( 'module_deactivated', array( 'module' => $module ) ); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param string $event_type |
|
| 29 | + */ |
|
| 27 | 30 | static function record_user_event( $event_type, $data ) { |
| 28 | 31 | |
| 29 | 32 | $user = wp_get_current_user(); |
@@ -51,6 +51,9 @@ |
||
| 51 | 51 | return $return; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | +/** |
|
| 55 | + * @param string $file |
|
| 56 | + */ |
|
| 54 | 57 | function github_gist_simple_embed( $id, $file ) { |
| 55 | 58 | $embed_url = $id . '.js' . $file; |
| 56 | 59 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * record_event |
| 51 | - * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required. |
|
| 51 | + * @param Jetpack_Tracks_Event $event Event object to send to Tracks. An array will be cast to object. Required. |
|
| 52 | 52 | * Properties are included directly in the pixel query string after light validation. |
| 53 | 53 | * @return mixed True on success, WP_Error on failure |
| 54 | 54 | */ |
@@ -71,6 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * Synchronously request the pixel |
| 74 | + * @param string $pixel |
|
| 74 | 75 | */ |
| 75 | 76 | static function record_pixel( $pixel ) { |
| 76 | 77 | // Add the Request Timestamp and URL terminator just before the HTTP request. |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * @param string $event_name The name of the event |
| 38 | 38 | * @param array $properties Custom properties to send with the event |
| 39 | 39 | * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred |
| 40 | - * @return \Jetpack_Tracks_Event|\WP_Error |
|
| 40 | + * @return Jetpack_Tracks_Event |
|
| 41 | 41 | */ |
| 42 | 42 | function jetpack_tracks_build_event_obj( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) { |
| 43 | 43 | |
@@ -107,7 +107,6 @@ discard block |
||
| 107 | 107 | /** |
| 108 | 108 | * Record an event in Tracks - this is the preferred way to record events from PHP. |
| 109 | 109 | * |
| 110 | - * @param mixed $identity username, user_id, or WP_user object |
|
| 111 | 110 | * @param string $event_name The name of the event |
| 112 | 111 | * @param array $properties Custom properties to send with the event |
| 113 | 112 | * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred |
@@ -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 |
@@ -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 | |
@@ -6487,8 +6519,8 @@ discard block |
||
| 6487 | 6519 | * - Absolute URLs `http://domain.com/feh.png` |
| 6488 | 6520 | * - Domain root relative URLs `/feh.png` |
| 6489 | 6521 | * |
| 6490 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6491 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6522 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6523 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6492 | 6524 | * |
| 6493 | 6525 | * @return mixed|string |
| 6494 | 6526 | */ |
@@ -6884,7 +6916,6 @@ discard block |
||
| 6884 | 6916 | } |
| 6885 | 6917 | |
| 6886 | 6918 | /** |
| 6887 | - * @param mixed $result Value for the user's option |
|
| 6888 | 6919 | * @return mixed |
| 6889 | 6920 | */ |
| 6890 | 6921 | function get_user_option_meta_box_order_dashboard( $sorted ) { |