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



the_attachment_link ›

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

Display an attachment page link using an image or icon.



Quellcode

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

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