wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



the_attachment_link › WordPress Function

Od2.0.0
Przestarzałyn/a
the_attachment_link ( $post = 0, $fullsize = false, $deprecated = false, $permalink = false )
Parametry: (4)
  • (int|WP_Post) $post Optional. Post ID or post object.
    Wymagane: Nie
    Domyślny:
  • (bool) $fullsize Optional. Whether to use full size. Default false.
    Wymagane: Nie
    Domyślny: false
  • (bool) $deprecated Deprecated. Not used.
    Wymagane: Nie
    Domyślny: false
  • (bool) $permalink Optional. Whether to include permalink. Default false.
    Wymagane: Nie
    Domyślny: false
Zdefiniowane na:
Codex:

Displays an attachment page link using an image or icon.



Źródło

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