wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



the_attachment_link › WordPress Function

Seit2.0.0
Veraltetn/v
the_attachment_link ( $post = 0, $fullsize = false, $deprecated = false, $permalink = false )
Parameter: (4)
  • (int|WP_Post) $post Optional. Post ID or post object.
    Erforderlich: Nein
    Standard:
  • (bool) $fullsize Optional. Whether to use full size. Default false.
    Erforderlich: Nein
    Standard: false
  • (bool) $deprecated Deprecated. Not used.
    Erforderlich: Nein
    Standard: false
  • (bool) $permalink Optional. Whether to include permalink. Default false.
    Erforderlich: Nein
    Standard: false
Definiert in:
Codex:

Displays an attachment page link using an image or icon.



Quellcode

function the_attachment_link( $post = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '2.5.0' );
	}

	if ( $fullsize ) {
		echo wp_get_attachment_link( $post, 'full', $permalink );
	} else {
		echo wp_get_attachment_link( $post, 'thumbnail', $permalink );
	}
}