first commit

This commit is contained in:
Ryan Ariana
2024-05-06 11:04:37 +07:00
commit aee061ddba
7322 changed files with 2918816 additions and 0 deletions

View File

@@ -0,0 +1,130 @@
<?php
namespace Elementor\Core\Schemes;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Elementor color scheme.
*
* Elementor color scheme class is responsible for initializing a scheme for
* colors.
*
* @since 1.0.0
* @deprecated 3.0.0 Use `Global_Colors` instead.
*/
class Color {
/**
* 1st color scheme.
* @deprecated 3.0.0 Use `Global_Colors::COLOR_PRIMARY` instead.
*/
const COLOR_1 = '1';
/**
* 2nd color scheme.
* @deprecated 3.0.0 Use `Global_Colors::COLOR_SECONDARY` instead.
*/
const COLOR_2 = '2';
/**
* 3rd color scheme.
* @deprecated 3.0.0 Use `Global_Colors::COLOR_TEXT` instead.
*/
const COLOR_3 = '3';
/**
* 4th color scheme.
* @deprecated 3.0.0 Use `Global_Colors::COLOR_ACCENT` instead.
*/
const COLOR_4 = '4';
/**
* Get color scheme type.
*
* Retrieve the color scheme type.
*
* @since 1.0.0
* @access public
* @static
* @deprecated 3.0.0
*
* @return string Color scheme type.
*/
public static function get_type() {
return 'color';
}
/**
* Get color scheme title.
*
* Retrieve the color scheme title.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return string Color scheme title.
*/
public function get_title() {
return '';
}
/**
* Get color scheme disabled title.
*
* Retrieve the color scheme disabled title.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return string Color scheme disabled title.
*/
public function get_disabled_title() {
return '';
}
/**
* Get color scheme titles.
*
* Retrieve the color scheme titles.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Color scheme titles.
*/
public function get_scheme_titles() {
return [];
}
/**
* Get default color scheme.
*
* Retrieve the default color scheme.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Default color scheme.
*/
public function get_default_scheme() {
return [];
}
/**
* 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
* @deprecated 3.0.0
*/
public function print_template_content() {}
}

View File

@@ -0,0 +1,209 @@
<?php
namespace Elementor\Core\Schemes;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Elementor scheme manager.
*
* Elementor scheme manager handler class is responsible for registering and
* initializing all the supported schemes.
*
* @since 1.0.0
*/
class Manager {
/**
* Registered schemes.
*
* Holds the list of all the registered schemes.
*
* @access protected
*
* @var Base[]
*/
protected $_registered_schemes = [];
/**
* Enabled schemes.
*
* Holds the list of all the enabled schemes.
*
* @access private
* @static
*
* @var array
*/
private static $_enabled_schemes;
/**
* Schemes types.
*
* Holds the list of the schemes types. Default types are `color`,
* `typography` and `color-picker`.
*
* @access private
* @static
*
* @var array
*/
private static $_schemes_types = [
'color',
'typography',
'color-picker',
];
/**
* Register new scheme.
*
* Add a new scheme to the schemes list. The method creates a new scheme
* instance for any given scheme class and adds the scheme to the registered
* schemes list.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @param string $scheme_class Scheme class name.
*/
public function register_scheme( $scheme_class ) {}
/**
* Unregister scheme.
*
* Removes a scheme from the list of registered schemes.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @param string $id Scheme ID.
*
* @return bool True if the scheme was removed, False otherwise.
*/
public function unregister_scheme( $id ) {
return true;
}
/**
* Get registered schemes.
*
* Retrieve the registered schemes list from the current instance.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*/
public function get_registered_schemes() {
return [];
}
/**
* Get schemes data.
*
* Retrieve all the registered schemes with data for each scheme.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Registered schemes with each scheme data.
*/
public function get_registered_schemes_data() {
return [];
}
/**
* Get default schemes.
*
* Retrieve all the registered schemes with default scheme for each scheme.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Registered schemes with with default scheme for each scheme.
*/
public function get_schemes_defaults() {
return [];
}
/**
* Get system schemes.
*
* Retrieve all the registered ui schemes with system schemes for each scheme.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Registered ui schemes with with system scheme for each scheme.
*/
public function get_system_schemes() {
return [];
}
/**
* Get scheme.
*
* Retrieve a single scheme from the list of all the registered schemes in
* the current instance.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @param string $id Scheme ID.
*/
public function get_scheme( $id ) {
return false;
}
/**
* Get scheme value.
*
* Retrieve the scheme value from the list of all the registered schemes in
* the current instance.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @param string $scheme_type Scheme type.
* @param string $scheme_value Scheme value.
*/
public function get_scheme_value( $scheme_type, $scheme_value ) {
return false;
}
/**
* Print ui schemes templates.
*
* Used to generate the scheme templates on the editor using Underscore JS
* template, for all the registered ui schemes.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*/
public function print_schemes_templates() {}
/**
* Get enabled schemes.
*
* Retrieve all enabled schemes from the list of the registered schemes in
* the current instance.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
* @static
*
* @return array Enabled schemes.
*/
public static function get_enabled_schemes() {
return [];
}
}

View File

@@ -0,0 +1,130 @@
<?php
namespace Elementor\Core\Schemes;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Elementor typography scheme.
*
* Elementor typography scheme class is responsible for initializing a scheme
* for typography.
*
* @since 1.0.0
* @deprecated 3.0.0 Use `Global_Typography` instead.
*/
class Typography {
/**
* 1st typography scheme.
* @deprecated 3.0.0 Use `Global_Typography::TYPOGRAPHY_PRIMARY` instead.
*/
const TYPOGRAPHY_1 = '1';
/**
* 2nd typography scheme.
* @deprecated 3.0.0 Use `Global_Typography::TYPOGRAPHY_SECONDARY` instead.
*/
const TYPOGRAPHY_2 = '2';
/**
* 3rd typography scheme.
* @deprecated 3.0.0 Use `Global_Typography::TYPOGRAPHY_TEXT` instead.
*/
const TYPOGRAPHY_3 = '3';
/**
* 4th typography scheme.
* @deprecated 3.0.0 Use `Global_Typography::TYPOGRAPHY_ACCENT` instead.
*/
const TYPOGRAPHY_4 = '4';
/**
* Get typography scheme type.
*
* Retrieve the typography scheme type.
*
* @since 1.0.0
* @access public
* @static
* @deprecated 3.0.0
*
* @return string Typography scheme type.
*/
public static function get_type() {
return 'typography';
}
/**
* Get typography scheme title.
*
* Retrieve the typography scheme title.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return string Typography scheme title.
*/
public function get_title() {
return '';
}
/**
* Get typography scheme disabled title.
*
* Retrieve the typography scheme disabled title.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return string Typography scheme disabled title.
*/
public function get_disabled_title() {
return '';
}
/**
* Get typography scheme titles.
*
* Retrieve the typography scheme titles.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Typography scheme titles.
*/
public function get_scheme_titles() {
return [];
}
/**
* Get default typography scheme.
*
* Retrieve the default typography scheme.
*
* @since 1.0.0
* @access public
* @deprecated 3.0.0
*
* @return array Default typography scheme.
*/
public function get_default_scheme() {
return [];
}
/**
* Print typography 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
* @deprecated 3.0.0
*/
public function print_template_content() {}
}