enclosure_links WordPress Filter Hook

The enclosure_links hook allows you to add extra links to an enclosure in a post. This can be useful if you want to add an enclosure to a post that is not yet available, or if you want to add a link to an alternate version of an enclosure.

apply_filters( 'enclosure_links', string[] $post_links, int $post_ID ) #

Filters the list of enclosure links before querying the database.


Description

Allows for the addition and/or removal of potential enclosures to save to postmeta before checking the database for existing enclosures.


Top ↑

Parameters

$post_links

(string[])An array of enclosure links.

$post_ID

(int)Post ID.


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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.

Show More
Show More