get_the_attachment_link [ WordPress Function ]
get_the_attachment_link ( $id = 0, $fullsize = false, $max_dims = false, $permalink = false )
| Parameters: |
|
| See: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: the_attachment_link, get_attachment_link, the_attachment_links, wp_get_attachment_link, get_attachment_icon
Retrieve HTML content of attachment image with link.
Source
<?php
function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_link()' );
$id = (int) $id;
$_post = & get_post($id);
if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
return __('Missing Attachment');
if ( $permalink )
$url = get_attachment_link($_post->ID);
$post_title = esc_attr($_post->post_title);
$innerHTML = get_attachment_innerHTML($_post->ID, $fullsize, $max_dims);
return "<a href='$url' title='$post_title'>$innerHTML</a>";
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- WordPress › Support » How to use this: get_the_attachment_link?
How to use this: get_the_attachment_link? (2 posts). hilj. Member Posted 2 years ago #. Hello,. I'm just building a site which displays thubnails (when opened) ...
wordpress.org - WordPress › Support » Tags — get_the_attachment_link
(forgot?) Register · WordPress › Support » get_the_attachment_link. Tag: get_the_attachment_link Add New » ... How to use this: get_the_attachment_link ?
wordpress.org - Fatal error: Cannot redeclare get_the_attachment_link - WordPress
Fatal error: Cannot redeclare get_the_attachment_link() (previously declared in / home/gseim/public_html/blog/wp-includes/post-template.php:973) in ...
wordpress.org - get_the_attachment_link (WordPress Function) - WPSeek.com
WordPress lookup for get_the_attachment_link, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com