get_enclosed
Filter HookDescription
Filters the list of enclosures already enclosed for the given post.Hook Information
File Location |
wp-includes/post.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5917 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$pung
|
Array of enclosures for the given post. |
int
|
$post_id
|
Post ID. |
Usage Examples
Basic Usage
<?php
// Hook into get_enclosed
add_filter('get_enclosed', 'my_custom_filter', 10, 2);
function my_custom_filter($pung, $post_id) {
// Your custom filtering logic here
return $pung;
}
Source Code Context
wp-includes/post.php:5917
- How this hook is used in WordPress core
<?php
5912 * @since 2.0.0
5913 *
5914 * @param string[] $pung Array of enclosures for the given post.
5915 * @param int $post_id Post ID.
5916 */
5917 return apply_filters( 'get_enclosed', $pung, $post_id );
5918 }
5919
5920 /**
5921 * Retrieves URLs already pinged for a post.
5922 *
PHP Documentation
<?php
/**
* Filters the list of enclosures already enclosed for the given post.
*
* @since 2.0.0
*
* @param string[] $pung Array of enclosures for the given post.
* @param int $post_id Post ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.