@@ 7586-7621 (lines=36) @@ | ||
7583 | $captions = array_values(array_unique($captions)); |
|
7584 | } |
|
7585 | } |
|
7586 | elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) |
|
7587 | { |
|
7588 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) |
|
7589 | { |
|
7590 | $caption_type = null; |
|
7591 | $caption_lang = null; |
|
7592 | $caption_startTime = null; |
|
7593 | $caption_endTime = null; |
|
7594 | $caption_text = null; |
|
7595 | if (isset($caption['attribs']['']['type'])) |
|
7596 | { |
|
7597 | $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7598 | } |
|
7599 | if (isset($caption['attribs']['']['lang'])) |
|
7600 | { |
|
7601 | $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7602 | } |
|
7603 | if (isset($caption['attribs']['']['start'])) |
|
7604 | { |
|
7605 | $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7606 | } |
|
7607 | if (isset($caption['attribs']['']['end'])) |
|
7608 | { |
|
7609 | $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7610 | } |
|
7611 | if (isset($caption['data'])) |
|
7612 | { |
|
7613 | $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7614 | } |
|
7615 | $captions[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text)); |
|
7616 | } |
|
7617 | if (is_array($captions)) |
|
7618 | { |
|
7619 | $captions = array_values(array_unique($captions)); |
|
7620 | } |
|
7621 | } |
|
7622 | else |
|
7623 | { |
|
7624 | $captions = $captions_parent; |
|
@@ 8158-8197 (lines=40) @@ | ||
8155 | } |
|
8156 | // Checking the other optional media: elements. Priority: media:content, media:group, item, channel |
|
8157 | // CAPTIONS |
|
8158 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) |
|
8159 | { |
|
8160 | foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) |
|
8161 | { |
|
8162 | $caption_type = null; |
|
8163 | $caption_lang = null; |
|
8164 | $caption_startTime = null; |
|
8165 | $caption_endTime = null; |
|
8166 | $caption_text = null; |
|
8167 | if (isset($caption['attribs']['']['type'])) |
|
8168 | { |
|
8169 | $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8170 | } |
|
8171 | if (isset($caption['attribs']['']['lang'])) |
|
8172 | { |
|
8173 | $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8174 | } |
|
8175 | if (isset($caption['attribs']['']['start'])) |
|
8176 | { |
|
8177 | $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8178 | } |
|
8179 | if (isset($caption['attribs']['']['end'])) |
|
8180 | { |
|
8181 | $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8182 | } |
|
8183 | if (isset($caption['data'])) |
|
8184 | { |
|
8185 | $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8186 | } |
|
8187 | $captions[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text)); |
|
8188 | } |
|
8189 | if (is_array($captions)) |
|
8190 | { |
|
8191 | $captions = array_values(array_unique($captions)); |
|
8192 | } |
|
8193 | } |
|
8194 | else |
|
8195 | { |
|
8196 | $captions = $captions_parent; |
|
8197 | } |
|
8198 | // CATEGORIES |
|
8199 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) |
|
8200 | { |