Changeset 63441 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 09/02/2026 07:08:14 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/comment-template.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r62324 r63441 489 489 * @param bool $display Optional. Whether to print or return the output. 490 490 * Default true. 491 * @return void|string Void if `$display` argument is true, comment classes if `$display` is false. 491 * @return string|void Comment classes if `$display` is false, nothing otherwise. 492 * @phpstan-return ( $display is true ? void : string ) 492 493 */ 493 494 function comment_class( $css_class = '', $comment = null, $post = null, $display = true ) { … … 1240 1241 * 1241 1242 * @since 0.71 1242 * 1243 * @param bool $deprecated_echo Not used. 1244 * @return void|string Should only be used to echo the trackback URL, use get_trackback_url() 1245 * for the result instead. 1243 * @since 2.5.0 Deprecated the `$deprecated_echo` argument. 1244 * 1245 * @see get_trackback_url() 1246 * 1247 * @param bool $deprecated_echo Deprecated. Use {@see get_trackback_url()}. Echo the URL or 1248 * return it. Default true. 1249 * @return string|void The trackback URL when `$deprecated_echo` is false, nothing otherwise. 1250 * @phpstan-return ( $deprecated_echo is true ? void : string ) 1246 1251 */ 1247 1252 function trackback_url( $deprecated_echo = true ) { … … 2229 2234 * } 2230 2235 * @param WP_Comment[] $comments Optional. Array of WP_Comment objects. Default null. 2231 * @return void|string Void if 'echo' argument is true, or no comments to list. 2232 * Otherwise, HTML list of comments. 2236 * @return string|void HTML list of comments when 'echo' is false, null when there are no 2237 * comments to list. Nothing otherwise. 2238 * @phpstan-return ( 2239 * $args is array{ echo: false|0|''|'0', ... } 2240 * ? string|null 2241 * : ( $args is ''|array ? void : string|null ) 2242 * ) 2233 2243 */ 2234 2244 function wp_list_comments( $args = array(), $comments = null ) { … … 2275 2285 $comments = (array) $comments; 2276 2286 if ( empty( $comments ) ) { 2277 return ;2287 return null; 2278 2288 } 2279 2289 if ( 'all' !== $parsed_args['type'] ) { 2280 2290 $comments_by_type = separate_comments( $comments ); 2281 2291 if ( empty( $comments_by_type[ $parsed_args['type'] ] ) ) { 2282 return ;2292 return null; 2283 2293 } 2284 2294 $_comments = $comments_by_type[ $parsed_args['type'] ]; … … 2321 2331 $comments_by_type = separate_comments( $comments ); 2322 2332 if ( empty( $comments_by_type[ $parsed_args['type'] ] ) ) { 2323 return ;2333 return null; 2324 2334 } 2325 2335 … … 2333 2343 } else { 2334 2344 if ( empty( $wp_query->comments ) ) { 2335 return ;2345 return null; 2336 2346 } 2337 2347 if ( 'all' !== $parsed_args['type'] ) { … … 2340 2350 } 2341 2351 if ( empty( $wp_query->comments_by_type[ $parsed_args['type'] ] ) ) { 2342 return ;2352 return null; 2343 2353 } 2344 2354 $_comments = $wp_query->comments_by_type[ $parsed_args['type'] ];
Note:
See TracChangeset
for help on using the changeset viewer.