get_enclosed [ WordPress Function ]
get_enclosed ( $post_id )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Retrieve enclosures already enclosed for a post.
Source
<?php
function get_enclosed($post_id) {
$custom_fields = get_post_custom( $post_id );
$pung = array();
if ( !is_array( $custom_fields ) )
return $pung;
foreach ( $custom_fields as $key => $val ) {
if ( 'enclosure' != $key || !is_array( $val ) )
continue;
foreach( $val as $enc ) {
$enclosure = explode( "\n", $enc );
$pung[] = trim( $enclosure[ 0 ] );
}
}
$pung = apply_filters('get_enclosed', $pung, $post_id);
return $pung;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get enclosed « WordPress Codex
Description. Retrieve enclosures already enclosed for a post. Usage. <?php get_enclosed( $post_id ) ?> Parameters. $post_id: (integer) (required) Post ID.
codex.wordpress.org - get_enclosed() WordPress function reference, arguments and ...
get_enclosed(). Retrieve enclosures already enclosed for a post. Signature. get_enclosed( $post_id ). post_id: (int) Post ID. Return. (array) List of enclosures ...
queryposts.com - Animals Petition: We need enclosed dog parks in UK: help to get ...
We need enclosed dog parks in UK: help to get enclosed dog parks all around the uk ... help to get enclosed dog parks all around the uk. Greetings,. I just signed ...
www.change.org - 常用函数-get_enclosed() | WordPress啦!
常用函数-get_enclosed(). 说明. 检索文章中已有enclosures。 用法. <?php get_enclosed( $post_id ) ?> 参数. $post_id. (整数)(必需)文章编号. 默认值:None ...
www.wordpress.la