Un motore di ricerca WordPress per sviluppatori e autori di temi



the_attachment_link ›

Da2.0.0
Deprecaton/a
the_attachment_link ( $id = 0, $fullsize = false, $deprecated = false, $permalink = false )
Parametri: (4)
  • (int|WP_Post) $id Optional. Post ID or post object.
    Richiesto: No
    Default:
  • (bool) $fullsize Optional, default is false. Whether to use full size.
    Richiesto: No
    Default: false
  • (bool) $deprecated Deprecated. Not used.
    Richiesto: No
    Default: false
  • (bool) $permalink Optional, default is false. Whether to include permalink.
    Richiesto: No
    Default: false
Definito a:
Codex:

Display an attachment page link using an image or icon.



Sorgenti

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