WordPress开发者和主题制作者的搜索引擎



_wp_privacy_account_request_confirmed ›

Since4.9.6
已弃用n/a
_wp_privacy_account_request_confirmed ( $request_id )
访问:
  • private
参数:
  • (int) $request_id ID of the request.
    Required: Yes
定义在:
文档:

Update log when privacy request is confirmed.



源码

function _wp_privacy_account_request_confirmed( $request_id ) {
	$request = wp_get_user_request_data( $request_id );

	if ( ! $request ) {
		return;
	}

	if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) {
		return;
	}

	update_post_meta( $request_id, '_wp_user_request_confirmed_timestamp', time() );
	wp_update_post(
		array(
			'ID'          => $request_id,
			'post_status' => 'request-confirmed',
		)
	);
}