wp_user_request_action_description() WordPress Function

The wp_user_request_action_description function is used to output a user-requested action description. This function is used when a user requests an action from another user. The function outputs a description of the action that the user is requesting.

wp_user_request_action_description( string $action_name ) #

Gets action description from the name and return a string.


Parameters

$action_name

(string)(Required)Action name of the request.


Top ↑

Return

(string) Human readable action name.


Top ↑

Source

File: wp-includes/user.php

function wp_user_request_action_description( $action_name ) {
	switch ( $action_name ) {
		case 'export_personal_data':
			$description = __( 'Export Personal Data' );
			break;
		case 'remove_personal_data':
			$description = __( 'Erase Personal Data' );
			break;
		default:
			/* translators: %s: Action name. */
			$description = sprintf( __( 'Confirm the "%s" action' ), $action_name );
			break;
	}

	/**
	 * Filters the user action description.
	 *
	 * @since 4.9.6
	 *
	 * @param string $description The default description.
	 * @param string $action_name The name of the request.
	 */
	return apply_filters( 'user_request_action_description', $description, $action_name );
}


Top ↑

Changelog

Changelog
VersionDescription
4.9.6Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More