Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
facebook.php
1<?php
2
4
7
8class Facebook extends Oembed
9{
10 public function handle(HtmlDocument $document, HttpClient $httpClient = null)
11 {
12 parent::handle($document);
13
14 if($document->getEmdbed())
15 {
16 $embedHtml = $document->getEmdbed();
17
18 preg_match('/<div(?:.+?)fb-post(.+?)>/i', $embedHtml, $divTags);
19
20 if($divTags[0])
21 {
22 $div = str_replace('>', ' data-show-text="false">', $divTags[0]);
23 $embedHtml = str_replace($divTags[0], $div, $embedHtml);
24 $document->setEmbed($embedHtml);
25 }
26 }
27 }
28}
handle(HtmlDocument $document, HttpClient $httpClient=null)
Definition facebook.php:10