wp_required_field_message
Filter HookDescription
Filters the message to explain required form fields.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5367 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$message
|
Message text and glyph wrapped in a `span` tag. |
Usage Examples
Basic Usage
<?php
// Hook into wp_required_field_message
add_filter('wp_required_field_message', 'my_custom_filter', 10, 1);
function my_custom_filter($message) {
// Your custom filtering logic here
return $message;
}
Source Code Context
wp-includes/general-template.php:5367
- How this hook is used in WordPress core
<?php
5362 *
5363 * @since 6.1.0
5364 *
5365 * @param string $message Message text and glyph wrapped in a `span` tag.
5366 */
5367 return apply_filters( 'wp_required_field_message', $message );
5368 }
5369
5370 /**
5371 * Default settings for heartbeat.
5372 *
PHP Documentation
<?php
/**
* Filters the message to explain required form fields.
*
* @since 6.1.0
*
* @param string $message Message text and glyph wrapped in a `span` tag.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.