Outil de recherche WordPress pour les développeurs et auteurs de thèmes



the_attachment_link ›

Depuis2.0.0
Dépréciéen/a
the_attachment_link ( $id = 0, $fullsize = false, $deprecated = false, $permalink = false )
Paramètres: (4)
  • (int|WP_Post) $id Optional. Post ID or post object.
    Requis: Non
    Défaut:
  • (bool) $fullsize Optional, default is false. Whether to use full size.
    Requis: Non
    Défaut: false
  • (bool) $deprecated Deprecated. Not used.
    Requis: Non
    Défaut: false
  • (bool) $permalink Optional, default is false. Whether to include permalink.
    Requis: Non
    Défaut: false
Défini(e) dans:
Codex:

Display an attachment page link using an image or icon.



Source

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 );
	}
}