Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
facebook.php
1
<?php
2
3
namespace
Bitrix\Main\UrlPreview\Parser
;
4
5
use
Bitrix\Main\UrlPreview\HtmlDocument
;
6
use
Bitrix\Main\Web\HttpClient
;
7
8
class
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
}
Bitrix\Main\UrlPreview\HtmlDocument
Definition
htmldocument.php:13
Bitrix\Main\UrlPreview\HtmlDocument\setEmbed
setEmbed($embed)
Definition
htmldocument.php:192
Bitrix\Main\UrlPreview\HtmlDocument\getEmdbed
getEmdbed()
Definition
htmldocument.php:181
Bitrix\Main\UrlPreview\Parser\Facebook
Definition
facebook.php:9
Bitrix\Main\UrlPreview\Parser\Facebook\handle
handle(HtmlDocument $document, HttpClient $httpClient=null)
Definition
facebook.php:10
Bitrix\Main\UrlPreview\Parser\Oembed
Definition
oembed.php:12
Bitrix\Main\Web\HttpClient
Definition
httpclient.php:24
Bitrix\Main\UrlPreview\Parser
Definition
applemaps.php:2
modules
main
lib
urlpreview
parser
facebook.php
Создано системой
1.10.0