Filter hook 'pre_user_description'

in WP Core File wp-includes/user.php at line 2424

View Source

pre_user_description

Filter Hook
Description
Filters a user's description before the user is created or updated.

Hook Information

File Location wp-includes/user.php View on GitHub
Hook Type Filter
Line Number 2424

Hook Parameters

Type Name Description
string $description The user's description.

Usage Examples

Basic Usage
<?php
// Hook into pre_user_description
add_filter('pre_user_description', 'my_custom_filter', 10, 1);

function my_custom_filter($description) {
    // Your custom filtering logic here
    return $description;
}

Source Code Context

wp-includes/user.php:2424 - How this hook is used in WordPress core
<?php
2419  	 *
2420  	 * @since 2.0.3
2421  	 *
2422  	 * @param string $description The user's description.
2423  	 */
2424  	$meta['description'] = apply_filters( 'pre_user_description', $description );
2425  
2426  	$meta['rich_editing'] = empty( $userdata['rich_editing'] ) ? 'true' : $userdata['rich_editing'];
2427  
2428  	$meta['syntax_highlighting'] = empty( $userdata['syntax_highlighting'] ) ? 'true' : $userdata['syntax_highlighting'];
2429  

PHP Documentation

<?php
/**
	 * Filters a user's description before the user is created or updated.
	 *
	 * @since 2.0.3
	 *
	 * @param string $description The user's description.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.