for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Disqus Helper package.
*
* Copyright (c) Nikola Posa <[email protected]>
* For full copyright and license information, please refer to the LICENSE file,
* located at the package root folder.
*/
declare(strict_types=1);
namespace DisqusHelper\Widget;
use DisqusHelper\Code;
* Comments thread widget.
* @author Nikola Posa <[email protected]>
final class ThreadWidget implements WidgetInterface
{
const SCRIPT_NAME = 'embed.js';
public function render(array $options = []) : string
return '<div id="disqus_thread"></div>';
}
public function visit(Code $code) : Code
$code->addScriptFile(self::SCRIPT_NAME, [
'lazy_load' => true,
]);
return $code;