prepend_attachment
Filters the attachment markup to be prepended to the post content.
Usage
add_filter( 'prepend_attachment', 'wp_kama_prepend_attachment_filter' ); /** * Function for `prepend_attachment` filter-hook. * * @param string $p The attachment HTML output. * * @return string */ function wp_kama_prepend_attachment_filter( $p ){ // filter... return $p; }
- $p(string)
- The attachment HTML output.
Changelog
Since 2.0.0 | Introduced. |
Where the hook is called
prepend_attachment
wp-includes/post-template.php 1752
$p = apply_filters( 'prepend_attachment', $p );