@@ -326,6 +326,9 @@ |
||
326 | 326 | return $contents; |
327 | 327 | } |
328 | 328 | |
329 | + /** |
|
330 | + * @param string $message |
|
331 | + */ |
|
329 | 332 | function display_page( $title, $message, $back_button = false, $recovery_form = false ) { |
330 | 333 | |
331 | 334 | if ( ! headers_sent() ) { |
@@ -87,6 +87,9 @@ |
||
87 | 87 | echo $args['after_widget']; |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param string $user_id |
|
92 | + */ |
|
90 | 93 | function goodreads_user_id_exists( $user_id ) { |
91 | 94 | $url = "https://www.goodreads.com/user/show/$user_id/"; |
92 | 95 | $response = wp_remote_head( $url, array( 'httpversion' => '1.1', 'timeout' => 3, 'redirection' => 2 ) ); |
@@ -94,6 +94,9 @@ |
||
94 | 94 | return $user; |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param WP_User|null $user |
|
99 | + */ |
|
97 | 100 | public function expand_user( $user ) { |
98 | 101 | if ( ! is_object( $user ) ) { |
99 | 102 | return null; |
@@ -201,7 +201,7 @@ |
||
201 | 201 | * should be notified, overriding the site setting. |
202 | 202 | * |
203 | 203 | * @param int $comment_id Comment ID. |
204 | - * @return true Always returns true. |
|
204 | + * @return boolean Always returns true. |
|
205 | 205 | */ |
206 | 206 | function wp_notify_moderator( $comment_id ) { |
207 | 207 | global $wpdb; |
@@ -147,6 +147,10 @@ |
||
147 | 147 | * Take a list of field prefixes and expand them for multi-lingual |
148 | 148 | * with the provided boostings. |
149 | 149 | */ |
150 | + |
|
151 | + /** |
|
152 | + * @param string[] $additional_fields |
|
153 | + */ |
|
150 | 154 | public function merge_ml_fields( $fields2boosts, $additional_fields ) { |
151 | 155 | $flds = array(); |
152 | 156 | foreach( $fields2boosts as $f => $b ) { |
@@ -58,6 +58,10 @@ |
||
58 | 58 | return $query->is_main_query() && $query->is_search(); |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param double $duration |
|
63 | + * @param boolean $was_jetpack_search |
|
64 | + */ |
|
61 | 65 | private function record_query_time( $duration, $was_jetpack_search ) { |
62 | 66 | $this->stats[] = array( $was_jetpack_search, intval( $duration * 1000 ) ); |
63 | 67 | } |
@@ -76,7 +76,6 @@ |
||
76 | 76 | * @since 5.8.0 |
77 | 77 | * |
78 | 78 | * @param string|array $key Query key or keys to remove. |
79 | - * @param bool|string $query Optional. A URL to act upon. Defaults to the current search URL. |
|
80 | 79 | * |
81 | 80 | * @return string New URL query string (unescaped). |
82 | 81 | */ |
@@ -155,6 +155,9 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | |
158 | + /** |
|
159 | + * @param string $text |
|
160 | + */ |
|
158 | 161 | function transform($text) { |
159 | 162 | # |
160 | 163 | # Main function. Performs some preprocessing on the input text |
@@ -889,6 +892,10 @@ discard block |
||
889 | 892 | |
890 | 893 | public $list_level = 0; |
891 | 894 | |
895 | + /** |
|
896 | + * @param string $list_str |
|
897 | + * @param string $marker_any_re |
|
898 | + */ |
|
892 | 899 | function processListItems($list_str, $marker_any_re) { |
893 | 900 | # |
894 | 901 | # Process the contents of a single ordered or unordered list, splitting it |
@@ -992,6 +999,9 @@ discard block |
||
992 | 999 | } |
993 | 1000 | |
994 | 1001 | |
1002 | + /** |
|
1003 | + * @param string $code |
|
1004 | + */ |
|
995 | 1005 | function makeCodeSpan($code) { |
996 | 1006 | # |
997 | 1007 | # Create a code span markup for $code. Called from handleSpanToken. |
@@ -1480,6 +1490,9 @@ discard block |
||
1480 | 1490 | } |
1481 | 1491 | |
1482 | 1492 | |
1493 | + /** |
|
1494 | + * @param string $text |
|
1495 | + */ |
|
1483 | 1496 | function detab($text) { |
1484 | 1497 | # |
1485 | 1498 | # Replace tabs with the appropriate amount of space. |
@@ -2010,6 +2023,12 @@ discard block |
||
2010 | 2023 | |
2011 | 2024 | return array($parsed, $text); |
2012 | 2025 | } |
2026 | + |
|
2027 | + /** |
|
2028 | + * @param string $text |
|
2029 | + * @param string $hash_method |
|
2030 | + * @param boolean $md_attr |
|
2031 | + */ |
|
2013 | 2032 | function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { |
2014 | 2033 | # |
2015 | 2034 | # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. |
@@ -2673,6 +2692,9 @@ discard block |
||
2673 | 2692 | } |
2674 | 2693 | |
2675 | 2694 | |
2695 | + /** |
|
2696 | + * @return string |
|
2697 | + */ |
|
2676 | 2698 | function processDefListItems($list_str) { |
2677 | 2699 | # |
2678 | 2700 | # Process the contents of a single definition list, splitting it |
@@ -2784,6 +2806,10 @@ discard block |
||
2784 | 2806 | |
2785 | 2807 | return $text; |
2786 | 2808 | } |
2809 | + |
|
2810 | + /** |
|
2811 | + * @param string[] $matches |
|
2812 | + */ |
|
2787 | 2813 | function _doFencedCodeBlocks_callback($matches) { |
2788 | 2814 | $classname =& $matches[2]; |
2789 | 2815 | $attrs =& $matches[3]; |