Add Creative Elements templates and update index files
- Introduced new templates for catalog, checkout, contact, and error pages. - Implemented caching headers and redirection in index.php files across various directories. - Enhanced product and layout templates for better integration with Creative Elements. - Added backoffice header styles and scripts for improved UI/UX in the admin panel.
This commit is contained in:
191
modules/creativeelements/includes/schemes/base.php
Normal file
191
modules/creativeelements/includes/schemes/base.php
Normal file
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
/**
|
||||
* Creative Elements - live Theme & Page Builder
|
||||
*
|
||||
* @author WebshopWorks, Elementor
|
||||
* @copyright 2019-2022 WebshopWorks.com & Elementor.com
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
namespace CE;
|
||||
|
||||
defined('_PS_VERSION_') or die;
|
||||
|
||||
/**
|
||||
* Elementor scheme base.
|
||||
*
|
||||
* An abstract class implementing the scheme interface, responsible for
|
||||
* creating new schemes.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @abstract
|
||||
*/
|
||||
abstract class SchemeBase implements SchemeInterface
|
||||
{
|
||||
/**
|
||||
* DB option name for the time when the scheme was last updated.
|
||||
*/
|
||||
const LAST_UPDATED_META = '_elementor_scheme_last_updated';
|
||||
|
||||
/**
|
||||
* System schemes.
|
||||
*
|
||||
* Holds the list of all the system schemes.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access private
|
||||
*
|
||||
* @var array System schemes.
|
||||
*/
|
||||
private $_system_schemes;
|
||||
|
||||
/**
|
||||
* Init system schemes.
|
||||
*
|
||||
* Initialize the system schemes.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
* @abstract
|
||||
*/
|
||||
abstract protected function _initSystemSchemes();
|
||||
|
||||
/**
|
||||
* Get description.
|
||||
*
|
||||
* Retrieve the scheme description.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return string Scheme description.
|
||||
*/
|
||||
public static function getDescription()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get system schemes.
|
||||
*
|
||||
* Retrieve the system schemes.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return string System schemes.
|
||||
*/
|
||||
final public function getSystemSchemes()
|
||||
{
|
||||
if (null === $this->_system_schemes) {
|
||||
$this->_system_schemes = $this->_initSystemSchemes();
|
||||
}
|
||||
|
||||
return $this->_system_schemes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scheme value.
|
||||
*
|
||||
* Retrieve the scheme value.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Scheme value.
|
||||
*/
|
||||
public function getSchemeValue()
|
||||
{
|
||||
$scheme_value = get_option('elementor_scheme_' . static::getType());
|
||||
|
||||
if (!$scheme_value) {
|
||||
$scheme_value = $this->getDefaultScheme();
|
||||
|
||||
update_option('elementor_scheme_' . static::getType(), $scheme_value);
|
||||
}
|
||||
|
||||
return $scheme_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save scheme.
|
||||
*
|
||||
* Update Elementor scheme in the database, and update the last updated
|
||||
* scheme time.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $posted
|
||||
*/
|
||||
public function saveScheme(array $posted)
|
||||
{
|
||||
$scheme_value = $this->getSchemeValue();
|
||||
|
||||
update_option('elementor_scheme_' . static::getType(), array_replace($scheme_value, array_intersect_key($posted, $scheme_value)));
|
||||
|
||||
update_option(self::LAST_UPDATED_META, time());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scheme.
|
||||
*
|
||||
* Retrieve the scheme.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return array The scheme.
|
||||
*/
|
||||
public function getScheme()
|
||||
{
|
||||
$scheme = [];
|
||||
|
||||
$titles = $this->getSchemeTitles();
|
||||
|
||||
foreach ($this->getSchemeValue() as $scheme_key => $scheme_value) {
|
||||
$scheme[$scheme_key] = [
|
||||
'title' => isset($titles[$scheme_key]) ? $titles[$scheme_key] : '',
|
||||
'value' => $scheme_value,
|
||||
];
|
||||
}
|
||||
|
||||
return $scheme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print scheme template.
|
||||
*
|
||||
* Used to generate the scheme template on the editor using Underscore JS
|
||||
* template.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
final public function printTemplate()
|
||||
{
|
||||
?>
|
||||
<script type="text/template" id="tmpl-elementor-panel-schemes-<?= static::getType() ?>">
|
||||
<div class="elementor-panel-scheme-buttons">
|
||||
<div class="elementor-panel-scheme-button-wrapper elementor-panel-scheme-reset">
|
||||
<button class="elementor-button">
|
||||
<i class="fa fa-undo" aria-hidden="true"></i>
|
||||
<?= __('Reset') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="elementor-panel-scheme-button-wrapper elementor-panel-scheme-discard">
|
||||
<button class="elementor-button">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
<?= __('Discard') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="elementor-panel-scheme-button-wrapper elementor-panel-scheme-save">
|
||||
<button class="elementor-button elementor-button-success" disabled><?= __('Apply') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printTemplateContent() ?>
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
241
modules/creativeelements/includes/schemes/color-picker.php
Normal file
241
modules/creativeelements/includes/schemes/color-picker.php
Normal file
@@ -0,0 +1,241 @@
|
||||
<?php
|
||||
/**
|
||||
* Creative Elements - live Theme & Page Builder
|
||||
*
|
||||
* @author WebshopWorks, Elementor
|
||||
* @copyright 2019-2022 WebshopWorks.com & Elementor.com
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
namespace CE;
|
||||
|
||||
defined('_PS_VERSION_') or die;
|
||||
|
||||
/**
|
||||
* Elementor color picker scheme.
|
||||
*
|
||||
* Elementor color picker scheme class is responsible for initializing a scheme
|
||||
* for color pickers.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class SchemeColorPicker extends SchemeColor
|
||||
{
|
||||
/**
|
||||
* 5th color scheme.
|
||||
*/
|
||||
const COLOR_5 = '5';
|
||||
|
||||
/**
|
||||
* 6th color scheme.
|
||||
*/
|
||||
const COLOR_6 = '6';
|
||||
|
||||
/**
|
||||
* 7th color scheme.
|
||||
*/
|
||||
const COLOR_7 = '7';
|
||||
|
||||
/**
|
||||
* 9th color scheme.
|
||||
*/
|
||||
const COLOR_8 = '8';
|
||||
|
||||
/**
|
||||
* Get color picker scheme type.
|
||||
*
|
||||
* Retrieve the color picker scheme type.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return string Color picker scheme type.
|
||||
*/
|
||||
public static function getType()
|
||||
{
|
||||
return 'color-picker';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color picker scheme description.
|
||||
*
|
||||
* Retrieve the color picker scheme description.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return string Color picker scheme description.
|
||||
*/
|
||||
|
||||
public static function getDescription()
|
||||
{
|
||||
return __('Choose which colors appear in the editor\'s color picker. This makes accessing the colors you chose for the site much easier.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default color picker scheme.
|
||||
*
|
||||
* Retrieve the default color picker scheme.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Default color picker scheme.
|
||||
*/
|
||||
public function getDefaultScheme()
|
||||
{
|
||||
return array_replace(parent::getDefaultScheme(), [
|
||||
self::COLOR_5 => '#4054b2',
|
||||
self::COLOR_6 => '#23a455',
|
||||
self::COLOR_7 => '#000',
|
||||
self::COLOR_8 => '#fff',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color picker scheme titles.
|
||||
*
|
||||
* Retrieve the color picker scheme titles.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Color picker scheme titles.
|
||||
*/
|
||||
public function getSchemeTitles()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Init system color picker schemes.
|
||||
*
|
||||
* Initialize the system color picker schemes.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*
|
||||
* @return array System color picker schemes.
|
||||
*/
|
||||
protected function _initSystemSchemes()
|
||||
{
|
||||
$schemes = parent::_initSystemSchemes();
|
||||
|
||||
$additional_schemes = [
|
||||
'joker' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#4b4646',
|
||||
self::COLOR_6 => '#e2e2e2',
|
||||
],
|
||||
],
|
||||
'ocean' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#154d80',
|
||||
self::COLOR_6 => '#8c8c8c',
|
||||
],
|
||||
],
|
||||
'royal' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#ac8e4d',
|
||||
self::COLOR_6 => '#e2cea1',
|
||||
],
|
||||
],
|
||||
'violet' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#9c9ea6',
|
||||
self::COLOR_6 => '#c184d0',
|
||||
],
|
||||
],
|
||||
'sweet' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#41aab9',
|
||||
self::COLOR_6 => '#ffc72f',
|
||||
],
|
||||
],
|
||||
'urban' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#aa4039',
|
||||
self::COLOR_6 => '#94dbaf',
|
||||
],
|
||||
],
|
||||
'earth' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#aa6666',
|
||||
self::COLOR_6 => '#efe5d9',
|
||||
],
|
||||
],
|
||||
'river' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#7b8c93',
|
||||
self::COLOR_6 => '#eb6d65',
|
||||
],
|
||||
],
|
||||
'pastel' => [
|
||||
'items' => [
|
||||
self::COLOR_5 => '#f5a46c',
|
||||
self::COLOR_6 => '#6e6f71',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$schemes = array_replace_recursive($schemes, $additional_schemes);
|
||||
|
||||
foreach ($schemes as &$scheme) {
|
||||
$scheme['items'] += [
|
||||
self::COLOR_7 => '#000',
|
||||
self::COLOR_8 => '#fff',
|
||||
];
|
||||
}
|
||||
|
||||
return $schemes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get system color picker schemes to print.
|
||||
*
|
||||
* Retrieve the system color picker schemes
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*
|
||||
* @return string The system color picker schemes.
|
||||
*/
|
||||
protected function _getSystemSchemesToPrint()
|
||||
{
|
||||
$schemes = $this->getSystemSchemes();
|
||||
|
||||
$items_to_print = [
|
||||
self::COLOR_1,
|
||||
self::COLOR_5,
|
||||
self::COLOR_2,
|
||||
self::COLOR_3,
|
||||
self::COLOR_6,
|
||||
self::COLOR_4,
|
||||
];
|
||||
|
||||
$items_to_print = array_flip($items_to_print);
|
||||
|
||||
foreach ($schemes as $scheme_key => $scheme) {
|
||||
$schemes[$scheme_key]['items'] = array_replace($items_to_print, array_intersect_key($scheme['items'], $items_to_print));
|
||||
}
|
||||
|
||||
return $schemes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current color picker scheme title.
|
||||
*
|
||||
* Retrieve the current color picker scheme title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*
|
||||
* @return string The current color picker scheme title.
|
||||
*/
|
||||
protected function _getCurrentSchemeTitle()
|
||||
{
|
||||
return __('Color Picker');
|
||||
}
|
||||
}
|
||||
301
modules/creativeelements/includes/schemes/color.php
Normal file
301
modules/creativeelements/includes/schemes/color.php
Normal file
@@ -0,0 +1,301 @@
|
||||
<?php
|
||||
/**
|
||||
* Creative Elements - live Theme & Page Builder
|
||||
*
|
||||
* @author WebshopWorks, Elementor
|
||||
* @copyright 2019-2022 WebshopWorks.com & Elementor.com
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
namespace CE;
|
||||
|
||||
defined('_PS_VERSION_') or die;
|
||||
|
||||
/**
|
||||
* Elementor color scheme.
|
||||
*
|
||||
* Elementor color scheme class is responsible for initializing a scheme for
|
||||
* colors.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class SchemeColor extends SchemeBase
|
||||
{
|
||||
/**
|
||||
* 1st color scheme.
|
||||
*/
|
||||
const COLOR_1 = '1';
|
||||
|
||||
/**
|
||||
* 2nd color scheme.
|
||||
*/
|
||||
const COLOR_2 = '2';
|
||||
|
||||
/**
|
||||
* 3rd color scheme.
|
||||
*/
|
||||
const COLOR_3 = '3';
|
||||
|
||||
/**
|
||||
* 4th color scheme.
|
||||
*/
|
||||
const COLOR_4 = '4';
|
||||
|
||||
/**
|
||||
* Get color scheme type.
|
||||
*
|
||||
* Retrieve the color scheme type.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return string Color scheme type.
|
||||
*/
|
||||
public static function getType()
|
||||
{
|
||||
return 'color';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color scheme title.
|
||||
*
|
||||
* Retrieve the color scheme title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Color scheme title.
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return __('Colors');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color scheme disabled title.
|
||||
*
|
||||
* Retrieve the color scheme disabled title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Color scheme disabled title.
|
||||
*/
|
||||
public function getDisabledTitle()
|
||||
{
|
||||
return __('Color Palettes');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color scheme titles.
|
||||
*
|
||||
* Retrieve the color scheme titles.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Color scheme titles.
|
||||
*/
|
||||
public function getSchemeTitles()
|
||||
{
|
||||
return [
|
||||
self::COLOR_1 => __('Primary'),
|
||||
self::COLOR_2 => __('Secondary'),
|
||||
self::COLOR_3 => __('Text'),
|
||||
self::COLOR_4 => __('Accent'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default color scheme.
|
||||
*
|
||||
* Retrieve the default color scheme.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Default color scheme.
|
||||
*/
|
||||
public function getDefaultScheme()
|
||||
{
|
||||
return [
|
||||
self::COLOR_1 => '#6ec1e4',
|
||||
self::COLOR_2 => '#54595f',
|
||||
self::COLOR_3 => '#7a7a7a',
|
||||
self::COLOR_4 => '#61ce70',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Print color scheme content template.
|
||||
*
|
||||
* Used to generate the HTML in the editor using Underscore JS template. The
|
||||
* variables for the class are available using `data` JS object.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
public function printTemplateContent()
|
||||
{
|
||||
?>
|
||||
<div class="elementor-panel-scheme-content elementor-panel-box">
|
||||
<div class="elementor-panel-heading">
|
||||
<div class="elementor-panel-heading-title"><?= $this->_getCurrentSchemeTitle() ?></div>
|
||||
</div>
|
||||
<?php $description = static::getDescription() ?>
|
||||
|
||||
<?php if ($description) : ?>
|
||||
<div class="elementor-panel-scheme-description elementor-descriptor"><?= $description ?></div>
|
||||
<?php endif ?>
|
||||
<div class="elementor-panel-scheme-items elementor-panel-box-content"></div>
|
||||
</div>
|
||||
<div class="elementor-panel-scheme-colors-more-palettes elementor-panel-box">
|
||||
<div class="elementor-panel-heading">
|
||||
<div class="elementor-panel-heading-title"><?= __('More Palettes') ?></div>
|
||||
</div>
|
||||
<div class="elementor-panel-box-content">
|
||||
<?php foreach ($this->_getSystemSchemesToPrint() as $scheme_name => $scheme) : ?>
|
||||
<div class="elementor-panel-scheme-color-system-scheme"
|
||||
data-scheme-name="<?= esc_attr($scheme_name) ?>">
|
||||
<div class="elementor-panel-scheme-color-system-items">
|
||||
<?php foreach ($scheme['items'] as $color_value) : ?>
|
||||
<div class="elementor-panel-scheme-color-system-item"
|
||||
style="background-color: <?= esc_attr($color_value) ?>;"></div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<div class="elementor-title"><?= $scheme['title'] ?></div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Init system color schemes.
|
||||
*
|
||||
* Initialize the system color schemes.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*
|
||||
* @return array System color schemes.
|
||||
*/
|
||||
protected function _initSystemSchemes()
|
||||
{
|
||||
return [
|
||||
'joker' => [
|
||||
'title' => 'Joker',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#202020',
|
||||
self::COLOR_2 => '#b7b4b4',
|
||||
self::COLOR_3 => '#707070',
|
||||
self::COLOR_4 => '#f6121c',
|
||||
],
|
||||
],
|
||||
'ocean' => [
|
||||
'title' => 'Ocean',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#1569ae',
|
||||
self::COLOR_2 => '#b6c9db',
|
||||
self::COLOR_3 => '#545454',
|
||||
self::COLOR_4 => '#fdd247',
|
||||
],
|
||||
],
|
||||
'royal' => [
|
||||
'title' => 'Royal',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#d5ba7f',
|
||||
self::COLOR_2 => '#902729',
|
||||
self::COLOR_3 => '#ae4848',
|
||||
self::COLOR_4 => '#302a8c',
|
||||
],
|
||||
],
|
||||
'violet' => [
|
||||
'title' => 'Violet',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#747476',
|
||||
self::COLOR_2 => '#ebca41',
|
||||
self::COLOR_3 => '#6f1683',
|
||||
self::COLOR_4 => '#a43cbd',
|
||||
],
|
||||
],
|
||||
'sweet' => [
|
||||
'title' => 'Sweet',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#6ccdd9',
|
||||
self::COLOR_2 => '#763572',
|
||||
self::COLOR_3 => '#919ca7',
|
||||
self::COLOR_4 => '#f12184',
|
||||
],
|
||||
],
|
||||
'urban' => [
|
||||
'title' => 'Urban',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#db6159',
|
||||
self::COLOR_2 => '#3b3b3b',
|
||||
self::COLOR_3 => '#7a7979',
|
||||
self::COLOR_4 => '#2abf64',
|
||||
],
|
||||
],
|
||||
'earth' => [
|
||||
'title' => 'Earth',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#882021',
|
||||
self::COLOR_2 => '#c48e4c',
|
||||
self::COLOR_3 => '#825e24',
|
||||
self::COLOR_4 => '#e8c12f',
|
||||
],
|
||||
],
|
||||
'river' => [
|
||||
'title' => 'River',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#8dcfc8',
|
||||
self::COLOR_2 => '#565656',
|
||||
self::COLOR_3 => '#50656e',
|
||||
self::COLOR_4 => '#dc5049',
|
||||
],
|
||||
],
|
||||
'pastel' => [
|
||||
'title' => 'Pastel',
|
||||
'items' => [
|
||||
self::COLOR_1 => '#f27f6f',
|
||||
self::COLOR_2 => '#f4cd78',
|
||||
self::COLOR_3 => '#a5b3c1',
|
||||
self::COLOR_4 => '#aac9c3',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get system color schemes to print.
|
||||
*
|
||||
* Retrieve the system color schemes
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*
|
||||
* @return string The system color schemes.
|
||||
*/
|
||||
protected function _getSystemSchemesToPrint()
|
||||
{
|
||||
return $this->getSystemSchemes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current color scheme title.
|
||||
*
|
||||
* Retrieve the current color scheme title.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access protected
|
||||
*
|
||||
* @return string The current color scheme title.
|
||||
*/
|
||||
protected function _getCurrentSchemeTitle()
|
||||
{
|
||||
return __('Color Palette');
|
||||
}
|
||||
}
|
||||
8
modules/creativeelements/includes/schemes/index.php
Normal file
8
modules/creativeelements/includes/schemes/index.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
header('Expires: Thu, 28 Feb 2019 00:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
header('Location: ../../../../');
|
||||
die;
|
||||
79
modules/creativeelements/includes/schemes/typography.php
Normal file
79
modules/creativeelements/includes/schemes/typography.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Creative Elements - live Theme & Page Builder
|
||||
*
|
||||
* @author WebshopWorks, Elementor
|
||||
* @copyright 2019-2022 WebshopWorks.com & Elementor.com
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
namespace CE;
|
||||
|
||||
defined('_PS_VERSION_') or die;
|
||||
|
||||
class SchemeTypography extends SchemeBase
|
||||
{
|
||||
const TYPOGRAPHY_1 = '1';
|
||||
const TYPOGRAPHY_2 = '2';
|
||||
const TYPOGRAPHY_3 = '3';
|
||||
const TYPOGRAPHY_4 = '4';
|
||||
|
||||
public static function getType()
|
||||
{
|
||||
return 'typography';
|
||||
}
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return __('Typography');
|
||||
}
|
||||
|
||||
public function getDisabledTitle()
|
||||
{
|
||||
return __('Default Fonts');
|
||||
}
|
||||
|
||||
public function getSchemeTitles()
|
||||
{
|
||||
return [
|
||||
self::TYPOGRAPHY_1 => __('Primary Headline'),
|
||||
self::TYPOGRAPHY_2 => __('Secondary Headline'),
|
||||
self::TYPOGRAPHY_3 => __('Body Text'),
|
||||
self::TYPOGRAPHY_4 => __('Accent Text'),
|
||||
];
|
||||
}
|
||||
|
||||
public function getDefaultScheme()
|
||||
{
|
||||
return [
|
||||
self::TYPOGRAPHY_1 => [
|
||||
'font_family' => 'Roboto',
|
||||
'font_weight' => '600',
|
||||
],
|
||||
self::TYPOGRAPHY_2 => [
|
||||
'font_family' => 'Roboto Slab',
|
||||
'font_weight' => '400',
|
||||
],
|
||||
self::TYPOGRAPHY_3 => [
|
||||
'font_family' => 'Roboto',
|
||||
'font_weight' => '400',
|
||||
],
|
||||
self::TYPOGRAPHY_4 => [
|
||||
'font_family' => 'Roboto',
|
||||
'font_weight' => '500',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
protected function _initSystemSchemes()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function printTemplateContent()
|
||||
{
|
||||
?>
|
||||
<div class="elementor-panel-scheme-items"></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user