wp_required_field_indicator
Filter HookDescription
Filters the markup for a visual indicator of required form fields.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5343 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$indicator
|
Markup for the indicator element. |
Usage Examples
Basic Usage
<?php
// Hook into wp_required_field_indicator
add_filter('wp_required_field_indicator', 'my_custom_filter', 10, 1);
function my_custom_filter($indicator) {
// Your custom filtering logic here
return $indicator;
}
Source Code Context
wp-includes/general-template.php:5343
- How this hook is used in WordPress core
<?php
5338 *
5339 * @since 6.1.0
5340 *
5341 * @param string $indicator Markup for the indicator element.
5342 */
5343 return apply_filters( 'wp_required_field_indicator', $indicator );
5344 }
5345
5346 /**
5347 * Creates a message to explain required form fields.
5348 *
PHP Documentation
<?php
/**
* Filters the markup for a visual indicator of required form fields.
*
* @since 6.1.0
*
* @param string $indicator Markup for the indicator element.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.