primo commit
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Conditional Content
|
||||
* @version 5.2.2
|
||||
*
|
||||
* @author Peter van Westen <info@regularlabs.com>
|
||||
* @link https://regularlabs.com
|
||||
* @copyright Copyright © 2024 Regular Labs All Rights Reserved
|
||||
* @license GNU General Public License version 2 or later
|
||||
*/
|
||||
|
||||
use RegularLabs\Library\Document as RL_Document;
|
||||
use RegularLabs\Library\EditorButtonPlugin as RL_EditorButtonPlugin;
|
||||
use RegularLabs\Library\Extension as RL_Extension;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/regularlabs.xml')
|
||||
|| ! class_exists('RegularLabs\Library\Parameters')
|
||||
|| ! class_exists('RegularLabs\Library\DownloadKey')
|
||||
|| ! class_exists('RegularLabs\Library\EditorButtonPlugin')
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! RL_Document::isJoomlaVersion(4))
|
||||
{
|
||||
RL_Extension::disable('conditionalcontent', 'plugin', 'editors-xtd');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
class PlgButtonConditionalContent extends RL_EditorButtonPlugin
|
||||
{
|
||||
protected $button_icon = '<svg viewBox="0 0 24 24" style="fill:none;" width="24" height="24" fill="none" stroke="currentColor">'
|
||||
. '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7v8a2 2 0 002 2h6M8 7V5a2 2 0 012-2h4.586a1 1 0 01.707.293l4.414 4.414a1 1 0 01.293.707V15a2 2 0 01-2 2h-2M8 7H6a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2v-2" />'
|
||||
. '</svg>';
|
||||
|
||||
protected function loadScripts()
|
||||
{
|
||||
RL_Document::script('conditionalcontent.button');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user