wp_get_comment_fields_max_lengths
Filter HookDescription
Filters the lengths for the comment form fields.Hook Information
File Location |
wp-includes/comment.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1240 |
Hook Parameters
Type | Name | Description |
---|---|---|
int[]
|
$lengths
|
Array of maximum lengths keyed by field name. |
Usage Examples
Basic Usage
<?php
// Hook into wp_get_comment_fields_max_lengths
add_filter('wp_get_comment_fields_max_lengths', 'my_custom_filter', 10, 1);
function my_custom_filter($lengths) {
// Your custom filtering logic here
return $lengths;
}
Source Code Context
wp-includes/comment.php:1240
- How this hook is used in WordPress core
<?php
1235 *
1236 * @since 4.5.0
1237 *
1238 * @param int[] $lengths Array of maximum lengths keyed by field name.
1239 */
1240 return apply_filters( 'wp_get_comment_fields_max_lengths', $lengths );
1241 }
1242
1243 /**
1244 * Compares the lengths of comment data against the maximum character limits.
1245 *
PHP Documentation
<?php
/**
* Filters the lengths for the comment form fields.
*
* @since 4.5.0
*
* @param int[] $lengths Array of maximum lengths keyed by field name.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/comment.php
Related Hooks
Related hooks will be displayed here in future updates.