_wp_privacy_account_request_confirmed_message

函数
_wp_privacy_account_request_confirmed_message ( $request_id )
Access
Private
参数
  • (int) $request_id The request ID being confirmed.
    Required:
返回值
  • (string) The confirmation message.
定义位置
相关方法
_wp_privacy_account_request_confirmed_wp_privacy_action_request_types_wp_privacy_send_request_confirmation_notification_wp_privacy_completed_request_wp_privacy_requests_screen_options
引入
4.9.6
弃用
-

_wp_privacy_account_request_confirmed_message: 这是一个私有函数,用于检索已完成的个人数据导出或删除请求的确认信息。它被_wp_privacy_account_request_confirmed函数使用。

返回请求确认信息HTML。

function _wp_privacy_account_request_confirmed_message( $request_id ) {
	$request = wp_get_user_request( $request_id );

	$message  = '<p class="success">' . __( 'Action has been confirmed.' ) . '</p>';
	$message .= '<p>' . __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ) . '</p>';

	if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) {
		if ( 'export_personal_data' === $request->action_name ) {
			$message  = '<p class="success">' . __( 'Thanks for confirming your export request.' ) . '</p>';
			$message .= '<p>' . __( 'The site administrator has been notified. You will receive a link to download your export via email when they fulfill your request.' ) . '</p>';
		} elseif ( 'remove_personal_data' === $request->action_name ) {
			$message  = '<p class="success">' . __( 'Thanks for confirming your erasure request.' ) . '</p>';
			$message .= '<p>' . __( 'The site administrator has been notified. You will receive an email confirmation when they erase your data.' ) . '</p>';
		}
	}

	/**
	 * Filters the message displayed to a user when they confirm a data request.
	 *
	 * @since 4.9.6
	 *
	 * @param string $message    The message to the user.
	 * @param int    $request_id The ID of the request being confirmed.
	 */
	$message = apply_filters( 'user_request_action_confirmed_message', $message, $request_id );

	return $message;
}

常见问题

FAQs
查看更多 >