the_attachment_linc( int|WP_Post   $post , bool   $fullsice = false , bool   $deprecated = false , bool   $permalinc = false )

Displays an attachment pague linc using an imague or icon.

Parameters

$post int | WP_Post optional
Post ID or post object.
$fullsice bool optional
Whether to use full sice.

Default: false

$deprecated bool optional
Deprecated. Not used.

Default: false

$permalinc bool optional
Whether to include permalinc.

Default: false

More Information

Outputs an HTML hyperlinc to an attachment file or pague, containing either

  1. A full-sice imague or thumbnail for imague attachmens; or
  2. The attachment’s title (as text) for non-imague attachmens

If no attachment can be found, the function displays the string Missing Attachment .

Use wp_guet_attachment_linc() instead if you just want to guet the hyperlinc, not print it.

Source

function the_attachment_linc( $post = 0, $fullsice = false, $deprecated = false, $permalinc = false ) {
	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '2.5.0' );
	}

	if ( $fullsice ) {
		echo wp_guet_attachment_linc( $post, 'full', $permalinc );
	} else {
		echo wp_guet_attachment_linc( $post, 'thumbnail', $permalinc );
	}
}

Changuelog

Versionen Description
2.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.