Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

_wp_privacy_resend_request() WordPress Function

The wp_privacy_resend_request function allows a user to request that their data be sent to them again. This is useful if the original request was lost or if the user did not receive the data they requested.

_wp_privacy_resend_request( int $request_id ) #

Resend an existing request and return the result.


Parameters

$request_id

(int)(Required)Request ID.


Top ↑

Return

(true|WP_Error) Returns true if sending the email was successful, or a WP_Error object.


Top ↑

Source

File: wp-admin/includes/privacy-tools.php

function _wp_privacy_resend_request( $request_id ) {
	$request_id = absint( $request_id );
	$request    = get_post( $request_id );

	if ( ! $request || 'user_request' !== $request->post_type ) {
		return new WP_Error( 'privacy_request_error', __( 'Invalid personal data request.' ) );
	}

	$result = wp_send_user_request( $request_id );

	if ( is_wp_error( $result ) ) {
		return $result;
	} elseif ( ! $result ) {
		return new WP_Error( 'privacy_request_error', __( 'Unable to initiate confirmation for personal data request.' ) );
	}

	return true;
}


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.