prepend_attachment
Filters the attachment markup to be prepended to the post content.
Использование
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(строка)
- The attachment HTML output.
Список изменений
| С версии 2.0.0 | Введена. |
Где вызывается хук
prepend_attachment
wp-includes/post-template.php 1759
$p = apply_filters( 'prepend_attachment', $p );