prepend_attachment WordPress Filter Hook

The prepend_attachment hook is called before an attachment is inserted into a post. It can be used to modify the attachment data before it is saved to the database.

apply_filters( 'prepend_attachment', string $p ) #

Filters the attachment markup to be prepended to the post content.


Description

Top ↑

See also


Top ↑

Parameters

$p

(string)The attachment HTML output.


Top ↑

Source

File: wp-includes/post-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.