wppaste
WordPress

Caption

Source
wp-includes/SimplePie/src/Caption.php:17
Handles `` captions as defined in Media RSS.

Description

Used by \SimplePie\Enclosure::get_caption() and \SimplePie\Enclosure::get_captions()

This class can be overloaded with \SimplePie\SimplePie::set_caption_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 · 5

$typeSimplePie\?stringpublic
Content type
$langSimplePie\?stringpublic
Language
$startTimeSimplePie\?stringpublic
Start time
$endTimeSimplePie\?stringpublic
End time
$textSimplePie\?stringpublic
Caption text

Methods · 7

Source code

class Caption{    /**     * Content type     *     * @var ?string     * @see get_type()     */    public $type;     /**     * Language     *     * @var ?string     * @see get_language()     */    public $lang;     /**     * Start time     *     * @var ?string     * @see get_starttime()     */    public $startTime;     /**     * End time     *     * @var ?string     * @see get_endtime()     */    public $endTime;     /**     * Caption text     *     * @var ?string     * @see get_text()     */    public $text;     /**     * Constructor, used to input the data     *     * For documentation on all the parameters, see the corresponding     * properties and their accessors     */    public function __construct(        ?string $type = null,        ?string $lang = null,        ?string $startTime = null,        ?string $endTime = null,        ?string $text = null    ) {        $this->type = $type;        $this->lang = $lang;        $this->startTime = $startTime;        $this->endTime = $endTime;        $this->text = $text;    }     /**     * String-ified version     *     * @return string     */    public function __toString()    {        // There is no $this->data here        return md5(serialize($this));    }     /**     * Get the end time     *     * @return string|null Time in the format 'hh:mm:ss.SSS'     */    public function get_endtime()    {

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 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/Caption.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.