sanitize_textarea_field
Filter HookDescription
Filters a sanitized textarea field string.Hook Information
File Location |
wp-includes/formatting.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5613 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$filtered
|
The sanitized string. |
string
|
$str
|
The string prior to being sanitized. |
Usage Examples
Basic Usage
<?php
// Hook into sanitize_textarea_field
add_filter('sanitize_textarea_field', 'my_custom_filter', 10, 2);
function my_custom_filter($filtered, $str) {
// Your custom filtering logic here
return $filtered;
}
Source Code Context
wp-includes/formatting.php:5613
- How this hook is used in WordPress core
<?php
5608 * @since 4.7.0
5609 *
5610 * @param string $filtered The sanitized string.
5611 * @param string $str The string prior to being sanitized.
5612 */
5613 return apply_filters( 'sanitize_textarea_field', $filtered, $str );
5614 }
5615
5616 /**
5617 * Internal helper function to sanitize a string from user input or from the database.
5618 *
PHP Documentation
<?php
/**
* Filters a sanitized textarea field string.
*
* @since 4.7.0
*
* @param string $filtered The sanitized string.
* @param string $str The string prior to being sanitized.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/formatting.php
Related Hooks
Related hooks will be displayed here in future updates.