Enclosure
- Source
wp-includes/SimplePie/src/Enclosure.php:17
Handles everything related to enclosures (including Media RSS and iTunes RSS)
Description
Used by \SimplePie\Item::get_enclosure() and \SimplePie\Item::get_enclosures()
This class can be overloaded with \SimplePie\SimplePie::set_enclosure_class()
Compatibility
- WordPress
- core
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Properties · 27
$bitrateSimplePie\?stringpublic$captionsSimplePie\Caption[]|nullpublic$categoriesSimplePie\Category[]|nullpublic$channelsSimplePie\?intpublic$copyrightSimplePie\?Copyrightpublic$creditsSimplePie\Credit[]|nullpublic$descriptionSimplePie\?stringpublic$durationSimplePie\?intpublic$expressionSimplePie\?stringpublic$framerateSimplePie\?stringpublic$handlerSimplePie\?stringpublic$hashesstring[]|nullpublic$heightSimplePie\?stringpublic$javascriptnullpublic$keywordsstring[]|nullpublic$langSimplePie\?stringpublic$lengthSimplePie\?intpublic$linkSimplePie\?stringpublic$mediumSimplePie\?stringpublic$playerSimplePie\?stringpublic$ratingsSimplePie\Rating[]|nullpublic$restrictionsSimplePie\?Restriction[]public$samplingrateSimplePie\?stringpublic$thumbnailsstring[]|nullpublic$titleSimplePie\?stringpublic$typeSimplePie\?stringpublic$widthSimplePie\?stringpublic
Methods · 41
- __construct()Constructor, used to input the data
- __toString()String-ified version
- get_bitrate()Get the bitrate
- get_caption()Get a single caption
- get_captions()Get all captions
- get_category()Get a single category
- get_categories()Get all categories
- get_channels()Get the number of audio channels
- get_copyright()Get the copyright information
- get_credit()Get a single credit
- get_credits()Get all credits
- get_description()Get the description of the enclosure
- get_duration()Get the duration of the enclosure
- get_expression()Get the expression
- get_extension()Get the file extension
- get_framerate()Get the framerate (in frames-per-second)
- get_handler()Get the preferred handler
- get_hash()Get a single hash
- get_hashes()Get all credits
- get_height()Get the height
- get_language()Get the language
- get_keyword()Get a single keyword
- get_keywords()Get all keywords
- get_length()Get length
- get_link()Get the URL
- get_medium()Get the medium
- get_player()Get the player URL
- get_rating()Get a single rating
- get_ratings()Get all ratings
- get_restriction()Get a single restriction
- get_restrictions()Get all restrictions
- get_sampling_rate()Get the sampling rate (in kHz)
- get_size()Get the file size (in MiB)
- get_thumbnail()Get a single thumbnail
- get_thumbnails()Get all thumbnails
- get_title()Get the title
- get_type()Get mimetype of the enclosure
- get_width()Get the width
- native_embed()Embed the enclosure using ``
- embed()Embed the enclosure using Javascript
- get_real_type()Get the real media type
Source code
class Enclosure{ /** * @var ?string * @see get_bitrate() */ public $bitrate; /** * @var Caption[]|null * @see get_captions() */ public $captions; /** * @var Category[]|null * @see get_categories() */ public $categories; /** * @var ?int * @see get_channels() */ public $channels; /** * @var ?Copyright * @see get_copyright() */ public $copyright; /** * @var Credit[]|null * @see get_credits() */ public $credits; /** * @var ?string * @see get_description() */ public $description; /** * @var ?int * @see get_duration() */ public $duration; /** * @var ?string * @see get_expression() */ public $expression; /** * @var ?string * @see get_framerate() */ public $framerate; /** * @var ?string * @see get_handler() */ public $handler; /** * @var string[]|null * @see get_hashes() */ public $hashes; /** * @var ?string * @see get_height() */ public $height;Changelog
Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/SimplePie/src/Enclosure.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.