Uma área de pesquisa sobre o WordPress para devs e autores do tema



_wp_privacy_completed_request ›

Desde4.9.6
Obsoleton/a
_wp_privacy_completed_request ( $request_id )
Acesso:
  • private
Parâmetros:
  • (int) $request_id Request ID.
    Required: Yes
Retorna:
  • (int|WP_Error) $result Request ID on success or WP_Error.
Definido em:
Codex:

Marks a request as completed by the admin and logs the current timestamp.



Fonte

function _wp_privacy_completed_request( $request_id ) {
	$request_id = absint( $request_id );
	$request    = wp_get_user_request_data( $request_id );

	if ( ! $request ) {
		return new WP_Error( 'privacy_request_error', __( 'Invalid request.' ) );
	}

	update_post_meta( $request_id, '_wp_user_request_completed_timestamp', time() );

	$result = wp_update_post(
		array(
			'ID'          => $request_id,
			'post_status' => 'request-completed',
		)
	);

	return $result;
}