prepend_attachment [ WordPress Function ]
prepend_attachment ( $content )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: is_attachment, wp_count_attachments, wp_delete_attachment, wp_insert_attachment, wp_get_attachment_url
Wrap attachment in <<p>> element before content.
Source
<?php
function prepend_attachment($content) {
global $post;
if ( empty($post->post_type) || $post->post_type != 'attachment' )
return $content;
$p = '<p class="attachment">';
// show the medium sized image representation of the attachment if available, and link to the raw file
$p .= wp_get_attachment_link(0, 'medium', false);
$p .= '</p>';
$p = apply_filters('prepend_attachment', $p);
return "$p\n$content";
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- prepend_attachment Wordpress hook details -- Adam Brown, BYU ...
Applied to the HTML to be prepended by the prepend_attachment function. This description ... WordPress version history for prepend_attachment. This database ...
adambrown.info - WordPress › Support » Tags — prepend_attachment
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » prepend_attachment. Tag: prepend_attachment Add New » ...
wordpress.org - (filter( 'the_content', 'prepend_attachment' - WordPress Trac
filter( 'the_content', 'prepend_attachment' ) on attachment pages may be problem ... the problem is add_filter( 'the_content', 'prepend_attachment' ); filter on ...
core.trac.wordpress.org - prepend_attachment (WordPress Function) - WPSeek.com
WordPress lookup for prepend_attachment, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com
Gebruikersdiscussies [ wordpress.org ]
- wprabbit on "How do you show an attachment without linking to the raw file"
- wdm on "How do you show an attachment without linking to the raw file"
- sponki on "How do you show an attachment without linking to the raw file"
- Thad Allender on "How do you show an attachment without linking to the raw file"
- Ed73 on "How do you show an attachment without linking to the raw file"
- Ed73 on "How do you show an attachment without linking to the raw file"