Automattic\WooCommerce\Internal\ProductDownloads

DownloadableFileAttachments::handle_adjacent_image_link │ public │ WC 1.0

Leave out previous and next image links that point to downloadable product files.

Attachment pages for unattached images link to other unattached images, and the link can show the image itself.

Method of the class: DownloadableFileAttachments{}

No Hooks.

Returns

string|mixed.

Usage

$DownloadableFileAttachments = new DownloadableFileAttachments();
$DownloadableFileAttachments->handle_adjacent_image_link( $output, $attachment_id );
$output(string|mixed) (required)
Link HTML.
$attachment_id(int|mixed) (required)
ID of the linked attachment.

DownloadableFileAttachments::handle_adjacent_image_link() code WC 11.3.0

public function handle_adjacent_image_link( $output, $attachment_id ) {
	return $this->is_hidden_attachment( absint( $attachment_id ) ) ? '' : $output;
}