Commit realizado el 12:13:52 08-04-2024

This commit is contained in:
Pagina Web Monito
2024-04-08 12:13:55 -04:00
commit 0c33094de9
7815 changed files with 1365694 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Enqueue styles for block editor
*
* @since ??
*/
function et_divi_block_editor_styles() {
wp_enqueue_style(
'divi-block-editor-style',
get_theme_file_uri( '/css/editor-blocks.css' ),
array(),
et_get_theme_version()
);
}
add_action( 'enqueue_block_editor_assets', 'et_divi_block_editor_styles' );
/**
* Setup page layout content width options for block editor
*
* @since ??
*
* @param array $content_widths
*
* @return array
*/
function et_divi_gb_content_widths( $content_widths = array() ) {
// Customizer value
$content_width = absint( et_get_option( 'content_width', '1080' ) ); // pixel
$use_sidebar_width = et_get_option( 'use_sidebar_width', false );
$sidebar_width = $use_sidebar_width ? intval( et_get_option( 'sidebar_width', 20.875 ) ) : 20.875; // Format percentage.
$sidebar_padding = 5.5; // percentage
// Content width when no sidebar exist
$no_sidebar = $content_width;
// Content width when sidebar exist (default)
$has_sidebar = absint( ( $content_width / 100 ) * ( 100 - ( $sidebar_width + $sidebar_padding ) ) );
// Min content width (small smartphone width)
$min = 320;
// Max content width (15" laptop * 2)
$max = 2880;
// Current content width
$saved = get_post_meta( get_the_ID(), '_et_gb_content_width', true);
$current = $saved ? $saved : $has_sidebar;
return array(
'current' => $current,
'default' => $has_sidebar,
'min' => $min,
'max' => $max,
'et_no_sidebar' => $no_sidebar,
'et_left_sidebar' => $has_sidebar,
'et_right_sidebar' => $has_sidebar,
'et_full_width_page' => $max,
);
}
add_filter( 'et_gb_content_widths', 'et_divi_gb_content_widths' );

View File

@@ -0,0 +1,4 @@
<?php
// Note, this will be updated automatically during grunt release task
$ET_BUILDER_VERSION = '3.17.3';

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,347 @@
<?php
/**
* Divi extension base class.
*
* @package Builder
* @subpackage API
* @since 4.6.2
*/
/**
* Core class used to implement the Divi Extension.
*/
class DiviExtension {
/**
* Utility class instance.
*
* @since 3.1
*
* @var ET_Core_Data_Utils
*/
protected static $_;
/**
* Dependencies for the extension's JavaScript bundles.
*
* @since 3.1
*
* @var array {
* JavaScript Bundle Dependencies
*
* @type string[] $builder Dependencies for the builder bundle
* @type string[] $frontend Dependencies for the frontend bundle
* }
*/
protected $_bundle_dependencies = array();
/**
* Builder bundle data
*
* @since 3.1
*
* @var array
*/
protected $_builder_js_data = array();
/**
* Frontend bundle data
*
* @since 3.1
*
* @var array
*/
protected $_frontend_js_data = array();
/**
* Whether or not the extension's debug mode is enabled. This should always be enabled
* during development and never be enabled in production.
*
* @since 3.1
*
* @var bool
*/
protected $_debug;
/**
* The gettext domain for the extension's translations.
*
* @since 3.1
*
* @var string
*/
public $gettext_domain;
/**
* The extension's WP Plugin name.
*
* @since 3.1
*
* @var string
*/
public $name;
/**
* Absolute path to the extension's directory.
*
* @since 3.1
*
* @var string
*/
public $plugin_dir;
/**
* The extension's directory URL.
*
* @since 3.1
*
* @var string
*/
public $plugin_dir_url;
/**
* The extension's version.
*
* @since 3.1
*
* @var string
*/
public $version;
/**
* DiviExtension constructor.
*
* @since 3.1
*
* @param string $name This Divi Extension's WP Plugin name/slug.
* @param array $args Argument flexibility for child classes.
*/
public function __construct( $name = '', $args = array() ) {
if ( ! self::$_ ) {
self::$_ = ET_Core_Data_Utils::instance();
}
$this->name = $name;
if ( $this->name ) {
$this->_initialize();
}
}
/**
* Enqueues minified, production javascript bundles.
*
* @since 3.1
*/
protected function _enqueue_bundles() {
// Frontend Bundle.
$bundle_url = "{$this->plugin_dir_url}scripts/frontend-bundle.min.js";
wp_enqueue_script( "{$this->name}-frontend-bundle", $bundle_url, $this->_bundle_dependencies['frontend'], $this->version, true );
if ( et_core_is_fb_enabled() ) {
// Builder Bundle.
$bundle_url = "{$this->plugin_dir_url}scripts/builder-bundle.min.js";
wp_enqueue_script( "{$this->name}-builder-bundle", $bundle_url, $this->_bundle_dependencies['builder'], $this->version, true );
}
}
/**
* Enqueues non-minified, hot reloaded javascript bundles.
*
* @since 3.1
*/
protected function _enqueue_debug_bundles() {
// Frontend Bundle.
$site_url = wp_parse_url( get_site_url() );
$hot_bundle_url = "{$site_url['scheme']}://{$site_url['host']}:3000/static/js/frontend-bundle.js";
wp_enqueue_script( "{$this->name}-frontend-bundle", $hot_bundle_url, $this->_bundle_dependencies['frontend'], $this->version, true );
if ( et_core_is_fb_enabled() ) {
// Builder Bundle.
$hot_bundle_url = "{$site_url['scheme']}://{$site_url['host']}:3000/static/js/builder-bundle.js";
wp_enqueue_script( "{$this->name}-builder-bundle", $hot_bundle_url, $this->_bundle_dependencies['builder'], $this->version, true );
}
}
/**
* Enqueues minified (production) or non-minified (hot reloaded) backend styles.
*
* @since 4.4.9
*/
protected function _enqueue_backend_styles() {
if ( $this->_debug ) {
$site_url = wp_parse_url( get_site_url() );
$backend_styles_url = "{$site_url['scheme']}://{$site_url['host']}:3000/styles/backend-style.css";
} else {
$extension_dir_path = plugin_dir_path( $this->plugin_dir );
$backend_styles_path = "{$extension_dir_path}styles/backend-style.min.css";
$backend_styles_url = "{$this->plugin_dir_url}styles/backend-style.min.css";
// Ensure backend style CSS file exists on production.
if ( ! file_exists( $backend_styles_path ) ) {
return;
}
}
// Backend Styles - VB.
wp_enqueue_style( "{$this->name}-backend-styles", $backend_styles_url, array(), $this->version );
}
/**
* Sets initial value of {@see self::$_bundle_dependencies}.
*
* @since 3.1
*/
protected function _set_bundle_dependencies() {
/**
* Builder script handle name
*
* @since 3.??
*
* @param string
*/
$this->_bundle_dependencies = array(
'builder' => array( 'react-dom', "{$this->name}-frontend-bundle" ),
'frontend' => array( 'jquery', et_get_combined_script_handle() ),
);
}
/**
* Sets {@see self::$_debug} based on the extension's global DEBUG constant.
*
* @since 3.1
*/
protected function _set_debug_mode() {
$name_parts = explode( '_', get_class( $this ) );
$prefix = strtoupper( $name_parts[0] );
$debug = $prefix . '_DEBUG';
$this->_debug = defined( $debug ) && constant( $debug );
if ( $this->_debug && ! DiviExtensions::register_debug_mode( $this ) ) {
$this->_debug = false;
et_error( "You're Doing It Wrong! Only one Divi Extension can be in debug mode at a time." );
}
}
/**
* Loads custom modules when the builder is ready.
*
* @since 3.1
* @deprecated ?? - Use {@see 'hook_et_builder_ready'} instead.
*/
public function hook_et_builder_modules_loaded() {
$this->hook_et_builder_ready();
}
/**
* Loads custom modules when the builder is ready.
* {@see 'et_builder_ready'}
*
* @since 4.10.0
*/
public function hook_et_builder_ready() {
if ( file_exists( trailingslashit( $this->plugin_dir ) . 'loader.php' ) ) {
require_once trailingslashit( $this->plugin_dir ) . 'loader.php';
}
}
/**
* Performs initialization tasks.
*
* @since 3.1
*/
protected function _initialize() {
DiviExtensions::add( $this );
$this->_set_debug_mode();
$this->_set_bundle_dependencies();
// Setup translations.
load_plugin_textdomain( $this->gettext_domain, false, basename( $this->plugin_dir ) . '/languages' );
// Register callbacks.
register_activation_hook( trailingslashit( $this->plugin_dir ) . $this->name . '.php', array( $this, 'wp_hook_activate' ) );
register_deactivation_hook( trailingslashit( $this->plugin_dir ) . $this->name . '.php', array( $this, 'wp_hook_deactivate' ) );
add_action( 'et_builder_ready', array( $this, 'hook_et_builder_ready' ), 9 );
add_action( 'wp_enqueue_scripts', array( $this, 'wp_hook_enqueue_scripts' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_hook_enqueue_scripts' ) );
}
/**
* Performs tasks when the plugin is activated.
* {@see 'activate_$PLUGINNAME'}
*
* @since 3.1
*/
public function wp_hook_activate() {
// Force the legacy backend builder to reload its template cache.
// This ensures that custom modules are available for use right away.
et_pb_force_regenerate_templates();
}
/**
* Performs tasks when the plugin is deactivated.
* {@see 'deactivate_$PLUGINNAME'}
*
* @since 3.1
*/
public function wp_hook_deactivate() {}
/**
* Enqueues the extension's scripts and styles.
* {@see 'wp_enqueue_scripts'}
*
* @since 3.1
* @since 4.4.9 Added backend styles for handling custom builder styles.
*/
public function wp_hook_enqueue_scripts() {
if ( $this->_debug ) {
$this->_enqueue_debug_bundles();
} else {
$styles = et_is_builder_plugin_active() ? 'style-dbp' : 'style';
$styles_url = "{$this->plugin_dir_url}styles/{$styles}.min.css";
wp_enqueue_style( "{$this->name}-styles", $styles_url, array(), $this->version );
$this->_enqueue_bundles();
}
if ( et_core_is_fb_enabled() && ! et_builder_bfb_enabled() ) {
$this->_enqueue_backend_styles();
}
// Normalize the extension name to get actual script name. For example from 'divi-custom-modules' to `DiviCustomModules`.
$extension_name = str_replace( ' ', '', ucwords( str_replace( '-', ' ', $this->name ) ) );
// Enqueue frontend bundle's data.
if ( ! empty( $this->_frontend_js_data ) ) {
wp_localize_script( "{$this->name}-frontend-bundle", "{$extension_name}FrontendData", $this->_frontend_js_data );
}
// Enqueue builder bundle's data.
if ( et_core_is_fb_enabled() && ! empty( $this->_builder_js_data ) ) {
wp_localize_script( "{$this->name}-builder-bundle", "{$extension_name}BuilderData", $this->_builder_js_data );
}
}
/**
* Enqueues the extension's scripts and styles for admin area.
*
* @since 4.4.9
*/
public function admin_hook_enqueue_scripts() {
if ( et_builder_bfb_enabled() || et_builder_is_tb_admin_screen() ) {
$this->_enqueue_backend_styles();
}
}
}
new DiviExtension();

View File

@@ -0,0 +1,123 @@
<?php
/**
* Extension API: DiviExtensions class.
*
* @package Builder
* @subpackage API
*/
/**
* Composite class to manage all Divi Extensions.
*/
class DiviExtensions {
/**
* Utility class instance.
*
* @since 3.1
*
* @var ET_Core_Data_Utils
*/
protected static $_;
/**
* The first extension to enable debug mode for itself. Only one Divi Extension can be in
* debug mode at a time.
*
* @var DiviExtension
*/
protected static $_debugging_extension;
/**
* List of all instances of the Divi Extension.
*
* @since 3.1
*
* @var DiviExtension[] {
* All current Divi Extension instances
*
* @type DiviExtension $name Instance
* }
*/
private static $_extensions;
/**
* Register a Divi Extension instance.
*
* @since 3.1
*
* @param DiviExtension $instance Instance.
*/
public static function add( $instance ) {
if ( ! isset( self::$_extensions[ $instance->name ] ) ) {
self::$_extensions[ $instance->name ] = $instance;
} else {
et_error( "A Divi Extension named {$instance->name} already exists!" );
}
}
/**
* Get one or all Divi Extension instances.
*
* @since 3.1
*
* @param string $name The extension name. Default: 'all'.
*
* @return DiviExtension|DiviExtension[]|null
*/
public static function get( $name = 'all' ) {
if ( 'all' === $name ) {
return self::$_extensions;
}
return self::$_->array_get( self::$_extensions, $name, null );
}
/**
* Initialize the base `DiviExtension` class.
*/
public static function initialize() {
self::$_ = ET_Core_Data_Utils::instance();
require_once ET_BUILDER_DIR . 'api/DiviExtension.php';
/**
* Fires when the {@see DiviExtension} base class is available.
*
* @since 3.1
*/
do_action( 'divi_extensions_init' );
}
/**
* Whether or not a Divi Extension is in debug mode.
*
* @since 3.1
*
* @return bool
*/
public static function is_debugging_extension() {
return ! is_null( self::$_debugging_extension );
}
/**
* Register's an extension instance for debug mode if one hasn't already been registered.
*
* @since 3.1
*
* @param DiviExtension $instance Instance.
*
* @return bool Whether or not request was successful
*/
public static function register_debug_mode( $instance ) {
if ( ! self::$_debugging_extension ) {
self::$_debugging_extension = $instance;
return true;
}
return false;
}
}
DiviExtensions::initialize();

View File

@@ -0,0 +1,329 @@
<?php
/**
* Rest API: Layout Block
*
* @package Divi
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Class for custom REST API endpoint for Divi Layout block.
*/
class ET_Api_Rest_Block_Layout {
/**
* Instance of `ET_Api_Rest_Block_Layout`.
*
* @var ET_Api_Rest_Block_Layout
*/
private static $_instance;
/**
* Constructor.
*
* ET_Api_Rest_Block_Layout constructor.
*/
public function __construct() {
$this->register();
}
/**
* Get class instance
*
* @since 4.1.0
*
* @return object class instance
*/
public static function instance() {
if ( null === self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Register callback for Layout block REST API
*
* @since 4.1.0
*/
public function register() {
add_action( 'rest_api_init', array( $this, 'register_routes' ) );
}
/**
* Register REST API routes for Layout block
*
* @since 4.1.0
*/
public function register_routes() {
register_rest_route(
'divi/v1',
'get_layout_content',
array(
'methods' => 'POST',
'callback' => array( $this, 'get_layout_content_callback' ),
'args' => array(
'id' => array(
// using intval directly doesn't work, hence the custom callback.
'sanitize_callback' => array( $this, 'sanitize_int' ),
'validation_callback' => 'is_numeric',
),
'nonce' => array(
'sanitize_callback' => 'sanitize_text_field',
),
),
'permission_callback' => array( $this, 'rest_api_layout_block_permission' ),
)
);
register_rest_route(
'divi/v1',
'block/layout/builder_edit_data',
array(
'methods' => 'POST',
'callback' => array( $this, 'process_builder_edit_data' ),
'args' => array(
'action' => array(
'sanitize_callback' => array( $this, 'sanitize_action' ), // update|delete|get.
'validation_callback' => array( $this, 'validate_action' ),
),
'postId' => array(
'sanitize_callback' => array( $this, 'sanitize_int' ),
'validation_callback' => 'is_numeric',
),
'blockId' => array(
'sanitize_callback' => 'sanitize_title',
),
'layoutContent' => array(
'sanitize_callback' => 'wp_kses_post',
),
'nonce' => array(
'sanitize_callback' => 'sanitize_text_field',
),
),
'permission_callback' => array( $this, 'rest_api_layout_block_permission' ),
)
);
}
/**
* Get layout content based on given post ID
*
* @since 4.1.0
*
* @param WP_REST_Request $request Full details about the request.
*
* @return string|WP_Error
*/
public function get_layout_content_callback( WP_REST_Request $request ) {
$post_id = $request->get_param( 'id' );
$nonce = $request->get_param( 'nonce' );
// Action nonce check. REST API actually has checked for nonce at cookie sent on every
// request and performed capability-based check. This check perform action-based nonce
// check to strengthen the security
// @see https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/.
if ( ! wp_verify_nonce( $nonce, 'et_rest_get_layout_content' ) ) {
return new WP_Error(
'invalid_nonce',
esc_html__( 'Invalid nonce', 'et_builder' ),
array(
'status' => 400,
)
);
}
// request has to have id param.
if ( ! $post_id ) {
return new WP_Error(
'no_layout_id',
esc_html__( 'No layout id found', 'et_builder' ),
array(
'status' => 400,
)
);
}
$post = get_post( $post_id );
if ( ! isset( $post->post_content ) || ! $post->post_content ) {
return new WP_Error(
'no_layout_found',
esc_html__( 'No valid layout content found.', 'et_builder' ),
array(
'status' => 404,
)
);
}
return $post->post_content;
}
/**
* Process /block/layout/builder_edit_data route request
*
* @param WP_Rest_Request $request Request to prepare items for.
*
* @return string|WP_Error
* @since 4.1.0
*/
public function process_builder_edit_data( WP_Rest_Request $request ) {
$post_id = $request->get_param( 'postId' );
$block_id = $request->get_param( 'blockId' );
$nonce = $request->get_param( 'nonce' );
// No post ID.
if ( empty( $post_id ) ) {
return new WP_Error(
'no_post_id',
esc_html__( 'No post id', 'et_builder' ),
array(
'status' => 400,
)
);
}
// No block ID.
if ( empty( $block_id ) ) {
return new WP_Error(
'no_block_id',
esc_html__( 'No block id', 'et_builder' ),
array(
'status' => 400,
)
);
}
// Action nonce check. REST API actually has checked for nonce at cookie sent on every
// request and performed capability-based check. This check perform action-based nonce
// check to strengthen the security
// @see https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/.
if ( ! wp_verify_nonce( $nonce, 'et_rest_process_builder_edit_data' ) ) {
return new WP_Error(
'invalid_nonce',
esc_html__( 'Invalid nonce', 'et_builder' ),
array(
'status' => 400,
)
);
}
$result = '';
$post_meta_key = "_et_block_layout_preview_{$block_id}";
switch ( $request->get_param( 'action' ) ) {
case 'get':
$result = get_post_meta( $post_id, $post_meta_key, true );
break;
case 'update':
$layout_content = $request->get_param( 'layoutContent' );
// No layout content.
if ( empty( $layout_content ) ) {
return new WP_Error(
'no_layout_content',
esc_html__( 'No layout content', 'et_builder' ),
array(
'status' => 400,
)
);
}
$saved_layout_content = get_post_meta( $post_id, $post_meta_key, true );
if ( ! empty( $saved_layout_content ) && $saved_layout_content === $layout_content ) {
// If for some reason layout exist and identical to the one being sent, return
// true because update_post_meta() returns false if it updates the meta key and
// the value doesn't change.
$result = true;
} else {
// Otherwise, attempt to save post meta and returns how it goes.
$result = update_post_meta(
$post_id,
$post_meta_key,
$layout_content
);
}
break;
case 'delete':
$result = delete_post_meta( $post_id, $post_meta_key );
break;
default:
return new WP_Error(
'no_valid_action',
esc_html__( 'No valid action found', 'et_builder' ),
array(
'status' => 400,
)
);
}
return array(
'result' => $result,
);
}
/**
* Sanitize int value
*
* @since 4.1.0
*
* @param int|mixed $value Value.
*
* @return int
*/
public function sanitize_int( $value ) {
return intval( $value );
}
/**
* Sanitize request "action" argument
*
* @since 4.1.0
*
* @param string $value Action value.
*
* @return string
*/
public function sanitize_action( $value ) {
return $this->validate_action( $value ) ? $value : '';
}
/**
* Validate request "action" argument
*
* @since 4.1.0
*
* @param string $value Action value.
*
* @return bool
*/
public function validate_action( $value ) {
$valid_builder_edit_data_actions = array(
'get',
'update',
'delete',
);
return in_array( $value, $valid_builder_edit_data_actions, true );
}
/**
* Permission callback for get layout permalink REST API endpoint
*
* @since 4.1.0
*
* @return bool
*/
public function rest_api_layout_block_permission() {
return current_user_can( 'edit_posts' ) && et_pb_is_allowed( 'use_visual_builder' );
}
}
// Initialize ET_Api_Rest_Block_Layout.
ET_Api_Rest_Block_Layout::instance();

View File

@@ -0,0 +1,458 @@
<?php
/**
* Register autoloader.
*
* @package Divi
* @subpackage Builder
* @since 4.6.2
*/
/**
* Autoloader for module fields.
*
* @param string $class The class name.
*/
function _et_pb_autoload_fields( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/field/{$class}.php";
}
/**
* Autoloader for module helpers.
*
* @param string $class The class name.
*/
function _et_pb_autoload_helpers( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/helpers/{$class}.php";
}
/**
* Autoloader for module motion helpers.
*
* @param string $class The class name.
*/
function _et_pb_autoload_helpers_motion( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/helpers/motion/{$class}.php";
}
/**
* Autoloader for module mask style.
*
* @param string $class The class name.
*/
function _et_pb_autoload_mask_pattern_helpers( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "feature/background-masks/{$class}.php";
}
/**
* Autoloader for module mask style.
*
* @param string $class The class name.
*/
function _et_pb_autoload_mask( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "feature/background-masks/mask/{$class}.php";
}
/**
* Autoloader for module pattern style.
*
* @param string $class The class name.
*/
function _et_pb_autoload_pattern( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "feature/background-masks/pattern/{$class}.php";
}
/**
* Autoloader for module types.
*
* @param string $class The class name.
*/
function _et_pb_autoload_types( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/type/{$class}.php";
}
/**
* Autoloader for woo modules.
*
* @param string $class The class name.
*/
function _et_pb_autoload_woo_modules( $class ) {
if ( et_is_woocommerce_plugin_active() ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/woocommerce/{$class}.php";
}
}
/**
* Autoloader for modules.
*
* @param string $class The class name.
*/
function _et_pb_autoload_modules( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
if ( file_exists( ET_BUILDER_DIR . "module/{$class}.php" ) ) {
require_once "module/{$class}.php";
} elseif ( 'Shop' === $class && et_is_woocommerce_plugin_active() &&
/*
* ET_Builder_Module_Shop class moved to "woocommerce/" directory
* as part of WooCommerce Modules v2.
*/
file_exists( ET_BUILDER_DIR . "module/woocommerce/{$class}.php" ) ) {
require_once "module/woocommerce/{$class}.php";
}
}
/**
* Autoloader for module helpers and structure elements.
*
* @param string $class The class name.
*/
function _et_pb_autoload( $class ) {
if ( in_array( $class, [ 'ET_Builder_Section', 'ET_Builder_Row', 'ET_Builder_Row_Inner', 'ET_Builder_Column' ], true ) ) {
require_once 'main-structure-elements.php';
} elseif ( 'ET_Builder_I18n' === $class ) {
require_once 'feature/I18n.php';
} elseif ( in_array( $class, [ 'ET_Builder_Element', 'ET_Builder_Module', 'ET_Builder_Structure_Element' ], true ) ) {
// This is needed for custom module that extends official module and gets registered in unexpected location.
require_once ET_BUILDER_DIR . 'functions.php';
require_once 'class-et-builder-element.php';
} elseif ( 'ET_Builder_Module_Shortcode_Manager' === $class ) {
require_once 'class-et-builder-module-shortcode-manager.php';
} elseif ( 'ET_Builder_Post_Feature_Base' === $class ) {
require_once 'class-et-builder-post-feature-base.php';
} elseif ( 'ET_Builder_Module_Features' === $class ) {
require_once 'class-et-builder-module-features.php';
} elseif ( 'ET_Builder_Module_Fields_Factory' === $class ) {
require_once 'module/field/Factory.php';
} elseif ( 'ET_Builder_Module_Use_Detection' === $class ) {
require_once 'class-et-builder-module-use-detection.php';
} elseif ( 'ET_Global_Settings' === $class ) {
require_once 'class-et-global-settings.php';
} elseif ( 'ET_Builder_Global_Feature_Base' === $class ) {
require_once 'class-et-builder-global-feature-base.php';
} elseif ( 'ET_Builder_Google_Fonts_Feature' === $class ) {
require_once 'class-et-builder-google-fonts-feature.php';
} elseif ( 'ET_Builder_Dynamic_Assets_Feature' === $class ) {
require_once 'class-et-builder-dynamic-assets-feature.php';
} elseif ( 'ET_Builder_Module_Field_DisplayConditions' === $class ) {
require_once 'module/field/DisplayConditions.php';
} elseif ( strpos( $class, 'ET_Builder_Background_Mask' ) !== false || strpos( $class, 'ET_Builder_Background_Pattern' ) !== false ) {
_et_pb_autoload_mask_pattern_helpers( str_replace( 'ET_Builder_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Mask_' ) !== false ) {
_et_pb_autoload_mask( str_replace( 'ET_Builder_Mask_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Pattern_' ) !== false ) {
_et_pb_autoload_pattern( str_replace( 'ET_Builder_Pattern_', '', $class ) );
} elseif ( 'ET_Builder_Woocommerce_Product_Simple_Placeholder' === $class ) {
require_once 'feature/woocommerce/placeholder/WoocommerceProductSimplePlaceholder.php';
} elseif ( strpos( $class, 'ET_Builder_Module_Helper_Motion_' ) !== false ) {
_et_pb_autoload_helpers_motion( str_replace( 'ET_Builder_Module_Helper_Motion_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Module_Helper_' ) !== false ) {
_et_pb_autoload_helpers( str_replace( 'ET_Builder_Module_Helper_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Module_Field_' ) !== false ) {
_et_pb_autoload_fields( str_replace( 'ET_Builder_Module_Field_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Module_Type_' ) !== false ) {
_et_pb_autoload_types( str_replace( 'ET_Builder_Module_Type_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Module_Woocommerce_' ) !== false ) {
_et_pb_autoload_woo_modules( str_replace( 'ET_Builder_Module_Woocommerce_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Module_' ) !== false ) {
_et_pb_autoload_modules( str_replace( 'ET_Builder_Module_', '', $class ) );
} elseif ( 'ET_Item_Library_Local' === $class ) {
require_once ET_CORE_PATH . '/item-library-local/ItemLibraryLocal.php';
} elseif ( 'ET_Theme_Options_Library_Local' === $class ) {
require_once ET_EPANEL_DIR . '/theme-options-library/theme-options-library-local/ThemeOptionsLibraryLocal.php';
} elseif ( 'ET_Code_Snippets_Library_Local' === $class ) {
require_once ET_CORE_PATH . '/code-snippets/code-snippets-library-local/CodeSnippetsLibraryLocal.php';
} elseif ( 'ET_Theme_Builder_Library_Local' === $class ) {
require_once ET_BUILDER_DIR . 'frontend-builder/theme-builder/theme-builder-library-local/ThemeBuilderLibraryLocal.php';
}
}
spl_autoload_register( '_et_pb_autoload' );
/**
* Get an instance of `ET_Builder_Module_Helper_Multi_Value`.
*
* @return ET_Builder_Module_Helper_Multi_Value
*/
function et_pb_multi_value() {
return ET_Builder_Module_Helper_Multi_Value::instance();
}
/**
* Get an instance of `ET_Builder_Module_Helper_Overflow`.
*
* @return ET_Builder_Module_Helper_Overflow
*/
function et_pb_overflow() {
return ET_Builder_Module_Helper_Overflow::get();
}
/**
* Get an instance of `ET_Builder_Module_Helper_Alignment`.
*
* @param string $prefix The prefix string that may be added to field name.
*
* @return ET_Builder_Module_Helper_Alignment
*/
function et_pb_alignment_options( $prefix = '' ) {
return new ET_Builder_Module_Helper_Alignment( $prefix );
}
/**
* Get an instance of `ET_Builder_Module_Helper_Height`.
*
* @param string $prefix The prefix string that may be added to field name.
*
* @return ET_Builder_Module_Helper_Height
*/
function et_pb_height_options( $prefix = '' ) {
return new ET_Builder_Module_Helper_Height( $prefix );
}
/**
* Get an instance of `ET_Builder_Module_Hover_Options`.
*
* @return ET_Builder_Module_Helper_Hover_Options
*/
function et_pb_hover_options() {
return ET_Builder_Module_Helper_Hover_Options::get();
}
/**
* Get sticky option instance.
*
* @since 4.6.0
*
* @return ET_Builder_Module_Helper_Sticky_Options
*/
function et_pb_sticky_options() {
return ET_Builder_Module_Helper_Sticky_Options::get();
}
/**
* Get an instance of `ET_Builder_Module_Helper_Max_Height`.
*
* @param string $prefix The prefix string that may be added to field name.
*
* @return ET_Builder_Module_Helper_Max_Height
*/
function et_pb_max_height_options( $prefix = '' ) {
return new ET_Builder_Module_Helper_Max_Height( $prefix );
}
/**
* Get an instance of `ET_Builder_Module_Helper_Max_Width`.
*
* @param string $prefix The prefix string that may be added to field name.
*
* @return ET_Builder_Module_Helper_Max_Width
*/
function et_pb_max_width_options( $prefix = '' ) {
return new ET_Builder_Module_Helper_Max_Width( $prefix );
}
/**
* Get an instance of `ET_Builder_Module_Helper_Min_Height`.
*
* @param string $prefix The prefix string that may be added to field name.
*
* @return ET_Builder_Module_Helper_Min_Height
*/
function et_pb_min_height_options( $prefix = '' ) {
return new ET_Builder_Module_Helper_Min_Height( $prefix );
}
/**
* Get an instance of `ET_Builder_Module_Helper_ResponsiveOptions`.
*
* @return ET_Builder_Module_Helper_ResponsiveOptions
*/
function et_pb_responsive_options() {
return ET_Builder_Module_Helper_ResponsiveOptions::instance();
}
/**
* Get an instance of `ET_Builder_Module_Helper_Slider`.
*
* @return ET_Builder_Module_Helper_Slider
*/
function et_pb_slider_options() {
return new ET_Builder_Module_Helper_Slider();
}
/**
* Get an instance of `ET_Builder_Module_Transition_Options`.
*
* @return ET_Builder_Module_Transition_Options
*/
function et_pb_transition_options() {
return ET_Builder_Module_Helper_Transition_Options::get();
}
/**
* Get an instance of `ET_Builder_Module_Helper_Width`.
*
* @param string $prefix The prefix string that may be added to field name.
*
* @return ET_Builder_Module_Helper_Width
*/
function et_pb_width_options( $prefix = '' ) {
return new ET_Builder_Module_Helper_Width( $prefix );
}
/**
* Get an instance of `ET_Builder_Module_Helper_Font`.
*
* @return ET_Builder_Module_Helper_Font
*/
function et_pb_font_options() {
return ET_Builder_Module_Helper_Font::instance();
}
/**
* Get an instance of `ET_Builder_Module_Helper_BackgroundLayout`.
*
* @return ET_Builder_Module_Helper_BackgroundLayout
*/
function et_pb_background_layout_options() {
return ET_Builder_Module_Helper_BackgroundLayout::instance();
}
/**
* Get helper instance
*
* @since 4.6.0
*
* @param string $helper_name Helper name.
*
* @return object
*/
function et_builder_get_helper( $helper_name ) {
switch ( $helper_name ) {
case 'sticky':
$helper = et_pb_sticky_options();
break;
case 'hover':
$helper = et_pb_hover_options();
break;
case 'responsive':
$helper = et_pb_responsive_options();
break;
default:
$helper = false;
break;
}
return $helper;
}
/**
* Class ET_Builder_Module_Helper_MultiViewOptions wrapper
*
* @since 3.27.1
*
* @param ET_Builder_Element|bool $module Module object.
* @param array $custom_props Defined custom props data.
* @param array $conditional_values Defined options conditional values.
* @param array $default_values Defined options default values.
*
* @return ET_Builder_Module_Helper_MultiViewOptions
*/
function et_pb_multi_view_options( $module = false, $custom_props = array(), $conditional_values = array(), $default_values = array() ) {
return new ET_Builder_Module_Helper_MultiViewOptions( $module, $custom_props, $conditional_values, $default_values );
}
if ( et_is_woocommerce_plugin_active() ) {
add_filter(
'et_builder_get_woo_default_columns',
array(
'ET_Builder_Module_Helper_Woocommerce_Modules',
'get_columns_posts_default_value',
)
);
}
/**
* Get an instance of `ET_Builder_Module_Helper_OptionTemplate`.
*
* @return ET_Builder_Module_Helper_OptionTemplate
*/
function et_pb_option_template() {
return ET_Builder_Module_Helper_OptionTemplate::instance();
}
/**
* Get an instance of `ET_Builder_Module_Helper_Background`.
*
* @return ET_Builder_Module_Helper_Background
*
* @since 4.3.3
*/
function et_pb_background_options() {
return ET_Builder_Module_Helper_Background::instance();
}
/**
* Class ET_Builder_Module_Helper_Media wrapper
*
* @since 4.6.4
*
* @return ET_Builder_Module_Helper_Media
*/
function et_pb_media_options() {
return ET_Builder_Module_Helper_Media::instance();
}
/**
* Class ET_Theme_Options_Library_Local wrapper
*
* @since 4.21.0
*
* @return ET_Theme_Options_Library_Local
*/
function et_pb_theme_options_library_local() {
return ET_Theme_Options_Library_Local::instance();
}
/**
* Class ET_Code_Snippets_Library_Local wrapper
*
* @since 4.21.0
*
* @return ET_Code_Snippets_Library_Local
*/
function et_pb_code_snippets_library_local() {
return ET_Code_Snippets_Library_Local::instance();
}
/**
* Class ET_Theme_Builder_Library_Local wrapper
*
* @since 4.21.0
*
* @return ET_Theme_Builder_Library_Local
*/
function et_pb_theme_builder_library_local() {
return ET_Theme_Builder_Library_Local::instance();
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* Dynamic_Assets feature class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Handles Dynamic_Assets feature.
*
* @since 4.10.0
*/
class ET_Builder_Dynamic_Assets_Feature extends ET_Builder_Global_Feature_Base {
/**
* Hold the class instance.
*
* @var null
*/
private static $_instance = null;
const CACHE_META_KEY = '_et_builder_da_feature_cache';
/**
* Initialize ET_Builder_Dynamic_Assets_Feature class.
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,216 @@
<?php
/**
* Feature base class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Base Feature feature.
*
* @since 4.10.0
*/
class ET_Builder_Global_Feature_Base {
const CACHE_META_KEY = '_et_builder_global_feature_cache';
/**
* Primed status.
*
* @access protected
* @var bool
*/
protected $_primed = false;
/**
* Cache array.
*
* @access protected
* @var array
*/
protected $_cache = [];
/**
* Cache status.
*
* @access protected
* @var array
*/
protected $_cache_dirty = false;
/**
* Construct instance.
*/
public function __construct() {
if ( self::enabled() ) {
$this->cache_prime();
if ( ! has_action( 'shutdown', [ $this, 'cache_save' ] ) ) {
add_action( 'shutdown', [ $this, 'cache_save' ] );
}
}
}
/**
* Purge the features cache.
*
* @since 4.10.0
*/
public static function purge_cache() {
delete_option( static::CACHE_META_KEY );
}
/**
* Get the features cache.
*
* @since 4.10.0
*
* @return mixed
*/
public static function load_cache() {
return get_option( static::CACHE_META_KEY );
}
/**
* Tell whether we should use cache or not.
*
* @since 4.10.0
*
* @return bool
*/
public static function enabled() {
/**
* Whether Global Feature Cache should be enabled or not.
*
* @since ?
*
* @param bool $enabled.
*/
return apply_filters( 'et_builder_global_feature_cache_enabled', et_builder_is_frontend() );
}
/**
* Prime the cache.
*
* @since 4.10.0
*/
public function cache_prime() {
if ( empty( $this->_primed ) ) {
$meta = self::load_cache();
if ( isset( $meta[1] ) ) {
list( $stored_index, $cache ) = $meta;
$current_index = (string) self::_get_cache_index();
$this->_cache = ( $current_index === $stored_index ) ? $cache : [];
}
$this->_primed = true;
}
}
/**
* Save the cache.
*
* @since 4.10.0
*/
public function cache_save() {
// Only if cache is "dirty" and builder is used.
if ( $this->_cache_dirty ) {
$cache = array( self::_get_cache_index(), $this->_cache );
update_option( static::CACHE_META_KEY, $cache );
}
}
/**
* Get Cache Version Index Items.
*
* @since 4.10.0
* @access protected
* @return array Cache version items.
*/
protected static function _get_cache_index_items() {
global $wp_version;
/**
* Filters global feature cache index items.
*
* @since 4.10.0
*
* @param array Assoc array of cache index items.
* @param string The cache meta key that the cache index items belong to.
*/
return apply_filters(
'et_global_feature_cache_index_items',
array(
'gph' => ET_Builder_Global_Presets_History::instance()->get_global_history_index(),
'divi' => et_get_theme_version(),
'wp' => $wp_version,
),
static::CACHE_META_KEY
);
}
/**
* Get Cache Version Index.
*
* @since 4.10.0
* @access protected
* @return string .Cache version index.
*/
public static function _get_cache_index() {
return wp_json_encode( self::_get_cache_index_items() );
}
/**
* Get cache
*
* @since 4.10.0
* @param string $key Cache key.
* @param string $group Cache Group.
*/
public function cache_get( $key, $group = 'default' ) {
$exists = isset( $this->_cache[ $group ] ) && isset( $this->_cache[ $group ][ $key ] );
return $exists ? $this->_cache[ $group ][ $key ] : null;
}
/**
* Set cache
*
* @since 4.10.0
* @param string $key Cache key.
* @param mixed $value To be cached.
* @param string $group Cache group.
*/
public function cache_set( $key, $value, $group = 'default' ) {
$this->_cache[ $group ][ $key ] = $value;
$this->_cache_dirty = true;
}
/**
* Check for cached value.
*
* First check cache if present, if not, determine
* from calling the callback.
*
* @param string $key Name of item.
* @param function $cb Callback function to perform logic.
* @param string $group Cache group.
*
* @return bool/mixed Result.
*/
public function get( $key, $cb, $group = 'default' ) {
// short circuit.
$result = $this->cache_get( $key, $group );
if ( is_null( $result ) ) {
// Set cache for next time.
$result = $cb();
$this->cache_set( $key, $result, $group );
}
return $result;
}
}

View File

@@ -0,0 +1,260 @@
<?php
/**
* Google_Fonts feature class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Handles Google_Fonts feature.
*
* @since 4.10.0
*/
class ET_Builder_Google_Fonts_Feature extends ET_Builder_Global_Feature_Base {
/**
* `ET_Builder_Google_Fonts_Feature` instance.
*
* @var ET_Builder_Google_Fonts_Feature
*/
private static $_instance;
const CACHE_META_KEY = '_et_builder_gf_feature_cache';
/**
* Returns instance of the class.
*
* @since 4.10.0
*/
public function __construct() {
// need to set this filter up front, bc as soon as the parent __construct
// is called then it will prime the cache so it needs
// this cache index filter to be setup right away.
add_filter( 'et_global_feature_cache_index_items', [ 'ET_Builder_Google_Fonts_Feature', 'cache_index_items' ], 10, 2 );
parent::__construct();
if ( self::enabled() ) {
self::setup_transient();
}
}
/**
* Initialize ET_Builder_Google_Fonts_Feature class.
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Setup transient to purge cache once a day.
*
* @since 4.10.0
*/
public static function setup_transient() {
if ( ! get_transient( self::CACHE_META_KEY ) ) {
self::purge_cache();
set_transient( self::CACHE_META_KEY, '1', DAY_IN_SECONDS );
}
}
/**
* Add to cache index items.
*
* @since 4.10.0
*
* @param array $items Assoc array of cache index items.
* @param string $key The cache meta key that the cache index items belong to.
*
* @return array $items Assoc array of cache index items.
*/
public static function cache_index_items( $items, $key ) {
global $shortname;
if ( self::CACHE_META_KEY === $key ) {
$items['enable_all_character_sets'] = (string) et_get_option( "{$shortname}_gf_enable_all_character_sets", 'false' );
}
return $items;
}
/**
* Determines if an option is enabled.
*
* @since 4.10.0
*
* @param string $sub_option Google Fonts Sub Option.
*
* @return bool Whether the sub option is enabled.
*/
public function is_option_enabled( $sub_option = '' ) {
global $shortname;
if ( ! self::enabled() ) {
return false;
}
if ( et_is_builder_plugin_active() ) {
$options = get_option( 'et_pb_builder_options', array() );
$option_state = isset( $options[ 'performance_main_' . $sub_option ] ) ? $options[ 'performance_main_' . $sub_option ] : 'on';
} else {
$option_state = et_get_option( $shortname . '_' . $sub_option, 'on' );
}
/**
* Filters the option state before it's returned.
* Allows other plugins to enable or disable a Google Font feature from code.
*
* @since 4.19.1
*
* @param bool $is_enabled Whether the sub option is enabled.
* @param string $sub_option Google Fonts sub option.
*/
return apply_filters( 'et_builder_google_fonts_is_enabled', 'on' === $option_state, $sub_option );
}
/**
* Builds the full URL to the Google Font css file to load the fonts
* provided by the parameter.
*
* @since 4.19.1
*
* @param array $google_fonts_url_args An array containing query-parameters.
*
* @return string The full URL to the Google Fonts resource.
*/
public function get_google_fonts_url( $google_fonts_url_args ) {
$url = add_query_arg( $google_fonts_url_args, 'https://fonts.googleapis.com/css' );
$url = esc_url_raw( $url );
/**
* Filters the URL of the requested Google Font CSS file.
* Allows swapping Google Fonts with other font sources.
*
* @since 4.19.1
*
* @param string $url The URL to the Google Fonts CSS file to fetch.
*/
return apply_filters( 'et_builder_google_fonts_get_url', $url );
}
/**
* Get User Agents.
*
* @since 4.10.0
*
* @return array[string] List of user agents.
*/
protected function _get_user_agents() {
$limit_support = $this->is_option_enabled( 'limit_google_fonts_support_for_legacy_browsers' );
$uas = [];
if ( ! $limit_support ) {
/**
* IE9 Compat Modes
*/
$uas['eot'] = 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)';
/**
* Legacy iOS
*/
$uas['svg'] = 'Mozilla/4.0 (iPad; CPU OS 4_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/4.1 Mobile/9A405 Safari/7534.48.3';
}
/**
* Safari, Android, iOS
*/
$uas['ttf'] = 'Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Safari/538.1 Daum/4.1';
/**
* Modern Browsers.
* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+
*/
$uas['woff'] = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0';
/**
* Super Modern Browsers.
* hrome 26+, Opera 23+, Firefox 39+
*/
$uas['woff2'] = 'Mozilla/5.0 (Windows NT 6.3; rv:39.0) Gecko/20100101 Firefox/39.0';
/**
* Filters which user agents to use to get google fonts.
*
* @since 4.10.0
*/
return apply_filters( 'et_builder_google_fonts_user_agents', $uas );
}
/**
* Fetch CSS file contents from google fonts URL.
*
* @since 4.10.0
*
* @param string $url The Google Fonts URL to fetch the contents for.
*
* @return string $url CSS file contents.
*/
public function fetch( $url ) {
$all_contents = '/* Original: ' . esc_url( $url ) . ' */';
foreach ( $this->_get_user_agents() as $ua ) {
$response = wp_remote_get(
esc_url_raw( $url ),
[
'user-agent' => $ua,
]
);
// Return if there is no response or if there is an error.
if ( ! is_array( $response ) || is_wp_error( $response ) ) {
return false;
}
$contents = wp_remote_retrieve_body( $response );
$contents = '/* User Agent: ' . $ua . ' */' . "\n" . $contents;
$all_contents .= "\n\n" . $contents;
}
/**
* Filter the unminified CSS file contents after loading it from Googles servers.
*
* @since 4.19.1
*
* @param string $all_contents The concatenated CSS files content that was fetched from Google.
* @param string $url The Google Fonts URL that was fetched.
*/
$all_contents = apply_filters( 'et_builder_google_fonts_fetch_content', $all_contents, $url );
$all_contents = self::minify( $all_contents );
return $all_contents;
}
/**
* Minify CSS string.
*
* @since 4.10.0
*
* @param string $data Multiline CSS data.
*
* @return string Minifed CSS data.
*/
public static function minify( $data ) {
$data = trim( $data );
$data = preg_replace( '/\n/smi', '', $data );
$data = preg_replace( '/\s\s/smi', '', $data );
return $data;
}
}

View File

@@ -0,0 +1,97 @@
<?php
/**
* Module Features feature class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Handles Builder Module Features.
*
* @since 4.10.0
*/
class ET_Builder_Module_Features extends ET_Builder_Post_Feature_Base {
const CACHE_META_KEY = '_et_builder_module_features_cache';
/**
* Cache group.
*
* @access protected
* @var array
*/
protected $_cache_group = [];
/**
* Construct instance.
*/
public function __construct() {
parent::__construct();
// Get shortcode tag / attributes.
add_filter( 'pre_do_shortcode_tag', [ $this, 'set_cache_group' ], 99, 3 );
add_filter( 'do_shortcode_tag', [ $this, 'restore_previous_cache_group' ] );
}
/**
* Creates a key from a shortcode tag and its attributes.
*
* @since 4.10.0
* @access public
* @param string $tag Shortcode tag.
* @param string $attrs Shortcode attributes.
*
* @return string
*/
public static function get_key( $tag, $attrs ) {
$key = $tag . '_' . md5( wp_json_encode( $attrs ) );
return $key;
}
/**
* Set cache group.
*
* @since 4.10.0
* @access public
* @param mixed $override Whether to override do_shortcode return value or not.
* @param string $tag Shortcode tag.
* @param string $attrs Shortcode attributes.
* @return mixed
*/
public function set_cache_group( $override, $tag, $attrs ) {
$this->_cache_group[] = self::get_key( $tag, $attrs );
return $override;
}
/**
* Restore previous cache group when current shortcode execution ends.
*
* @since 4.10.0
* @access public
* @param mixed $output Shortcode content.
* @return mixed
*/
public function restore_previous_cache_group( $output ) {
// Get rid of current shortcode cache group.
array_pop( $this->_cache_group );
return $output;
}
/**
* Check for cached value.
*
* First check cache if present, if not, determine
* from calling the callback.
*
* @param string $key Name of item.
* @param function $cb Callback function to perform logic.
* @param string $group Cache group.
*
* @return bool/mixed Result.
*/
public function get( $key, $cb, $group = 'default' ) {
return parent::get( $key, $cb, end( $this->_cache_group ) );
}
}

View File

@@ -0,0 +1,740 @@
<?php
/**
* Shortcode Manager Class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Handles module shortcodes.
*
* @since 4.10.0
*/
class ET_Builder_Module_Shortcode_Manager {
/**
* Modules container.
*
* @access public
* @var array
*/
public static $modules_map = [];
/**
* WooCommerce modules container.
*
* @access public
* @var array
*/
public static $woo_modules_map = [];
/**
* Structural Modules container.
*
* @access public
* @var array
*/
public static $structural_modules_map = [];
/**
* Initialize shortcode manager class.
*
* @since 4.10.0
* @access public
* @return void
*/
public function init() {
$this->register_modules();
$this->register_fullwidth_modules();
$this->register_structural_modules();
$this->register_woo_modules();
$this->register_shortcode();
}
/**
* Get modules map.
*
* @since 4.14.5
*
* @param string $type Modules map type.
*
* @return array Modules map.
*/
public static function get_modules_map( $type = false ) {
if ( 'woo_modules' === $type ) {
return self::$woo_modules_map;
}
if ( 'structural_modules' === $type ) {
return self::$structural_modules_map;
}
return self::$modules_map;
}
/**
* Start registering shortcodes.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_shortcode() {
// is_saving_cache or other scenarios where we need to load everything.
if ( et_builder_should_load_all_module_data() ) {
$this->register_all_shortcodes();
} else {
$this->register_lazy_shortcodes();
}
}
/**
* Register normal modules.
*
* Modules dependent to each other will have
* to have a dependency parameter on them.
* Eg : et_pb_accordion_item needs et_pb_toggle so we
* have to pass add that on the `deps` key.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_modules() {
$modules = [
'et_pb_accordion' => [
'classname' => 'ET_Builder_Module_Accordion',
],
'et_pb_accordion_item' => [
'classname' => 'ET_Builder_Module_Accordion_Item',
'deps' => array( 'et_pb_toggle' ),
],
'et_pb_audio' => [
'classname' => 'ET_Builder_Module_Audio',
],
'et_pb_counters' => [
'classname' => 'ET_Builder_Module_Bar_Counters',
],
'et_pb_counter' => [
'classname' => 'ET_Builder_Module_Bar_Counters_Item',
],
'et_pb_blog' => [
'classname' => 'ET_Builder_Module_Blog',
],
'et_pb_blurb' => [
'classname' => 'ET_Builder_Module_Blurb',
],
'et_pb_button' => [
'classname' => 'ET_Builder_Module_Button',
],
'et_pb_circle_counter' => [
'classname' => 'ET_Builder_Module_Circle_Counter',
],
'et_pb_code' => [
'classname' => 'ET_Builder_Module_Code',
],
'et_pb_comments' => [
'classname' => 'ET_Builder_Module_Comments',
],
'et_pb_contact_form' => [
'classname' => 'ET_Builder_Module_Contact_Form',
],
'et_pb_contact_field' => [
'classname' => 'ET_Builder_Module_Contact_Form_Item',
],
'et_pb_countdown_timer' => [
'classname' => 'ET_Builder_Module_Countdown_Timer',
],
'et_pb_cta' => [
'classname' => 'ET_Builder_Module_Cta',
],
'et_pb_divider' => [
'classname' => 'ET_Builder_Module_Divider',
],
'et_pb_filterable_portfolio' => [
'classname' => 'ET_Builder_Module_Filterable_Portfolio',
],
'et_pb_gallery' => [
'classname' => 'ET_Builder_Module_Gallery',
],
'et_pb_image' => [
'classname' => 'ET_Builder_Module_Image',
],
'et_pb_login' => [
'classname' => 'ET_Builder_Module_Login',
],
'et_pb_map' => [
'classname' => 'ET_Builder_Module_Map',
],
'et_pb_map_pin' => [
'classname' => 'ET_Builder_Module_Map_Item',
],
'et_pb_menu' => [
'classname' => 'ET_Builder_Module_Menu',
],
'et_pb_number_counter' => [
'classname' => 'ET_Builder_Module_Number_Counter',
],
'et_pb_portfolio' => [
'classname' => 'ET_Builder_Module_Portfolio',
],
'et_pb_post_content' => [
'classname' => 'ET_Builder_Module_PostContent',
],
'et_pb_post_slider' => [
'classname' => 'ET_Builder_Module_Post_Slider',
],
'et_pb_post_title' => [
'classname' => 'ET_Builder_Module_Post_Title',
],
'et_pb_post_nav' => [
'classname' => 'ET_Builder_Module_Posts_Navigation',
],
'et_pb_pricing_tables' => [
'classname' => 'ET_Builder_Module_Pricing_Tables',
],
'et_pb_pricing_table' => [
'classname' => 'ET_Builder_Module_Pricing_Tables_Item',
],
'et_pb_search' => [
'classname' => 'ET_Builder_Module_Search',
],
'et_pb_sidebar' => [
'classname' => 'ET_Builder_Module_Sidebar',
],
'et_pb_signup' => [
'classname' => 'ET_Builder_Module_Signup',
],
'et_pb_signup_custom_field' => [
'classname' => 'ET_Builder_Module_Signup_Item',
'preload_deps' => array( 'et_pb_contact_field' ),
],
'et_pb_slider' => [
'classname' => 'ET_Builder_Module_Slider',
],
'et_pb_slide' => [
'classname' => 'ET_Builder_Module_Slider_Item',
],
'et_pb_social_media_follow' => [
'classname' => 'ET_Builder_Module_Social_Media_Follow',
],
'et_pb_social_media_follow_network' => [
'classname' => 'ET_Builder_Module_Social_Media_Follow_Item',
],
'et_pb_tabs' => [
'classname' => 'ET_Builder_Module_Tabs',
],
'et_pb_tab' => [
'classname' => 'ET_Builder_Module_Tabs_Item',
],
'et_pb_team_member' => [
'classname' => 'ET_Builder_Module_Team_Member',
],
'et_pb_testimonial' => [
'classname' => 'ET_Builder_Module_Testimonial',
],
'et_pb_text' => [
'classname' => 'ET_Builder_Module_Text',
],
'et_pb_toggle' => [
'classname' => 'ET_Builder_Module_Toggle',
],
'et_pb_video' => [
'classname' => 'ET_Builder_Module_Video',
],
'et_pb_video_slider' => [
'classname' => 'ET_Builder_Module_Video_Slider',
],
'et_pb_video_slider_item' => [
'classname' => 'ET_Builder_Module_Video_Slider_Item',
],
'et_pb_icon' => [
'classname' => 'ET_Builder_Module_Icon',
],
'et_pb_heading' => [
'classname' => 'ET_Builder_Module_Heading',
],
];
/**
* Filters built-in Divi Builder module class names.
*
* 3rd-party plugins can use this filter to override Divi Builder modules.
*
* NOTE: Overriding built-in modules is not ideal and should only be used as a temporary solution.
* The recommended approach for achieving this is using the official API:
* https://www.elegantthemes.com/documentation/developers/divi-module/how-to-create-a-divi-builder-module/
*
* @since 4.11.0
*
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_module_classes', [] );
self::$modules_map = array_merge( self::$modules_map, $modules, $additional_modules );
}
/**
* Register fullwidth modules.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_fullwidth_modules() {
$modules = [
'et_pb_fullwidth_code' => [
'classname' => 'ET_Builder_Module_Fullwidth_Code',
],
'et_pb_fullwidth_header' => [
'classname' => 'ET_Builder_Module_Fullwidth_Header',
],
'et_pb_fullwidth_image' => [
'classname' => 'ET_Builder_Module_Fullwidth_Image',
],
'et_pb_fullwidth_map' => [
'classname' => 'ET_Builder_Module_Fullwidth_Map',
],
'et_pb_fullwidth_menu' => [
'classname' => 'ET_Builder_Module_Fullwidth_Menu',
],
'et_pb_fullwidth_portfolio' => [
'classname' => 'ET_Builder_Module_Fullwidth_Portfolio',
],
'et_pb_fullwidth_post_content' => [
'classname' => 'ET_Builder_Module_Fullwidth_PostContent',
],
'et_pb_fullwidth_post_slider' => [
'classname' => 'ET_Builder_Module_Fullwidth_Post_Slider',
],
'et_pb_fullwidth_post_title' => [
'classname' => 'ET_Builder_Module_Fullwidth_Post_Title',
],
'et_pb_fullwidth_slider' => [
'classname' => 'ET_Builder_Module_Fullwidth_Slider',
],
];
/**
* Filters built-in Divi Builder module class names.
*
* 3rd-party plugins can use this filter to override Divi Builder modules.
*
* NOTE: Overriding built-in modules is not ideal and should only be used as a temporary solution.
* The recommended approach for achieving this is using the official API:
* https://www.elegantthemes.com/documentation/developers/divi-module/how-to-create-a-divi-builder-module/
*
* @since 4.11.0
*
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_fullwidth_module_classes', [] );
self::$modules_map = array_merge( self::$modules_map, $modules, $additional_modules );
}
/**
* Register structural modules.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_structural_modules() {
$modules = [
'et_pb_section' => [
'classname' => 'ET_Builder_Section',
],
'et_pb_row' => [
'classname' => 'ET_Builder_Row',
],
'et_pb_row_inner' => [
'classname' => 'ET_Builder_Row_Inner',
],
'et_pb_column' => [
'classname' => 'ET_Builder_Column',
],
];
/**
* Filters built-in Divi Builder module class names.
*
* 3rd-party plugins can use this filter to override Divi Builder modules.
*
* NOTE: Overriding built-in modules is not ideal and should only be used as a temporary solution.
* The recommended approach for achieving this is using the official API:
* https://www.elegantthemes.com/documentation/developers/divi-module/how-to-create-a-divi-builder-module/
*
* @since 4.11.0
*
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_structural_module_classes', [] );
self::$structural_modules_map = array_merge( $modules, $additional_modules );
}
/**
* Register woocommerce modules.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_woo_modules() {
// Only add wooModules if woo is active.
if ( ! et_is_woocommerce_plugin_active() ) {
return;
}
$woo_modules = [
'et_pb_wc_add_to_cart' => [
'classname' => 'ET_Builder_Module_Woocommerce_Add_To_Cart',
],
'et_pb_wc_additional_info' => [
'classname' => 'ET_Builder_Module_Woocommerce_Additional_Info',
],
'et_pb_wc_breadcrumb' => [
'classname' => 'ET_Builder_Module_Woocommerce_Breadcrumb',
],
'et_pb_wc_cart_notice' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cart_Notice',
],
'et_pb_wc_description' => [
'classname' => 'ET_Builder_Module_Woocommerce_Description',
],
'et_pb_wc_gallery' => [
'classname' => 'ET_Builder_Module_Woocommerce_Gallery',
],
'et_pb_wc_images' => [
'classname' => 'ET_Builder_Module_Woocommerce_Images',
],
'et_pb_wc_meta' => [
'classname' => 'ET_Builder_Module_Woocommerce_Meta',
],
'et_pb_wc_price' => [
'classname' => 'ET_Builder_Module_Woocommerce_Price',
],
'et_pb_wc_rating' => [
'classname' => 'ET_Builder_Module_Woocommerce_Rating',
],
'et_pb_wc_related_products' => [
'classname' => 'ET_Builder_Module_Woocommerce_Related_Products',
],
'et_pb_wc_reviews' => [
'classname' => 'ET_Builder_Module_Woocommerce_Reviews',
],
'et_pb_wc_stock' => [
'classname' => 'ET_Builder_Module_Woocommerce_Stock',
],
'et_pb_wc_tabs' => [
'classname' => 'ET_Builder_Module_Woocommerce_Tabs',
],
'et_pb_wc_title' => [
'classname' => 'ET_Builder_Module_Woocommerce_Title',
],
'et_pb_wc_upsells' => [
'classname' => 'ET_Builder_Module_Woocommerce_Upsells',
],
'et_pb_wc_cart_products' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cart_Products',
],
'et_pb_wc_cross_sells' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cross_Sells',
],
'et_pb_wc_cart_totals' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cart_Totals',
],
'et_pb_wc_checkout_billing' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Billing',
],
'et_pb_wc_checkout_shipping' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Shipping',
],
'et_pb_wc_checkout_order_details' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Order_Details',
],
'et_pb_wc_checkout_payment_info' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Payment_Info',
],
'et_pb_wc_checkout_additional_info' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Additional_Info',
],
'et_pb_shop' => [
'classname' => 'ET_Builder_Module_Shop',
],
];
/**
* Filters built-in Divi Builder module class names.
*
* 3rd-party plugins can use this filter to override Divi Builder modules.
*
* NOTE: Overriding built-in modules is not ideal and should only be used as a temporary solution.
* The recommended approach for achieving this is using the official API:
* https://www.elegantthemes.com/documentation/developers/divi-module/how-to-create-a-divi-builder-module/
*
* @since 4.11.0
*
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_woo_module_classes', [] );
self::$woo_modules_map = $woo_modules;
self::$modules_map = array_merge( self::$modules_map, $woo_modules, $additional_modules );
}
/**
* Register shortcode.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_all_shortcodes() {
$et_builder_module_files = glob( ET_BUILDER_DIR . 'module/*.php' );
$et_builder_module_types = glob( ET_BUILDER_DIR . 'module/type/*.php' );
if ( ! $et_builder_module_files ) {
return;
}
/**
* Fires before the builder's module classes are loaded.
*
* @since 3.0.77
*/
do_action( 'et_builder_modules_load' );
foreach ( $et_builder_module_types as $module_type ) {
require_once $module_type;
}
foreach ( $et_builder_module_files as $module_file ) {
// skip this all caps version, if it exists.
// See https://github.com/elegantthemes/Divi/issues/24780.
if ( 'CTA.php' === basename( $module_file ) ) {
continue;
}
require_once $module_file;
}
if ( et_is_woocommerce_plugin_active() ) {
$et_builder_woocommerce_module_files = glob( ET_BUILDER_DIR . 'module/woocommerce/*.php' );
foreach ( $et_builder_woocommerce_module_files as $module_type ) {
require_once $module_type;
}
}
/**
* Fires after the builder's module classes are loaded.
*
* NOTE: this hook only fires on :
* - Visual Builder pages
* - Front end cache prime initial request
*
* IT DOES NOT fire on ALL front end requests
*
* @since 3.0.77
* @deprecated ?? Introduced shortcode manager.
* Use {@see et_builder_module_loading}/{@see et_builder_module_loaded}/{@see et_builder_ready} instead.
*/
do_action( 'et_builder_modules_loaded' );
}
/**
* Lazy load shortcodes.
*
* @since 4.10.0
* @access public
* @return void
*/
public function register_lazy_shortcodes() {
// A fake handler has to be registered for every shortcode, otherways
// code will exit early and the pre_do_shortcode_tag hook won't be executed.
foreach ( self::$modules_map as $shortcode_slug => $module_data ) {
add_shortcode( $shortcode_slug, '__return_empty_string' );
}
// Load modules as needed.
add_filter( 'pre_do_shortcode_tag', [ $this, 'load_modules' ], 99, 2 );
// Ensure all our module slugs are always considered, even when not loaded (yet).
add_filter( 'et_builder_get_module_slugs_by_post_type', [ $this, 'add_module_slugs' ] );
add_filter( 'et_builder_get_woocommerce_modules', [ $this, 'add_woo_slugs' ] );
// Ensure all our structural module slugs are always considered, even when not loaded (yet).
add_filter( 'et_builder_get_structural_module_slugs', [ $this, 'add_structural_module_slugs' ] );
/**
* Fires after the builder's module classes are loaded.
*
* This hook is fired here for legacy reasons only.
* Do not depend on this hook in the future.
*
* @since 3.0.77
* @deprecated ?? Introduced shortcode manager.
* Use {@see et_builder_module_loading}/{@see et_builder_module_loaded}/{@see et_builder_ready} instead.
*/
do_action( 'et_builder_modules_loaded' );
/**
* Fires after the builder's module shortcodes are lazy registered.
*
* @since 4.10.0
*/
do_action( 'et_builder_module_lazy_shortcodes_registered' );
}
/**
* Add slugs for all our woo modules.
*
* @since 4.10.0
* @access public
* @param array $loaded Loaded woo modules slugs.
* @return array
*/
public function add_woo_slugs( $loaded ) {
static $module_slugs;
// Only compute this once.
if ( empty( $module_slugs ) ) {
$module_slugs = array_keys( self::$woo_modules_map );
}
return array_unique( array_merge( $loaded, $module_slugs ) );
}
/**
* Add slugs for all our modules.
*
* @since 4.10.0
* @access public
* @param array $loaded Loaded modules slugs.
* @return array
*/
public function add_module_slugs( $loaded ) {
static $module_slugs;
// Only compute this once.
if ( empty( $module_slugs ) ) {
$module_slugs = array_keys( self::$modules_map );
}
return array_unique( array_merge( $loaded, $module_slugs ) );
}
/**
* Add slugs for all our structural modules.
*
* @since 4.10.0
* @access public
* @param array $loaded Loaded modules slugs.
* @return array
*/
public function add_structural_module_slugs( $loaded ) {
static $structural_module_slugs;
// Only compute this once.
if ( empty( $structural_module_slugs ) ) {
$structural_module_slugs = array_keys( self::$structural_modules_map );
}
return array_unique( array_merge( $loaded, $structural_module_slugs ) );
}
/**
* Load modules.
*
* @since 4.10.0
* @access public
* @param mixed $override Whether to override do_shortcode return value or not.
* @param string $tag Shortcode tag.
* @return mixed
*/
public function load_modules( $override, $tag ) {
$this->maybe_load_module_from_slug( $tag );
return $override;
}
/**
* Instantiate module from a shortcode slug.
*
* @since 4.10.0
* @access public
* @param string $tag Shortcode tag.
* @return void
*/
public function maybe_load_module_from_slug( $tag ) {
if ( empty( self::$modules_map[ $tag ] ) ) {
// None of our business.
return;
}
$module =& self::$modules_map[ $tag ];
if ( empty( $module['instance'] ) ) {
/**
* Fires before module class is instantiated.
*
* @param string $tag Shortcode tag for module.
* @param array $module Module loading configuration details.
*
* @since 4.10.0
*/
do_action( 'et_builder_module_loading', $tag, $module );
/**
* Fires before module class is instantiated.
*
* The dynamic portion of the hook, `$tag`, refers to the shortcode tag.
*
* @param array $module Module loading configuration details.
*
* @since 4.10.0
*/
do_action( "et_builder_module_loading_{$tag}", $module );
// Load dependency before the class if needed.
if ( ! empty( $module['preload_deps'] ) ) {
foreach ( $module['preload_deps'] as $slug ) {
$this->maybe_load_module_from_slug( $slug );
}
}
$module['instance'] = new $module['classname']();
if ( ! empty( $module['deps'] ) ) {
foreach ( $module['deps'] as $slug ) {
$this->maybe_load_module_from_slug( $slug );
}
}
/**
* Fires after module class is instantiated.
*
* @param string $tag Shortcode tag for module.
* @param array $module Module loading configuration details.
*
* @since 4.10.0
*/
do_action( 'et_builder_module_loaded', $tag, $module );
/**
* Fires after module class is instantiated.
*
* The dynamic portion of the hook, `$tag`, refers to the shortcode tag.
*
* @param array $module Module loading configuration details.
*
* @since 4.10.0
*/
do_action( "et_builder_module_loaded_{$tag}", $module );
}
}
}

View File

@@ -0,0 +1,207 @@
<?php
/**
* Module Use Detection class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Handles Module Use Detection.
*
* @since 4.10.0
*/
class ET_Builder_Module_Use_Detection {
/**
* Module Slugs Used.
*
* @access protected
* @var array
*/
protected $_modules_used = [];
/**
* Module Attrs Used.
*
* @access protected
* @var array
*/
protected $_module_attrs_used = [];
/**
* Module Attr Values Used.
*
* @access protected
* @var array
*/
protected $_module_attr_values_used = [];
/**
* Valid Shortcode Slugs.
*
* @access protected
* @var array
*/
protected $_valid_slugs = [];
/**
* `ET_Builder_Module_Use_Detection` instance.
*
* @var ET_Builder_Module_Use_Detection
*/
private static $_instance;
/**
* Construct instance.
*/
public function __construct() {
add_filter( 'pre_do_shortcode_tag', [ $this, 'log_slug_used' ], 99, 3 );
add_action( 'wp_footer', [ $this, 'footer' ], 1000 );
add_action( 'et_builder_ready', array( $this, '_setup_valid_slugs' ), 100 );
}
/**
* Get instance.
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new static();
}
return self::$_instance;
}
/**
* Get valid slugs.
*/
public function _setup_valid_slugs() {
$this->_valid_slugs = ET_Builder_Element::get_all_module_slugs();
}
/**
* Log the Shortcode Tag/Slug.
*
* @since 4.10.0
* @access public
* @param mixed $override Whether to override do_shortcode return value or not.
* @param string $tag Shortcode tag.
* @param array $attrs Shortcode attrs.
* @return mixed
*/
public function log_slug_used( $override, $tag, $attrs ) {
$interested_attrs_and_values = apply_filters(
'et_builder_module_attrs_values_used',
[
'gutter_width',
'animation_style',
'sticky_position',
'specialty',
'use_custom_gutter',
'font_icon',
'button_icon',
'hover_icon',
'scroll_down_icon',
'social_network',
'show_in_lightbox',
'fullwidth',
'scroll_vertical_motion_enable',
'scroll_horizontal_motion_enable',
'scroll_fade_enable',
'scroll_scaling_enable',
'scroll_rotating_enable',
'scroll_blur_enable',
'show_content',
]
);
/**
* The "gallery" shortcode is not part of the Divi modules but is used for enqueuing MagnificPopup
* when Divi Gallery is enabled under Theme Options > Enable Divi Gallery, so we need to include
* it in late detection for edge cases such as shortcodes hardcoded into child themes.
*/
$additional_valid_slugs = apply_filters(
'et_builder_valid_module_slugs',
[
'gallery',
]
);
$valid_slugs = array_unique( array_merge( $this->_valid_slugs, $additional_valid_slugs ) );
// Log the shortcode tags used.
if ( in_array( $tag, $valid_slugs, true ) ) {
$this->_modules_used[] = $tag;
$this->_modules_used = array_unique( $this->_modules_used );
if ( ! is_null( $attrs ) && ! is_array( $attrs ) ) {
$attrs = (array) $attrs;
}
$found_interested_attr_and_values = array_intersect( array_keys( $attrs ), $interested_attrs_and_values );
foreach ( $found_interested_attr_and_values as $key => $attr_name ) {
if ( empty( $this->_module_attr_values_used[ $attr_name ] ) ) {
$this->_module_attr_values_used[ $attr_name ] = [];
}
$this->_module_attr_values_used[ $attr_name ][] = $attrs[ $attr_name ];
$this->_module_attr_values_used[ $attr_name ] = array_unique( $this->_module_attr_values_used[ $attr_name ] );
}
}
return $override;
}
/**
* Add footer actions.
*/
public function footer() {
/**
* Fires after wp_footer hook and contains unique array of
* slugs of the modules that were used on the page load.
*
* @param array $_used_modules Module slugs used on the page load.
*
* @since 4.10.0
*/
do_action( 'et_builder_modules_used', $this->_modules_used );
}
/**
* Get modules used.
*
* @return array List of module slugs used.
* @since 4.10.0
* @access public
*/
public function get_modules_used() {
return $this->_modules_used;
}
/**
* Get module attrs used.
*
* @return array List of interested module attrs used.
* @since 4.10.0
* @access public
*/
public function get_module_attrs_used() {
return $this->_module_attrs_used;
}
/**
* Get module attr values used.
*
* @return array List of interested module attrs and values used.
* @since 4.10.0
* @access public
*/
public function get_module_attr_values_used() {
return $this->_module_attr_values_used;
}
}
ET_Builder_Module_Use_Detection::instance();

View File

@@ -0,0 +1,46 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Base class for plugin compatibility file
*
* @since 0.7 (builder version)
*/
class ET_Builder_Plugin_Compat_Base {
public $plugin_id;
/**
* Get plugin dir path based on plugin_id
*
* @return sting
*/
function get_plugin_dir_path() {
return WP_PLUGIN_DIR . '/' . $this->plugin_id;
}
/**
* Get plugin data based on initialized plugin_id
*
* @return array
*/
function get_plugin_data() {
return get_plugin_data( $this->get_plugin_dir_path(), false );
}
/**
* Get plugin version based on initialized plugin_id
*
* @return string
*/
function get_plugin_version() {
$plugin_data = $this->get_plugin_data();
if ( ! isset( $plugin_data['Version'] ) ) {
return false;
}
return $plugin_data['Version'];
}
}

View File

@@ -0,0 +1,74 @@
<?php
/**
* Load plugin compatibility file if supported plugins are activated.
*
* @since 0.7 (builder version)
*
* @package Divi
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Class ET_Builder_Plugin_Compat_Loader.
*/
class ET_Builder_Plugin_Compat_Loader {
/**
* Unique instance of class.
*
* @var ET_Builder_Plugin_Compat_Loader
*/
public static $instance;
/**
* Constructor.
*/
private function __construct() {
$this->init_hooks();
}
/**
* Gets the instance of the class.
*/
public static function init() {
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Hook methods to WordPress action and filter.
*
* @return void
*/
private function init_hooks() {
// Load plugin.php for frontend usage.
if ( ! function_exists( 'is_plugin_active' ) || ! function_exists( 'get_plugins' ) ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
// Loop plugin list and load active plugin compatibility file.
foreach ( array_keys( get_plugins() ) as $plugin ) {
// Load plugin compat file if plugin is active.
if ( is_plugin_active( $plugin ) ) {
$plugin_compat_name = dirname( $plugin );
$plugin_compat_url = apply_filters(
"et_builder_plugin_compat_path_{$plugin_compat_name}",
ET_BUILDER_DIR . "plugin-compat/{$plugin_compat_name}.php",
$plugin_compat_name
);
// Load plugin compat file (if compat file found).
if ( file_exists( $plugin_compat_url ) ) {
require_once $plugin_compat_url;
}
}
}
}
}
ET_Builder_Plugin_Compat_Loader::init();

View File

@@ -0,0 +1,332 @@
<?php
/**
* Feature base class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
/**
* Post Based Feature Base.
*
* @since 4.10.0
*/
class ET_Builder_Post_Feature_Base {
// Only save cache if time (milliseconds) to generate it is above this threshold.
const CACHE_SAVE_THRESHOLD = 15;
const CACHE_META_KEY = '_et_builder_module_feature_cache';
/**
* Post ID.
*
* @access protected
* @var int
*/
protected $_post_id = 0;
/**
* Primed status.
*
* @access protected
* @var bool
*/
protected $_primed = false;
/**
* Cache array.
*
* @access protected
* @var array
*/
protected $_cache = [];
/**
* Total time needed to populate the cache.
*
* @access protected
* @var float
*/
protected $_cache_set_time = 0;
/**
* Whether the feature manager is enabled.
*
* @access protected
* @var null|bool
*/
protected static $_enabled = null;
/**
* Whether this page load is loading the cache or using existing cache.
*
* @access protected
* @var bool
*/
protected $_cache_loading = false;
/**
* `ET_Builder_Post_Feature_Base` instance.
*
* @var ET_Builder_Post_Feature_Base
*/
private static $_instance;
/**
* Construct instance.
*/
public function __construct() {
if ( self::enabled() ) {
global $shortname;
$this->_post_id = ET_Builder_Element::get_current_post_id();
if ( 'extra' === $shortname ) {
if ( ( et_is_extra_layout_used_as_home() || et_is_extra_layout_used_as_front() ) && ! is_null( et_get_extra_home_layout_id() ) ) {
$this->_post_id = et_get_extra_home_layout_id();
} elseif ( ( is_category() || is_tag() ) && ! is_null( et_get_extra_tax_layout_id() ) ) {
$this->_post_id = et_get_extra_tax_layout_id();
}
}
$this->cache_prime();
if ( ! has_action( 'shutdown', [ $this, 'cache_save' ] ) ) {
add_action( 'shutdown', [ $this, 'cache_save' ] );
}
}
}
/**
* Initialize ET_Builder_Post_Feature_Base class.
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new static();
}
return self::$_instance;
}
/**
* Purge the features cache for a given post.
*
* @since 4.10.0
*
* @param int $post_id The post ID to purge cache from.
*/
public static function purge_cache( $post_id = '' ) {
if ( $post_id ) {
delete_post_meta( $post_id, static::CACHE_META_KEY );
} else {
delete_post_meta_by_key( static::CACHE_META_KEY );
}
}
/**
* Get the features cache for a given post.
*
* @since 4.10.0
*
* @param int $post_id The post ID to get cache from.
* @return mixed
*/
public static function load_cache( $post_id ) {
return get_post_meta( $post_id, static::CACHE_META_KEY, true );
}
/**
* Tell whether we should use cache or not.
*
* @since 4.10.0
*
* @return bool
*/
public static function enabled() {
if ( null === self::$_enabled ) {
$et_dynamic_module_framework = et_builder_dynamic_module_framework();
$enabled = et_builder_is_frontend() && 'on' === $et_dynamic_module_framework;
/**
* Whether Post Feature Cache should be enabled or not.
*
* @since ?
*
* @param bool $enabled.
*/
self::$_enabled = apply_filters( 'et_builder_post_feature_cache_enabled', $enabled );
}
return self::$_enabled;
}
/**
* Prime the cache.
*
* @since 4.10.0
*/
public function cache_prime() {
if ( empty( $this->_primed ) ) {
$meta = self::load_cache( $this->_post_id );
$current_index = (string) self::_get_cache_index();
$stored_index = null;
if ( isset( $meta[1] ) ) {
list( $stored_index, $cache ) = $meta;
$this->_cache = ( $current_index === $stored_index ) ? $cache : [];
}
do_action( 'et_builder_post_feature_cache_primed', $this->_cache, $this->_post_id, $current_index, $stored_index );
// determine if were loading cache,
// or using previous cache values.
$this->_cache_loading = empty( $this->_cache );
$this->_primed = true;
}
}
/**
* Save the cache.
*
* @since 4.10.0
*/
public function cache_save() {
if ( ! self::enabled() ) {
return;
}
$cache_index = self::_get_cache_index();
$is_above_threshold = $this->_cache_set_time >= self::CACHE_SAVE_THRESHOLD;
do_action( 'et_builder_post_feature_cache_save', $this->_cache, $this->_post_id, $this->_cache_set_time, $is_above_threshold, $cache_index );
// Only save cache if time to generate it is above a certain threshold.
if ( $is_above_threshold ) {
$cache = array( $cache_index, $this->_cache );
update_post_meta( $this->_post_id, static::CACHE_META_KEY, $cache );
}
}
/**
* Get Cache Version Index Items.
*
* @since 4.10.0
* @access protected
* @return array Cache version items.
*/
protected static function _get_cache_index_items() {
global $wp_version;
$dynamic_assets = ET_Dynamic_Assets::init();
$tb_ids = $dynamic_assets->get_theme_builder_template_ids();
$tb_data = [];
foreach ( $tb_ids as $tb_id ) {
$tb_post = get_post( $tb_id );
$tb_data[ $tb_id ] = $tb_post->post_modified_gmt;
}
// Ignore WP Editor template if current page use TB.
$wpe_data = [];
if ( empty( $tb_data ) ) {
$wpe_ids = $dynamic_assets->get_wp_editor_template_ids();
foreach ( $wpe_ids as $wpe_id ) {
$wpe_post = get_post( $wpe_id );
$wpe_data[ $wpe_id ] = $wpe_post->post_modified_gmt;
}
}
return array(
'gph' => ET_Builder_Global_Presets_History::instance()->get_global_history_index(),
'divi' => et_get_theme_version(),
'wp' => $wp_version,
'tb' => $tb_data,
'wpe' => $wpe_data,
);
}
/**
* Get Cache Version Index.
*
* @since 4.10.0
* @access protected
* @return string .Cache version index.
*/
protected static function _get_cache_index() {
return wp_json_encode( self::_get_cache_index_items() );
}
/**
* Get cache
*
* @since 4.10.0
* @param string $key Cache key.
* @param string $group Cache group.
*/
public function cache_get( $key, $group = 'default' ) {
$exists = isset( $this->_cache[ $group ] ) && isset( $this->_cache[ $group ][ $key ] );
return $exists ? $this->_cache[ $group ][ $key ] : null;
}
/**
* Set cache
*
* @since 4.10.0
* @param string $key Cache key.
* @param mixed $value To be cached.
* @param string $group Cache group.
* @param float $elapsed How much time it took to generate the value.
*/
public function cache_set( $key, $value, $group = 'default', $elapsed = 0 ) {
// Only save truthy values into cache.
if ( $value ) {
$this->_cache[ $group ][ $key ] = $value;
}
$this->_cache_set_time += $elapsed * 1000;
}
/**
* Check for cached value.
*
* First check cache if present, if not, determine
* from calling the callback.
*
* @param string $key Name of item.
* @param function $cb Callback function to perform logic.
* @param string $group Cache group.
*
* @return bool/mixed Result.
*/
public function get( $key, $cb, $group = 'default' ) {
if ( ! self::enabled() ) {
return $cb();
}
$result = $this->cache_get( $key, $group );
if ( is_null( $result ) ) {
if ( $this->_cache_loading ) {
// Set cache for next time.
$before = microtime( true );
$result = $cb();
$elapsed = microtime( true ) - $before;
$this->cache_set( $key, $result, $group, $elapsed );
} else {
// No entry found in a previsouly loaded cache,
// means the answer was falsey last time $cb() was checked,
// as falsey values arent stored in cache.
$result = false;
}
}
return $result;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
<?php
/**
* Theme compat base class.
*
* @package Divi
* @subpackage Builder
* @since 4.10.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Base class for plugin compatibility file.
*
* @since 4.10.0
*/
class ET_Builder_Theme_Compat_Base {
/**
* Theme name.
*
* @access private
* @var array
*/
public $theme_id;
/**
* Get theme dir path based on theme_id.
*
* @return sting
*/
public function get_theme_dir_path() {
return get_stylesheet_directory();
}
/**
* Get theme data.
*
* @return object
*/
public function get_theme_data() {
return wp_get_theme();
}
}

View File

@@ -0,0 +1,68 @@
<?php
/**
* Load theme compatibility file for current theme.
*
* @since 4.10.0
* @package Divi
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Class ET_Builder_Plugin_Compat_Loader.
*/
class ET_Builder_Theme_Compat_Handler {
/**
* Unique instance of class.
*
* @var ET_Builder_Theme_Compat_Handler
*/
public static $instance;
/**
* Constructor.
*/
private function __construct() {
$this->_init_hooks();
}
/**
* Gets the instance of the class.
*/
public static function init() {
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Hook methods to WordPress action and filter.
*
* @return void
*/
private function _init_hooks() {
// Load plugin.php for frontend usage.
if ( ! function_exists( 'wp_get_theme' ) ) {
include_once ABSPATH . 'wp-admin/includes/theme.php';
}
$current_theme = wp_get_theme();
$current_theme_name = $current_theme->get( 'TextDomain' );
$theme_compat_url = apply_filters(
"et_builder_theme_compat_path_{$current_theme_name}",
ET_BUILDER_DIR . "theme-compat/{$current_theme_name}.php",
$current_theme_name
);
if ( file_exists( $theme_compat_url ) ) {
require_once $theme_compat_url;
}
}
}
ET_Builder_Theme_Compat_Handler::init();

View File

@@ -0,0 +1,135 @@
<?php
/**
* Represent a simple value or a dynamic one.
* Used for module attributes and content.
*
* @package Divi
* @subpackage Builder
* @since 3.17.2
*/
/**
* Class ET_Builder_Value.
*/
class ET_Builder_Value {
/**
* Flag whether the value is static or dynamic.
*
* @since 3.17.2
*
* @var bool
*/
protected $dynamic = false;
/**
* Value content. Represents the dynamic content type when dynamic.
*
* @since 3.17.2
*
* @var string
*/
protected $content = '';
/**
* Array of dynamic content settings.
*
* @since 3.17.2
*
* @var mixed[]
*/
protected $settings = array();
/**
* ET_Builder_Value constructor.
*
* @since 3.17.2
*
* @param boolean $dynamic Whether content is dynamic.
* @param string $content Value content.
* @param array $settings Dynamic content settings.
*/
public function __construct( $dynamic, $content, $settings = array() ) {
$this->dynamic = $dynamic;
$this->content = $content;
$this->settings = $settings;
}
/**
* Check if the value is dynamic or not.
*
* @since 3.17.2
*
* @return bool
*/
public function is_dynamic() {
return $this->dynamic;
}
/**
* Retrieve the value content.
*
* @since 4.4.4
*
* @return string
*/
public function get_content() {
return $this->content;
}
/**
* Get the resolved content.
*
* @since 3.17.2
*
* @param integer $post_id Post id.
*
* @return string
*/
public function resolve( $post_id ) {
if ( ! $this->dynamic ) {
return $this->content;
}
return et_builder_resolve_dynamic_content( $this->content, $this->settings, $post_id, 'display' );
}
/**
* Get the static content or a serialized representation of the dynamic one.
*
* @since 3.17.2
*
* @return string
*/
public function serialize() {
if ( ! $this->dynamic ) {
return $this->content;
}
return et_builder_serialize_dynamic_content( $this->dynamic, $this->content, $this->settings );
}
/**
* Get ettings value.
*
* @since 4.23.2
*
* @param string $setting_name Setting name.
*
* @return mixed
*/
public function get_settings( $setting_name ) {
return $this->settings[ $setting_name ];
}
/**
* Set settings value.
*
* @since 4.23.2
*
* @param string $setting_name Setting name.
* @param mixed $setting_value Setting value.
*/
public function set_settings( $setting_name, $setting_value ) {
$this->settings[ $setting_name ] = $setting_value;
}
}

View File

@@ -0,0 +1,766 @@
<?php
/**
* Global modules settings.
*
* @package Divi
* @subpackage Builder
*/
/**
* Global settings class.
*
* @todo Rename this class to `ET_Builder_Module_Settings` so that its name clearly indicates its purpose.
*/
class ET_Global_Settings {
/**
* List of default settings.
*
* @var array
*/
private static $_settings = array();
/**
* Whether reinit default setting values.
*
* @var bool
*/
private static $_reinit_values = false;
/**
* Initialize the global settings.
*/
public static function init() {
// The class can only be initialized once.
if ( ! empty( self::$_settings ) && ! self::$_reinit_values ) {
return;
}
// Reset _reinit_values property. It should only used once for every reinit() method call.
if ( self::$_reinit_values ) {
self::$_reinit_values = false;
}
self::set_values();
}
/**
* Allow global settings value to be reinitialized. Initially added a to make global
* settings modifieable during unit/integration testing which uses PHPUnit & wp-browser
*/
public static function reinit() {
self::$_reinit_values = true;
}
/**
* Set default global setting value
*/
private static function set_values() {
$hover = et_pb_hover_options();
$font_defaults_h1 = array(
'size' => '30px',
'letter_spacing' => '0px',
'line_height' => '1em',
);
$font_defaults_h2 = array(
'size' => '26px',
'letter_spacing' => '0px',
'line_height' => '1em',
);
$font_defaults = array(
'size' => '14',
'color' => '#666666',
'letter_spacing' => '0px',
'line_height' => '1.7em',
);
$background_gradient_defaults = array(
'stops' => '#2b87da 0%|#29c4a9 100%',
'type' => 'linear',
'direction' => '180deg',
'direction_radial' => 'center',
'repeat' => 'off',
'unit' => '%',
'overlays_image' => 'off',
'start' => '#2b87da',
'end' => '#29c4a9',
'start_position' => '0%',
'end_position' => '100%',
);
$background_image_defaults = array(
'size' => 'cover',
'position' => 'center',
'repeat' => 'no-repeat',
'blend' => 'normal',
);
$background_blend_mode_defaults = array(
'background_blend_mode' => $background_image_defaults['blend'],
);
$filter_defaults = array(
'filter_hue_rotate' => '0deg',
'filter_saturate' => '100%',
'filter_brightness' => '100%',
'filter_contrast' => '100%',
'filter_invert' => '0%',
'filter_sepia' => '0%',
'filter_opacity' => '100%',
'filter_blur' => '0px',
);
$defaults = array(
// Global: Buttons.
'all_buttons_font_size' => '20',
'all_buttons_border_width' => '2',
'all_buttons_border_radius' => '3',
'all_buttons_spacing' => '0',
'all_buttons_font_style' => '',
$hover->get_hover_field( 'all_buttons_border_radius' ) => '3',
$hover->get_hover_field( 'all_buttons_spacing' ) => '0',
// Global: Background Gradients.
'all_background_gradient_repeat' => $background_gradient_defaults['repeat'],
'all_background_gradient_type' => $background_gradient_defaults['type'],
'all_background_gradient_direction' => $background_gradient_defaults['direction'],
'all_background_gradient_direction_radial' => $background_gradient_defaults['direction_radial'],
'all_background_gradient_stops' => $background_gradient_defaults['stops'],
'all_background_gradient_unit' => $background_gradient_defaults['unit'],
'all_background_gradient_overlays_image' => $background_gradient_defaults['overlays_image'],
// Deprecated.
'all_background_gradient_start' => $background_gradient_defaults['start'],
// Deprecated.
'all_background_gradient_end' => $background_gradient_defaults['end'],
// Deprecated.
'all_background_gradient_start_position' => $background_gradient_defaults['start_position'],
// Deprecated.
'all_background_gradient_end_position' => $background_gradient_defaults['end_position'],
// Global: Filters.
'all_filter_hue_rotate' => $filter_defaults['filter_hue_rotate'],
'all_filter_saturate' => $filter_defaults['filter_saturate'],
'all_filter_brightness' => $filter_defaults['filter_brightness'],
'all_filter_contrast' => $filter_defaults['filter_contrast'],
'all_filter_invert' => $filter_defaults['filter_invert'],
'all_filter_sepia' => $filter_defaults['filter_sepia'],
'all_filter_opacity' => $filter_defaults['filter_opacity'],
'all_filter_blur' => $filter_defaults['filter_blur'],
// Global: Mix Blend Mode.
'all_mix_blend_mode' => 'normal',
// Module: Accordion.
'et_pb_accordion-toggle_font_size' => '16',
'et_pb_accordion-toggle_font_style' => '',
'et_pb_accordion-inactive_toggle_font_style' => '',
'et_pb_accordion-toggle_icon_size' => '16',
'et_pb_accordion-custom_padding' => '20',
'et_pb_accordion-toggle_line_height' => '1em',
'et_pb_accordion-toggle_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_accordion-body_font_size' => $font_defaults['size'],
'et_pb_accordion-body_line_height' => $font_defaults['line_height'],
'et_pb_accordion-body_letter_spacing' => $font_defaults['letter_spacing'],
// Module: Audio.
'et_pb_audio-title_font_size' => '26',
'et_pb_audio-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_audio-title_line_height' => $font_defaults['line_height'],
'et_pb_audio-title_font_style' => '',
'et_pb_audio-caption_font_size' => $font_defaults['size'],
'et_pb_audio-caption_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_audio-caption_line_height' => $font_defaults['line_height'],
'et_pb_audio-caption_font_style' => '',
'et_pb_audio-title_text_color' => '#666666',
'et_pb_audio-background_size' => $background_image_defaults['size'],
'et_pb_audio-background_position' => $background_image_defaults['position'],
'et_pb_audio-background_repeat' => $background_image_defaults['repeat'],
'et_pb_audio-background_blend' => $background_image_defaults['blend'],
// Module: Blog.
'et_pb_blog-header_font_size' => '18',
'et_pb_blog-header_font_style' => '',
'et_pb_blog-meta_font_size' => '14',
'et_pb_blog-meta_font_style' => '',
'et_pb_blog-meta_line_height' => $font_defaults['line_height'],
'et_pb_blog-meta_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_blog-header_color' => '#333333',
'et_pb_blog-header_line_height' => '1em',
'et_pb_blog-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_blog-body_font_size' => $font_defaults['size'],
'et_pb_blog-body_line_height' => $font_defaults['line_height'],
'et_pb_blog-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_blog-pagination_font_size' => $font_defaults['size'],
'et_pb_blog-pagination_line_height' => $font_defaults['line_height'],
'et_pb_blog-pagination_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_blog_masonry-header_font_size' => '26',
'et_pb_blog_masonry-header_font_style' => '',
'et_pb_blog_masonry-meta_font_size' => '14',
'et_pb_blog_masonry-meta_font_style' => '',
'et_pb_blog-read_more_font_size' => '14px',
'et_pb_blog-read_more_line_height' => $font_defaults['line_height'],
// Module: Blurb.
'et_pb_blurb-header_font_size' => '18',
'et_pb_blurb-header_color' => '#333333',
'et_pb_blurb-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_blurb-header_line_height' => '1em',
'et_pb_blurb-body_font_size' => $font_defaults['size'],
'et_pb_blurb-body_color' => '#666666',
'et_pb_blurb-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_blurb-body_line_height' => $font_defaults['line_height'],
'et_pb_blurb-text_orientation' => 'left',
'et_pb_blurb-background_size' => $background_image_defaults['size'],
'et_pb_blurb-background_position' => $background_image_defaults['position'],
'et_pb_blurb-background_repeat' => $background_image_defaults['repeat'],
'et_pb_blurb-background_blend' => $background_image_defaults['blend'],
// Module: Circle Counter.
'et_pb_circle_counter-title_font_size' => '16',
'et_pb_circle_counter-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_circle_counter-title_line_height' => '1em',
'et_pb_circle_counter-title_font_style' => '',
'et_pb_circle_counter-number_font_size' => '46',
'et_pb_circle_counter-number_font_style' => '',
'et_pb_circle_counter-title_color' => '#333333',
'et_pb_circle_counter-number_line_height' => '225px',
'et_pb_circle_counter-number_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_circle_counter-circle_color_alpha' => '0.1',
// Module: Comments.
'et_pb_comments-header_font_size' => $font_defaults_h1['size'],
'et_pb_comments-header_line_height' => $font_defaults_h1['line_height'],
// Module: Contact Form.
'et_pb_contact_form-title_font_size' => '26',
'et_pb_contact_form-title_font_style' => '',
'et_pb_contact_form-form_field_font_size' => '14',
'et_pb_contact_form-form_field_font_style' => '',
'et_pb_contact_form-captcha_font_size' => '14',
'et_pb_contact_form-captcha_font_style' => '',
'et_pb_contact_form-padding' => '16',
'et_pb_contact_form-title_color' => '#333333',
'et_pb_contact_form-title_line_height' => '1em',
'et_pb_contact_form-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_contact_form-form_field_color' => '#999999',
'et_pb_contact_form-form_field_line_height' => $font_defaults['line_height'],
'et_pb_contact_form-form_field_letter_spacing' => $font_defaults['letter_spacing'],
// Module: Countdown Timer.
'et_pb_countdown_timer-header_font_size' => '22',
'et_pb_countdown_timer-header_font_style' => '',
'et_pb_countdown_timer-header_color' => '#333333',
'et_pb_countdown_timer-header_line_height' => '1em',
'et_pb_countdown_timer-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_countdown_timer-numbers_font_size' => '54px',
'et_pb_countdown_timer-numbers_line_height' => '54px',
'et_pb_countdown_timer-numbers_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_countdown_timer-separator_font_size' => '54px',
'et_pb_countdown_timer-separator_line_height' => '54px',
'et_pb_countdown_timer-separator_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_countdown_timer-label_line_height' => '25px',
'et_pb_countdown_timer-label_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_countdown_timer-label_font_size' => $font_defaults['size'],
'et_pb_countdown_timer-background_size' => $background_image_defaults['size'],
'et_pb_countdown_timer-background_position' => $background_image_defaults['position'],
'et_pb_countdown_timer-background_repeat' => $background_image_defaults['repeat'],
'et_pb_countdown_timer-background_blend' => $background_image_defaults['blend'],
// Module: Bar Counters Item.
'et_pb_counter-background_size' => $background_image_defaults['size'],
'et_pb_counter-background_position' => $background_image_defaults['position'],
'et_pb_counter-background_repeat' => $background_image_defaults['repeat'],
'et_pb_counter-background_blend' => $background_image_defaults['blend'],
// Module: Bar Counters.
'et_pb_counters-title_font_size' => '12',
'et_pb_counters-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_counters-title_line_height' => $font_defaults['line_height'],
'et_pb_counters-title_font_style' => '',
'et_pb_counters-percent_font_size' => '12',
'et_pb_counters-percent_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_counters-percent_line_height' => $font_defaults['line_height'],
'et_pb_counters-percent_font_style' => '',
'et_pb_counters-border_radius' => '0',
'et_pb_counters-padding' => '0',
'et_pb_counters-title_color' => '#999999',
'et_pb_counters-percent_color' => '#ffffff',
'et_pb_counters-background_size' => $background_image_defaults['size'],
'et_pb_counters-background_position' => $background_image_defaults['position'],
'et_pb_counters-background_repeat' => $background_image_defaults['repeat'],
'et_pb_counters-background_blend' => $background_image_defaults['blend'],
// Module: CTA.
'et_pb_cta-header_font_size' => '26',
'et_pb_cta-header_font_style' => '',
'et_pb_cta-custom_padding' => '40',
'et_pb_cta-header_text_color' => '#333333',
'et_pb_cta-header_line_height' => '1em',
'et_pb_cta-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_cta-body_font_size' => $font_defaults['size'],
'et_pb_cta-body_line_height' => $font_defaults['line_height'],
'et_pb_cta-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_cta-text_orientation' => 'center',
'et_pb_cta-background_size' => $background_image_defaults['size'],
'et_pb_cta-background_position' => $background_image_defaults['position'],
'et_pb_cta-background_repeat' => $background_image_defaults['repeat'],
'et_pb_cta-background_blend' => $background_image_defaults['blend'],
// Module: Divider.
'et_pb_divider-divider_style' => 'solid',
'et_pb_divider-divider_weight' => '1',
'et_pb_divider-height' => '1',
'et_pb_divider-divider_position' => 'top',
// Module: Filterable Portfolio.
'et_pb_filterable_portfolio-hover_overlay_color' => 'rgba(255,255,255,0.9)',
'et_pb_filterable_portfolio-title_font_size' => '18',
'et_pb_filterable_portfolio-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_filterable_portfolio-title_line_height' => $font_defaults['line_height'],
'et_pb_filterable_portfolio-title_font_style' => '',
'et_pb_filterable_portfolio-title_color' => '#333333',
'et_pb_filterable_portfolio-caption_font_size' => '14',
'et_pb_filterable_portfolio-caption_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_filterable_portfolio-caption_line_height' => $font_defaults['line_height'],
'et_pb_filterable_portfolio-caption_font_style' => '',
'et_pb_filterable_portfolio-filter_font_size' => '14',
'et_pb_filterable_portfolio-filter_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_filterable_portfolio-filter_line_height' => $font_defaults['line_height'],
'et_pb_filterable_portfolio-filter_font_style' => '',
'et_pb_filterable_portfolio-pagination_font_size' => '14',
'et_pb_filterable_portfolio-pagination_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_filterable_portfolio-pagination_line_height' => $font_defaults['line_height'],
'et_pb_filterable_portfolio-pagination_font_style' => '',
'et_pb_filterable_portfolio-background_size' => $background_image_defaults['size'],
'et_pb_filterable_portfolio-background_position' => $background_image_defaults['position'],
'et_pb_filterable_portfolio-background_repeat' => $background_image_defaults['repeat'],
'et_pb_filterable_portfolio-background_blend' => $background_image_defaults['blend'],
'et_pb_filterable_portfolio-zoom_icon_color' => '',
// Module: Fullwidth Header.
'et_pb_fullwidth_header-scroll_down_icon_size' => '50px',
'et_pb_fullwidth_header-subhead_font_size' => '18px',
'et_pb_fullwidth_header-button_one_font_size' => '20px',
'et_pb_fullwidth_header-button_one_border_radius' => '3px',
'et_pb_fullwidth_header-button_two_font_size' => '20px',
'et_pb_fullwidth_header-button_two_border_radius' => '3px',
'et_pb_fullwidth_header-background_size' => $background_image_defaults['size'],
'et_pb_fullwidth_header-background_position' => $background_image_defaults['position'],
'et_pb_fullwidth_header-background_repeat' => $background_image_defaults['repeat'],
'et_pb_fullwidth_header-background_blend' => $background_image_defaults['blend'],
// Module: Fullwidth Menu.
'et_pb_fullwidth_menu-background_size' => $background_image_defaults['size'],
'et_pb_fullwidth_menu-background_position' => $background_image_defaults['position'],
'et_pb_fullwidth_menu-background_repeat' => $background_image_defaults['repeat'],
'et_pb_fullwidth_menu-background_blend' => $background_image_defaults['blend'],
// Module: Fullwidth Portfolio.
'et_pb_fullwidth_portfolio-background_size' => $background_image_defaults['size'],
'et_pb_fullwidth_portfolio-background_position' => $background_image_defaults['position'],
'et_pb_fullwidth_portfolio-background_repeat' => $background_image_defaults['repeat'],
'et_pb_fullwidth_portfolio-background_blend' => $background_image_defaults['blend'],
'et_pb_fullwidth_portfolio-zoom_icon_color' => '',
// Module: Fullwidth Post Title.
'et_pb_fullwidth_post_title-title_font_size' => '26px',
'et_pb_fullwidth_post_title-title_line_height' => '1em',
'et_pb_fullwidth_post_title-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_fullwidth_post_title-meta_font_size' => $font_defaults['size'],
'et_pb_fullwidth_post_title-meta_line_height' => '1em',
'et_pb_fullwidth_post_title-meta_letter_spacing' => $font_defaults['letter_spacing'],
// Module: Fullwidth Slider.
'et_pb_fullwidth_slider-header_font_size' => '46',
'et_pb_fullwidth_slider-header_font_style' => '',
'et_pb_fullwidth_slider-body_font_size' => '16',
'et_pb_fullwidth_slider-body_font_style' => '',
'et_pb_fullwidth_slider-body_line_height' => $font_defaults['line_height'],
'et_pb_fullwidth_slider-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_fullwidth_slider-padding' => '16',
'et_pb_fullwidth_slider-header_color' => '#ffffff',
'et_pb_fullwidth_slider-header_line_height' => '1em',
'et_pb_fullwidth_slider-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_fullwidth_slider-body_color' => '#ffffff',
'et_pb_fullwidth_slider-background_size' => $background_image_defaults['size'],
'et_pb_fullwidth_slider-background_position' => $background_image_defaults['position'],
'et_pb_fullwidth_slider-background_repeat' => $background_image_defaults['repeat'],
'et_pb_fullwidth_slider-background_blend' => $background_image_defaults['blend'],
// Module: Gallery.
'et_pb_gallery-hover_overlay_color' => 'rgba(255,255,255,0.9)',
'et_pb_gallery-title_font_size' => '16',
'et_pb_gallery-title_color' => '#333333',
'et_pb_gallery-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_gallery-title_line_height' => '1em',
'et_pb_gallery-title_font_style' => '',
'et_pb_gallery-caption_font_size' => '14',
'et_pb_gallery-caption_font_style' => '',
'et_pb_gallery-caption_color' => '#f3f3f3',
'et_pb_gallery-caption_line_height' => '18px',
'et_pb_gallery-caption_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_gallery-pagination_font_size' => '16px',
'et_pb_gallery-pagination_line_height' => '1em',
'et_pb_gallery-zoom_icon_color' => '',
// Module: Image.
'et_pb_image-animation' => 'left',
// Module: Login.
'et_pb_login-header_font_size' => '26',
'et_pb_login-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_login-header_line_height' => $font_defaults['line_height'],
'et_pb_login-body_font_size' => $font_defaults['size'],
'et_pb_login-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_login-body_line_height' => $font_defaults['line_height'],
'et_pb_login-header_font_style' => '',
'et_pb_login-custom_padding' => '40',
'et_pb_login-focus_border_color' => '#ffffff',
'et_pb_login-background_size' => $background_image_defaults['size'],
'et_pb_login-background_position' => $background_image_defaults['position'],
'et_pb_login-background_repeat' => $background_image_defaults['repeat'],
'et_pb_login-background_blend' => $background_image_defaults['blend'],
// Module: Menu.
'et_pb_menu-background_size' => $background_image_defaults['size'],
'et_pb_menu-background_position' => $background_image_defaults['position'],
'et_pb_menu-background_repeat' => $background_image_defaults['repeat'],
'et_pb_menu-background_blend' => $background_image_defaults['blend'],
// Module: Number Counter.
'et_pb_number_counter-title_font_size' => '16',
'et_pb_number_counter-title_line_height' => '1em',
'et_pb_number_counter-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_number_counter-title_font_style' => '',
'et_pb_number_counter-number_font_size' => '72',
'et_pb_number_counter-number_line_height' => '72px',
'et_pb_number_counter-number_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_number_counter-number_font_style' => '',
'et_pb_number_counter-title_color' => '#333333',
'et_pb_number_counter-background_size' => $background_image_defaults['size'],
'et_pb_number_counter-background_position' => $background_image_defaults['position'],
'et_pb_number_counter-background_repeat' => $background_image_defaults['repeat'],
'et_pb_number_counter-background_blend' => $background_image_defaults['blend'],
// Module: Portfolio.
'et_pb_portfolio-hover_overlay_color' => 'rgba(255,255,255,0.9)',
'et_pb_portfolio-title_font_size' => '18',
'et_pb_portfolio-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_portfolio-title_line_height' => $font_defaults['line_height'],
'et_pb_portfolio-title_font_style' => '',
'et_pb_portfolio-title_color' => '#333333',
'et_pb_portfolio-caption_font_size' => '14',
'et_pb_portfolio-caption_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_portfolio-caption_line_height' => $font_defaults['line_height'],
'et_pb_portfolio-caption_font_style' => '',
'et_pb_portfolio-pagination_font_size' => '14',
'et_pb_portfolio-pagination_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_portfolio-pagination_line_height' => $font_defaults['line_height'],
'et_pb_portfolio-pagination_font_style' => '',
'et_pb_portfolio-background_size' => $background_image_defaults['size'],
'et_pb_portfolio-background_position' => $background_image_defaults['position'],
'et_pb_portfolio-background_repeat' => $background_image_defaults['repeat'],
'et_pb_portfolio-background_blend' => $background_image_defaults['blend'],
'et_pb_portfolio-zoom_icon_color' => '',
// Module: Post Title.
'et_pb_post_title-title_font_size' => '26px',
'et_pb_post_title-title_line_height' => '1em',
'et_pb_post_title-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_post_title-meta_font_size' => $font_defaults['size'],
'et_pb_post_title-meta_line_height' => '1em',
'et_pb_post_title-meta_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_post_title-parallax' => 'off',
'et_pb_post_title-background_size' => $background_image_defaults['size'],
'et_pb_post_title-background_position' => $background_image_defaults['position'],
'et_pb_post_title-background_repeat' => $background_image_defaults['repeat'],
'et_pb_post_title-background_blend' => $background_image_defaults['blend'],
// Module: Post Slider.
'et_pb_post_slider-background_size' => $background_image_defaults['size'],
'et_pb_post_slider-background_position' => $background_image_defaults['position'],
'et_pb_post_slider-background_repeat' => $background_image_defaults['repeat'],
'et_pb_post_slider-background_blend' => $background_image_defaults['blend'],
// Module: Pricing Tables Item (Pricing Table).
'et_pb_pricing_table-header_font_size' => '22px',
'et_pb_pricing_table-header_color' => '#ffffff',
'et_pb_pricing_table-header_line_height' => '1em',
'et_pb_pricing_table-subheader_font_size' => '16px',
'et_pb_pricing_table-subheader_color' => '#ffffff',
'et_pb_pricing_table-price_font_size' => '80px',
'et_pb_pricing_table-price_color' => '#2EA3F2',
'et_pb_pricing_table-price_line_height' => '82px',
'et_pb_pricing_table-body_line_height' => '24px',
'et_pb_pricing_table-background_size' => $background_image_defaults['size'],
'et_pb_pricing_table-background_position' => $background_image_defaults['position'],
'et_pb_pricing_table-background_repeat' => $background_image_defaults['repeat'],
'et_pb_pricing_table-background_blend' => $background_image_defaults['blend'],
'et_pb_pricing_table-excluded_letter_spacing' => '0px',
'et_pb_pricing_table-excluded_line_height' => '1.7em',
// Module: Pricing Tables.
'et_pb_pricing_tables-header_font_size' => '22',
'et_pb_pricing_tables-header_font_style' => '',
'et_pb_pricing_tables-subheader_font_size' => '16',
'et_pb_pricing_tables-subheader_font_style' => '',
'et_pb_pricing_tables-price_font_size' => '80',
'et_pb_pricing_tables-price_font_style' => '',
'et_pb_pricing_tables-header_color' => '#ffffff',
'et_pb_pricing_tables-header_line_height' => '1em',
'et_pb_pricing_tables-subheader_color' => '#ffffff',
'et_pb_pricing_tables-currency_frequency_font_size' => '16px',
'et_pb_pricing_tables-currency_frequency_letter_spacing' => '0px',
'et_pb_pricing_tables-currency_frequency_line_height' => '1.7em',
'et_pb_pricing_tables-price_letter_spacing' => '0px',
'et_pb_pricing_tables-price_color' => '#2EA3F2',
'et_pb_pricing_tables-price_line_height' => '82px',
'et_pb_pricing_tables-body_line_height' => '24px',
'et_pb_pricing_tables-background_size' => $background_image_defaults['size'],
'et_pb_pricing_tables-background_position' => $background_image_defaults['position'],
'et_pb_pricing_tables-background_repeat' => $background_image_defaults['repeat'],
'et_pb_pricing_tables-background_blend' => $background_image_defaults['blend'],
'et_pb_pricing_tables-excluded_letter_spacing' => '0px',
'et_pb_pricing_tables-excluded_line_height' => '1.7em',
// Module: Shop.
'et_pb_shop-title_font_size' => '16',
'et_pb_shop-title_font_style' => '',
'et_pb_shop-sale_badge_font_size' => '16',
'et_pb_shop-sale_badge_font_style' => '',
'et_pb_shop-price_font_size' => '14',
'et_pb_shop-price_font_style' => '',
'et_pb_shop-sale_price_font_size' => '14',
'et_pb_shop-sale_price_font_style' => '',
'et_pb_shop-title_color' => '#333333',
'et_pb_shop-title_line_height' => '1em',
'et_pb_shop-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_shop-price_line_height' => '26px',
'et_pb_shop-price_letter_spacing' => $font_defaults['letter_spacing'],
// Module: Sidebar.
'et_pb_sidebar-header_font_size' => '18',
'et_pb_sidebar-header_font_style' => '',
'et_pb_sidebar-header_color' => '#333333',
'et_pb_sidebar-header_line_height' => '1em',
'et_pb_sidebar-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_sidebar-remove_border' => 'off',
'et_pb_sidebar-body_font_size' => $font_defaults['size'],
'et_pb_sidebar-body_line_height' => $font_defaults['line_height'],
'et_pb_sidebar-body_letter_spacing' => $font_defaults['letter_spacing'],
// Module: Signup.
'et_pb_signup-header_font_size' => '26',
'et_pb_signup-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_signup-header_line_height' => $font_defaults['line_height'],
'et_pb_signup-body_font_size' => $font_defaults['size'],
'et_pb_signup-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_signup-body_line_height' => $font_defaults['line_height'],
'et_pb_signup-result_message_font_size' => $font_defaults_h2['size'],
'et_pb_signup-result_message_line_height' => $font_defaults_h2['line_height'],
'et_pb_signup-header_font_style' => '',
'et_pb_signup-padding' => '20',
'et_pb_signup-focus_border_color' => '#ffffff',
'et_pb_signup-background_size' => $background_image_defaults['size'],
'et_pb_signup-background_position' => $background_image_defaults['position'],
'et_pb_signup-background_repeat' => $background_image_defaults['repeat'],
'et_pb_signup-background_blend' => $background_image_defaults['blend'],
'et_pb_signup-form_field_font_size' => '14',
'et_pb_signup-form_field_line_height' => $font_defaults['line_height'],
'et_pb_signup_form-form_field_letter_spacing' => $font_defaults['letter_spacing'],
// Module: Slider Item (Slide).
'et_pb_slide-header_font_size' => '26px',
'et_pb_slide-header_color' => '#ffffff',
'et_pb_slide-header_line_height' => '1em',
'et_pb_slide-body_font_size' => '16px',
'et_pb_slide-body_color' => '#ffffff',
'et_pb_slide-background_size' => $background_image_defaults['size'],
'et_pb_slide-background_position' => $background_image_defaults['position'],
'et_pb_slide-background_repeat' => $background_image_defaults['repeat'],
'et_pb_slide-background_blend' => $background_image_defaults['blend'],
// Module: Slider.
'et_pb_slider-header_font_size' => '46',
'et_pb_slider-header_line_height' => '1em',
'et_pb_slider-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_slider-header_font_style' => '',
'et_pb_slider-body_font_size' => '16',
'et_pb_slider-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_slider-body_line_height' => $font_defaults['line_height'],
'et_pb_slider-body_font_style' => '',
'et_pb_slider-padding' => '16',
'et_pb_slider-header_color' => '#ffffff',
'et_pb_slider-body_color' => '#ffffff',
'et_pb_slider-background_size' => $background_image_defaults['size'],
'et_pb_slider-background_position' => $background_image_defaults['position'],
'et_pb_slider-background_repeat' => $background_image_defaults['repeat'],
'et_pb_slider-background_blend' => $background_image_defaults['blend'],
// Module: Social Media Follow.
'et_pb_social_media_follow-icon_size' => '14',
'et_pb_social_media_follow-button_font_style' => '',
// Module: Tabs.
'et_pb_tabs-tab_font_size' => $font_defaults['size'],
'et_pb_tabs-tab_line_height' => $font_defaults['line_height'],
'et_pb_tabs-tab_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_tabs-title_font_size' => $font_defaults['size'],
'et_pb_tabs-body_font_size' => $font_defaults['size'],
'et_pb_tabs-body_line_height' => $font_defaults['line_height'],
'et_pb_tabs-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_tabs-title_font_style' => '',
'et_pb_tabs-padding' => '30',
'et_pb_tabs-background_size' => $background_image_defaults['size'],
'et_pb_tabs-background_position' => $background_image_defaults['position'],
'et_pb_tabs-background_repeat' => $background_image_defaults['repeat'],
'et_pb_tabs-background_blend' => $background_image_defaults['blend'],
// Module: Tabs Item (Tab).
'et_pb_tab-background_size' => $background_image_defaults['size'],
'et_pb_tab-background_position' => $background_image_defaults['position'],
'et_pb_tab-background_repeat' => $background_image_defaults['repeat'],
'et_pb_tab-background_blend' => $background_image_defaults['blend'],
// Module: Team Member (Person).
'et_pb_team_member-header_font_size' => '18',
'et_pb_team_member-header_font_style' => '',
'et_pb_team_member-subheader_font_size' => '14',
'et_pb_team_member-subheader_font_style' => '',
'et_pb_team_member-social_network_icon_size' => '16',
'et_pb_team_member-header_color' => '#333333',
'et_pb_team_member-header_line_height' => '1em',
'et_pb_team_member-header_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_team_member-body_font_size' => $font_defaults['size'],
'et_pb_team_member-body_line_height' => $font_defaults['line_height'],
'et_pb_team_member-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_team_member-background_size' => $background_image_defaults['size'],
'et_pb_team_member-background_position' => $background_image_defaults['position'],
'et_pb_team_member-background_repeat' => $background_image_defaults['repeat'],
'et_pb_team_member-background_blend' => $background_image_defaults['blend'],
// Module: Testimonial.
'et_pb_testimonial-portrait_border_radius' => '90',
'et_pb_testimonial-portrait_width' => '90',
'et_pb_testimonial-portrait_height' => '90',
'et_pb_testimonial-author_name_font_style' => 'bold',
'et_pb_testimonial-author_details_font_style' => 'bold',
'et_pb_testimonial-border_color' => '#ffffff',
'et_pb_testimonial-border_width' => '1px',
'et_pb_testimonial-body_font_size' => $font_defaults['size'],
'et_pb_testimonial-body_line_height' => '1.5em',
'et_pb_testimonial-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_testimonial-background_size' => $background_image_defaults['size'],
'et_pb_testimonial-background_position' => $background_image_defaults['position'],
'et_pb_testimonial-background_repeat' => $background_image_defaults['repeat'],
'et_pb_testimonial-background_blend' => $background_image_defaults['blend'],
'et_pb_testimonial-quote_icon_background_color' => '#f5f5f5',
// Module: Text.
'et_pb_text-header_font_size' => $font_defaults_h1['size'],
'et_pb_text-header_letter_spacing' => $font_defaults_h1['letter_spacing'],
'et_pb_text-header_line_height' => $font_defaults_h1['line_height'],
'et_pb_text-text_font_size' => $font_defaults['size'],
'et_pb_text-text_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_text-text_line_height' => $font_defaults['line_height'],
'et_pb_text-border_color' => '#ffffff',
'et_pb_text-border_width' => '1px',
'et_pb_text-background_size' => $background_image_defaults['size'],
'et_pb_text-background_position' => $background_image_defaults['position'],
'et_pb_text-background_repeat' => $background_image_defaults['repeat'],
'et_pb_text-background_blend' => $background_image_defaults['blend'],
// Module: Toggle.
'et_pb_toggle-title_font_size' => '16',
'et_pb_toggle-title_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_toggle-title_font_style' => '',
'et_pb_toggle-inactive_title_font_style' => '',
'et_pb_toggle-toggle_icon_size' => '16',
'et_pb_toggle-title_color' => '#333333',
'et_pb_toggle-title_line_height' => '1em',
'et_pb_toggle-custom_padding' => '20',
'et_pb_toggle-body_font_size' => $font_defaults['size'],
'et_pb_toggle-body_line_height' => $font_defaults['line_height'],
'et_pb_toggle-body_letter_spacing' => $font_defaults['letter_spacing'],
'et_pb_toggle-background_size' => $background_image_defaults['size'],
'et_pb_toggle-background_position' => $background_image_defaults['position'],
'et_pb_toggle-background_repeat' => $background_image_defaults['repeat'],
'et_pb_toggle-background_blend' => $background_image_defaults['blend'],
// Module: Woo Title.
'et_pb_wc_title-header_font_size' => $font_defaults_h1['size'],
'et_pb_wc_title-header_line_height' => '1em',
'et_pb_wc_stock-in_stock_text_color' => '#77a464',
// Global: Field Input.
'all_field_font_size' => '16',
'all_field_border_width' => '0',
'all_field_border_radius' => '3',
'all_field_spacing' => '0',
'all_field_font_style' => '',
$hover->get_hover_field( 'all_field_border_radius' ) => '3',
$hover->get_hover_field( 'all_field_spacing' ) => '0',
);
if ( et_builder_has_limitation( 'forced_icon_color_default' ) ) {
$defaults['et_pb_gallery-zoom_icon_color'] = et_get_option( 'accent_color', '#2ea3f2' );
$defaults['et_pb_portfolio-zoom_icon_color'] = et_get_option( 'accent_color', '#2ea3f2' );
$defaults['et_pb_fullwidth-portfolio-zoom_icon_color'] = et_get_option( 'accent_color', '#2ea3f2' );
$defaults['et_pb_filterable_portfolio-zoom_icon_color'] = et_get_option( 'accent_color', '#2ea3f2' );
}
$module_presets_manager = ET_Builder_Global_Presets_Settings::instance();
if ( ! et_is_builder_plugin_active() && ! ET_Builder_Global_Presets_Settings::is_customizer_migrated() ) {
$module_presets_manager->migrate_customizer_settings( $defaults );
}
$custom_defaults_unmigrated = et_get_option( ET_Builder_Global_Presets_Settings::CUSTOM_DEFAULTS_UNMIGRATED_OPTION, false );
// reformat defaults array and add actual values to it.
foreach ( $defaults as $setting_name => $default_value ) {
$defaults[ $setting_name ] = array(
'default' => $default_value,
);
if ( ! et_is_builder_plugin_active() ) {
$actual_value = (string) et_get_option( $setting_name, '', '', true );
$add_as_actual = false;
// Pass Theme Customizer non module specific settings.
$setting_array = explode( '-', $setting_name );
$module_name = $setting_array[0];
if ( empty( $setting_array[1] ) || ! empty( $custom_defaults_unmigrated->$module_name ) && in_array( $setting_array[1], ET_Builder_Global_Presets_Settings::$phase_two_settings, true ) ) {
$add_as_actual = true;
}
if ( $add_as_actual && '' !== $actual_value ) {
$defaults[ $setting_name ]['actual'] = $actual_value;
}
}
}
self::$_settings = apply_filters( 'et_set_default_values', $defaults );
}
/**
* Get default global setting value
*
* @param string $name Setting name.
* @param string $get_value Defines the value it should get: actual or default.
*
* @return mixed Global setting value or FALSE
*/
public static function get_value( $name, $get_value = 'actual' ) {
$settings = self::$_settings;
if ( ! isset( $settings[ $name ] ) ) {
return false;
}
if ( isset( $settings[ $name ][ $get_value ] ) ) {
$result = $settings[ $name ][ $get_value ];
} elseif ( 'actual' === $get_value && isset( $settings[ $name ]['default'] ) ) {
$result = $settings[ $name ]['default'];
} else {
$result = false;
}
return $result;
}
/**
* Translate 'on'/'off' into true/false
* Pagebuilder use pseudo checkbox with 'on'/'off' value while customizer use true/false
* which cause ET_Global_Settings' default value incompatibilities.
*
* @param string $name Setting name.
* @param string $get_value Defines the value it should get: actual or default.
* @param string $source pagebuilder or customizer.
*
* @return bool|string
*/
public static function get_checkbox_value( $name, $get_value = 'actual', $source = 'pagebuilder' ) {
// Get value.
$value = self::get_value( $name, $get_value );
// customizer to pagebuilder || pagebuilder to customizer.
if ( 'customizer' === $source ) {
if ( false === $value ) {
return 'off';
} else {
return 'on';
}
} else {
if ( 'off' === $value || false === $value ) {
return false;
} else {
return true;
}
}
}
}
/**
* Initialize the global settings.
*/
function et_builder_init_global_settings() {
ET_Global_Settings::init();
}

View File

@@ -0,0 +1,89 @@
<?php
if ( post_password_required() ) : ?>
<p class="nocomments container"><?php esc_html_e( 'This post is password protected. Enter the password to view comments.', 'et_builder' ); ?></p>
<?php
return;
endif;
global $et_comments_header_level, $et_comments_form_title_level;
$et_comments_header_level_processed = isset( $et_comments_header_level ) && '' !== $et_comments_header_level ? et_pb_process_header_level( $et_comments_header_level, 'h1' ) : 'h1';
?>
<?php
if ( empty( $comments_by_type ) ) {
$comments_by_type = separate_comments( $comments );
}
?>
<section id="comment-wrap">
<<?php echo et_core_intentionally_unescaped( $et_comments_header_level_processed, 'fixed_string' ); ?> id="comments" class="page_title"><?php comments_number( esc_html__( '0 Comments', 'et_builder' ), esc_html__( '1 Comment', 'et_builder' ), '% ' . esc_html__( 'Comments', 'et_builder' ) ); ?></<?php echo et_core_intentionally_unescaped( $et_comments_header_level_processed, 'fixed_string' ); ?>>
<?php if ( have_comments() ) : ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="comment_navigation_top clearfix">
<div class="nav-previous"><?php previous_comments_link( et_get_safe_localization( __( '<span class="meta-nav">&larr;</span> Older Comments', 'et_builder' ) ) ); ?></div>
<div class="nav-next"><?php next_comments_link( et_get_safe_localization( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'et_builder' ) ) ); ?></div>
</div>
<?php endif; // check for comment navigation ?>
<?php if ( ! empty( $comments_by_type['comment'] ) ) : ?>
<ol class="commentlist clearfix">
<?php
wp_list_comments(
array(
'type' => 'comment',
'callback' => 'et_custom_comments_display',
)
);
?>
</ol>
<?php endif; ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="comment_navigation_bottom clearfix">
<div class="nav-previous"><?php previous_comments_link( et_get_safe_localization( __( '<span class="meta-nav">&larr;</span> Older Comments', 'et_builder' ) ) ); ?></div>
<div class="nav-next"><?php next_comments_link( et_get_safe_localization( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'et_builder' ) ) ); ?></div>
</div>
<?php endif; // check for comment navigation ?>
<?php if ( ! empty( $comments_by_type['pings'] ) ) : ?>
<div id="trackbacks">
<h3 id="trackbacks-title"><?php esc_html_e( 'Trackbacks/Pingbacks', 'et_builder' ); ?></h3>
<ol class="pinglist">
<?php wp_list_comments( 'type=pings&callback=et_list_pings' ); ?>
</ol>
</div>
<?php endif; ?>
<?php else : // this is displayed if there are no comments so far ?>
<div id="comment-section" class="nocomments">
<?php if ( 'open' === $post->comment_status ) : ?>
<?php else : // comments are closed ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ( 'open' === $post->comment_status ) : ?>
<?php
// Comment submit content title level.
$et_comments_form_title_level_processed = isset( $et_comments_form_title_level ) && '' !== $et_comments_form_title_level ? et_pb_process_header_level( $et_comments_form_title_level, 'h3' ) : 'h3';
$et_comments_form_title_level_escaped = et_core_intentionally_unescaped( $et_comments_form_title_level_processed, 'fixed_string' );
comment_form(
array(
'label_submit' => esc_attr__( 'Submit Comment', 'et_builder' ),
'title_reply' => '<span>' . esc_attr__( 'Submit a Comment', 'et_builder' ) . '</span>',
'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'et_builder' ),
'title_reply_before' => '<' . $et_comments_form_title_level_escaped . ' id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</' . $et_comments_form_title_level_escaped . '>',
'class_submit' => 'submit et_pb_button',
'comment_notes_after' => '',
'id_submit' => 'et_pb_submit',
)
);
?>
<?php else : ?>
<?php endif; // if you delete this the sky will fall on your head ?>
</section>

View File

@@ -0,0 +1,129 @@
<?php
// Compatibility code that needs to be run early and for each request.
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( function_exists( 'ud_get_stateless_media' ) ) {
// WP Stateless Plugin.
function et_compat_stateless_skip_cache_busting( $result, $filename ) {
return $filename;
}
add_filter( 'stateless_skip_cache_busting', 'et_compat_stateless_skip_cache_busting', 10, 2 );
}
/**
* Disable JQuery Body Feature.
*
* @since 4.10.3
*
* @return void
*/
function et_builder_disable_jquery_body() {
add_filter( 'et_builder_enable_jquery_body', '__return_false' );
}
if ( function_exists( 'sg_cachepress_purge_cache' ) ) {
// Disable JQuery Body when SG CachePress JS Combine option is enabled
// because the two features aren't compatible.
if ( '1' === get_option( 'siteground_optimizer_combine_javascript' ) ) {
et_builder_disable_jquery_body();
}
}
if ( defined( 'WP_ROCKET_SLUG' ) ) {
// Disable JQuery Body when WP Rocket Defer JS option is enabled
// because the two features aren't compatible.
if ( 1 === et_()->array_get( get_option( WP_ROCKET_SLUG ), 'defer_all_js' ) ) {
et_builder_disable_jquery_body();
}
}
if ( defined( 'LSCWP_V' ) ) {
$options = [
'litespeed.conf.optm-js_comb_ext_inl',
'litespeed.conf.optm-js_defer',
];
// Disable JQuery Body when some LiteSpeed Cache JS options are enabled
// because the features aren't compatible.
foreach ( $options as $option ) {
if ( ! empty( get_option( $option ) ) ) {
et_builder_disable_jquery_body();
break;
}
}
}
if ( defined( 'AUTOPTIMIZE_PLUGIN_VERSION' ) ) {
$options = [
'autoptimize_js_include_inline',
'autoptimize_js_defer_inline',
'autoptimize_js_forcehead',
];
// Disable JQuery Body when some Autoptimize JS options are enabled
// because the features aren't compatible.
foreach ( $options as $option ) {
if ( ! empty( get_option( $option ) ) ) {
et_builder_disable_jquery_body();
break;
}
}
}
if ( defined( 'OP3_VERSION' ) ) {
// Disable JQuery Body when some OptimizePress is active
// because the two aren't compatible.
et_builder_disable_jquery_body();
}
/**
* Sets the loading attr threshold based on Post meta.
*
* @param int $omit_threshold The number of media elements where the `loading`
* attribute will not be added. Default 1.
*
* @return int
*/
function et_builder_set_loading_attr_threshold_by_atf_content( $omit_threshold ) {
global $post;
if ( empty( $post ) ) {
return $omit_threshold;
}
$post_id = $post->ID;
$post_threshold = get_post_meta(
$post_id,
'_et_builder_dynamic_assets_loading_attr_threshold',
true
);
$post_threshold = absint( $post_threshold );
return $post_threshold > 1 ? $post_threshold : $omit_threshold;
}
/**
* Execute the following on `wp` hook.
*
* The loading attribute threshold is set on `wp` hook. This is because framework.php is run on `init` which determines the threshold value.
* Once the value is determined (happens only on first load), it is the saved on to post meta.
* The saved post meta is retrieved on every load until the page is changed or cache cleared.
* The value is then fed to WordPress using the `wp_omit_loading_attr_threshold` filter.
*
* @return void
*/
function et_builder_on_wp() {
add_filter(
'wp_omit_loading_attr_threshold',
'et_builder_set_loading_attr_threshold_by_atf_content'
);
}
add_action( 'wp', 'et_builder_on_wp' );

View File

@@ -0,0 +1,41 @@
<?php
/**
* Compatibility code that deals with 3P Services which are not integrated via
* WP Plugins (eg. code added via integration / Code Module) because not hosted locally.
*
* @package Divi
* @subpackage Builder
* @since 4.10.5
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Disable JQuery Body feature when certain 3P form services are used.
// phpcs:disable PEAR.Functions.FunctionCallSignature.MultipleArguments -- Anonymous functions.
// phpcs:disable PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket -- Anonymous functions.
// phpcs:disable PEAR.Functions.FunctionCallSignature.CloseBracketLine -- Anonymous functions.
add_filter( 'et_builder_enable_jquery_body', function( $enabled, $content = '' ) {
if ( empty( $content ) ) {
return $enabled;
}
$services = [
'et_builder_disable_jquery_body',
'slick.js',
'webforms/bbox-min.js',
'www.cognitoforms.com',
'mailchimp.com',
'mindbodyonline.com/javascripts',
'static.smartrecruiters.com/job-widget/',
'default.salsalabs.org/api/widget/',
];
$services = array_filter( $services, 'preg_quote' );
$pattern = '#(' . implode( '|', $services ) . ')#';
// Disable when the service is found.
return 1 === preg_match( $pattern, $content ) ? false : $enabled;
}, 10, 2);
// phpcs:enable

View File

@@ -0,0 +1,128 @@
<?php
$GLOBALS['et_builder_used_in_wc_shop'] = false;
/**
* Determines if current page is WooCommerce's shop page + uses builder.
* NOTE: This has to be used after pre_get_post (et_builder_wc_pre_get_posts).
*
* @return bool
*/
function et_builder_used_in_wc_shop() {
global $et_builder_used_in_wc_shop;
return apply_filters(
'et_builder_used_in_wc_shop',
$et_builder_used_in_wc_shop
);
}
/**
* Use page.php as template for a page which uses builder & being set as shop page
*
* @param string path to template
* @return string modified path to template
*/
function et_builder_wc_template_include( $template ) {
// Detemine whether current page uses builder and set as
if ( et_builder_used_in_wc_shop() && '' !== locate_template( 'page.php' ) ) {
$template = locate_template( 'page.php' );
}
return $template;
}
add_filter( 'template_include', 'et_builder_wc_template_include', 20 );
/**
* Overwrite WooCommerce's custom query in shop page if the page uses builder.
* After proper shop page setup (page selection + permalink flushed), the original
* page permalink will be recognized as is_post_type_archive by WordPress' rewrite
* URL when it is being parsed. This causes is_page() detection fails and no way
* to get actual page ID on pre_get_posts hook, unless by doing reverse detection:
*
* 1. Check if current page is product archive page. Most page will fail on this.
* 2. Afterward, if wc_get_page_id( 'shop' ) returns a page ID, it means that
* current page is shop page (product post type archive) which is configured
* in custom page. Next, check whether Divi Builder is used on this page or not.
*
* @param object query object
* @param void
*/
function et_builder_wc_pre_get_posts( $query ) {
global $et_builder_used_in_wc_shop;
if ( is_admin() ) {
return;
}
if ( ! $query->is_main_query() ) {
return;
}
if ( $query->is_search() ) {
return;
}
if ( ! class_exists( 'WooCommerce' ) ) {
return;
}
if ( ! function_exists( 'wc_get_page_id' ) ) {
return;
}
// Check if current page is product archive page. Most page will fail on this.
// initially used is_shop(), but is_shop()'s is_page() check throws error at
// this early hook on homepage if shop page !== page_on_front
if ( ! is_post_type_archive( 'product' ) ) {
return;
}
// Note that the following check is only performed on product archive page.
$shop_page_id = wc_get_page_id( 'shop' );
$shop_page_object = get_post( $shop_page_id );
$is_shop_page_exist = isset( $shop_page_object->post_type ) && 'page' === $shop_page_object->post_type;
if ( ! $is_shop_page_exist ) {
return;
}
if ( ! et_pb_is_pagebuilder_used( $shop_page_id ) ) {
return;
}
// Set et_builder_used_in_wc_shop() global to true
$et_builder_used_in_wc_shop = true;
// Overwrite page query. This overwrite enables is_page() and other standard
// page-related function to work normally after pre_get_posts hook
$query->set( 'page_id', $shop_page_id );
$query->set( 'post_type', 'page' );
$query->set( 'posts_per_page', 1 );
$query->set( 'wc_query', null );
$query->set( 'meta_query', array() );
$query->is_singular = true;
$query->is_page = true;
$query->is_post_type_archive = false;
$query->is_archive = false;
// Avoid unwanted <p> at the beginning of the rendered builder
remove_filter( 'the_content', 'wpautop' );
}
add_action( 'pre_get_posts', 'et_builder_wc_pre_get_posts' );
/**
* Remove woocommerce body classes if current shop page uses builder.
* woocommerce-page body class causes builder's shop column styling to be irrelevant.
*
* @param array body classes
* @return array modified body classes
*/
function et_builder_wc_body_class( $classes ) {
if ( et_builder_used_in_wc_shop() ) {
$classes = array_diff( $classes, array( 'woocommerce-page' ) );
}
return $classes;
}
add_filter( 'body_class', 'et_builder_wc_body_class' );

View File

@@ -0,0 +1,215 @@
<?php
/**
* Utility functions for checking conditions.
*
* To be included in this file a function must:
*
* * Return a bool value
* * Have a name that asks a yes or no question (where the first word after
* the et_ prefix is a word like: is, can, has, should, was, had, must, or will)
*
* @package Divi
* @subpackage Builder
* @since 4.0.7
*/
// phpcs:disable Squiz.PHP.CommentedOutCode -- We may add `et_builder_()` in future.
/*
Function Template
if ( ! function_exists( '' ) ):
function et_builder_() {
}
endif;
*/
// phpcs:enable
// Note: Functions in this file are sorted alphabetically.
if ( ! function_exists( 'et_builder_is_frontend' ) ) :
/**
* Determine whether current request is frontend.
* This excludes the visual builder.
*
* @return bool
*/
function et_builder_is_frontend() {
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Only used to disable some FE optmizations.
$is_builder = isset( $_GET['et_fb'] ) || isset( $_GET['et_bfb'] );
$is_block_layout_preview = isset( $_GET['et_block_layout_preview'] );
// phpcs:enable
return $is_builder || is_admin() || wp_doing_ajax() || wp_doing_cron() || $is_block_layout_preview ? false : true;
}
endif;
if ( ! function_exists( 'et_builder_is_frontend_or_builder' ) ) :
/**
* Determine whether current request is frontend.
* This includes the visual builder.
*
* @since 4.10.0
*
* @return bool
*/
function et_builder_is_frontend_or_builder() {
static $et_builder_is_frontend_or_builder = null;
if ( null === $et_builder_is_frontend_or_builder ) {
if (
! is_admin()
&& ! wp_doing_ajax()
&& ! wp_doing_cron()
) {
$et_builder_is_frontend_or_builder = true;
}
}
return $et_builder_is_frontend_or_builder;
}
endif;
if ( ! function_exists( 'et_builder_is_loading_data' ) ) :
/**
* Determine whether builder is loading full data or not.
*
* @param string $type Is it a bb or vb.
*
* @return bool
*/
function et_builder_is_loading_data( $type = 'vb' ) {
// phpcs:disable WordPress.Security.NonceVerification -- This function does not change any stats, hence CSRF ok.
if ( 'bb' === $type ) {
return 'et_pb_get_backbone_templates' === et_()->array_get( $_POST, 'action' );
}
$data_actions = array(
'et_fb_retrieve_builder_data',
'et_fb_update_builder_assets',
'et_pb_process_computed_property',
);
return isset( $_POST['action'] ) && in_array( $_POST['action'], $data_actions, true );
// phpcs:enable
}
endif;
if ( ! function_exists( 'et_builder_should_load_all_data' ) ) :
/**
* Determine whether to load full builder data.
*
* @return bool
*/
function et_builder_should_load_all_data() {
$needs_cached_definitions = et_core_is_fb_enabled() && ! et_fb_dynamic_asset_exists( 'definitions' );
return $needs_cached_definitions || ( ET_Builder_Element::is_saving_cache() || et_builder_is_loading_data() );
}
endif;
if ( ! function_exists( 'et_builder_should_load_all_module_data' ) ) :
/**
* Determine whether to load all module data.
*
* @return bool
*/
function et_builder_should_load_all_module_data() {
if ( ! et_builder_is_frontend() ) {
// Always load everything when not a frontend request.
return true;
}
$needs_cached_definitions = et_core_is_fb_enabled();
$et_dynamic_module_framework = et_builder_dynamic_module_framework();
$result = $needs_cached_definitions || ( ET_Builder_Element::is_saving_cache() || et_builder_is_loading_data() ) || 'on' !== $et_dynamic_module_framework;
/**
* Whether to load all module data,
* including all module classes, on a given page load.
*
* @since 4.10.0
*
* @param bool $result Whether to load all module data.
*/
return apply_filters( 'et_builder_should_load_all_module_data', $result );
}
endif;
if ( ! function_exists( 'et_builder_dynamic_module_framework' ) ) :
/**
* Determine whether module framework is on.
*
* @return string
*/
function et_builder_dynamic_module_framework() {
global $shortname;
if ( et_is_builder_plugin_active() ) {
$options = get_option( 'et_pb_builder_options', array() );
$et_dynamic_module_framework = isset( $options['performance_main_dynamic_module_framework'] ) ? $options['performance_main_dynamic_module_framework'] : 'on';
} else {
$et_dynamic_module_framework = et_get_option( $shortname . '_dynamic_module_framework', 'on' );
}
return $et_dynamic_module_framework;
}
endif;
if ( ! function_exists( 'et_builder_is_mod_pagespeed_enabled' ) ) :
/**
* Determine whether Mod PageSpeed is enabled.
*
* @return bool
*/
function et_builder_is_mod_pagespeed_enabled() {
static $enabled;
if ( isset( $enabled ) ) {
// Use the cached value.
return $enabled;
}
$key = 'et_check_mod_pagespeed';
$version = get_transient( $key );
if ( false === $version ) {
// Mod PageSpeed is an output filter, hence it can't be detected from within the request.
// To figure out whether it is active or not:
// 1. Use `wp_remote_get` to make another request.
// 2. Retrieve PageSpeed version from response headers (if set).
// 3. Save the value in a transient for 24h.
// The `et_check_mod_pagespeed` url parameter is also added to the request so
// we can exit early (content is irrelevant, only headers matter).
$args = [
$key => 'on',
];
// phpcs:disable WordPress.Security.NonceVerification -- Only checking arg is set.
if ( isset( $_REQUEST['PageSpeed'] ) ) {
// This isn't really needed but it's harmless and makes testing a lot easier.
$args['PageSpeed'] = sanitize_text_field( $_REQUEST['PageSpeed'] );
}
// phpcs:enable
$request = wp_remote_get( add_query_arg( $args, get_home_url() ) );
// Apache header.
$version = wp_remote_retrieve_header( $request, 'x-mod-pagespeed' );
if ( empty( $version ) ) {
// Nginx header.
$version = wp_remote_retrieve_header( $request, 'x-page-speed' );
}
set_transient( $key, $version, DAY_IN_SECONDS );
}
// Cache the value.
$enabled = ! empty( $version );
return $enabled;
}
endif;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
<?php
/**
* Deprecated symbols mapped to replacements when applicable, organized by type.
*
* @since 3.1
*
* @return array[] {
* Deprecations
*
* @type string[] $functions {
* Deprecated Functions
*
* @type mixed $deprecated_symbol Replacement symbol or default value
* ...
* }
* @type array[] $classes {
* Deprecations By Class
*
* @type array[] $class_name {
* Deprecated Symbols
*
* @type string[] $symbol_type {
*
* @type mixed $deprecated_symbol Replacement symbol or default value
* ...
* }
* ...
* }
* ...
* }
* }
*/
return array(
'functions' => array(),
'classes' => array(
'\ET_Builder_Module_Blurb' => array(
'method_args' => array(
'_add_option_toggles' => array( 'general', array() ),
'_shortcode_callback' => array( array(), null, 'et_pb_blurb' ),
'_shortcode_passthru_callback' => array( array(), null, 'et_pb_blurb' ),
'additional_shortcode_callback' => array( array(), null, 'et_pb_blurb' ),
'shortcode_callback' => array( array(), null, 'et_pb_blurb' ),
),
'methods' => array(
'_add_option_toggles' => '_add_settings_modal_toggles',
'_get_current_shortcode_address' => 'generate_element_address',
'_shortcode_callback' => '_render',
'_shortcode_passthru_callback' => 'render_as_builder_data',
'additional_shortcode_callback' => 'additional_render',
'get_shortcode_fields' => 'get_default_props',
'pre_shortcode_content' => 'before_render',
'shortcode_atts' => '',
'shortcode_atts_to_data_atts' => 'props_to_html_data_attrs',
'shortcode_callback' => 'render',
'shortcode_output' => 'output',
),
'properties' => array(
'advanced_options' => 'advanced_fields',
'custom_css_options' => 'custom_css_fields',
'options_toggles' => 'settings_modal_toggles',
'shortcode_atts' => 'props',
'shortcode_content' => 'content',
'allowlisted_fields' => array(),
'no_shortcode_callback' => 'no_render',
),
),
),
);

View File

@@ -0,0 +1,293 @@
<?php
/**
* Ajax Cache.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Class to cache commonly used AJAX requests.
*/
class ET_Builder_Ajax_Cache {
/**
* Instance of this class.
*
* @var ET_Builder_Ajax_Cache
*/
private static $_instance;
/**
* Transient name.
*
* @var string
*/
protected $_transient = 'et_builder_ajax_cache';
/**
* Flag to determine whether to save cache or not on `shutdown` hook.
*
* @var bool
*/
protected $_dirty = false;
/**
* List of all ajax cache.
*
* @var Array
*/
protected $_cache;
/**
* ET_Builder_Ajax_Cache constructor.
*/
public function __construct() {
add_action( 'et_builder_ajax_cache_clear', array( $this, 'clear' ), 10, 1 );
add_action( 'shutdown', array( $this, 'save' ) );
add_filter( 'et_builder_dynamic_asset_deps', array( $this, 'add_cache_dep' ), 10, 2 );
}
/**
* Returns whether cache file exists or not.
*
* @since 4.0.10
*
* @return bool
*/
public function file_exists() {
$file = $this->get_file_name();
return $file && et_()->WPFS()->is_readable( $file );
}
/**
* Returns whether cache is empty or not.
*
* @since 4.0.10
*
* @return bool
*/
public function is_empty() {
$this->load();
return empty( $this->_cache );
}
/**
* Enqueue ajax cache as definitions dependency.
*
* @since 4.0.10
*
* @param array $deps Dependencies array.
* @param string $key Script handle.
*
* @return array
*/
public function add_cache_dep( $deps, $key ) {
// Skip all static assets but definitions.
if ( 'et-dynamic-asset-definitions' !== $key ) {
return $deps;
}
if ( ! $this->file_exists() && ! $this->write_file() ) {
// Bail out if cache is empty and cannot write the file.
return $deps;
}
// Enqueue ajax cache as definitions dependency.
$handle = 'et-ajax-cache';
$deps[] = $handle;
wp_register_script( $handle, $this->get_url(), array(), ET_BUILDER_VERSION, false );
return $deps;
}
/**
* Load cache.
*
* @since 4.0.10
*
* @return void
*/
public function load() {
if ( is_array( $this->_cache ) ) {
// Cache was already loaded.
return;
}
$this->_cache = get_transient( $this->_transient );
if ( ! is_array( $this->_cache ) ) {
$this->_cache = array();
$this->delete_file();
}
}
/**
* Save cache.
*
* @since 4.0.10
*
* @return void
*/
public function save() {
// Ensure cache is loaded.
$this->load();
if ( $this->_dirty ) {
set_transient( $this->_transient, $this->_cache );
$this->delete_file();
}
}
/**
* Write cache file.
*
* @since 4.0.10
*
* @return bool
*/
public function write_file() {
if ( $this->is_empty() ) {
return false;
}
$file = $this->get_file_name();
$cache = '';
foreach ( $this->_cache as $key => $value ) {
$cache = sprintf( '"%s":%s,', $key, $value );
}
$cache = sprintf( '{"ajaxCache":{%s}}', rtrim( $cache, ',' ) );
$cache = sprintf( 'window.ETBuilderBackend=jQuery.extend(true,%s,window.ETBuilderBackend)', $cache );
et_()->WPFS()->put_contents( $file, $cache );
return $this->file_exists();
}
/**
* Delete cache file.
*
* @since 4.0.10
*
* @return void
*/
public function delete_file() {
if ( $this->file_exists() ) {
et_()->WPFS()->delete( $this->get_file_name() );
}
}
/**
* Set cache key.
*
* @since 4.0.10
*
* @param string $key Cache key.
* @param string $content Cache value.
*
* @return void
*/
public function set( $key, $content ) {
$this->load();
$this->_cache[ $key ] = wp_json_encode( $content );
$this->_dirty = true;
}
/**
* Unset cache key.
*
* @since 4.0.10
*
* @param string $key Cache key.
*
* @return void
*/
public function unset_( $key ) {
$this->load();
if ( isset( $this->_cache[ $key ] ) ) {
unset( $this->_cache[ $key ] );
$this->_dirty = true;
}
}
/**
* Clear cache.
*
* @return void
*/
public function clear() {
delete_transient( $this->_transient );
}
/**
* Get cache file name.
*
* @since 4.0.10
*
* @return string.
*/
public function get_file_name() {
// Per language Cache due to some data being localized.
$lang = is_admin() || et_fb_is_enabled() ? get_user_locale() : get_locale();
$lang = trim( sanitize_file_name( $lang ), '.' );
$prefix = 'ajax';
$cache = et_()->path( et_core_cache_dir()->path, $lang );
$files = glob( "{$cache}/{$prefix}-*.js" );
$exists = is_array( $files ) && $files;
if ( $exists ) {
return $files[0];
}
wp_mkdir_p( $cache );
// Create uniq filename.
$uniq = str_replace( '.', '', (string) microtime( true ) );
$file = "{$cache}/{$prefix}-{$uniq}.js";
return et_()->WPFS()->is_writable( dirname( $file ) ) ? $file : false;
}
/**
* Get cache url.
*
* @since 4.0.10
*
* @return string
*/
public function get_url() {
$file = $this->get_file_name();
$lang = basename( dirname( $file ) );
$name = basename( $file );
return et_()->path( et_core_cache_dir()->url, $lang, $name );
}
/**
* Get the class instance.
*
* @since 4.0.10
*
* @return ET_Builder_Ajax_Cache
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
/**
* Filters the cache class instance that for caches AJAX requests.
*
* @param ET_Builder_Ajax_Cache Cache Instance
*
* @see GlobalHistoryMigrationTest
*
* @since 4.14.0
*/
return apply_filters( 'et_builder_ajax_cache_instance', self::$_instance );
}
}
ET_Builder_Ajax_Cache::instance();

View File

@@ -0,0 +1,803 @@
<?php
/**
* Compatibility for Gutenberg.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Editing GB blocks inside Divi.
*
* @since 3.18 Added support for WP 5.0
* @since 3.10.2
*/
class ET_Builder_Block_Editor_Integration {
/**
* Regex to match gallery in block editor.
*
* @var string
*/
protected $_gb_gallery_regexp = '/<ul class="wp-block-gallery[^"]*?">.*?<\/ul>/mis';
/**
* Constructor.
*
* ET_Builder_Block_Editor_Integration constructor.
*/
public function __construct() {
$this->init_hooks();
}
/**
* Return whether the post can be edited in the block editor.
*
* @param mixed $post Post ID or WP_Post object.
*
* @return bool
*/
protected function _can_edit_post( $post ) {
if ( function_exists( 'gutenberg_can_edit_post' ) ) {
return gutenberg_can_edit_post( $post );
}
// In case WordPress is lower than version 5.0.
if ( ! function_exists( 'use_block_editor_for_post' ) ) {
return false;
}
return use_block_editor_for_post( $post );
}
/**
* Return whether a post type is compatible with the block editor.
*
* @param string $type The post type.
*
* @return bool
*/
protected function _can_edit_post_type( $type ) {
if ( function_exists( 'gutenberg_can_edit_post_type' ) ) {
return gutenberg_can_edit_post_type( $type );
}
// In case WordPress is lower than version 5.0.
if ( ! function_exists( 'use_block_editor_for_post_type' ) ) {
return false;
}
return use_block_editor_for_post_type( $type );
}
/**
* Check if the current editor is set to load Gutenberg.
*
* @return bool
*/
protected function _is_block_editor_page() {
if ( function_exists( 'is_gutenberg_page' ) ) {
return is_gutenberg_page();
}
// In case WordPress is lower than version 5.0.
if ( ! function_exists( 'use_block_editor_for_post' ) ) {
return false;
}
return use_block_editor_for_post( get_the_ID() );
}
/**
* Filter on map_meta_cap.
*
* @param array $caps Capabilities.
* @param string $cap Capability to check.
* @param string $user_id User ID.
* @param array $args Additional args.
*
* @return array
*/
public function map_meta_cap( $caps, $cap, $user_id, $args ) {
// This only needs to run once,.
remove_filter( 'map_meta_cap', array( $this, 'map_meta_cap' ), 10 );
if (
// GB checks for 'edit_post' so do nothing in all other cases.
'edit_post' !== $cap ||
// Ignore the case where Divi wasn't used to edit the post.
! et_pb_is_pagebuilder_used( $args[0] )
) {
return $caps;
}
// We need to add `do_not_allow` for superadmins.
$caps = array( 'do_not_allow' );
return $caps;
}
/**
* Get user capabilities that is relevant to block editor integration
*
* @since 4.1.0
*
* @return array
*/
public function get_current_user_capabilities() {
/**
* Make relevant capabilities filterable should the need to check for more caps arises
*
* @since 4.1.0
*
* @param array user capabilities
*/
$relevant_capabilities = array(
'divi_library',
'use_visual_builder',
);
$relevant_capabilities = apply_filters( 'et_block_editor_relevant_capabilities', $relevant_capabilities );
$capabilities = array();
foreach ( $relevant_capabilities as $cap_name ) {
$capabilities[ $cap_name ] = et_pb_is_allowed( $cap_name );
}
return $capabilities;
}
/**
* Filter used to disable GB for certain post types.
*
* @param bool $can_edit Whether post type can be editable with gutenberg or not.
* @param string $post_type Post type name.
*
* @return bool
*/
public function gutenberg_can_edit_post_type( $can_edit, $post_type ) {
// The tricky part here is that GB doesn't pass the post ID to this filter but only its type
// but we need the ID to determine whether the post has been edited with Divi.
// Since GB uses `current_user_can( 'edit_post', $post->ID )` right after call this filter,
// We hook into `map_meta_cap` (which gets passed the ID) and do our checks there.
add_filter( 'map_meta_cap', array( $this, 'map_meta_cap' ), 10, 4 );
return $can_edit;
}
/**
* Enqueue our GB compatibility bundle.
*
* @return void
*/
public function enqueue_block_editor_assets() {
// Load script dependencies that is used by builder on top window. These dependencies
// happen to be the exact same scripts required by BFB top window's scripts.
et_bfb_enqueue_scripts_dependencies();
// Enqueue open sans.
et_builder_enqueue_open_sans();
// Enqueue integration & blocks scripts.
$deps = array(
'jquery',
'et_bfb_admin_date_addon_js',
'wp-hooks',
);
et_fb_enqueue_bundle( 'et-builder-gutenberg', 'gutenberg.js', $deps );
// Enqueue top window style.
wp_register_style(
'et-fb-top-window',
ET_BUILDER_URI . '/frontend-builder/assets/css/fb-top-window.css',
array(),
ET_BUILDER_VERSION
);
// Enqueue integration & blocks styles.
$deps = array(
'et-fb-top-window',
);
et_fb_enqueue_bundle( 'et-builder-gutenberg', 'gutenberg.css', $deps );
// this enqueue bundle.css.
et_builder_enqueue_assets_main();
$post_id = get_the_ID();
$post_type = get_post_type();
$enabled_for_post_type = et_builder_enabled_for_post_type( $post_type );
$updates_options = get_site_option( 'et_automatic_updates_options', array() );
$et_account = array(
'et_username' => et_()->array_get( $updates_options, 'username', '' ),
'et_api_key' => et_()->array_get( $updates_options, 'api_key', '' ),
'status' => get_site_option( 'et_account_status', 'not_active' ),
);
if ( defined( 'ET_CLOUD_PLUGIN_DIR' ) ) {
$library_i18n = require ET_CLOUD_PLUGIN_DIR . '/i18n/library.php';
} else {
$library_i18n = require get_template_directory() . '/cloud/i18n/library.php';
}
// Set helpers needed by our own Gutenberg bundle.
$gutenberg = array(
'helpers' => array(
'postID' => $post_id,
'postType' => $post_type,
'is3rdPartyPostType' => et_builder_is_post_type_custom( $post_type ) ? 'yes' : 'no',
'vbUrl' => et_fb_get_vb_url(),
'builderUsed' => et_pb_is_pagebuilder_used( $post_id ),
'scriptDebug' => defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
'canToggle' => et_pb_is_allowed( 'divi_builder_control' ) && $enabled_for_post_type,
'isEnabled' => $enabled_for_post_type,
'i18n' => array(
'placeholder' => array(
'block' => array(
'title' => esc_html__( 'Divi Builder', 'et_builder' ),
'description' => esc_html__( 'The Divi Builder is activated on this page. To edit your page using the builder, click the Edit With The Divi Builder button.', 'et_builder' ),
),
'render' => array(
'title' => array(
'new' => esc_html__( 'Build Your Layout Using Divi', 'et_builder' ),
'old' => esc_html__( 'This Layout Is Built With Divi', 'et_builder' ),
),
'divi' => array(
'new' => esc_html__( 'Use Divi Builder', 'et_builder' ),
'old' => esc_html__( 'Edit With The Divi Builder', 'et_builder' ),
),
'default' => esc_html__( 'Use Default Editor', 'et_builder' ),
),
),
'library' => $library_i18n,
),
),
// Loaded into ETBlockUserStore.
'capabilities' => $this->get_current_user_capabilities(),
// Loaded into ETBlockLibraryStore.
'etAccount' => $et_account,
// Loaded into ETBlockSettingsStore.
'conditions' => array(
'isRtl' => is_rtl(),
),
'constants' => array(
'emptyLayout' => '[et_pb_section admin_label="section"][et_pb_row admin_label="row"][/et_pb_row][/et_pb_section]',
),
'nonces' => array(
'et_builder_library_get_layouts_data' => wp_create_nonce( 'et_builder_library_get_layouts_data' ),
'et_builder_library_update_account' => wp_create_nonce( 'et_builder_library_update_account' ),
'et_block_layout_preview' => wp_create_nonce( 'et_block_layout_preview' ),
'et_rest_get_layout_content' => wp_create_nonce( 'et_rest_get_layout_content' ),
'et_rest_process_builder_edit_data' => wp_create_nonce( 'et_rest_process_builder_edit_data' ),
'et_fb_shortcode_to_html_nonce' => wp_create_nonce( 'et_fb_shortcode_to_html_nonce' ),
),
'urls' => array(
'adminAjax' => admin_url( 'admin-ajax.php' ),
'home' => home_url( '/' ),
),
/**
* Make DOM selectors list filterable so third party can modified it if needed
*
* @since 4.1.0
*
* @param array list of selectors
*/
'selectors' => apply_filters(
'et_gb_selectors',
array(
'pageLayoutSelect' => '#et_pb_page_layout',
)
),
/**
* Make Content Widhts settings filterable so third party can modified it if needed
*
* @since 4.1.0
*
* @param array content width configurations
*/
'contentWidths' => apply_filters(
'et_gb_content_widths',
array(
// Intentionally set null for default and undefined if no saved content width found
// unless `et_gb_content_widths` is being filtered to handle Divi Builder Plugin
// situation which might not have deifined content width.
'default' => null,
'current' => get_post_meta( $post_id, '_et_gb_content_width', true ),
'min' => 320, // Min content width (small smartphone width).
'max' => 2880, // Max content width (15" laptop * 2).
)
),
);
wp_localize_script( 'et-builder-gutenberg', 'et_builder_gutenberg', $gutenberg );
// Set translated strings for the scripts.
wp_set_script_translations( 'et-builder-gutenberg', 'et_builder', ET_BUILDER_DIR . 'languages' );
ET_Cloud_App::load_js( true, true );
// Block Editor Styles.
// Divi Layout Block.
wp_register_style( 'et-block-divi-library-editor', ET_BUILDER_URI . '/frontend-builder/assets/css/block-editor/divi-library-editor.css', array(), ET_BUILDER_VERSION );
wp_register_style( 'et-block-layout-editor', ET_BUILDER_URI . '/frontend-builder/assets/css/block-editor/layout-editor.css', array( 'et-block-divi-library-editor' ), ET_BUILDER_VERSION );
register_block_type(
'et-block-editor/et-block-layout-editor-stylesheets',
array(
'editor_style' => 'et-block-layout-editor',
)
);
// Divi Placeholder Block.
wp_register_style( 'et-block-placeholder-editor', ET_BUILDER_URI . '/frontend-builder/assets/css/block-editor/placeholder-editor.css', array( 'et-core-admin' ), ET_BUILDER_VERSION );
register_block_type(
'et-block-editor/et-block-placeholder-editor-stylesheets',
array(
'editor_style' => 'et-block-placeholder-editor',
)
);
}
/**
* Add new Divi page
*
* @return void
*/
public function add_new_button() {
global $typenow;
if ( ! $this->_can_edit_post_type( $typenow ) ) {
return;
}
$edit = 'post-new.php';
$edit .= 'post' !== $typenow ? "?post_type=$typenow" : '';
// Create a nonce to auto activate VB on a new Auto Draft.
$url = add_query_arg( 'et_fb_new_vb_nonce', wp_create_nonce( 'et_fb_new_vb_nonce' ), admin_url( $edit ) );
$button = sprintf( '<a href="%s">%s</a>', esc_url( $url ), 'Divi' );
?>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var menu = document.querySelector('#split-page-title-action .dropdown');
if (menu) {
menu.insertAdjacentHTML('afterbegin', '<?php echo et_core_esc_previously( $button ); ?>');
return;
}
});
</script>
<?php
}
/**
* This filter allows VB to be directly activated for Auto Drafts.
*
* @param object $post Auto Draft post.
*
* @return void
*/
public function auto_draft( $post ) {
// phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- The nonce value is used only for comparision in the `wp_verify_nonce`.
if ( ! isset( $_GET['et_fb_new_vb_nonce'] ) || ! wp_verify_nonce( $_GET['et_fb_new_vb_nonce'], 'et_fb_new_vb_nonce' ) ) {
return;
}
// Save the draft.
wp_update_post(
array(
'ID' => $post->ID,
'post_status' => 'draft',
)
);
// Add VB activation nonce.
$url = add_query_arg(
'et_fb_activation_nonce',
wp_create_nonce( 'et_fb_activation_nonce_' . $post->ID ),
et_fb_prepare_ssl_link( get_permalink( $post ) )
);
// Set post meta to `off` or else `et_builder_set_content_activation` won't work...
update_post_meta( $post->ID, '_et_pb_use_builder', 'off' );
wp_safe_redirect( $url );
exit();
}
/**
* Add 'Edit With Divi Editor' links
*
* @param array $actions Currently defined actions for the row.
* @param object $post Current post object.
*
* @return array
*/
public function add_edit_link( $actions, $post ) {
// Maybe change this with et_fb_current_user_can_save or equivalent.
if ( ! $this->_can_edit_post( $post ) || ! et_builder_enabled_for_post_type( $post->post_type ) ) {
return $actions;
}
if ( (int) get_option( 'page_for_posts' ) === $post->ID ) {
// Post is assigned as the blog page so it does not have editable content.
return $actions;
}
$post_id = $post->ID;
$is_divi_library = 'et_pb_layout' === get_post_type( $post_id );
$edit_url = $is_divi_library ? get_edit_post_link( $post_id, 'raw' ) : get_permalink( $post_id );
if ( et_pb_is_pagebuilder_used( $post_id ) ) {
$edit_url = et_fb_get_vb_url( $edit_url );
} else {
if ( ! et_pb_is_allowed( 'divi_builder_control' ) ) {
// Do not add Divi activation link when user lacks `Toggle Divi Builder` capability.
return $actions;
}
$edit_url = add_query_arg(
array(
'et_fb_activation_nonce' => wp_create_nonce( 'et_fb_activation_nonce_' . $post_id ),
),
$edit_url
);
}
$edit_action = array(
'divi' => sprintf(
'<a href="%s" aria-label="%s">%s</a>',
esc_url( $edit_url ),
esc_attr(
sprintf(
__( 'Edit &#8220;%s&#8221; in Divi', 'et_builder' ),
_draft_or_post_title( $post->ID )
)
),
esc_html__( 'Edit With Divi', 'et_builder' )
),
);
$actions = array_merge( $actions, $edit_action );
// I'm leaving this here in case we wanna change item position.
// $edit_offset = array_search( 'edit', array_keys( $actions ), true );
// $actions = array_merge(
// array_slice( $actions, 0, $edit_offset + 1 ),
// $edit_action,
// array_slice( $actions, $edit_offset + 1 )
// );.
return $actions;
}
/**
* Add filters needed to show our extra row action.
*
* @return void
*/
public function add_edit_link_filters() {
// For hierarchical post types.
add_filter( 'page_row_actions', array( $this, 'add_edit_link' ), 10, 2 );
// For non-hierarchical post types.
add_filter( 'post_row_actions', array( $this, 'add_edit_link' ), 10, 2 );
}
/**
* Add 'Divi' to post states when builder is enabled for it.
*
* @param array $post_states Existing post states.
* @param object $post Current post object.
*
* @return array
*/
public function display_post_states( $post_states, $post ) {
// Make sure that $post_states is an array. Third party plugin might modify $post_states and makes it null
// which create various issue (i.e. Piklist + Having a page configured as a static page).
if ( ! is_array( $post_states ) ) {
$post_states = array();
}
if ( et_pb_is_pagebuilder_used( $post->ID ) ) {
// Remove Gutenberg if existing.
$key = array_search( 'Gutenberg', $post_states, true );
if ( false !== $key ) {
unset( $post_states[ $key ] );
}
// GB devs didn't allow this to be translated so why should we ?
$post_states[] = 'Divi';
}
return $post_states;
}
/**
* Ensures that Divi enabled CPTs support 'custom-fields'.
*
* @since 3.19.12
*/
public function ensure_post_type_supports() {
$post_types = et_builder_get_builder_post_types();
foreach ( $post_types as $post_type ) {
if ( ! post_type_supports( $post_type, 'custom-fields' ) ) {
add_post_type_support( $post_type, 'custom-fields' );
}
}
}
/**
* Alter update_post_metadata return value from during a REST API update
* when meta value isn't changed.
*
* @param mixed $result Previous result.
* @param int $object_id Post ID.
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*
* @return mixed
*/
public function update_post_metadata( $result, $object_id, $meta_key, $meta_value ) {
if ( ! in_array( $meta_key, array( '_et_pb_use_builder', '_et_pb_old_content' ), true ) ) {
// Only act if it's one of our metas.
return $result;
}
if ( get_metadata( 'post', $object_id, $meta_key, true ) === $meta_value ) {
// Return true instead of false so silly WP REST API call won't die on us....
return true;
}
return $result;
}
/**
* Remove empty Divi GB placeholder when processing shortcode.
*
* @param string $post_content Raw post content (shortcode).
*
* @return string
*/
public function et_fb_load_raw_post_content( $post_content ) {
// Replace empty placeholder with no content so page creation will
// still work in this case.
return '<!-- wp:divi/placeholder /-->' === $post_content ? '' : $post_content;
}
/**
* Convert a single GB gallery to shortcode.
*
* @param string $gallery Post content.
*
* @return string
*/
public function gb_gallery_to_shortcode( $gallery ) {
$gallery = is_array( $gallery ) ? $gallery[0] : $gallery;
$ids = preg_match_all( '/data-id="(\d+)"/i', $gallery, $matches ) ? $matches[1] : array();
$columns = preg_match( '/<ul class="wp-block-gallery columns-(\d)[^"]*?">/i', $gallery, $matches ) ? $matches[1] : 3;
$shortcode = sprintf(
'[gallery columns="%s" ids="%s"]',
intval( $columns ),
implode( ',', array_map( 'intval', $ids ) )
);
return $shortcode;
}
/**
* Convert all GB galleries to shortcodes.
*
* @param string $content Post content.
*
* @return string
*/
public function gb_galleries_to_shortcodes( $content ) {
return preg_replace_callback(
$this->_gb_gallery_regexp,
array( $this, 'gb_gallery_to_shortcode' ),
$content
);
}
/**
* Check a specified post's content for GB gallery and, if present, return the first
*
* @param string $gallery Gallery data and srcs parsed from the expanded shortcode.
* @param int|WP_Post $post Post ID or object.
*
* @return string|array Gallery data and srcs parsed from the expanded shortcode.
*/
public function get_post_gallery( $gallery, $post ) {
if ( $gallery ) {
return $gallery;
}
$content = get_post_field( 'post_content', $post );
if ( empty( $content ) ) {
return $gallery;
}
if ( preg_match( $this->_gb_gallery_regexp, $content, $matches ) ) {
// Found a GB gallery.
if ( apply_filters( 'et_gb_gallery_to_shortcode', true ) ) {
// Return as shortcode.
return do_shortcode( $this->gb_gallery_to_shortcode( $matches[0] ) );
}
// Return it as is.
return $matches[0];
}
return $gallery;
}
/**
* Delete first GB gallery in content
*
* @param string $content Content.
* @param bool $deleted Whether a gallery has been already deleted or not.
* @return string
*/
public function et_delete_post_gallery( $content, $deleted ) {
if ( $deleted ) {
// If a gallery was already removed, do nothing.
return $content;
}
return preg_replace( $this->_gb_gallery_regexp, '', $content, 1 );
}
/**
* Remove custom style from our metabox when GB is showing it.
*
* @param string $post_type Post type.
*
* @return void
*/
public function add_meta_boxes( $post_type ) {
$is_block_editor_page = $this->_is_block_editor_page();
$is_metabox_exist = function_exists( 'et_single_settings_meta_box' );
$is_builder_enabled = et_builder_enabled_for_post_type( $post_type );
$is_metabox_allowed = et_pb_is_allowed( 'page_options' );
if ( $is_block_editor_page && $is_metabox_exist && $is_builder_enabled && $is_metabox_allowed ) {
// Change our metabox id so that no custom style is applied.
remove_meta_box( 'et_settings_meta_box', $post_type, 'side' );
add_meta_box(
'et_settings_meta_box_gutenberg',
esc_html__( 'Divi Page Settings', 'Divi' ),
'et_single_settings_meta_box',
$post_type,
'side',
'high'
);
}
}
/**
* Hook into REST API page call.
*
* @return void
*/
public function rest_insert_page() {
add_filter( 'update_post_metadata', array( $this, 'update_post_metadata' ), 10, 4 );
}
/**
* Custom auth function for meta updates via REST API.
*
* @param boolean $allowed True if allowed to view the meta field by default, false if else.
* @param string $meta_key The meta key.
* @param int $id Post ID.
*
* @return bool
*/
public function meta_auth( $allowed, $meta_key, $id ) {
return current_user_can( 'edit_post', $id );
}
/**
* Hook methods to WordPress
* Latest plugin version: 1.5
*
* @return void
*/
public function init_hooks() {
global $pagenow;
$edit_page_names = array( 'post.php', 'post-new.php' );
$is_editing_page = in_array( $pagenow, $edit_page_names, true );
if ( is_admin() ) {
// Load assets on post editing pages only.
if ( $is_editing_page ) {
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ), 4 );
}
add_action( 'admin_print_scripts-edit.php', array( $this, 'add_new_button' ), 10 );
add_action( 'admin_init', array( $this, 'add_edit_link_filters' ) );
// Only need to add this filter is the nonce is present in the url request
// nonce value will be checked in the filter itself.
// phpcs:ignore WordPress.Security.NonceVerification -- This is just check, therefore nonce verification not required.
if ( isset( $_GET['et_fb_new_vb_nonce'] ) ) {
add_action( 'new_to_auto-draft', array( $this, 'auto_draft' ), 1 );
}
add_filter( 'display_post_states', array( $this, 'display_post_states' ), 10, 2 );
} else {
// If "Enable Divi Gallery" option is enabled.
if ( apply_filters( 'et_gb_gallery_to_shortcode', false ) === true ) {
// Converts GB galleries to shortcodes.
add_filter( 'the_content', array( $this, 'gb_galleries_to_shortcodes' ), 1 );
}
if ( apply_filters( 'et_gb_gallery_include_in_get_post_gallery', false ) === true ) {
// Makes sure `get_post_gallery` returns a GB gallery if no shortcode is found.
add_filter( 'get_post_gallery', array( $this, 'get_post_gallery' ), 10, 2 );
}
// This filter gets called when Divi removes first gallery shortcode from
// a gallery post (as in post format). We hook into that to ensure that the first GB gallery
// is deleted if nothing else was.
add_filter( 'et_delete_post_gallery', array( $this, 'et_delete_post_gallery' ), 10, 2 );
// Provide other code a simple way to access the conversion function via this custom filter.
add_filter( 'et_gb_galleries_to_shortcodes', array( $this, 'gb_galleries_to_shortcodes' ) );
}
add_filter( 'et_fb_load_raw_post_content', array( $this, 'et_fb_load_raw_post_content' ) );
add_filter( 'init', array( $this, 'ensure_post_type_supports' ), 999999 );
// This is one of the most idiot things I had to do ever and its due to
// a 10 month old-yet not fixed WP bug: https://core.trac.wordpress.org/ticket/42069
// TLDR: when updating a post with meta via WP REST API, `update_metadata` should only
// be called for metas whose value changed.
// However, the equality check is fooled by values including characters that are
// slashed or converted to entities, like " or <.
// `update_metadata` is then called and returns `false` (because value didn't change) which results
// in REST API page update to abort with a 500 error code....
// To fix the issue, we hook into REST API page update and force `update_metadata` to return `true`
// when value didn't change (only applied to our own meta keys).
add_action( 'rest_insert_page', array( $this, 'rest_insert_page' ) );
// Need to deal with our metabox styling when inside GB.
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 10, 1 );
// To register the post metas is needed because we want to change their value within our custom GB blocks
// Editing a post meta via REST API is allowed by default unless its key is protected (starts with `_`)
// which is the case here so we also need to create a custom auth function.
$auth = array( $this, 'meta_auth' );
$args = array(
'auth_callback' => $auth,
'show_in_rest' => true,
'single' => true,
'type' => 'string',
);
register_meta( 'post', '_et_pb_use_builder', $args );
$args = array(
'auth_callback' => $auth,
'show_in_rest' => true,
'single' => true,
'type' => 'string',
);
register_meta( 'post', '_et_pb_old_content', $args );
$args = array(
'auth_callback' => $auth,
'show_in_rest' => true,
'single' => true,
'type' => 'string',
);
register_meta( 'post', '_et_gb_content_width', $args );
if ( $is_editing_page ) {
// Load Library and Cloud.
et_builder_load_library();
}
}
}
if ( et_core_is_gutenberg_active() ) {
new ET_Builder_Block_Editor_Integration();
}

View File

@@ -0,0 +1,149 @@
<?php
/**
* Classic Editor Enabler.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! class_exists( 'ET_Builder_Classic_Editor' ) ) :
/**
* Load classic editor and disable Gutenberg/Block Editor
*
* Adapted from Classic Editor plugin by WordPress Contributors.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License version 2, as published by the Free Software Foundation. You may NOT assume
* that you can use any other version of the GPL.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Classic Editor
*
* Copyright 2018 by WordPress Contributors
*
* Classic Editor is released under the GPL-2.0+
*/
class ET_Builder_Classic_Editor {
/**
* Instance of `ET_Builder_Classic_Editor`.
*
* @var ET_Builder_Classic_Editor
*/
private static $_instance;
/**
* ET_Builder_Classic_Editor constructor.
*/
public function __construct() {
add_action( 'init', array( $this, 'register_actions' ), 20 );
}
/**
* Get the class instance.
*
* @since 3.18
*
* @return ET_Builder_Classic_Editor
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Add & remove necessary actions and filters needed to load Classic Editor back
* These filters are based on Classic Editor plugin to ensure required filters & actions needed
* to load Classic Editor on Gutenberg / Block Editor (WordPress 5.0). All conditiononal Block Editor
* loader based on query string has been removed.
*
* @since 3.18
*/
public function register_actions() {
$gutenberg = has_filter( 'replace_editor', 'gutenberg_init' );
$block_editor = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' );
if ( ! $gutenberg && ! $block_editor ) {
return;
}
// Load classic editor.
// phpcs:ignore WordPress.Security.NonceVerification -- This function does not change any state, and is therefore not susceptible to CSRF.
$enable_classic_editor = apply_filters( 'et_builder_enable_classic_editor', isset( $_GET['et_classic_editor'] ) );
if ( $block_editor && $enable_classic_editor ) {
add_filter( 'use_block_editor_for_post_type', '__return_false', 100 );
}
if ( $gutenberg && $enable_classic_editor ) {
// gutenberg.php.
remove_action( 'admin_menu', 'gutenberg_menu' );
remove_action( 'admin_notices', 'gutenberg_build_files_notice' );
remove_action( 'admin_notices', 'gutenberg_wordpress_version_notice' );
remove_action( 'admin_init', 'gutenberg_redirect_demo' );
remove_filter( 'replace_editor', 'gutenberg_init' );
// lib/client-assets.php.
remove_action( 'wp_enqueue_scripts', 'gutenberg_register_scripts_and_styles', 5 );
remove_action( 'admin_enqueue_scripts', 'gutenberg_register_scripts_and_styles', 5 );
remove_action( 'wp_enqueue_scripts', 'gutenberg_common_scripts_and_styles' );
remove_action( 'admin_enqueue_scripts', 'gutenberg_common_scripts_and_styles' );
// lib/compat.php.
remove_filter( 'wp_refresh_nonces', 'gutenberg_add_rest_nonce_to_heartbeat_response_headers' );
// lib/rest-api.php.
remove_action( 'rest_api_init', 'gutenberg_register_rest_routes' );
remove_action( 'rest_api_init', 'gutenberg_add_taxonomy_visibility_field' );
remove_filter( 'rest_request_after_callbacks', 'gutenberg_filter_oembed_result' );
remove_filter( 'registered_post_type', 'gutenberg_register_post_prepare_functions' );
remove_filter( 'register_post_type_args', 'gutenberg_filter_post_type_labels' );
// lib/meta-box-partial-page.php.
remove_action( 'do_meta_boxes', 'gutenberg_meta_box_save', 1000 );
remove_action( 'submitpost_box', 'gutenberg_intercept_meta_box_render' );
remove_action( 'submitpage_box', 'gutenberg_intercept_meta_box_render' );
remove_action( 'edit_page_form', 'gutenberg_intercept_meta_box_render' );
remove_action( 'edit_form_advanced', 'gutenberg_intercept_meta_box_render' );
remove_filter( 'redirect_post_location', 'gutenberg_meta_box_save_redirect' );
remove_filter( 'filter_gutenberg_meta_boxes', 'gutenberg_filter_meta_boxes' );
}
if ( $gutenberg && $enable_classic_editor ) {
// gutenberg.php.
remove_action( 'admin_init', 'gutenberg_add_edit_link_filters' );
remove_action( 'admin_print_scripts-edit.php', 'gutenberg_replace_default_add_new_button' );
remove_filter( 'body_class', 'gutenberg_add_responsive_body_class' );
remove_filter( 'admin_url', 'gutenberg_modify_add_new_button_url' );
// lib/compat.php.
remove_action( 'admin_enqueue_scripts', 'gutenberg_check_if_classic_needs_warning_about_blocks' );
// lib/register.php.
remove_action( 'edit_form_top', 'gutenberg_remember_classic_editor_when_saving_posts' );
remove_filter( 'redirect_post_location', 'gutenberg_redirect_to_classic_editor_when_saving_posts' );
remove_filter( 'get_edit_post_link', 'gutenberg_revisions_link_to_editor' );
remove_filter( 'wp_prepare_revision_for_js', 'gutenberg_revisions_restore' );
remove_filter( 'display_post_states', 'gutenberg_add_gutenberg_post_state' );
// lib/plugin-compat.php.
remove_filter( 'rest_pre_insert_post', 'gutenberg_remove_wpcom_markdown_support' );
}
}
}
endif;
ET_Builder_Classic_Editor::instance();

View File

@@ -0,0 +1,692 @@
<?php
/**
* Extract Critical CSS
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Extract Critical CSS
*/
class ET_Builder_Critical_CSS {
// Include in Critical CSS the Required Assets (those which don't depends on Content).
// To force some of the Required Assets in the BTF, check `maybe_defer_global_asset` method.
const INCLUDE_REQUIRED = true;
// Used to estimate height for percentage based units like `vh`,`em`, etc.
const VIEWPORT_HEIGHT = 1000;
const FONT_HEIGHT = 16;
/**
* Is Critical CSS Threshold Height.
*
* @var int
*/
protected $_above_the_fold_height;
/**
* Root element.
*
* @var stdClass
*/
protected $_root;
/**
* Modules.
*
* @var array
*/
protected $_modules = [];
/**
* Modules.
*
* @var stdClass
*/
protected $_content;
/**
* Above The Fold Sections.
*
* @var array
*/
protected $_atf_sections = [];
/**
* Builder Style Manager.
*
* @var array
*/
protected $_builder_styles = [];
/**
* Instance of `ET_Builder_Critical_CSS`.
*
* @var ET_Builder_Critical_CSS
*/
private static $_instance;
/**
* ET_Builder_Critical_CSS constructor.
*/
public function __construct() {
global $shortname;
if ( et_is_builder_plugin_active() ) {
$options = get_option( 'et_pb_builder_options', array() );
$critical_threshold_height = isset( $options['performance_main_critical_threshold_height'] ) ? $options['performance_main_critical_threshold_height'] : 'Medium';
} else {
$critical_threshold_height = et_get_option( $shortname . '_critical_threshold_height', 'Medium' );
}
if ( 'High' === $critical_threshold_height ) {
$this->_above_the_fold_height = 1500;
} elseif ( 'Medium' === $critical_threshold_height ) {
$this->_above_the_fold_height = 1000;
} else {
$this->_above_the_fold_height = 500;
}
add_filter( 'et_builder_critical_css_enabled', '__return_true' );
// Dynamic CSS content shortcode modules.
add_filter( 'et_dynamic_assets_modules_atf', [ $this, 'dynamic_assets_modules_atf' ], 10, 2 );
// Detect when renderining Above The Fold sections.
add_filter( 'pre_do_shortcode_tag', [ $this, 'check_section_start' ], 99, 4 );
add_filter( 'do_shortcode_tag', [ $this, 'check_section_end' ], 99, 2 );
// Analyze Builder style manager.
add_filter( 'et_builder_module_style_manager', [ $this, 'enable_builder' ] );
// Dynamic CSS content shortcode.
add_filter( 'et_global_assets_list', [ $this, 'maybe_defer_global_asset' ], 99 );
if ( self::INCLUDE_REQUIRED ) {
add_filter( 'et_dynamic_assets_atf_includes_required', '__return_true' );
}
}
/**
* Defer some global assets if threshold is met.
*
* @param array $assets assets to defer.
*
* @since 4.10.0
*
* @return array $assets assets to be deferred.
*/
public function maybe_defer_global_asset( $assets ) {
$defer = [
'et_divi_footer',
'et_divi_gutters_footer',
'et_divi_comments',
];
foreach ( $defer as $key ) {
if ( isset( $assets[ $key ] ) ) {
$assets[ $key ]['maybe_defer'] = true;
}
}
return $assets;
}
/**
* Force a PageResource to write its content on file, even when empty
*
* @param bool $force Default value.
* @param array $resource Critical/Deferred PageResources.
*
* @since 4.10.0
*
* @return bool
*/
public function force_resource_write( $force, $resource ) {
$styles = $this->_builder_styles;
if ( empty( $styles ) ) {
return $force;
}
$forced_slugs = [
$styles['deferred']->slug,
$styles['manager']->slug,
];
return in_array( $resource->slug, $forced_slugs, true ) ? true : $force;
}
/**
* Analyze Builder style manager.
*
* @since 4.10.0
*
* @param array $styles Style Managers.
*
* @return array
*/
public function enable_builder( $styles ) {
$this->_builder_styles = $styles;
// There are cases where external assets generation might be disabled at runtime,
// ensure Critical CSS and Dynamic Assets use the same logic to avoid side effects.
if ( ! et_should_generate_dynamic_assets() ) {
$this->disable();
return $styles;
}
add_filter( 'et_core_page_resource_force_write', [ $this, 'force_resource_write' ], 10, 2 );
add_filter( 'et_core_page_resource_tag', [ $this, 'builder_style_tag' ], 10, 5 );
if ( et_builder_is_mod_pagespeed_enabled() ) {
// PageSpeed filters out `preload` links so we gotta use `prefetch` but
// Safari doesn't support the latter....
add_action( 'wp_body_open', [ $this, 'add_safari_prefetch_workaround' ], 1 );
}
return $styles;
}
/**
* Prints deferred Critical CSS stlyesheet.
*
* @param string $tag stylesheet template.
* @param string $slug stylesheet slug.
* @param string $scheme stylesheet URL.
* @param string $onload stylesheet onload attribute.
*
* @since 4.10.0
*
* @return string
*/
public function builder_style_tag( $tag, $slug, $scheme, $onload ) {
$deferred = $this->_builder_styles['deferred'];
$inlined = $this->_builder_styles['manager'];
// reason: Stylsheet needs to be printed on demand.
// phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
// reason: Snake case requires refactor of PageResource.php.
// phpcs:disable ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase
switch ( $slug ) {
case $deferred->slug:
// Don't enqueue empty resources.
if ( 0 === et_()->WPFS()->size( $deferred->path ) ) {
return '';
}
// Use 'prefetch' when Mod PageSpeed is detected because it removes 'preload' links.
$rel = et_builder_is_mod_pagespeed_enabled() ? 'prefetch' : 'preload';
/**
* Filter deferred styles rel attribute.
*
* Mod PageSpeed removes 'preload' links and we attempt to fix that by trying to detect if
* the 'x-mod-pagespeed' (Apache) or 'x-page-speed' (Nginx) header is present and if it is,
* replace 'preload' with 'prefetch'. However, in some cases, like when the request goes through
* a CDN first, we are unable to detect the header. This hook can be used to change the 'rel'
* attribute to use 'prefetch' when our et_builder_is_mod_pagespeed_enabled() function fails
* to detect Mod PageSpeed.
*
* With that out of the way, the only reason I wrote this detailed description is to make Fabio proud.
*
* @since 4.11.3
*
* @param string $rel
*/
$rel = apply_filters( 'et_deferred_styles_rel', $rel );
// Defer the stylesheet.
$template = '<link rel="%4$s" as="style" id="%1$s" href="%2$s" onload="this.onload=null;this.rel=\'stylesheet\';%3$s" />';
return sprintf( $template, $slug, $scheme, $onload, $rel );
case $inlined->slug:
// Inline the stylesheet.
$template = "<style id=\"et-critical-inline-css\">%1\$s</style>\n";
$content = et_()->WPFS()->get_contents( $inlined->path );
return sprintf( $template, $content );
}
// phpcs:enable
return $tag;
}
/**
* Safari doesn't support `prefetch`......
*
* @since 4.10.7
*
* @return void
*/
public function add_safari_prefetch_workaround() {
// .... so we turn it into `preload` using JS.
?>
<script type="application/javascript">
(function() {
var relList = document.createElement('link').relList;
if (!!(relList && relList.supports && relList.supports('prefetch'))) {
// Browser supports `prefetch`, no workaround needed.
return;
}
var links = document.getElementsByTagName('link');
for (var i = 0; i < links.length; i++) {
var link = links[i];
if ('prefetch' === link.rel) {
link.rel = 'preload';
}
}
})();
</script>
<?php
}
/**
* Add `set_style` filter when rendering an ATF section.
*
* @since 4.10.0
*
* @param false|string $value Short-circuit return value. Either false or the value to replace the shortcode with.
* @param string $tag Shortcode name.
* @param array|string $attr Shortcode attributes array or empty string.
* @param array $m Regular expression match array.
*
* @return false|string
*/
public function check_section_start( $value, $tag, $attr, $m ) {
if ( 'et_pb_section' !== $tag ) {
return $value;
}
$attrs = $m[3];
$action = 'et_builder_set_style';
$filter = [ $this, 'set_style' ];
$active = has_filter( $action, $filter );
if ( ! empty( $this->_atf_sections[ $attrs ] ) ) {
$this->_atf_sections[ $attrs ]--;
if ( ! $active ) {
add_filter( $action, [ $this, 'set_style' ], 10 );
}
}
return $value;
}
/**
* Remove `set_style` filter after rendering an ATF section.
*
* @since 4.10.0
*
* @param string $output Shortcode output.
* @param string $tag Shortcode name.
*
* @return string
*/
public function check_section_end( $output, $tag ) {
static $section = 0;
if ( 'et_pb_section' !== $tag ) {
return $output;
}
$action = 'et_builder_set_style';
$filter = [ $this, 'set_style' ];
if ( has_filter( $action, $filter ) ) {
remove_filter( $action, $filter, 10 );
}
return $output;
}
/**
* Filter used to analize content coming from Dynamic Access Class.
*
* @param array $value Default shortcodes list (empty).
* @param string $content TB/Post Content.
*
* @since 4.10.0
*
* @return array List of ATF shortcodes.
*/
public function dynamic_assets_modules_atf( $value, $content = '' ) {
if ( empty( $content ) ) {
return $value;
}
$modules = $this->extract( $content );
// Dynamic CSS content shortcode.
add_filter( 'et_dynamic_assets_content', [ $this, 'dynamic_assets_content' ] );
return $modules;
}
/**
* Returns splitted (ATF/BFT) Content.
*
* @since 4.10.0
*
* @return stdClass
*/
public function dynamic_assets_content() {
return $this->_content;
}
/**
* While the filter is applied, any rendered style will be considered critical.
*
* @param array $style Style.
*
* @since 4.10.0
*
* @return array
*/
public function set_style( $style ) {
$style['critical'] = true;
return $style;
}
/**
* Parse Content into shortcodes.
*
* @param string $content TB/Post Content.
*
* @since 4.10.0
*
* @return array|boolean
*/
public static function parse_shortcode( $content ) {
static $regex;
if ( false === strpos( $content, '[' ) ) {
return false;
}
if ( empty( $regex ) ) {
$regex = '/' . get_shortcode_regex() . '/';
// Add missing child shortcodes (because dynamically added).
$existing = 'et_pb_pricing_tables';
$shortcodes = [
$existing,
'et_pb_pricing_item',
];
$regex = str_replace( $existing, join( '|', $shortcodes ), $regex );
}
preg_match_all( $regex, $content, $matches, PREG_SET_ORDER );
return $matches;
}
/**
* Estimates height to split Content in ATF/BTF.
*
* @param string $content TB/Post Content.
*
* @since 4.10.0
*
* @return array List of ATF shortcodes.
*/
public function extract( $content ) {
// Create root object when needed.
if ( empty( $this->_root ) ) {
$this->_root = (object) [
'tag' => 'root',
'height' => 0,
];
}
if ( $this->_root->height >= $this->_above_the_fold_height ) {
// Do nothing when root already exists and its height >= treshold.
return [];
}
$shortcodes = self::parse_shortcode( $content );
if ( ! is_array( $shortcodes ) ) {
return [];
}
$shortcodes = array_reverse( $shortcodes );
$is_above_the_fold = true;
$root = $this->_root;
$root->count = count( $shortcodes );
$stack = [ $root ];
$parent = end( $stack );
$tags = [];
$atf_content = '';
$btf_content = '';
$structure_slugs = [
'et_pb_section',
'et_pb_row',
'et_pb_row_inner',
'et_pb_column',
'et_pb_column_inner',
];
$section = '';
$section_shortcode = '';
// phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
while ( $is_above_the_fold && $shortcode = array_pop( $shortcodes ) ) {
list( $raw,, $tag, $attrs,, $content ) = $shortcode;
$tags[] = $tag;
$children = self::parse_shortcode( $content );
$element = (object) [
'tag' => $tag,
'children' => [],
'height' => 0,
'margin' => 0,
'padding' => 0,
'attrs' => [],
];
switch ( $tag ) {
case 'et_pb_pricing_table':
$lines = array_filter( explode( "\n", str_replace( array( '<p>', '</p>', '<br />' ), "\n", $content ) ) );
$content = '';
foreach ( $lines as $line ) {
$content .= sprintf( '[et_pb_pricing_item]%s[/et_pb_pricing_item]', trim( $line ) );
}
$children = self::parse_shortcode( $content );
break;
case 'et_pb_section':
$section = $attrs;
$section_shortcode = $raw;
break;
}
$props = shortcode_parse_atts( $attrs );
if ( isset( $props['custom_margin'] ) ) {
$margin = self::get_margin_padding_height( $props['custom_margin'] );
$element->margin = $margin;
if ( $margin > 0 ) {
$element->height += $margin;
$element->attrs[] = 'margin:' . $props['custom_margin'] . "-> $margin";
}
}
if ( isset( $props['custom_padding'] ) ) {
$padding = self::get_margin_padding_height( $props['custom_padding'] );
$element->padding = $padding;
if ( $padding > 0 ) {
$element->height += $padding;
$element->attrs[] = 'padding:' . $props['custom_padding'] . "-> $padding";
}
}
if ( false !== $children ) {
// Non empty structure element.
$element->count = count( $children );
$stack[] = $element;
$shortcodes = array_merge( $shortcodes, array_reverse( $children ) );
} else {
// Only add default content height for modules, not empty structure.
if ( ! in_array( $tag, $structure_slugs, true ) ) {
$element->height += 100;
}
do {
$parent = end( $stack );
switch ( $element->tag ) {
case 'et_pb_column':
case 'et_pb_column_inner':
// Do nothing.
break;
case 'et_pb_row':
case 'et_pb_row_inner':
// Row height is determined by its tallest column.
$max = 0;
foreach ( $element->children as $column ) {
$max = max( $max, $column->height );
}
$element->height += $max;
$parent->height += $element->height;
break;
case 'et_pb_section':
// Update Above The Fold Sections.
if ( isset( $this->_atf_sections[ $section ] ) ) {
$this->_atf_sections[ $section ]++;
} else {
$this->_atf_sections[ $section ] = 1;
}
$atf_content .= $section_shortcode;
$root->height += $element->height;
if ( $root->height >= $this->_above_the_fold_height ) {
$is_above_the_fold = false;
}
break;
default:
$parent->height += $element->height;
}
$parent->children[] = $element;
if ( 0 !== --$parent->count ) {
break;
}
$element = $parent;
array_pop( $stack );
if ( empty( $stack ) ) {
break;
}
} while ( $is_above_the_fold && 0 !== --$parent->count );
}
}
foreach ( $shortcodes as $shortcode ) {
$btf_content .= $shortcode[0];
}
$tags = array_unique( $tags );
$this->_modules = array_unique( array_merge( $this->_modules, $tags ) );
$this->_content = (object) [
'atf' => $atf_content,
'btf' => $btf_content,
];
return $tags;
}
/**
* Calculate margin and padding.
*
* @param string $value Margin and padding values.
*
* @since 4.10.0
*
* @return int margin/padding height value.
*/
public static function get_margin_padding_height( $value ) {
$values = explode( '|', $value );
if ( empty( $values ) ) {
return;
}
// Only top/bottom values are needed.
$values = array_map( 'trim', [ $values[0], $values[2] ] );
$total = 0;
foreach ( $values as $value ) {
if ( '' === $value ) {
continue;
}
$unit = et_pb_get_value_unit( $value );
// Remove the unit, if present.
if ( false !== strpos( $value, $unit ) ) {
$value = substr( $value, 0, -strlen( $unit ) );
}
$value = (int) $value;
switch ( $unit ) {
case 'rem':
case 'em':
$value *= self::FONT_HEIGHT;
break;
case 'vh':
$value = ( $value * self::VIEWPORT_HEIGHT ) / 100;
break;
case 'px':
break;
default:
$value = 0;
}
$total += $value;
}
return $total;
}
/**
* Disable Critical CSS.
*
* @since 4.12.0
*
* @return void
*/
public function disable() {
remove_filter( 'et_builder_critical_css_enabled', '__return_true' );
remove_filter( 'et_dynamic_assets_modules_atf', [ $this, 'dynamic_assets_modules_atf' ] );
remove_filter( 'pre_do_shortcode_tag', [ $this, 'check_section_start' ] );
remove_filter( 'do_shortcode_tag', [ $this, 'check_section_end' ] );
remove_filter( 'et_builder_module_style_manager', [ $this, 'enable_builder' ] );
remove_filter( 'et_global_assets_list', [ $this, 'maybe_defer_global_asset' ] );
}
/**
* Get the class instance.
*
* @since 4.10.0
*
* @return ET_Builder_Critical_CSS
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
}
ET_Builder_Critical_CSS::instance();

View File

@@ -0,0 +1,194 @@
<?php
/**
* Prevent Page/Post from being cached.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Class to prevent Page/Post from being cached.
*/
class ET_Builder_Do_Not_Cache_Page {
/**
* Instance of `ET_Builder_Do_Not_Cache_Page`.
*
* @var ET_Builder_Do_Not_Cache_Page
*/
private static $_instance;
/**
* Instance of `ET_Builder_Do_Not_Cache_Page`.
*
* @var bool
*/
protected $_processed = false;
/**
* ET_Builder_Do_Not_Cache_Page constructor.
*/
public function __construct() {
add_action( 'template_redirect', [ $this, 'maybe_prevent_cache' ] );
}
/**
* When a page loads for the first time, Builder CSS is generated during the request and then
* printed inline in the footer which causes CLS issues because the CSS is loading late.
*
* @since 4.11.0
*
* @return void
*/
public function prevent_cache() {
// Ensure this only runs once.
if ( $this->_processed ) {
return;
}
$this->_processed = true;
// Disable several plugins which do not honor `DONOTCACHEPAGE` (set in `PageResource.php`).
if ( ! headers_sent() ) {
// Sending `no-cache` header should prevent CDNs from caching the first request.
header( 'Cache-Control: no-store, no-cache' );
// Disable SiteGround Optimizer Dynamic Cache.
header( 'X-Cache-Enabled: False' );
}
// Disable LiteSpeed Cache.
$reason = esc_html__( 'Generating CSS', 'et_builder' );
do_action( 'litespeed_control_set_nocache', $reason );
// Disable WP Fastest Cache.
if ( class_exists( 'WpFastestCacheCreateCache' ) ) {
// This Plugin has no hook/API to disable cache programmatically....
// The only way we can do this is by setting the `exclude_current_page_text` public property
// to a non empty value... except the class instance is not made available anywhere in the code....
// However, the instance also adds itself to the `wp` hook so we can find it by scanning the list
// of all registered actions.
$hooks = et_()->array_get( $GLOBALS, 'wp_filter.wp.10', [] );
if ( is_array( $hooks ) ) {
foreach ( $hooks as $key => $hook ) {
if (
isset( $hook['function'] ) &&
is_array( $hook['function'] ) &&
is_a( $hook['function'][0], 'WpFastestCacheCreateCache' )
) {
$wp_fastest_cache = $hook['function'][0];
$wp_fastest_cache->exclude_current_page_text = "<!-- $reason -->";
break;
}
}
}
}
// Disable Breeze Cache.
if ( function_exists( 'breeze_cache' ) ) {
// This Plugin has no hook/API to disable cache programmatically....
// The only way we can do this is by overwriting its configuration
// which is exposed as global variable.
global $breeze_config;
if ( isset( $breeze_config['cache_options'] ) ) {
$cache_options =& $breeze_config['cache_options'];
if ( is_array( $cache_options ) ) {
$cache_options['breeze-browser-cache'] = 0;
$cache_options['breeze-desktop-cache'] = 0;
$cache_options['breeze-mobile-cache'] = 0;
}
}
}
// Disable Hyper Cache.
if ( function_exists( 'hyper_cache_callback' ) ) {
global $hyper_cache_stop;
$hyper_cache_stop = true;
}
}
/**
* Disable Cache on first page request.
*
* @see prevent_cache()
*
* @since 4.11.0
*
* @return void
*/
public function maybe_prevent_cache() {
global $shortname;
// Bail if the magic already happened.
if ( $this->_processed ) {
return;
}
// Disable in the Visual Builder
if ( et_fb_is_enabled() ) {
return;
}
$product = in_array( $shortname, [ 'divi', 'extra' ], true ) ? $shortname : 'divi-builder';
$post_id = et_core_page_resource_get_the_ID();
$is_preview = is_preview() || is_et_pb_preview() || isset( $_GET['et_pb_preview_nonce'] ) || is_customize_preview(); // phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification -- Only checks if the parameter exists, and is therefore not susceptible to CSRF.
$is_singular = et_core_page_resource_is_singular();
$is_cpt = et_builder_should_wrap_styles();
$forced_in_footer = $post_id && et_builder_setting_is_on( 'et_pb_css_in_footer', $post_id );
$forced_inline = (
! $post_id ||
$is_preview ||
$forced_in_footer ||
et_builder_setting_is_off( 'et_pb_static_css_file', $post_id ) ||
et_core_is_safe_mode_active() ||
ET_GB_Block_Layout::is_layout_block_preview()
);
// If the post is password protected and a password has not been provided yet,
// no content (including any custom style) will be printed.
// When static css file option is enabled this will result in missing styles.
if ( ! $forced_inline && post_password_required( $post_id ? $post_id : null ) ) {
$forced_inline = true;
}
// Bail if using inline styles, page content won't be changing between requests anyway.
if ( $forced_inline ) {
return;
}
$unified = $is_singular && ! $forced_inline && ! $forced_in_footer && et_core_is_builder_used_on_current_request();
$post_id = $unified ? $post_id : 'global';
$owner = $unified ? 'core' : $product;
$slug = $unified ? 'unified' : 'customizer';
$slug .= $is_cpt ? '-cpt' : '';
$slug = et_theme_builder_decorate_page_resource_slug( $post_id, $slug );
$resource = et_core_page_resource_get( $owner, $slug, $post_id );
// Bail if Builder CSS already exists in external file, this is the request we want to cache.
if ( $resource->has_file() ) {
return;
}
$this->prevent_cache();
}
/**
* Get the class instance.
*
* @since 4.11.0
*
* @return ET_Builder_Do_Not_Cache_Page
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
}
ET_Builder_Do_Not_Cache_Page::instance();

View File

@@ -0,0 +1,419 @@
<?php
/**
* Handle error report
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// get_plugins() is only available on dashboard; Manually require it needed.
if ( ! function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
/**
* Class to send an error report.
*/
class ET_Builder_Error_Report {
/**
* Instance of `ET_Core_Data_Utils`.
*
* @var ET_Core_Data_Utils
*/
protected static $_;
/**
* Instance of `ET_Builder_Error_Report`.
*
* @var ET_Builder_Error_Report
*/
private static $_instance;
/**
* ET_Builder_Error_Report constructor.
*/
public function __construct() {
add_action( 'wp_ajax_et_fb_error_report', array( 'ET_Builder_Error_Report', 'endpoint' ) );
}
/**
* Get json_decode data and stripslashes if needed.
*
* @since 3.24
*
* @param string $data Data to be decoded.
*
* @return mixed
*/
public static function json_decode_maybe_stripslashes( $data ) {
$decoded = json_decode( $data, true );
if ( null === $decoded ) {
$decoded = json_decode( stripslashes( $data ), true );
}
return $decoded;
}
/**
* Get the class instance.
*
* @since 3.21.4
*
* @return ET_Builder_Error_Report
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
self::$_ = ET_Core_Data_Utils::instance();
return self::$_instance;
}
/**
* Get information sent for error reporting
*
* @since 3.21.4
*
* @return array
*/
public static function get_debug_info() {
$info = array(
'user' => array(
'role',
),
'errors' => array(
'error_message',
'error_message_stack',
'error_stack',
'component_info',
'notes',
),
'page' => array(
'post_type',
'builder_settings',
'builder_history',
'preferences',
),
'installation' => array(
'product_name',
'product_version',
'builder_version',
'wp_version',
'installed_plugins',
'active_plugins',
'must_use_plugins',
),
);
// If the site uses divi builder plugin, provide the theme information.
if ( et_is_builder_plugin_active() ) {
array_unshift(
$info['installation'],
'theme_name'
);
}
// If the site uses child theme, provide the child theme information.
if ( is_child_theme() ) {
array_unshift(
$info['installation'],
'is_child_theme',
'child_theme_name',
'child_theme_version'
);
}
return $info;
}
/**
* Get current product name
*
* @since 3.21.4
*
* @return string|bool
*/
protected function _get_product() {
if ( et_is_builder_plugin_active() ) {
return 'divi-builder';
}
if ( function_exists( 'et_divi_fonts_url' ) ) {
return 'Divi';
}
if ( function_exists( 'et_extra_fonts_url' ) ) {
return 'Extra';
}
return false;
}
/**
* Get debug item value
*
* @since 3.21.4
*
* @param string $info_name debug info item name.
* @param object $post alias for $_POST.
*
* @return string|array|object
*/
protected function _get_debug_value( $info_name, $post ) {
switch ( $info_name ) {
case 'role':
$current_user = wp_get_current_user();
$value = esc_html( implode( ', ', $current_user->roles ) );
break;
case 'error_message':
case 'error_message_stack':
case 'error_stack':
case 'notes':
case 'post_type':
// this will be saved into a text report, no need to convert entities.
$value = self::$_->array_get( $post, $info_name, '' );
break;
case 'latest_content':
case 'loaded_content':
$value = et_fb_process_to_shortcode( self::$_->array_get( $post, $info_name, array() ) );
break;
case 'builder_settings':
case 'builder_history':
case 'component_info':
$value = wp_json_encode( self::$_->array_get( $post, $info_name, array() ) );
break;
case 'preferences':
$value = array();
foreach ( et_fb_app_preferences() as $name => $preference ) {
$value[ $name ] = $preference['value'];
}
$value = wp_json_encode( $value );
break;
case 'product_name':
$value = $this->_get_product();
break;
case 'product_version':
$value = et_is_builder_plugin_active() ?
self::$_->array_get( get_plugin_data( WP_PLUGIN_DIR . '/divi-builder/divi-builder.php' ), 'Version', '' ) :
et_get_theme_version();
$value = esc_html( $value );
break;
case 'builder_version':
$value = ET_BUILDER_PRODUCT_VERSION;
break;
case 'wp_version':
$value = esc_html( get_bloginfo( 'version' ) );
break;
case 'installed_plugins':
$all_plugins = get_plugins();
$value = wp_json_encode( array_keys( $all_plugins ), true );
break;
case 'active_plugins':
$all_plugins = get_plugins();
$active_plugins_saved = get_option( 'active_plugins' );
$active_plugins_keys = is_array( $active_plugins_saved ) ? $active_plugins_saved : array();
$active_plugins = array_intersect_key( $all_plugins, array_flip( $active_plugins_keys ) );
$value = wp_json_encode( $active_plugins, true );
break;
case 'must_use_plugins':
$value = wp_json_encode( get_mu_plugins(), true );
break;
case 'theme_name':
case 'child_theme_name':
$value = esc_html( wp_get_theme()->get( 'Name' ) );
break;
case 'theme_version':
case 'child_theme_version':
$value = esc_html( wp_get_theme()->get( 'Version' ) );
break;
case 'is_child_theme':
$value = is_child_theme() ? 'yes' : 'no';
break;
default:
$value = '';
break;
}
return $value;
}
/**
* Get error report content
*
* @since 3.21.4
*
* @param string $data Report data.
*
* @return string
*/
protected function _get_report_content( $data ) {
$report_content = '';
$debug_info = self::get_debug_info();
$report_content = array();
foreach ( $debug_info as $items_title => $debug_items ) {
$item_key = 'group_title-' . $items_title;
$items_title = ucwords( $items_title );
$report_content[ $item_key ] = $items_title;
foreach ( $debug_items as $debug_item ) {
$item_value = et_core_esc_previously( $this->_get_debug_value( $debug_item, $data, 'array' ) );
$report_content[ $debug_item ] = $item_value;
}
}
return $report_content;
}
/**
* Get attachment data as string to be passed into endpoint
*
* @since 3.21.4
*
* @param string $data Report data.
* @param string $field Debug info item name.
*
* @return string
*/
protected function _get_exported_layout_content( $data, $field ) {
// phpcs:disable WordPress.Security.NonceVerification -- Nonce has been verified in the {@see self::endpoint()}.
// Set faux $_POST value that is required by portability.
$_POST['post'] = isset( $_POST['post_id'] ) ? sanitize_text_field( $_POST['post_id'] ) : '';
$_POST['content'] = self::$_instance->_get_debug_value( $field, $data );
// Remove page value if it is equal to `false`, avoiding paginated images not accidentally triggered.
if ( isset( $_POST['page'] ) && false === $_POST['page'] ) {
unset( $_POST['page'] );
}
$portability = et_core_portability_load( 'et_builder' );
// Export the content.
$result = $portability->export( true );
// Delete temp files or else the same content will be used for all exports.
$portability->delete_temp_files( 'et_core_export' );
return $result;
// phpcs:enable
}
/**
* Endpoint for sending error report request
*
* @since 3.21.4
*/
public static function endpoint() {
// Check for valid permission. Only administrator role can send error report.
if ( ! et_core_security_check_passed( 'manage_options', 'et_fb_send_error_report' ) ) {
wp_send_json_error(
array(
'message' => esc_html__( 'You do not have valid permission to send error report', 'et_builder' ),
)
);
wp_die();
}
// Check valid post id.
$post_id = self::$_->array_get( $_POST, 'post_id', false );
if ( ! $post_id ) {
wp_send_json_error(
array(
'message' => esc_html__( 'No valid post id found', 'et_builder' ),
)
);
wp_die();
}
// Check report data.
$data = self::$_->array_get( $_POST, 'data', false );
if ( ! $data ) {
wp_send_json_error(
array(
'message' => esc_html__( 'No valid report data found', 'et_builder' ),
)
);
wp_die();
}
// Check for Elegant Themes username & API Key.
$updates_options = get_site_option( 'et_automatic_updates_options', array() );
$et_username = self::$_->array_get( $updates_options, 'username', '' );
$et_api_key = self::$_->array_get( $updates_options, 'api_key', '' );
if ( '' === $et_username || '' === $et_api_key ) {
wp_send_json_error(
array(
'message' => esc_html__( 'No Elegant Themes username or API key found', 'et_builder' ),
)
);
wp_die();
}
// Check for account status.
$et_account_status = get_site_option( 'et_account_status', 'not_active' );
if ( 'active' !== $et_account_status ) {
wp_send_json_error(
array(
'message' => esc_html__( 'Your Elegant Themes account is inactive', 'et_builder' ),
)
);
wp_die();
}
$data = self::json_decode_maybe_stripslashes( $data );
$et_endpoint = apply_filters( 'et_builder_report_endpoint', 'https://www.elegantthemes.com/api/reportV2.php' );
// Crafting reports and send to end endpoint.
$request_settings = array(
'timeout' => 30,
'body' => array(
'username' => $et_username,
'api_key' => $et_api_key,
'error_report' => self::$_instance->_get_report_content( $data ),
'site_url' => site_url(),
'attachments' => array(
'latest' => self::$_instance->_get_exported_layout_content( $data, 'latest_content' ),
'loaded' => self::$_instance->_get_exported_layout_content( $data, 'loaded_content' ),
),
),
);
$request = wp_remote_post( $et_endpoint, $request_settings );
$request_response_code = wp_remote_retrieve_response_code( $request );
$request_body = wp_remote_retrieve_body( $request );
if ( 200 === $request_response_code ) {
wp_send_json_success();
} else {
wp_send_json_error( json_decode( $request_body ) );
}
wp_die();
}
}
ET_Builder_Error_Report::instance();

View File

@@ -0,0 +1,156 @@
<?php
/**
* Cached common translation.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Commonly used translations.
*/
class ET_Builder_I18n {
/**
* Retrieve a commonly used translation.
*
* @since 4.4.9
*
* @param string $key Translation key.
*
* @return string
*/
public static function get( $key ) {
// phpcs:disable PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE
// phpcs:disable PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE
switch ( $key ) {
// To avoid breaking tests:
// 1. Do not remove `i18-list-begin` / `i18-list-end` tags.
// 2. One translation per line.
// 3. `et_builder` Text Domain only.
// 4. No comments / empty lines.
// 5. Keep the list ordered, if can't do with your IDE, switch to Emacs.
// i18-list-begin.
case 'Actual Size' : return esc_html__( 'Actual Size', 'et_builder' );
case 'Admin Label' : return esc_html__( 'Admin Label', 'et_builder' );
case 'Advanced' : return esc_html__( 'Advanced', 'et_builder' );
case 'After' : return esc_html__( 'After', 'et_builder' );
case 'Background' : return esc_html__( 'Background', 'et_builder' );
case 'Before' : return esc_html__( 'Before', 'et_builder' );
case 'Blur' : return esc_html__( 'Blur', 'et_builder' );
case 'Body' : return esc_html__( 'Body', 'et_builder' );
case 'Bottom Center' : return esc_html__( 'Bottom Center', 'et_builder' );
case 'Bottom Left' : return esc_html__( 'Bottom Left', 'et_builder' );
case 'Bottom Right' : return esc_html__( 'Bottom Right', 'et_builder' );
case 'Bottom' : return esc_html__( 'Bottom', 'et_builder' );
case 'Button' : return esc_html__( 'Button', 'et_builder' );
case 'Cancel' : return esc_html__( 'Cancel', 'et_builder' );
case 'Center Center' : return esc_html__( 'Center Center', 'et_builder' );
case 'Center Left' : return esc_html__( 'Center Left', 'et_builder' );
case 'Center Right' : return esc_html__( 'Center Right', 'et_builder' );
case 'Center' : return esc_html__( 'Center', 'et_builder' );
case 'Centimeters (cm)' : return esc_html__( 'Centimeters (cm)', 'et_builder' );
case 'Circle' : return esc_html__( 'Circle', 'et_builder' );
case 'Circular' : return esc_html__( 'Circular', 'et_builder' );
case 'Color Burn' : return esc_html__( 'Color Burn', 'et_builder' );
case 'Color Dodge' : return esc_html__( 'Color Dodge', 'et_builder' );
case 'Color' : return esc_html__( 'Color', 'et_builder' );
case 'Conical' : return esc_html__( 'Conical', 'et_builder' );
case 'Content' : return esc_html__( 'Content', 'et_builder' );
case 'Cover' : return esc_html__( 'Cover', 'et_builder' );
case 'Custom CSS' : return esc_html__( 'Custom CSS', 'et_builder' );
case 'Custom Size' : return esc_html__( 'Custom Size', 'et_builder' );
case 'CSS' : return esc_html__( 'CSS', 'et_builder' );
case 'Dark' : return esc_html__( 'Dark', 'et_builder' );
case 'Darken' : return esc_html__( 'Darken', 'et_builder' );
case 'Default' : return esc_html__( 'Default', 'et_builder' );
case 'Degrees (deg)' : return esc_html__( 'Degrees (deg)', 'et_builder' );
case 'Design' : return esc_html__( 'Design', 'et_builder' );
case 'Desktop' : return esc_html__( 'Desktop', 'et_builder' );
case 'Difference' : return esc_html__( 'Difference', 'et_builder' );
case 'Disc' : return esc_html__( 'Disc', 'et_builder' );
case 'Down' : return esc_html__( 'Down', 'et_builder' );
case 'Ease' : return esc_html__( 'Ease', 'et_builder' );
case 'Ease-In' : return esc_html__( 'Ease-In', 'et_builder' );
case 'Ease-In-Out' : return esc_html__( 'Ease-In-Out', 'et_builder' );
case 'Ease-Out' : return esc_html__( 'Ease-Out', 'et_builder' );
case 'Elements' : return esc_html__( 'Elements', 'et_builder' );
case 'Elliptical' : return esc_html__( 'Elliptical', 'et_builder' );
case 'Exclusion' : return esc_html__( 'Exclusion', 'et_builder' );
case 'Expand' : return esc_html__( 'Expand', 'et_builder' );
case 'Fade' : return esc_html__( 'Fade', 'et_builder' );
case 'Fit' : return esc_html__( 'Fit', 'et_builder' );
case 'Flip' : return esc_html__( 'Flip', 'et_builder' );
case 'Font size (em)' : return esc_html__( 'Font size (em)', 'et_builder' );
case 'Hard Light' : return esc_html__( 'Hard Light', 'et_builder' );
case 'Heading' : return esc_html__( 'Heading', 'et_builder' );
case 'Hue' : return esc_html__( 'Hue', 'et_builder' );
case 'Image' : return esc_html__( 'Image', 'et_builder' );
case 'Inches (in)' : return esc_html__( 'Inches (in)', 'et_builder' );
case 'Inside' : return esc_html__( 'Inside', 'et_builder' );
case 'Layout' : return esc_html__( 'Layout', 'et_builder' );
case 'Left' : return esc_html__( 'Left', 'et_builder' );
case 'Light' : return esc_html__( 'Light', 'et_builder' );
case 'Lighten' : return esc_html__( 'Lighten', 'et_builder' );
case 'Linear' : return esc_html__( 'Linear', 'et_builder' );
case 'Link' : return esc_html__( 'Link', 'et_builder' );
case 'Luminosity' : return esc_html__( 'Luminosity', 'et_builder' );
case 'Main Element' : return esc_html__( 'Main Element', 'et_builder' );
case 'Millimeters (mm)' : return esc_html__( 'Millimeters (mm)', 'et_builder' );
case 'Multiply' : return esc_html__( 'Multiply', 'et_builder' );
case 'No Repeat' : return esc_html__( 'No Repeat', 'et_builder' );
case 'No' : return esc_html__( 'No', 'et_builder' );
case 'None' : return esc_html__( 'None', 'et_builder' );
case 'Normal' : return esc_html__( 'Normal', 'et_builder' );
case 'Off' : return esc_html__( 'Off', 'et_builder' );
case 'On' : return esc_html__( 'On', 'et_builder' );
case 'Outside' : return esc_html__( 'Outside', 'et_builder' );
case 'Overlay' : return esc_html__( 'Overlay', 'et_builder' );
case 'Percent (%)' : return esc_html__( 'Percent (%)', 'et_builder' );
case 'Phone' : return esc_html__( 'Phone', 'et_builder' );
case 'Picas (pc)' : return esc_html__( 'Picas (pc)', 'et_builder' );
case 'Pixels (px)' : return esc_html__( 'Pixels (px)', 'et_builder' );
case 'Points (pt)' : return esc_html__( 'Points (pt)', 'et_builder' );
case 'Position' : return esc_html__( 'Position', 'et_builder' );
case 'Radial' : return esc_html__( 'Radial', 'et_builder' );
case 'Repeat X (horizontal)' : return esc_html__( 'Repeat X (horizontal)', 'et_builder' );
case 'Repeat Y (vertical)' : return esc_html__( 'Repeat Y (vertical)', 'et_builder' );
case 'Repeat and Stretch' : return esc_html__( 'Repeat and Stretch', 'et_builder' );
case 'Repeat with space between' : return esc_html__( 'Repeat with space between', 'et_builder' );
case 'Repeat' : return esc_html__( 'Repeat', 'et_builder' );
case 'Right' : return esc_html__( 'Right', 'et_builder' );
case 'Root-level font size (rem)' : return esc_html__( 'Root-level font size (rem)', 'et_builder' );
case 'Saturation' : return esc_html__( 'Saturation', 'et_builder' );
case 'Screen' : return esc_html__( 'Screen', 'et_builder' );
case 'Sizing' : return esc_html__( 'Sizing', 'et_builder' );
case 'Slide' : return esc_html__( 'Slide', 'et_builder' );
case 'Soft Light' : return esc_html__( 'Soft Light', 'et_builder' );
case 'Square' : return esc_html__( 'Square', 'et_builder' );
case 'Stretch to Fill' : return esc_html__( 'Stretch to Fill', 'et_builder' );
case 'Tablet' : return esc_html__( 'Tablet', 'et_builder' );
case 'Text' : return esc_html__( 'Text', 'et_builder' );
case 'Title' : return esc_html__( 'Title', 'et_builder' );
case 'Top Center' : return esc_html__( 'Top Center', 'et_builder' );
case 'Top Left' : return esc_html__( 'Top Left', 'et_builder' );
case 'Top Right' : return esc_html__( 'Top Right', 'et_builder' );
case 'Top' : return esc_html__( 'Top', 'et_builder' );
case 'Up' : return esc_html__( 'Up', 'et_builder' );
case 'Upload an image' : return esc_attr__( 'Upload an image', 'et_builder' );
case 'Viewport Height (vh)' : return esc_html__( 'Viewport Height (vh)', 'et_builder' );
case 'Viewport Maximum (vmax)' : return esc_html__( 'Viewport Maximum (vmax)', 'et_builder' );
case 'Viewport Minimum (vmin)' : return esc_html__( 'Viewport Minimum (vmin)', 'et_builder' );
case 'Viewport Width (vw)' : return esc_html__( 'Viewport Width (vw)', 'et_builder' );
case 'Visibility' : return esc_attr__( 'Visibility', 'et_builder' );
case 'X-height (ex)' : return esc_html__( 'X-height (ex)', 'et_builder' );
case 'Yes' : return esc_html__( 'Yes', 'et_builder' );
case 'Zero-width (ch)' : return esc_html__( 'Zero-width (ch)', 'et_builder' );
// i18-list-end.
}
// phpcs:enable
return $key;
}
}

View File

@@ -0,0 +1,352 @@
<?php
/**
* Move JQuery from head to body.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Class to move JQuery from head to body.
*/
class ET_Builder_JQuery_Body {
/**
* Cache.
*
* @var array.
*/
protected $_has_jquery_dep = [];
/**
* Should move jquery.
*
* @var bool|null.
*/
protected static $_should_move_jquery = null;
/**
* Instance of `ET_Builder_JQuery_Body`.
*
* @var ET_Builder_JQuery_Body
*/
private static $_instance;
/**
* ET_Builder_JQuery_Body constructor.
*/
public function __construct() {
add_action( 'wp_print_scripts', [ $this, 'wp_print_scripts' ], 99 );
add_action( 'wp_head', [ $this, 'add_jquery_sub' ], 1 );
add_action( 'wp_enqueue_scripts', [ $this, 'remove_jquery_sub' ] );
}
/**
* Get post content from Theme Builder templates.
* Combine it with the post content from the current post and integration code.
*
* @return string
* @since 4.10.0
*/
public function get_all_content() {
static $all_content;
// Cache the value.
if ( ! empty( $all_content ) ) {
return $all_content;
}
global $post, $shortname;
$all_content = empty( $post ) ? '' : $post->post_content;
$tb_layouts = et_theme_builder_get_template_layouts();
// Add TB templates content.
if ( ! empty( $tb_layouts ) ) {
$post_types = [
ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE,
ET_THEME_BUILDER_BODY_LAYOUT_POST_TYPE,
ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE,
];
foreach ( $post_types as $post_type ) {
$layout = $tb_layouts[ $post_type ];
if ( $layout['override'] && ! empty( $layout['enabled'] ) ) {
$template = get_post( intval( $layout['id'] ) );
$all_content .= $template->post_content;
}
}
}
$integrations = [
'head',
'body',
'single_top',
'single_bottom',
];
// Add Integration code.
foreach ( $integrations as $integration ) {
$all_content .= et_get_option( $shortname . '_integration_' . $integration );
}
return $all_content;
}
/**
* Recursively check if a script (or its deps) depends on JQuery.
*
* @since 4.10.0
* @param string $script Script Handle.
*
* @return bool
*/
public function has_jquery_dep( $script ) {
global $wp_scripts;
$registered = $wp_scripts->registered;
$handles = [ $script ];
$stack = [];
$result = false;
while ( false === $result && $handles ) {
foreach ( $handles as $handle ) {
if ( ! empty( $this->_has_jquery_dep[ $handle ] ) ) {
$result = true;
break;
}
if ( isset( $registered[ $handle ] ) ) {
$deps = $registered[ $handle ]->deps;
if ( $deps ) {
if ( in_array( 'jquery-core', $deps, true ) ) {
$result = true;
break;
}
array_push( $stack, $deps );
}
}
}
$handles = array_pop( $stack );
}
$this->_has_jquery_dep[ $script ] = $result;
return $result;
}
/**
* Get script deps.
*
* @since 4.10.0
* @param string $script Script Handle.
*
* @return array
*/
public function get_deps( $script ) {
global $wp_scripts;
$registered = $wp_scripts->registered;
$handles = is_array( $script ) ? $script : [ $script ];
$all_deps = $handles;
$stack = [];
$done = [];
while ( $handles ) {
foreach ( $handles as $handle ) {
if ( ! isset( $done[ $handle ] ) && isset( $registered[ $handle ] ) ) {
$deps = $registered[ $handle ]->deps;
if ( $deps ) {
$all_deps = array_merge( $all_deps, $deps );
array_push( $stack, $deps );
}
$done[ $handle ] = true;
}
}
$handles = array_pop( $stack );
}
return array_unique( $all_deps );
}
/**
* Check if a script is currently enqueued in HEAD.
*
* @since 4.10.0
* @param string $handle Script Handle.
*
* @return bool
*/
public function in_head( $handle ) {
global $wp_scripts;
if ( empty( $wp_scripts->registered[ $handle ] ) ) {
return false;
}
$script = $wp_scripts->registered[ $handle ];
if ( isset( $script->args ) && 1 === $script->args ) {
return false;
}
if ( isset( $script->extra['group'] ) && 1 === $script->extra['group'] ) {
return false;
}
return true;
}
/**
* Check whether some content includes jQuery or not.
*
* @since 4.10.0
* @param string $content Content.
*
* @return bool
*/
public static function has_jquery_content( $content ) {
$has_jquery_regex = '/\(jQuery|jQuery\.|jQuery\)/';
return 1 === preg_match( $has_jquery_regex, $content );
}
/**
* Move jQuery / migrate / 3P scripts in BODY.
*
* @since 4.10.0
*
* @return void
*/
public function wp_print_scripts() {
global $shortname;
if ( $this->should_move_jquery() ) {
global $wp_scripts;
$queue = $this->get_deps( $wp_scripts->queue );
$head = in_array( 'jquery-migrate', $queue, true ) ? [ 'jquery-migrate' ] : [];
$mode = 'on' === et_get_option( $shortname . '_enable_jquery_body_super' ) ? 'super' : 'safe';
// Find all head scripts that depends on JQuery.
foreach ( $queue as $handle ) {
if ( $this->in_head( $handle ) && $this->has_jquery_dep( $handle ) ) {
if ( 'safe' === $mode && 'jquery' !== $handle && 'jquery-migrate' !== $handle ) {
// Bail out when a script requiring jQuery is found in head.
return;
}
$head[] = $handle;
}
}
$registered = $wp_scripts->registered;
// Disable the feature when finding a script which does not depend on jQuery
// but still uses it inside its inlined content (before/after).
foreach ( $queue as $handle ) {
if ( ! $this->has_jquery_dep( $handle ) ) {
$script = $registered[ $handle ];
$data = '';
if ( isset( $script->extra['data'] ) ) {
$data .= $script->extra['data'];
}
if ( isset( $script->extra['before'] ) ) {
$data .= join( '', $script->extra['before'] );
}
if ( isset( $script->extra['after'] ) ) {
$data .= join( '', $script->extra['after'] );
}
if ( ! empty( $data ) && self::has_jquery_content( $data ) ) {
return;
}
}
}
// Disable the feature when jQuery is found in TB/Post Content.
if ( self::has_jquery_content( $this->get_all_content() ) ) {
return;
}
if ( ! empty( $head ) ) {
foreach ( $this->get_deps( $head ) as $handle ) {
$wp_scripts->add_data( $handle, 'group', 1 );
}
}
}
}
/**
* Get the class instance.
*
* @since 4.10.0
*
* @return ET_Builder_JQuery_Body
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Fake jQuery in head when jQuery body option is true.
*/
public function add_jquery_sub() {
global $shortname;
$jquery_compatibility_enabled = 'on' === et_get_option( $shortname . '_enable_jquery_compatibility', 'on' ) ? true : false;
if ( $this->should_move_jquery() && $jquery_compatibility_enabled ) {
echo '<script type="text/javascript">
let jqueryParams=[],jQuery=function(r){return jqueryParams=[...jqueryParams,r],jQuery},$=function(r){return jqueryParams=[...jqueryParams,r],$};window.jQuery=jQuery,window.$=jQuery;let customHeadScripts=!1;jQuery.fn=jQuery.prototype={},$.fn=jQuery.prototype={},jQuery.noConflict=function(r){if(window.jQuery)return jQuery=window.jQuery,$=window.jQuery,customHeadScripts=!0,jQuery.noConflict},jQuery.ready=function(r){jqueryParams=[...jqueryParams,r]},$.ready=function(r){jqueryParams=[...jqueryParams,r]},jQuery.load=function(r){jqueryParams=[...jqueryParams,r]},$.load=function(r){jqueryParams=[...jqueryParams,r]},jQuery.fn.ready=function(r){jqueryParams=[...jqueryParams,r]},$.fn.ready=function(r){jqueryParams=[...jqueryParams,r]};</script>';
}
}
/**
* Disable the Fake jQuery in head when jQuery body option is true.
*/
public function remove_jquery_sub() {
global $shortname;
$jquery_compatibility_enabled = 'on' === et_get_option( $shortname . '_enable_jquery_compatibility', 'on' ) ? true : false;
if ( $this->should_move_jquery() && $jquery_compatibility_enabled ) {
$script = 'jqueryParams.length&&$.each(jqueryParams,function(e,r){if("function"==typeof r){var n=String(r);n.replace("$","jQuery");var a=new Function("return "+n)();$(document).ready(a)}});';
wp_add_inline_script( 'jquery', $script, 'after' );
}
}
/**
* Check if jQuery should be moved to the body.
*/
public function should_move_jquery() {
global $shortname;
if ( null === self::$_should_move_jquery ) {
/**
* Filters whether JQuery Body feature is enabled or not.
*
* @since 4.10.5
*
* @param bool $enabled JQuery Body enabled value.
* @param string $content TB/Post Content.
*/
if ( false === apply_filters( 'et_builder_enable_jquery_body', true, $this->get_all_content() ) ) {
// Bail out if disabled by filter.
self::$_should_move_jquery = false;
return false;
}
self::$_should_move_jquery = ! ( is_admin() || wp_doing_ajax() || et_is_builder_plugin_active() || is_customize_preview() || is_et_pb_preview() || 'wp-login.php' === $GLOBALS['pagenow'] || et_fb_is_enabled() ) && 'on' === et_get_option( $shortname . '_enable_jquery_body', 'on' );
}
return self::$_should_move_jquery;
}
}
ET_Builder_JQuery_Body::instance();

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,351 @@
<?php
/**
* Divi Split Library.
*
* @package Builder
*/
/**
* Core class used to Split library item.
*/
class ET_Builder_Split_Library {
/**
* Instance of `ET_Builder_Split_Library`.
*
* @var ET_Builder_Split_Library
*/
private static $_instance;
/**
* Get the class instance.
*
* @since 4.20.3
*
* @return ET_Builder_Split_Library
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* ET_Builder_Split_Library constructor.
*/
public function __construct() {
$this->_register_ajax_callbacks();
}
/**
* Registers the Split Library's AJAX callbacks.
*
* @since 4.20.3
*/
protected function _register_ajax_callbacks() {
add_action( 'wp_ajax_et_builder_split_library_item', array( $this, 'split_library_item' ) );
}
/**
* Split library item based on split type
*/
public function split_library_item() {
et_core_security_check( 'edit_posts', 'et_builder_split_library_item', 'et_cloud_nonce' );
$id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : false;
$prefix = isset( $_POST['itemName'] ) ? sanitize_text_field( $_POST['itemName'] ) : false;
$to_cloud = isset( $_POST['cloud'] ) ? sanitize_text_field( $_POST['cloud'] ) : 'off';
$split_type = isset( $_POST['updateType'] ) ? sanitize_text_field( $_POST['updateType'] ) : false;
$origin = isset( $_POST['actionOrigin'] ) ? sanitize_text_field( $_POST['actionOrigin'] ) : '';
if ( ! $id || ! $split_type || ! $prefix ) {
wp_send_json_error();
}
if ( ! in_array( $split_type, array( 'split_layout', 'split_section', 'split_row' ), true ) ) {
wp_send_json_error();
}
$cloud_content = isset( $_POST['content'] ) ? $_POST['content'] : ''; // phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- $_POST['content'] is an array, it's value sanitization is done at the time of accessing value.
if ( $cloud_content ) {
$item_content = wp_unslash( reset( $cloud_content['data'] ) );
} else {
$post = get_post( $id );
$item_content = $post->post_content;
}
switch ( $split_type ) {
case 'split_layout':
$pattern = '/\[et_pb_section .+?]?.+?\[\/et_pb_section]/s';
$layout_type = 'section';
break;
case 'split_section':
$pattern = '/\[et_pb_row(_inner)? .+?].+?\[\/et_pb_row(_inner)?]/s';
$layout_type = 'row';
break;
case 'split_row':
$pattern = '/\[(et_pb_(?!section|row|column).+?)\s.+?]?\[\/\1]/s';
$layout_type = 'module';
break;
}
// Get the intented content array based on split type pattern.
preg_match_all( $pattern, $item_content, $matches );
$args = array(
'split_type' => $split_type,
'layout_type' => $layout_type,
'layout_selected_cats' => isset( $_POST['itemCategories'] ) ? array_map( 'sanitize_text_field', $_POST['itemCategories'] ) : array(),
'layout_selected_tags' => isset( $_POST['itemTags'] ) ? array_map( 'sanitize_text_field', $_POST['itemTags'] ) : array(),
'built_for_post_type' => 'page',
'layout_new_cat' => isset( $_POST['newCategoryName'] ) ? sanitize_text_field( $_POST['newCategoryName'] ) : '',
'layout_new_tag' => isset( $_POST['newTagName'] ) ? sanitize_text_field( $_POST['newTagName'] ) : '',
'columns_layout' => '0',
'module_type' => 'et_pb_unknown',
'layout_scope' => isset( $_POST['global'] ) && ( 'on' === $_POST['global'] ) ? 'global' : 'not_global',
'module_width' => 'regular',
);
$layouts = array();
$processed = false;
foreach ( $matches[0] as $key => $content ) {
$title = $prefix;
if ( 'split_row' === $split_type && 'save_modal' === $origin ) {
$module_name = explode( ' ', $content )[0];
$module_name = str_replace( '[et_pb_', '', $module_name );
$module_name = ucfirst( str_replace( '_', ' ', $module_name ) );
$title = str_replace( '%module_type%', $module_name, $prefix );
}
$args['layout_name'] = $title . ' ' . ( ++$key );
$content = $this->_get_content_with_type( $content, $layout_type );
if ( 'on' === $to_cloud ) {
if ( $cloud_content ) {
/* From cloud to cloud */
$layouts[] = $this->_get_cloud_to_cloud_formatted_data( $cloud_content, $content, $args );
} else {
/* From local to cloud */
$layouts[] = $this->_get_local_to_cloud_formatted_data( $content, $args );
}
} else {
if ( $cloud_content ) {
/* From cloud to local */
$cloud_content['data']['1'] = $content;
$layouts[] = $this->_get_cloud_to_local_formatted_data( $cloud_content, $content, $args );
// We only need to insert these data once into the database.
unset( $cloud_content['presets'] );
unset( $cloud_content['global_colors'] );
unset( $cloud_content['images'] );
unset( $cloud_content['thumbnails'] );
} else {
/* From local to Local */
$args['layout_content'] = $content;
$args['layout_selected_cats'] = is_array( $args['layout_selected_cats'] ) ? implode( ',', $args['layout_selected_cats'] ) : '';
$args['layout_selected_tags'] = is_array( $args['layout_selected_tags'] ) ? implode( ',', $args['layout_selected_tags'] ) : '';
$new_saved = json_decode( et_pb_submit_layout( $args ) );
// Only need to process once because all the split item's taxonomies are the same.
if ( ! $processed ) {
$layouts[] = [
'newId' => $new_saved->post_id,
'categories' => $args['layout_selected_cats'],
'tags' => $args['layout_selected_tags'],
'updated_terms' => $this->_get_all_updated_terms(),
];
$processed = true;
}
}
}
}
wp_send_json_success( $layouts );
}
/**
* Get content with type.
*
* @since 4.20.3
*
* @param string $content Content to be processed.
* @param string $type Type of the content.
*/
private function _get_content_with_type( $content, $type ) {
$pattern = '/^(\[\w+\s)/';
$replace = '$0template_type="' . $type . '" '; // e.g. [et_pb_row template_type="row" ...].
return preg_replace( $pattern, $replace, $content );
}
/**
* Get formatted data for cloud item split to cloud.
*
* @since 4.20.3
*
* @param array $cloud_content Cloud Item data.
* @param string $content Shortcode after split cloud item.
* @param array $assoc_data Related data after split cloud item.
*/
private function _get_cloud_to_cloud_formatted_data( $cloud_content, $content, $assoc_data ) {
$data = $this->_get_common_cloud_formatted_data( $content, $assoc_data );
$images = array();
$presets = array();
$global_colors = array();
if ( ! empty( $cloud_content['images'] ) ) {
foreach ( $cloud_content['images'] as $url => $img ) {
if ( str_contains( $content, $url ) ) {
$images[ $url ] = $img;
}
}
}
if ( ! empty( $cloud_content['presets'] ) ) {
foreach ( $cloud_content['presets'] as $module => $preset ) {
if ( str_contains( $content, $module ) ) {
$presets[ $module ] = $preset;
}
}
}
if ( ! empty( $cloud_content['global_colors'] ) ) {
foreach ( $cloud_content['global_colors'] as $key => $global_color ) {
if ( str_contains( $content, $global_color[0] ) ) {
$global_colors[ $key ] = $global_color;
}
}
}
$data['images'] = $images;
$data['presets'] = $presets;
$data['global_colors'] = $global_colors;
return $data;
}
/**
* Get formatted data for local item split to cloud.
*
* @since 4.20.3
*
* @param string $content Shortcode after split cloud item.
* @param array $assoc_data Related data after split cloud item.
*
* @return array
*/
private function _get_local_to_cloud_formatted_data( $content, $assoc_data ) {
return $this->_get_common_cloud_formatted_data( $content, $assoc_data );
}
/**
* Get formatted data for cloud item split to local.
*
* @since 4.20.3
*
* @param array $cloud_content Cloud Item data.
* @param string $content Shortcode after split cloud item.
* @param array $assoc_data Related data after split cloud item.
*
* @return array
*/
private function _get_cloud_to_local_formatted_data( $cloud_content, $content, $assoc_data ) {
return array(
'itemName' => $assoc_data['layout_name'],
'itemCategories' => $assoc_data['layout_selected_cats'],
'itemTags' => $assoc_data['layout_selected_tags'],
'newCategoryName' => $assoc_data['layout_new_cat'],
'newTagName' => $assoc_data['layout_new_tag'],
'cloud' => 'off',
'global' => $assoc_data['layout_scope'],
'layoutType' => $assoc_data['layout_type'],
'updateType' => $assoc_data['split_type'],
'content' => $cloud_content,
'shortcode' => wp_json_encode( $content ),
);
}
/**
* Get common formatted data for cloud item.
*
* @since 4.20.3
*
* @param string $content Shortcode after split cloud item.
* @param array $assoc_data Related data after split cloud item.
*
* @return array
*/
private function _get_common_cloud_formatted_data( $content, $assoc_data ) {
$data = array(
'post_title' => $assoc_data['layout_name'],
'post_content' => $content,
'terms' => array(
array(
'name' => $assoc_data['layout_type'],
'slug' => $assoc_data['layout_type'],
'taxonomy' => 'layout_type',
),
),
);
foreach ( $assoc_data['layout_selected_cats'] as $category ) {
$data['terms'][] = array(
'name' => $category,
'slug' => $category,
'taxonomy' => 'layout_category',
);
}
foreach ( $assoc_data['layout_selected_tags'] as $tag ) {
$data['terms'][] = array(
'name' => $tag,
'slug' => $tag,
'taxonomy' => 'layout_tag',
);
}
return $data;
}
/**
* Get all the updated terms.
*
* @since 4.20.3
*
* @return array
*/
private function _get_all_updated_terms() {
$updated_terms = array();
foreach ( [ 'layout_category', 'layout_tag' ] as $taxonomy ) {
$raw_terms_array = get_terms( $taxonomy, array( 'hide_empty' => false ) );
$clean_terms_array = array();
if ( is_array( $raw_terms_array ) && ! empty( $raw_terms_array ) ) {
foreach ( $raw_terms_array as $term ) {
$clean_terms_array[] = array(
'name' => html_entity_decode( $term->name ),
'id' => $term->term_id,
'slug' => $term->slug,
);
}
}
$updated_terms[ $taxonomy ] = $clean_terms_array;
}
return $updated_terms;
}
}
ET_Builder_Split_Library::instance();

View File

@@ -0,0 +1,189 @@
<?php
/**
* Handle AI Button feature.
*
* @package Builder
* @since 4.22.0
*/
/**
* Gets AI field options to be listed.
*
* These options are shown when the field is empty.
*
* @param boolean $is_image If button is used on image field.
*
* @return Array
*/
function et_builder_get_ai_text_field_empty_options( $is_image = false ) {
$options_list = [
[
'label' => esc_html__( 'Generate Automatically with AI', 'et_builder' ),
'slug' => 'generate_automatically_with_ai',
],
];
if ( $is_image ) {
$options_list = [];
$options_list[] = [
'label' => esc_html__( 'Generate with AI', 'et_builder' ),
'slug' => 'generate_with_ai',
];
$options_list[] = [
'label' => esc_html__( 'Improve with AI', 'et_builder' ),
'slug' => 'improve_with_ai',
];
$options_list[] = [
'label' => esc_html__( 'Generate & Replace', 'et_builder' ),
'slug' => 'generate_and_replace',
];
$options_list[] = [
'label' => esc_html__( 'Reimagine', 'et_builder' ),
'slug' => 'reimagine',
];
$options_list[] = [
'label' => esc_html__( 'Change Style', 'et_builder' ),
'slug' => 'change_style',
];
$options_list[] = [
'label' => esc_html__( 'Change Aspect Ratio', 'et_builder' ),
'slug' => 'change_aspect_ratio',
];
} else {
$options_list[] = [
'label' => esc_html__( 'Prompt & Write with Divi AI', 'et_builder' ),
'slug' => 'prompt_write_with_divi_ai',
];
}
return $options_list;
}
/**
* Gets AI field options to be listed.
*
* These options are shown when the field is NOT empty.
*
* @return Array
*/
function et_builder_get_ai_text_field_options() {
return [
[
'label' => esc_html__( 'Regenerate Automatically', 'et_builder' ),
'slug' => 'regenerate_automatically',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Prompt & Write with Divi AI', 'et_builder' ),
'slug' => 'new_prompt_with_divi_ai',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Refine with AI', 'et_builder' ),
'slug' => 'refine_with_ai',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Rewrite Automatically', 'et_builder' ),
'slug' => 'rewrite_automatically',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Lengthen Text', 'et_builder' ),
'slug' => 'lengthen_text',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Shorten Text', 'et_builder' ),
'slug' => 'shorten_text',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Simplify Language', 'et_builder' ),
'slug' => 'simplify_language',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Change Tone', 'et_builder' ),
'slug' => 'change_tone',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
];
}
/**
* Gets AI text options to be listed.
*
* These options are shown when the field is NOT empty.
*
* @return Array
*/
function et_builder_get_ai_text_options() {
return [
'write_with_ai' => esc_html__( 'Write With AI', 'et_builder' ),
'improve_with_ai' => esc_html__( 'Improve With AI', 'et_builder' ),
'write_automatically' => esc_html__( 'Write Automatically', 'et_builder' ),
'write_and_replace' => esc_html__( 'Write & Replace', 'et_builder' ),
];
}
/**
* Get AI code options to be listed.
*
* These options are shown when the code field is NOT empty.
*
* @return Array
*/
function et_builder_get_ai_code_options() {
return [
'code_with_ai' => esc_html__( 'Code With AI', 'et_builder' ),
'improve_code_with_ai' => esc_html__( 'Improve With AI', 'et_builder' ),
// Later, qucik options will be retrieved from AI server, these are just placeholders for now.
'make_it_better' => esc_html__( 'Make It Better', 'et_builder' ),
'format' => esc_html__( 'Format', 'et_builder' ),
'improve_compatibility' => esc_html__( 'Improve Compatibility', 'et_builder' ),
'optimize' => esc_html__( 'Optimize', 'et_builder' ),
'convert_color_values' => esc_html__( 'Convert Color Values', 'et_builder' ),
'prefix_classes' => esc_html__( 'Prefix Classes', 'et_builder' ),
];
}
/**
* Gets AI image options to be listed.
*
* These options are shown when the field is NOT empty.
*
* @return Array
*/
function et_builder_get_ai_image_options() {
return [
'improve_with_ai' => esc_html__( 'Improve With AI', 'et_builder' ),
'generate_with_ai' => esc_html__( 'Generate With AI', 'et_builder' ),
'generate_automatically' => esc_html__( 'Generate Automatically', 'et_builder' ),
'generate_and_replace' => esc_html__( 'Generate & Replace', 'et_builder' ),
'reimagine' => esc_html__( 'Reimagine', 'et_builder' ),
'change_style' => esc_html__( 'Change Style', 'et_builder' ),
];
}
/**
* Gets AI field options to be listed.
*
* These options are shown when the text field has selected text.
*/
function et_builder_get_ai_selected_text_field_options() {
return [
[
'label' => esc_html__( 'Prompt & Write Selection with Divi AI', 'et_builder' ),
'slug' => 'new_prompt_with_divi_ai',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
[
'label' => esc_html__( 'Rewrite Selection Automatically', 'et_builder' ),
'slug' => 'rewrite_automatically',
'group' => esc_html__( 'Modify With AI', 'et_builder' ),
],
];
}

View File

@@ -0,0 +1,454 @@
<?php
/**
* Serves the data to various AJAX requests.
*
* @since 4.11.0
*
* @package Divi
* @sub-package Builder
*/
namespace Feature\AjaxData;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
use ET_Builder_Module_Fields_Factory;
/**
* AJAX Data class.
*
* @since 4.11.0
*/
class ET_Builder_Ajax_Data {
/**
* Holds the class instance.
*
* @var Class
*/
private static $_instance = null;
/**
* Registers the AJAX actions when class is constructed.
*/
public function __construct() {
add_action( 'wp_ajax_et_builder_ajax_get_post_types', array( $this, 'get_post_types' ) );
add_action( 'wp_ajax_et_builder_ajax_get_authors', array( $this, 'get_authors' ) );
add_action( 'wp_ajax_et_builder_ajax_get_user_roles', array( $this, 'get_user_roles' ) );
add_action( 'wp_ajax_et_builder_ajax_get_categories', array( $this, 'get_categories' ) );
add_action( 'wp_ajax_et_builder_ajax_get_tags', array( $this, 'get_tags' ) );
add_action( 'wp_ajax_et_builder_ajax_search_products', array( $this, 'search_products' ) );
add_action( 'wp_ajax_et_builder_ajax_get_display_conditions_status', array( $this, 'get_display_conditions_status' ) );
add_action( 'wp_ajax_et_builder_ajax_get_post_meta_fields', array( $this, 'get_post_meta_fields' ) );
}
/**
* Get the instance of the Class
*
* @return Class Instance
*/
public static function get_instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* AJAX Action for Display Conditions Status.
*
* @return void
*/
public function get_display_conditions_status() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_display_conditions_status', 'nonce', '_POST' );
/**
* Filters "Display Conditions" functionality to determine whether to enable or disable the functionality or not.
*
* Useful for disabling/enabling "Display Condition" feature site-wide.
*
* @since 4.13.1
*
* @param boolean True to enable the functionality, False to disable it.
*/
$is_display_conditions_enabled = apply_filters( 'et_is_display_conditions_functionality_enabled', true );
if ( ! $is_display_conditions_enabled ) {
wp_send_json_error();
}
// $_POST['conditions'] is a JSON so there is no effective way to sanitize it at this level.
// phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- Conditions is not stored or displayed therefore XSS safe.
$conditions = isset( $_POST['conditions'] ) ? $_POST['conditions'] : '';
$conditions = json_decode( stripslashes( $conditions ), true );
$status = ET_Builder_Module_Fields_Factory::get( 'DisplayConditions' )->is_displayable( $conditions, true );
if ( ! $status ) {
wp_send_json_error();
}
wp_send_json_success( $status );
}
/**
* AJAX Action for Searching within Products.
*
* @return void
*/
public function search_products() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_search_products', 'nonce', '_GET' );
$current_page = isset( $_GET['page'] ) ? (int) $_GET['page'] : 0;
$current_page = max( $current_page, 1 );
$search = isset( $_GET['search'] ) ? sanitize_text_field( $_GET['search'] ) : '';
$results_per_page = 20;
$results = [
'results' => [],
'meta' => [],
];
$query = [
'post_type' => 'product',
'posts_per_page' => $results_per_page,
'post_status' => 'publish',
's' => $search,
'orderby' => 'date',
'order' => 'desc',
'paged' => $current_page,
];
$query = new \WP_Query( $query );
if ( ! empty( $query->posts ) ) {
foreach ( $query->posts as $post ) {
$results['results'][] = [
'value' => (int) $post->ID,
'label' => et_core_intentionally_unescaped( wp_strip_all_tags( $post->post_title ), 'react_jsx' ),
];
}
}
$results['meta']['pagination'] = array(
'results' => array(
'per_page' => (int) $results_per_page,
'total' => (int) $query->found_posts,
),
'pages' => array(
'current' => (int) $current_page,
'total' => (int) $query->max_num_pages,
),
);
// Only reset if the query is successful to avoid resetting previous query by mistake.
if ( ! empty( $query->posts ) ) {
wp_reset_postdata();
}
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of all Categories (All Taxonomies Terms) except excluded taxonomies.
*
* @return void
*/
public function get_categories() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_categories', 'nonce', '_GET' );
$data = [];
$search = isset( $_GET['search'] ) ? sanitize_text_field( $_GET['search'] ) : '';
$excluded_taxonomies = [ 'post_tag', 'project_tag', 'product_tag', 'nav_menu', 'link_category', 'post_format', 'layout_category', 'layout_pack', 'layout_type', 'scope', 'module_width' ];
/**
* Filters excluded taxonomies for `et_builder_ajax_get_categories` ajax action.
*
* @since 4.11.0
*
* @param array $excluded_taxonomies
*/
$excluded_taxonomies = apply_filters( 'et_builder_ajax_get_categories_excluded_taxonomies', $excluded_taxonomies );
$taxonomies = array_diff( get_taxonomies(), $excluded_taxonomies );
$categories = get_terms(
[
'taxonomy' => $taxonomies,
'hide_empty' => false,
'search' => $search,
]
);
foreach ( $categories as $cat ) {
$tax_name = get_taxonomy( $cat->taxonomy )->label;
$tax_slug = get_taxonomy( $cat->taxonomy )->name;
$data[ $cat->taxonomy ][] = [
'name' => et_core_intentionally_unescaped( wp_strip_all_tags( $cat->name ), 'react_jsx' ),
'id' => $cat->term_id,
'taxonomyName' => et_core_intentionally_unescaped( wp_strip_all_tags( $tax_name ), 'react_jsx' ),
'taxonomySlug' => $tax_slug,
];
}
$results = [
'results' => $data,
];
if ( is_wp_error( $categories ) ) {
wp_send_json_error( $categories );
}
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of Divi registered Tags.
*
* @return void
*/
public function get_tags() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_tags', 'nonce', '_GET' );
$data = [];
$search = isset( $_GET['search'] ) ? sanitize_text_field( $_GET['search'] ) : '';
$included_taxonomies = [ 'post_tag', 'project_tag', 'product_tag' ];
/**
* Filters included taxonomies for `et_builder_ajax_get_tags` ajax action.
*
* @since 4.11.0
*
* @param array $included_taxonomies
*/
$included_taxonomies = apply_filters( 'et_builder_ajax_get_tags_included_taxonomies', $included_taxonomies );
$included_taxonomies = array_filter(
$included_taxonomies,
function( $taxonomy_slug ) {
return taxonomy_exists( $taxonomy_slug );
}
);
$tags = get_terms(
[
'taxonomy' => $included_taxonomies,
'hide_empty' => false,
'search' => $search,
]
);
foreach ( $tags as $tag ) {
$tax_name = get_taxonomy( $tag->taxonomy )->label;
$tax_slug = get_taxonomy( $tag->taxonomy )->name;
$data[ $tag->taxonomy ][] = [
'name' => et_core_intentionally_unescaped( wp_strip_all_tags( $tag->name ), 'react_jsx' ),
'id' => $tag->term_id,
'taxonomyName' => et_core_intentionally_unescaped( wp_strip_all_tags( $tax_name ), 'react_jsx' ),
'taxonomySlug' => $tax_slug,
];
}
$results = [
'results' => $data,
];
if ( is_wp_error( $tags ) ) {
wp_send_json_error( $tags );
}
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of Post Types.
*
* @return void
*/
public function get_post_types() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_post_types', 'nonce', '_GET' );
$current_page = isset( $_GET['page'] ) ? (int) $_GET['page'] : 0;
$current_page = max( $current_page, 1 );
$post_types = array_values( get_post_types( [ 'public' => true ], 'objects' ) );
/**
* Filters included post types for `et_builder_ajax_get_post_types` ajax action.
*
* @since 4.11.0
*
* @param array $post_types
*/
$post_types = apply_filters( 'et_builder_ajax_get_post_types', $post_types );
$total = count( $post_types );
$results_per_page = 20;
$pages_total = 1;
$post_types_data = array_map(
function( $item ) {
return [
'label' => et_core_intentionally_unescaped( wp_strip_all_tags( $item->labels->name ), 'react_jsx' ),
'singular_label' => et_core_intentionally_unescaped( wp_strip_all_tags( $item->labels->singular_name ), 'react_jsx' ),
'value' => $item->name,
];
},
$post_types
);
$results = [
'results' => $post_types_data,
'meta' => [],
];
$results['meta']['pagination'] = array(
'results' => array(
'per_page' => $results_per_page,
'total' => $total,
),
'pages' => array(
'current' => $current_page,
'total' => $pages_total,
),
);
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of Authors.
*
* @return void
*/
public function get_authors() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_authors', 'nonce', '_GET' );
$current_page = isset( $_GET['page'] ) ? (int) $_GET['page'] : 0;
$current_page = max( $current_page, 1 );
$results_per_page = 10;
$users_data = [];
$role__in = [];
foreach ( wp_roles()->roles as $role_slug => $role ) {
if ( ! empty( $role['capabilities']['publish_posts'] ) ) {
$role__in[] = $role_slug;
}
}
/**
* Filters included roles for `et_builder_ajax_get_authors` ajax action.
*
* @since 4.11.0
*
* @param array $role__in
*/
$role__in = apply_filters( 'et_builder_ajax_get_authors_included_roles', $role__in );
$user_query = new \WP_User_Query(
[
'role__in' => $role__in,
'fields' => [ 'ID', 'user_login' ],
'number' => $results_per_page,
'paged' => 1,
]
);
$found_users = $user_query->get_results();
if ( ! empty( $found_users ) ) {
$users_data = array_map(
function( $item ) {
return [
'label' => et_core_intentionally_unescaped( wp_strip_all_tags( $item->user_login ), 'react_jsx' ),
'value' => $item->ID,
];
},
$found_users
);
}
$total = $user_query->get_total();
$pages_total = max( $total / $results_per_page, 1 );
$results = [
'results' => $users_data,
'meta' => [],
];
$results['meta']['pagination'] = array(
'results' => array(
'per_page' => (int) $results_per_page,
'total' => (int) $total,
),
'pages' => array(
'current' => (int) $current_page,
'total' => (int) $pages_total,
),
);
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of User Roles.
*
* @return void
*/
public function get_user_roles() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_user_roles', 'nonce', '_GET' );
$user_roles = [];
foreach ( wp_roles()->roles as $key => $value ) {
$user_roles[] = [
'label' => et_core_intentionally_unescaped( wp_strip_all_tags( $value['name'] ), 'react_jsx' ),
'value' => $key,
];
}
/**
* Filters included user roles for `et_builder_ajax_get_user_roles` ajax action.
*
* @since 4.11.0
*
* @param array $user_roles
*/
$user_roles = apply_filters( 'et_builder_ajax_get_user_roles_included_roles', $user_roles );
$results = [
'results' => $user_roles,
];
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of all meta fields assigned to a post.
*
* @return void
*/
public function get_post_meta_fields() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_post_meta_fields', 'nonce', '_GET' );
$data = [];
$post_id = isset( $_GET['postId'] ) ? sanitize_text_field( $_GET['postId'] ) : '';
$meta_fields = get_post_meta( (int) $post_id );
/**
* Filters included meta fields for `et_builder_ajax_get_post_meta_fields` ajax action.
*
* @since 4.14.3
*
* @param array $meta_fields
*/
$meta_fields = apply_filters( 'et_builder_ajax_get_post_meta_fields', $meta_fields );
$data = is_array( $meta_fields ) ? $meta_fields : [];
$results = [
'results' => $data,
];
wp_send_json_success( $results );
}
}
ET_Builder_Ajax_Data::get_instance();

View File

@@ -0,0 +1,234 @@
<?php
/**
* Background Mask Options
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Mask_Options
*
* @since 4.15.0
*/
class ET_Builder_Background_Mask_Options {
/**
* Class instance object.
*
* @var ET_Builder_Background_Mask_Options
*/
private static $_instance;
/**
* Mask Settings.
*
* @var array
*/
private static $_settings = null;
/**
* Get instance of ET_Builder_Background_Mask_Options.
*
* @return ET_Builder_Background_Mask_Options
*/
public static function get() {
if ( empty( self::$_instance ) ) {
self::$_instance = new ET_Builder_Background_Mask_Options();
}
return self::$_instance;
}
/**
* Get SVG Settings for a Mask Style.
*
* @param string $name Style Name.
*
* @return array
*/
public function get_style( $name ) {
// Fetch style when settings already processed.
if ( isset( self::$_settings['styles'][ $name ] ) ) {
return self::$_settings['styles'][ $name ];
}
// Fetch settings for the mask style.
$instance = ET_Builder_Background_Mask_Style_Factory::get( $name );
if ( ! empty( $instance ) ) {
return $instance->settings();
}
return array();
}
/**
* Returns SVG url for Mask style.
*
* @param string $name Style Name.
* @param string $color Color value.
* @param string $type SVG type, valid options: landscape | portrait | square | thumbnail.
* @param bool $rotated Rotated or not.
* @param bool $inverted Inverted or not.
* @param string $size Size value.
*
* @return string
*/
public function get_svg( $name, $color, $type, $rotated, $inverted, $size ) {
if ( strpos( $color, 'gcid-' ) === 0 ) {
$global_color_info = et_builder_get_global_color_info( $color );
$color = $global_color_info['color'];
}
$is_stretch = 'stretch' === $size || '' === $size;
$content = $this->get_svg_content( $name, $type, $rotated, $inverted );
$view_box = $this->get_view_box( $name, $type );
$props = et_()->get_svg_attrs(
array(
'fill' => esc_attr( $color ),
'viewBox' => esc_attr( $view_box ),
'preserveAspectRatio' => $is_stretch ? 'none' : 'xMinYMin slice',
)
);
// Encode the SVG, so we can use it as data for background-image.
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- base64_encode() used for browser support.
$svg = base64_encode( "<svg {$props}>{$content}</svg>" );
return sprintf( 'url( data:image/svg+xml;base64,%s )', $svg );
}
/**
* Get SVG content for a Mask Style.
*
* @param string $name Style Name.
* @param string $type Valid options: landscape | portrait | square | thumbnail.
* @param bool $rotated Default false, set true to get rotated version.
* @param bool $inverted Default false, set true to get inverted version.
*
* @return string
*/
public function get_svg_content( $name, $type, $rotated = false, $inverted = false ) {
$settings = $this->get_style( $name );
// Return SVG Content for Thumbnail.
// Note: Thumbnail value decided as following:
// 1. Return Thumbnail from the Mask Style settings
// 2. If not defined, return landscape value from default SVG group.
if ( 'thumbnail' === $type ) {
return isset( $settings['svgContent']['thumbnail'] )
? $settings['svgContent']['thumbnail']
: $this->get_svg_content( $name, 'landscape' );
}
// Return SVG Content for Style.
$svg_group = $rotated ? 'rotated' : 'default';
$svg_group = $inverted ? "{$svg_group}-inverted" : $svg_group;
return isset( $settings['svgContent'][ $svg_group ][ $type ] )
? $settings['svgContent'][ $svg_group ][ $type ]
: '';
}
/**
* Get viewBox for a Mask Style.
*
* @param string $name Style name.
* @param string $type viewBox type, valid options: landscape | portrait | square | thumbnail.
*
* @return string
*/
public function get_view_box( $name, $type ) {
$view_box_settings = $this->view_box_settings();
$style_settings = $this->get_style( $name );
// Note: viewBox value decided as following:
// 1. Return viewBox from the Mask Style settings
// 2. If not defined, return viewBox from default settings.
$view_box_default = isset( $view_box_settings[ $type ] )
? $view_box_settings[ $type ]
: '';
return isset( $style_settings['viewBox'][ $type ] )
? $style_settings['viewBox'][ $type ]
: $view_box_default;
}
/**
* Mask SVG Settings.
*
* @return array
*/
public function settings() {
if ( null === self::$_settings ) {
// Look at builder/feature/background-masks/mask directory.
self::$_settings = array(
'styles' => glob( ET_BUILDER_DIR . 'feature/background-masks/mask/*.php' ),
'viewBox' => $this->view_box_settings(),
);
// Default mask style.
$default = self::get_default_style_name();
$style = array(
$default => self::get_style( $default ),
);
$files = array();
foreach ( self::$_settings['styles'] as $file ) {
// Extract name from file (e.g corner-lake).
$name = basename( $file, '.php' );
// Fetch settings for the style.
$style_settings = $default !== $name ? self::get_style( $name ) : array();
// Include the style only when valid settings are found.
if ( ! empty( $style_settings ) ) {
$files[ $name ] = $style_settings;
}
}
// Sort by priority.
et_()->uasort( $files, array( 'ET_Builder_Element', 'compare_by_priority' ) );
self::$_settings['styles'] = array_merge( $style, $files );
// Cleanup.
$default = null;
$files = null;
$style = null;
}
return self::$_settings;
}
/**
* Default viewBox settings for Mask.
*
* @return string[]
*/
public function view_box_settings() {
return array(
'landscape' => '0 0 1920 1440',
'portrait' => '0 0 1920 2560',
'square' => '0 0 1920 1920',
'thumbnail' => '0 0 1920 1440',
);
}
/**
* Get default mask style.
*
* @return string Default Style Name.
*/
public function get_default_style_name() {
return 'layer-blob';
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Abstract Class for Mask Style.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* ET_Builder_Background_Mask_Style_Base.
*
* @since 4.15.0
*/
abstract class ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
abstract public function settings();
}

View File

@@ -0,0 +1,47 @@
<?php
/**
* Factory Class for Mask Style Options.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Mask_Style_Factory.
*
* @since 4.15.0
*/
class ET_Builder_Background_Mask_Style_Factory {
/**
* Class instance object
*
* @var array Holds all Mask Style instance.
*/
private static $_instance = array();
/**
* Get instance of the Class
*
* @param string $name Mask Style Name.
*
* @return ET_Builder_Background_Mask_Style_Base
*/
public static function get( $name ) {
$name = sanitize_file_name( $name );
if ( ! isset( self::$_instance[ $name ] ) ) {
// Look at feature/background-masks/mask directory.
$file = ET_BUILDER_DIR . "feature/background-masks/mask/$name.php";
$instance = file_exists( $file ) ? require_once $file : null;
self::$_instance[ $name ] = $instance instanceof ET_Builder_Background_Mask_Style_Base ? $instance : null;
}
return self::$_instance[ $name ];
}
}

View File

@@ -0,0 +1,252 @@
<?php
/**
* Background Pattern Options
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Pattern_Options
*
* @since 4.15.0
*/
class ET_Builder_Background_Pattern_Options {
/**
* Class instance object.
*
* @var ET_Builder_Background_Pattern_Options
*/
private static $_instance;
/**
* Pattern Settings.
*
* @var array
*/
private static $_settings = null;
/**
* Get instance of ET_Builder_Background_Pattern_Options.
*
* @return ET_Builder_Background_Pattern_Options
*/
public static function get() {
if ( empty( self::$_instance ) ) {
self::$_instance = new ET_Builder_Background_Pattern_Options();
}
return self::$_instance;
}
/**
* Get SVG Settings for a Pattern Style.
*
* @param string $name Style name.
*
* @return array
*/
public function get_style( $name ) {
// Fetch style when settings already processed.
if ( isset( self::$_settings['styles'][ $name ] ) ) {
return self::$_settings['styles'][ $name ];
}
// Fetch settings for the pattern style.
$instance = ET_Builder_Background_Pattern_Style_Factory::get( $name );
if ( ! empty( $instance ) ) {
return $instance->settings();
}
return array();
}
/**
* Returns SVG content for a Pattern style.
*
* @param string $name Style Name.
* @param string $color Color value.
* @param string $type SVG Type.
* @param bool $rotated Default false, set true to get rotated version.
* @param bool $inverted Default false, set true to get inverted version.
*
* @return string
*/
public function get_svg( $name, $color, $type, $rotated = false, $inverted = false ) {
if ( strpos( $color, 'gcid-' ) === 0 ) {
$global_color_info = et_builder_get_global_color_info( $color );
$color = $global_color_info['color'];
}
$content = $this->get_svg_content( $name, $type, $rotated, $inverted );
$props = et_()->get_svg_attrs(
array(
'fill' => esc_attr( $color ),
'height' => esc_attr( $this->get_value( $name, 'height', $rotated ) ),
'width' => esc_attr( $this->get_value( $name, 'width', $rotated ) ),
'viewBox' => esc_attr( $this->get_value( $name, 'viewBox', $rotated ) ),
'preserveAspectRatio' => 'none',
)
);
$svg = "<svg {$props}>{$content}</svg>";
// Encode the SVG so we can use it as data for background-image.
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- base64_encode() used for browser support.
$svg = base64_encode( $svg );
return sprintf( 'url( data:image/svg+xml;base64,%s )', $svg );
}
/**
* Get SVG content for a Pattern Style.
*
* @param string $name Pattern style name.
* @param string $type Valid options: default | thumbnail.
* @param bool $rotated Default false, set true to get rotated version.
* @param bool $inverted Default false, set true to get inverted version.
*
* @return string
*/
public function get_svg_content( $name, $type, $rotated = false, $inverted = false ) {
$settings = $this->get_style( $name );
// Return SVG Content for Thumbnail.
if ( 'thumbnail' === $type ) {
return isset( $settings['svgContent']['thumbnail'] )
? $settings['svgContent']['thumbnail']
: '';
}
// Return SVG Content for Style.
$svg_type = $rotated ? 'rotated' : $type;
$svg_type = $inverted ? "{$svg_type}-inverted" : $svg_type;
return isset( $settings['svgContent'][ $svg_type ] )
? $settings['svgContent'][ $svg_type ]
: '';
}
/**
* Get Width/Height/viewBox for a Pattern Style.
*
* @param string $name Style name.
* @param string $type Value Style.
* @param bool $rotated Default false, set true to get rotated version.
*
* @return string
*/
public function get_value( $name, $type, $rotated = false ) {
$settings = $this->get_style( $name );
$width = isset( $settings['width'] ) ? $settings['width'] : '';
$height = isset( $settings['height'] ) ? $settings['height'] : '';
switch ( true ) {
case 'width' === $type:
// When rotated, we need to swap the width/height.
return $rotated ? $height : $width;
case 'height' === $type:
// When rotated, we need to swap the width/height.
return $rotated ? $width : $height;
case 'viewBox' === $type:
// The viewBox format is '[x] [y] [width] [height]'.
// When rotated, we need to swap the width/height.
return $rotated
? '0 0 ' . (int) $height . ' ' . (int) $width
: '0 0 ' . (int) $width . ' ' . (int) $height;
default:
return '';
}
}
/**
* Get value for thumbnail settings.
*
* @param string $key Attr key.
*
* @return string
*/
public function get_thumbnail_value( $key ) {
$thumbnail = $this->thumbnail_settings();
return isset( $thumbnail[ $key ] )
? $thumbnail[ $key ]
: '';
}
/**
* Pattern SVG Settings.
*
* @return array
*/
public function settings() {
if ( null === self::$_settings ) {
// Look at builder/feature/background-masks/pattern directory.
self::$_settings = array(
'styles' => glob( ET_BUILDER_DIR . 'feature/background-masks/pattern/*.php' ),
'thumbnail' => $this->thumbnail_settings(),
);
// Default pattern style.
$default = self::get_default_style_name();
$style = array(
$default => self::get_style( $default ),
);
$files = array();
foreach ( self::$_settings['styles'] as $file ) {
// Extract name from file (e.g corner-lake).
$name = basename( $file, '.php' );
// Fetch settings for the style.
$style_settings = $default !== $name ? self::get_style( $name ) : array();
// Include the style only when valid settings are found.
if ( ! empty( $style_settings ) ) {
$files[ $name ] = $style_settings;
}
}
// Sort by priority.
et_()->uasort( $files, array( 'ET_Builder_Element', 'compare_by_priority' ) );
self::$_settings['styles'] = array_merge( $style, $files );
// Cleanup.
$default = null;
$files = null;
$style = null;
}
return self::$_settings;
}
/**
* Default thumbnail settings for Pattern.
*
* @return string[]
*/
public function thumbnail_settings() {
return array(
'height' => '60px',
'width' => '80px',
);
}
/**
* Get default pattern style.
*
* @return string Default Style Name.
*/
public function get_default_style_name() {
return 'polka-dots';
}
}

View File

@@ -0,0 +1,24 @@
<?php
/**
* Abstract Class for Pattern Style.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* ET_Builder_Background_Pattern_Style_Base.
*/
abstract class ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
abstract public function settings();
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* Background Pattern Config
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Pattern_Style_Factory.
*/
class ET_Builder_Background_Pattern_Style_Factory {
/**
* Class instance object
*
* @var array Holds all Pattern Style instance.
*/
private static $_instance = array();
/**
* Get instance of the Class
*
* @param string $name Pattern Style Name.
*
* @return ET_Builder_Background_Pattern_Style_Base
*/
public static function get( $name ) {
$name = sanitize_file_name( $name );
if ( ! isset( self::$_instance[ $name ] ) ) {
// Look at feature/background-masks/pattern directory.
$file = ET_BUILDER_DIR . "feature/background-masks/pattern/$name.php";
$instance = file_exists( $file ) ? require_once $file : null;
self::$_instance[ $name ] = $instance instanceof ET_Builder_Background_Pattern_Style_Base ? $instance : null;
}
return self::$_instance[ $name ];
}
}

View File

@@ -0,0 +1,222 @@
<?php
/**
* Functions needed for the Background Masks QF.
*
* @since 4.15.0
*
* @package Divi
* @subpackage Builder
*/
/**
* Get background pattern option instance.
*
* @since 4.15.0
*
* @return ET_Builder_Background_Pattern_Options
*/
function et_pb_background_pattern_options() {
return ET_Builder_Background_Pattern_Options::get();
}
/**
* Get background mask option instance.
*
* @since 4.15.0
*
* @return ET_Builder_Background_Mask_Options
*/
function et_pb_background_mask_options() {
return ET_Builder_Background_Mask_Options::get();
}
/**
* Returns Pattern style options.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_pattern_style_options() {
// Bail, when AJAX isn't calling for Builder Assets/Data.
if ( wp_doing_ajax() && ! et_fb_is_builder_ajax() ) {
return array();
}
$cache_key = 'et_pb_get_pattern_style_options';
if ( ! et_core_cache_has( $cache_key ) ) {
$options = array();
$settings = et_pb_background_pattern_options()->settings();
if ( ! empty( $settings['styles'] ) ) {
// Get the style names.
$names = array_keys( $settings['styles'] );
// Get Label for the styles.
$labels = array_column( $settings['styles'], 'label' );
// Prepare the final style options.
$options = array_combine( $names, $labels );
// Cleanup.
$labels = null;
$names = null;
$settings = null;
}
et_core_cache_set( $cache_key, $options );
} else {
$options = et_core_cache_get( $cache_key );
}
return $options ? $options : array();
}
/**
* Returns Mask style options.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_mask_style_options() {
// Bail, when AJAX isn't calling for Builder Assets/Data.
if ( wp_doing_ajax() && ! et_fb_is_builder_ajax() ) {
return array();
}
$cache_key = 'et_pb_get_mask_style_options';
if ( ! et_core_cache_has( $cache_key ) ) {
$options = array();
$settings = et_pb_background_mask_options()->settings();
if ( ! empty( $settings['styles'] ) ) {
// Get the style names.
$names = array_keys( $settings['styles'] );
// Get Label for the styles.
$labels = array_column( $settings['styles'], 'label' );
// Prepare the final style options.
$options = array_combine( $names, $labels );
// Cleanup.
$labels = null;
$names = null;
$settings = null;
}
et_core_cache_set( $cache_key, $options );
} else {
$options = et_core_cache_get( $cache_key );
}
return $options ? $options : array();
}
if ( ! function_exists( 'et_pb_get_background_field_allowed_units' ) ) :
/**
* Return allowed units for width/height/horizontal offset/vertical offset field.
*
* @since 4.15.0
*
* @return string[]
*/
function et_pb_get_background_field_allowed_units() {
return array(
'%',
'em',
'rem',
'px',
'cm',
'mm',
'in',
'pc',
'ex',
'vh',
'vw',
);
}
endif;
if ( ! function_exists( 'et_pb_get_background_blend_mode_options' ) ) :
/**
* Return blend mode options list.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_background_blend_mode_options() {
return array(
'normal' => et_builder_i18n( 'Normal' ),
'multiply' => et_builder_i18n( 'Multiply' ),
'screen' => et_builder_i18n( 'Screen' ),
'overlay' => et_builder_i18n( 'Overlay' ),
'darken' => et_builder_i18n( 'Darken' ),
'lighten' => et_builder_i18n( 'Lighten' ),
'color-dodge' => et_builder_i18n( 'Color Dodge' ),
'color-burn' => et_builder_i18n( 'Color Burn' ),
'hard-light' => et_builder_i18n( 'Hard Light' ),
'soft-light' => et_builder_i18n( 'Soft Light' ),
'difference' => et_builder_i18n( 'Difference' ),
'exclusion' => et_builder_i18n( 'Exclusion' ),
'hue' => et_builder_i18n( 'Hue' ),
'saturation' => et_builder_i18n( 'Saturation' ),
'color' => et_builder_i18n( 'Color' ),
'luminosity' => et_builder_i18n( 'Luminosity' ),
);
}
endif;
if ( ! function_exists( 'et_pb_get_background_position_options' ) ) :
/**
* Return Background Position options list.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_background_position_options() {
return array(
'top_left' => et_builder_i18n( 'Top Left' ),
'top_center' => et_builder_i18n( 'Top Center' ),
'top_right' => et_builder_i18n( 'Top Right' ),
'center_left' => et_builder_i18n( 'Center Left' ),
'center' => et_builder_i18n( 'Center' ),
'center_right' => et_builder_i18n( 'Center Right' ),
'bottom_left' => et_builder_i18n( 'Bottom Left' ),
'bottom_center' => et_builder_i18n( 'Bottom Center' ),
'bottom_right' => et_builder_i18n( 'Bottom Right' ),
);
}
endif;
if ( ! function_exists( 'et_pb_get_background_repeat_options' ) ) :
/**
* Return Background Repeat options list.
*
* @since 4.15.0
*
* @param bool $no_repeat Whether to include no-repeat option.
*
* @return array
*/
function et_pb_get_background_repeat_options( $no_repeat = true ) {
$options = array(
'repeat' => et_builder_i18n( 'Repeat' ),
'repeat-x' => et_builder_i18n( 'Repeat X (horizontal)' ),
'repeat-y' => et_builder_i18n( 'Repeat Y (vertical)' ),
'space' => et_builder_i18n( 'Repeat with space between' ),
'round' => et_builder_i18n( 'Repeat and Stretch' ),
);
if ( $no_repeat ) {
$options['no-repeat'] = et_builder_i18n( 'No Repeat' );
}
return $options;
}
endif;

View File

@@ -0,0 +1,467 @@
<?php
/**
* Functions needed for the Background Pattern Fields.
*
* @since 4.15.0
*
* @package Divi
* @subpackage Builder
*/
/**
* Mask Fields Language Strings.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_mask_i18n() {
static $_i18n = null;
if ( is_null( $_i18n ) ) {
$_i18n = array(
'mask_style' => array(
'label' => esc_html__( 'Mask Style', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Style', 'et_builder' ),
),
'mask_color' => array(
'label' => esc_html__( 'Mask Color', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Color', 'et_builder' ),
),
'mask_transform' => array(
'label' => esc_html__( 'Mask Transform', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Transform', 'et_builder' ),
'options' => array(
'flip_horizontal' => esc_html__( 'Flip Horizontal', 'et_builder' ),
'flip_vertical' => esc_html__( 'Flip Vertical', 'et_builder' ),
'rotate_90_degree' => esc_html__( 'Rotate 90 Degree', 'et_builder' ),
'invert' => esc_html__( 'Invert', 'et_builder' ),
),
),
'mask_aspect_ratio' => array(
'label' => esc_html__( 'Mask Aspect Ratio', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Aspect Ratio', 'et_builder' ),
'options' => array(
'landscape' => esc_html__( 'Landscape', 'et_builder' ),
'square' => esc_html__( 'Square', 'et_builder' ),
'portrait' => esc_html__( 'Portrait', 'et_builder' ),
),
),
'mask_size' => array(
'label' => esc_html__( 'Mask Size', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Size', 'et_builder' ),
'options' => array(
'stretch' => et_builder_i18n( 'Stretch to Fill' ),
'cover' => et_builder_i18n( 'Cover' ),
'contain' => et_builder_i18n( 'Fit' ),
'custom' => et_builder_i18n( 'Custom Size' ),
),
),
'mask_width' => array(
'label' => esc_html__( 'Mask Width', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Width', 'et_builder' ),
),
'mask_height' => array(
'label' => esc_html__( 'Mask Height', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Height', 'et_builder' ),
),
'mask_position' => array(
'label' => esc_html__( 'Mask Position', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Position', 'et_builder' ),
),
'mask_horizontal_offset' => array(
'label' => esc_html__( 'Mask Horizontal Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Horizontal Offset', 'et_builder' ),
),
'mask_vertical_offset' => array(
'label' => esc_html__( 'Mask Vertical Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Vertical Offset', 'et_builder' ),
),
'mask_blend_mode' => array(
'label' => esc_html__( 'Mask Blend Mode', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Blend Mode', 'et_builder' ),
),
);
}
return $_i18n;
}
/**
* Mask Field Templates.
*
* @since 4.15.0
*
* @return array[]
*/
function et_ph_mask_field_templates() {
return array(
'mask_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'tab_filler' => true,
'type' => 'select-mask',
),
'mask_color' => array(
'custom_color' => true,
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'color-alpha',
),
'mask_transform' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'multi_selection' => true,
'option_category' => 'configuration',
'sticky' => true,
'toggleable' => true,
'type' => 'multiple_buttons',
),
'mask_aspect_ratio' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'multi_selection' => false,
'option_category' => 'configuration',
'sticky' => true,
'toggleable' => true,
'type' => 'multiple_buttons',
),
'mask_size' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'mask_width' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_height' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_position' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'mask_horizontal_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_vertical_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_blend_mode' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'enable_mask_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'skip',
),
);
}
/**
* Generates Background Mask fields.
*
* @since 4.15.0
*
* @param string $base_name background base name.
* @param bool $specialty whether return field for specialty section column.
*
* @return array
*/
function et_pb_get_mask_fields( $base_name, $specialty = false ) {
static $_cache = null;
$suffix = $specialty ? '_%s' : '';
$field_type = "{$base_name}{$suffix}";
if ( ! isset( $_cache[ $field_type ] ) ) {
$i18n = et_pb_mask_i18n();
$label = $specialty ? 'column_label' : 'label';
$options = array();
$options[ "{$base_name}_enable_mask_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'enable_mask_style',
array(
'default' => 'off',
)
);
$options[ "{$base_name}_mask_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_style',
array(
'default' => et_pb_background_mask_options()->get_default_style_name(),
'label' => $i18n['mask_style'][ $label ],
'options' => et_pb_get_mask_style_options(),
'copy_with' => array(
"{$base_name}_enable_mask_style{$suffix}",
),
)
);
$options[ "{$base_name}_mask_color{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_color',
array(
'default' => '#ffffff',
'label' => $i18n['mask_color'][ $label ],
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_transform{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_transform',
array(
'default' => '',
'label' => $i18n['mask_transform'][ $label ],
'options' => array(
'flip_horizontal' => array(
'title' => $i18n['mask_transform']['options']['flip_horizontal'],
'icon' => 'flip-horizontally',
),
'flip_vertical' => array(
'title' => $i18n['mask_transform']['options']['flip_vertical'],
'icon' => 'flip-vertically',
),
'rotate_90_degree' => array(
'title' => $i18n['mask_transform']['options']['rotate_90_degree'],
'icon' => 'rotate-90-degree',
),
'invert' => array(
'title' => $i18n['mask_transform']['options']['invert'],
'icon' => 'invert',
),
),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_aspect_ratio{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_aspect_ratio',
array(
'default' => 'landscape',
'label' => $i18n['mask_aspect_ratio'][ $label ],
'options' => array(
'landscape' => array(
'title' => $i18n['mask_aspect_ratio']['options']['landscape'],
'icon' => 'aspect-ratio-landscape',
),
'square' => array(
'title' => $i18n['mask_aspect_ratio']['options']['square'],
'icon' => 'aspect-ratio-square',
),
'portrait' => array(
'title' => $i18n['mask_aspect_ratio']['options']['portrait'],
'icon' => 'aspect-ratio-portrait',
),
),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_size{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_size',
array(
'default' => 'stretch',
'label' => $i18n['mask_size'][ $label ],
'options' => array(
'stretch' => $i18n['mask_size']['options']['stretch'],
'cover' => $i18n['mask_size']['options']['cover'],
'contain' => $i18n['mask_size']['options']['contain'],
'custom' => $i18n['mask_size']['options']['custom'],
),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_width{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_width',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['mask_width'][ $label ],
'show_if' => array(
"{$base_name}_mask_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_mask_height{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_height',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['mask_height'][ $label ],
'show_if' => array(
"{$base_name}_mask_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_mask_position{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_position',
array(
'default' => 'center',
'label' => $i18n['mask_position'][ $label ],
'options' => et_pb_get_background_position_options(),
'show_if' => array(
"{$base_name}_mask_size{$suffix}" => array(
'cover',
'contain',
'custom',
),
),
)
);
$options[ "{$base_name}_mask_horizontal_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_horizontal_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['mask_horizontal_offset'][ $label ],
'show_if' => array(
"{$base_name}_mask_position{$suffix}" => array(
'top_left',
'top_right',
'center_left',
'center_right',
'bottom_left',
'bottom_right',
),
),
)
);
$options[ "{$base_name}_mask_vertical_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_vertical_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['mask_vertical_offset'][ $label ],
'show_if' => array(
"{$base_name}_mask_position{$suffix}" => array(
'top_left',
'top_center',
'top_right',
'bottom_left',
'bottom_center',
'bottom_right',
),
),
'show_if_not' => array(
"{$base_name}_mask_size{$suffix}" => 'contain',
),
)
);
$options[ "{$base_name}_mask_blend_mode{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_blend_mode',
array(
'default' => 'normal',
'label' => $i18n['mask_blend_mode'][ $label ],
'options' => et_pb_get_background_blend_mode_options(),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
if ( $specialty ) {
foreach ( array_keys( $options ) as $field ) {
$options[ $field ]['sub_toggle'] = 'column_%s';
}
}
$_cache[ $field_type ] = $options;
}
return isset( $_cache[ $field_type ] ) ? $_cache[ $field_type ] : array();
}

View File

@@ -0,0 +1,454 @@
<?php
/**
* Functions needed for the Background Pattern Fields.
*
* @package Divi
* @subpackage Builder
* @since 4.15.0
*/
/**
* Pattern Fields Language Strings.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_pattern_i18n() {
static $_i18n = null;
if ( is_null( $_i18n ) ) {
$_i18n = array(
'pattern_style' => array(
'label' => esc_html__( 'Pattern Style', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Style', 'et_builder' ),
),
'pattern_color' => array(
'label' => esc_html__( 'Pattern Color', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Color', 'et_builder' ),
),
'pattern_transform' => array(
'label' => esc_html__( 'Pattern Transform', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Transform', 'et_builder' ),
'options' => array(
'flip_horizontal' => esc_html__( 'Flip Horizontal', 'et_builder' ),
'flip_vertical' => esc_html__( 'Flip Vertical', 'et_builder' ),
'rotate_90_degree' => esc_html__( 'Rotate 90 degree', 'et_builder' ),
'invert' => esc_html__( 'Invert', 'et_builder' ),
),
),
'pattern_size' => array(
'label' => esc_html__( 'Pattern Size', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Size', 'et_builder' ),
'options' => array(
'initial' => et_builder_i18n( 'Actual Size' ),
'cover' => et_builder_i18n( 'Cover' ),
'contain' => et_builder_i18n( 'Fit' ),
'stretch' => et_builder_i18n( 'Stretch to Fill' ),
'custom' => et_builder_i18n( 'Custom Size' ),
),
),
'pattern_width' => array(
'label' => esc_html__( 'Pattern Width', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Width', 'et_builder' ),
),
'pattern_height' => array(
'label' => esc_html__( 'Pattern Height', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Height', 'et_builder' ),
),
'pattern_repeat_origin' => array(
'label' => esc_html__( 'Pattern Repeat Origin', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Repeat Origin', 'et_builder' ),
),
'pattern_horizontal_offset' => array(
'label' => esc_html__( 'Pattern Horizontal Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Horizontal Offset', 'et_builder' ),
),
'pattern_vertical_offset' => array(
'label' => esc_html__( 'Pattern Vertical Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Vertical Offset', 'et_builder' ),
),
'pattern_repeat' => array(
'label' => esc_html__( 'Pattern Repeat', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Repeat', 'et_builder' ),
),
'pattern_blend_mode' => array(
'label' => esc_html__( 'Pattern Blend Mode', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Blend Mode', 'et_builder' ),
),
);
}
return $_i18n;
}
/**
* Pattern Field Templates.
*
* @since 4.15.0
*
* @return array[]
*/
function et_ph_pattern_field_templates() {
return array(
'pattern_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'tab_filler' => true,
'type' => 'select-pattern',
),
'pattern_color' => array(
'custom_color' => true,
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'color-alpha',
),
'pattern_transform' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'multi_selection' => true,
'option_category' => 'configuration',
'sticky' => true,
'toggleable' => true,
'type' => 'multiple_buttons',
),
'pattern_size' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'pattern_width' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => 'px',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 1000,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_height' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => 'px',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 1000,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_repeat_origin' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'pattern_horizontal_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_vertical_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_repeat' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'pattern_blend_mode' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'enable_pattern_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'skip',
),
);
}
/**
* Generates Background Pattern fields.
*
* @since 4.15.0
*
* @param string $base_name background base name.
* @param bool $specialty whether return field for specialty section column.
*
* @return array
*/
function et_pb_get_pattern_fields( $base_name, $specialty = false ) {
static $_cache = null;
$suffix = $specialty ? '_%s' : '';
$field_type = "{$base_name}{$suffix}";
if ( ! isset( $_cache[ $field_type ] ) ) {
$i18n = et_pb_pattern_i18n();
$label = $specialty ? 'column_label' : 'label';
$options = array();
$options[ "{$base_name}_enable_pattern_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'enable_pattern_style',
array(
'default' => 'off',
)
);
$options[ "{$base_name}_pattern_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_style',
array(
'default' => et_pb_background_pattern_options()->get_default_style_name(),
'label' => $i18n['pattern_style'][ $label ],
'options' => et_pb_get_pattern_style_options(),
'copy_with' => array(
"{$base_name}_enable_pattern_style{$suffix}",
),
)
);
$options[ "{$base_name}_pattern_color{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_color',
array(
'default' => 'rgba(0,0,0,0.2)',
'label' => $i18n['pattern_color'][ $label ],
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_pattern_transform{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_transform',
array(
'default' => '',
'label' => $i18n['pattern_transform'][ $label ],
'options' => array(
'flip_horizontal' => array(
'title' => $i18n['pattern_transform']['options']['flip_horizontal'],
'icon' => 'flip-horizontally',
),
'flip_vertical' => array(
'title' => $i18n['pattern_transform']['options']['flip_vertical'],
'icon' => 'flip-vertically',
),
'rotate_90_degree' => array(
'title' => $i18n['pattern_transform']['options']['rotate_90_degree'],
'icon' => 'rotate-90-degree',
),
'invert' => array(
'title' => $i18n['pattern_transform']['options']['invert'],
'icon' => 'invert',
),
),
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_pattern_size{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_size',
array(
'default' => 'initial',
'label' => $i18n['pattern_size'][ $label ],
'options' => array(
'initial' => $i18n['pattern_size']['options']['initial'],
'cover' => $i18n['pattern_size']['options']['cover'],
'contain' => $i18n['pattern_size']['options']['contain'],
'stretch' => $i18n['pattern_size']['options']['stretch'],
'custom' => $i18n['pattern_size']['options']['custom'],
),
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_pattern_width" ] = ET_Builder_Element::background_field_template(
'pattern_width',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['pattern_width'][ $label ],
'show_if' => array(
"{$base_name}_pattern_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_pattern_height{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_height',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['pattern_height'][ $label ],
'show_if' => array(
"{$base_name}_pattern_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_pattern_repeat_origin{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_repeat_origin',
array(
'default' => 'top_left',
'label' => $i18n['pattern_repeat_origin'][ $label ],
'options' => et_pb_get_background_position_options(),
'show_if' => array(
"{$base_name}_pattern_repeat{$suffix}" => array(
'repeat',
'repeat-x',
'repeat-y',
'round',
),
),
)
);
$options[ "{$base_name}_pattern_horizontal_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_horizontal_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['pattern_horizontal_offset'][ $label ],
'show_if' => array(
"{$base_name}_pattern_repeat_origin{$suffix}" => array(
'top_left',
'top_right',
'center_left',
'center_right',
'bottom_left',
'bottom_right',
),
),
)
);
$options[ "{$base_name}_pattern_vertical_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_vertical_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['pattern_vertical_offset'][ $label ],
'show_if' => array(
"{$base_name}_pattern_repeat_origin{$suffix}" => array(
'top_left',
'top_center',
'top_right',
'bottom_left',
'bottom_center',
'bottom_right',
),
),
'show_if_not' => array(
"{$base_name}_pattern_size{$suffix}" => 'contain',
),
)
);
$options[ "{$base_name}_pattern_repeat{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_repeat',
array(
'default' => 'repeat',
'label' => $i18n['pattern_repeat'][ $label ],
'options' => et_pb_get_background_repeat_options( false ),
'show_if' => array(
"{$base_name}_pattern_size{$suffix}" => array(
'initial',
'cover',
'contain',
'custom',
),
),
)
);
$options[ "{$base_name}_pattern_blend_mode{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_blend_mode',
array(
'default' => 'normal',
'label' => $i18n['pattern_blend_mode'][ $label ],
'options' => et_pb_get_background_blend_mode_options(),
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
if ( $specialty ) {
foreach ( array_keys( $options ) as $field ) {
$options[ $field ]['sub_toggle'] = 'column_%s';
}
}
$_cache[ $field_type ] = $options;
}
return isset( $_cache[ $field_type ] ) ? $_cache[ $field_type ] : array();
}

View File

@@ -0,0 +1,186 @@
# Adding New Mask Style
To add new Mask style in the Divi Builder follow the Actions Items.
## Action Items
- [ ] Copy Mask Template (see bellow).
- [ ] Replace `NAME`, all the `ET_Builder_Mask_NAME` in the template (3 places).
- [ ] Replace `TITLE` in the template (2 places).
- [ ] Replace `PRIORITY` in the template, lower number will make it show-up early in Mask Style Dropdown list in the VB.
- [ ] Save in a new file, e.g: `some-name.php`, in this folder, add/commit to the repository.
**Tip**:
- For `NAME`, if it's multiple words like `Diagonal Lines`, use `_` to join, e.g `Diagonal_Lines`.
- For `filename`, if it's multiple words like `Diagonal Lines`, use `-` to join and make it lower case, e.g `diagonal-lines.php`.
- Once new `filename.php` placed in this folder, the new mask would automatically appear in the VB (just refresh).
- `landscape`, `portrait` and `square` should only contain all tags inside the `<svg></svg>` file, e.g:
```
'landscape' => '<path d="M28,28H56V56H28ZM0,0H28V28H0Z"/>',
```
<hr>
### Regular Mask Template:
```
<?php
/**
* Background Mask Style - TITLE.
*
* @package Divi
* @sub-package Builder
* @since ??
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_NAME
*
* @since ??
*/
class ET_Builder_Mask_NAME extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'TITLE', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'default-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
),
// Replace following PRIORITY with number (1-9) and uncomment to make it on top 9 list.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- temporary comment.
// 'priority' => PRIORITY,
);
}
}
return new ET_Builder_Mask_NAME();
```
<hr>
### Extended Mask Template:
We're using following default `viewBox` settings for all masks ([Code Ref](https://github.com/elegantthemes/submodule-builder/blob/a54a40832c4abc5777b1f3fad52ad2cabde6f97f/module/settings/BackgroundMaskOptions.php#L195-L202)).
```
/**
* Default viewBox settings for Mask.
*
* @return string[]
*/
public function view_box_settings() {
return array(
'landscape' => '0 0 1920 1440',
'portrait' => '0 0 1920 2560',
'square' => '0 0 1920 1920',
'thumbnail' => '0 0 1920 1440',
);
}
```
Also, we're using svgContent of `square` to show as `thumbnail` to display in Dropdown Style list in the VB.
In case a mask need any custom value for viewBox and/or custom thumbnail, can be done like following:
```
<?php
/**
* Background Mask Style - TITLE.
*
* @package Divi
* @sub-package Builder
* @since ??
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_NAME
*
* @since ??
*/
class ET_Builder_Mask_NAME extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'TITLE', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'default-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
// Following is optional, uncomment it if don't want to reuse landscape value.
// 'thumbnail' => '',
),
// Replace following PRIORITY with number (1-9) and uncomment to make it on top 9 list.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- temporary comment.
// 'priority' => PRIORITY,
// Following is optional, remove any number of them if you want to reuse global settings.
'viewBox' => array(
'landscape' => '0 0 1920 1440',
'portrait' => '0 0 1920 2560',
'square' => '0 0 1920 1920',
'thumbnail' => '0 0 1920 1440',
),
);
}
}
return new ET_Builder_Mask_NAME();
```
The Code works as following:
- Look for `viewBox` value from mask file, if not exists, global settings are used.
- Look for `thumbnail` value from `svgContent` array from mask file, if not exists, `square` value is used.
<hr>
**Last Updated**: Feb 10, 2022.

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Arch.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Arch
*
* @since 4.15.0
*/
class ET_Builder_Mask_Arch extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Arch', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1175.84,0H0V1440H1176.38c-110.64-207.53-174.88-454.91-174.88-720.5C1001.5,454.33,1065.54,207.33,1175.84,0Z"/>',
'portrait' => '<path d="M1175.43,0H0V2560H1176.38c-196.68-368.95-310.9-808.72-310.9-1280.89C865.48,807.7,979.33,368.58,1175.43,0Z"/>',
'square' => '<path d="M1175.66,0H0V1920H1176.38c-147.51-276.71-233.17-606.54-233.17-960.67C943.21,605.78,1028.59,276.44,1175.66,0Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1920,0H1175.84c-110.3,207.33-174.34,454.33-174.34,719.5,0,265.59,64.24,513,174.88,720.5H1920Z"/>',
'portrait' => '<path d="M1175.43,0H1920V2560H1176.38c-196.68-368.95-310.9-808.72-310.9-1280.89C865.48,807.7,979.33,368.58,1175.43,0Z"/>',
'square' => '<path d="M1175.66,0H1920V1920H1176.38c-147.51-276.71-233.17-606.54-233.17-960.67C943.21,605.78,1028.59,276.44,1175.66,0Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M0,545.16V1440H1920V544.62C1643.29,655.26,1313.46,719.5,959.33,719.5,605.78,719.5,276.44,655.46,0,545.16Z"/>',
'portrait' => '<path d="M0,1048.43V2560H1920V1047.72c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,1280.89,276.44,1195.51,0,1048.43Z"/>',
'square' => '<path d="M0,728.34V1920H1920V727.62c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,960.79,276.44,875.41,0,728.34Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M0,545.16V0H1920V544.62C1643.29,655.26,1313.46,719.5,959.33,719.5,605.78,719.5,276.44,655.46,0,545.16Z"/>',
'portrait' => '<path d="M0,1048.43V0H1920V1047.72c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,1280.89,276.44,1195.51,0,1048.43Z"/>',
'square' => '<path d="M0,728.34V0H1920V727.62c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,960.79,276.44,875.41,0,728.34Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Arch();

View File

@@ -0,0 +1,66 @@
<?php
/**
* Background Mask Style - Bean.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Bean
*
* @since 4.15.0
*/
class ET_Builder_Mask_Bean extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Bean', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM729.79,450c112.5,8.65,199.22-58.32,293-101.82,36.35-25.81,75.42-47.67,120.66-60.64,411.05-130.29,634.07,288.11,369.08,599.49-3.24,4.19-6.56,8.32-9.91,12.42-47.1,57.67-104.37,106.58-168.16,146.51-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140-10.74-23.07-22-46.55-26.65-72C253.28,457.35,515.27,433.55,729.79,450Z"/>
<path fill-opacity=".4" d="M1178.93,307.43c-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.66-60.64,411.05-130.29,634.07,288.11,369.08,599.49-3.24,4.19-6.56,8.32-9.91,12.42C1683.16,653.44,1539.44,291.86,1178.93,307.43ZM324.19,772.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1239.39,478.65,1104.63,324.19,772.53Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1512.57,1447.06c-3.24,4.19-6.56,8.32-9.91,12.42-47.1,57.67-104.37,106.58-168.16,146.51-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140-10.74-23.07-22-46.55-26.65-72-44.26-243.16,217.73-267,432.25-250.48,112.5,8.65,199.22-58.32,293-101.82,36.35-25.81,75.42-47.67,120.67-60.64C1554.54,717.28,1777.56,1135.68,1512.57,1447.06Z"/>
<path fill-opacity=".4" d="M1512.57,1447.06c-3.24,4.19-6.56,8.32-9.91,12.42,180.5-246,36.78-607.62-323.73-592.05-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.67-60.64C1554.54,717.28,1777.56,1135.68,1512.57,1447.06ZM324.19,1332.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1799.39,478.65,1664.63,324.19,1332.53Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM729.79,690c112.5,8.65,199.22-58.32,293-101.82,36.35-25.81,75.42-47.67,120.67-60.64,411-130.29,634.06,288.11,369.07,599.49-3.24,4.19-6.56,8.32-9.91,12.42-47.1,57.67-104.37,106.58-168.16,146.51-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140-10.74-23.07-22-46.55-26.65-72C253.28,697.35,515.27,673.55,729.79,690Z"/>
<path fill-opacity=".4" d="M1334.5,1286c-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140C478.65,1344.63,1004.57,1479.39,1334.5,1286Zm168.16-146.51c3.35-4.1,6.67-8.23,9.91-12.42,265-311.38,42-729.78-369.07-599.49-45.25,13-84.32,34.83-120.67,60.64,48.51-22.5,99-40,156.1-40.78C1539.44,531.86,1683.16,893.44,1502.66,1139.48Z"/>',
),
'default-inverted' => array(
'landscape' => '<path fill-opacity=".4" d="M1178.93,307.43c-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.66-60.64,411.05-130.29,634.07,288.11,369.08,599.49-3.24,4.19-6.56,8.32-9.91,12.42C1683.16,653.44,1539.44,291.86,1178.93,307.43ZM324.19,772.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1239.39,478.65,1104.63,324.19,772.53Z"/>
<path d="M324.19,772.53c154.46,332.1,680.38,466.86,1010.31,273.46,63.79-39.93,121.06-88.84,168.16-146.51,180.5-246,36.78-607.62-323.73-592-57.11.78-107.59,18.28-156.1,40.78C929,391.71,842.29,458.68,729.79,450c-214.52-16.48-476.51,7.32-432.25,250.48C302.18,726,313.45,749.46,324.19,772.53Z"/>',
'portrait' => '<path fill-opacity=".4" d="M1512.57,1447.06c-3.24,4.19-6.56,8.32-9.91,12.42,180.5-246,36.78-607.62-323.73-592.05-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.67-60.64C1554.54,717.28,1777.56,1135.68,1512.57,1447.06ZM324.19,1332.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1799.39,478.65,1664.63,324.19,1332.53Z"/>
<path d="M1178.93,867.43c-57.11.78-107.59,18.28-156.1,40.78-93.82,43.5-180.54,110.47-293,101.82-214.52-16.48-476.51,7.32-432.25,250.48,4.64,25.47,15.91,49,26.65,72,154.46,332.1,680.38,466.86,1010.31,273.46,63.79-39.93,121.06-88.84,168.16-146.51C1683.16,1213.44,1539.44,851.86,1178.93,867.43Z"/>',
'square' => '<path fill-opacity=".4" d="M1334.5,1286c-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140C478.65,1344.63,1004.57,1479.39,1334.5,1286Zm168.16-146.51c3.35-4.1,6.67-8.23,9.91-12.42,265-311.38,42-729.78-369.07-599.49-45.25,13-84.32,34.83-120.67,60.64,48.51-22.5,99-40,156.1-40.78C1539.44,531.86,1683.16,893.44,1502.66,1139.48Z"/>
<path d="M324.19,1012.53c154.46,332.1,680.38,466.86,1010.31,273.46,63.79-39.93,121.06-88.84,168.16-146.51,180.5-246,36.78-607.62-323.73-592.05-57.11.78-107.59,18.28-156.1,40.78C929,631.71,842.29,698.68,729.79,690c-214.52-16.48-476.51,7.32-432.25,250.48C302.18,966,313.45,989.46,324.19,1012.53Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM720.14,861.63c22.44-87.43-18.28-165.06-39.52-245-15.28-32.23-27.07-66-31-103.49-45.54-341.95,315.07-459.52,523.58-207.5,2.85,3.14,5.64,6.32,8.4,9.53,38.9,45.12,69.48,97,92.08,152.84,118,291.28,16.28,694.15-245.05,774.78-31,9.58-73.11,4-110.75-16.79-19.67,5.24-39.74,10.87-60.45,11C659.71,1238.06,677.35,1028.35,720.14,861.63Z"/>
<path fill-opacity=".4" d="M670.18,488c-7.32,45.11-.54,87.31,10.44,128.66-15.28-32.23-27.07-66-31-103.49-45.54-341.95,315.07-459.52,523.58-207.5,2.85,3.14,5.64,6.32,8.4,9.53C1012.83,138.78,708,201.78,670.18,488Zm247.69,738c37.64,20.8,79.72,26.37,110.75,16.79,261.33-80.63,363-483.5,245.05-774.78C1380.2,754.8,1201,1150.42,917.87,1226Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1220.47,764.83c3.56,3.93,7,7.91,10.51,11.92,48.63,56.4,86.84,121.29,115.09,191,147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21-24.59,6.56-49.67,13.59-75.56,13.73-247.15,1.36-225.1-260.77-171.61-469.17,28.05-109.3-22.85-206.33-49.4-306.27-19.1-40.28-33.84-82.56-38.76-129.37C509.07,596.77,959.84,449.8,1220.47,764.83Z"/>
<path fill-opacity=".4" d="M1220.47,764.83c3.56,3.93,7,7.91,10.51,11.92C1020,556.27,639,635,591.72,992.75c-9.15,56.38-.68,109.13,13,160.82-19.1-40.28-33.84-82.56-38.76-129.37C509.07,596.77,959.84,449.8,1220.47,764.83ZM901.33,1915.28c47,26,99.64,33,138.44,21,326.65-100.79,453.77-604.38,306.3-968.48C1479.24,1326.3,1255.2,1820.83,901.33,1915.28Z"/>',
'square' => '<path d="M0,1920H1920V0H0Zm654.16-780.16c28.05-109.3-22.85-206.33-49.4-306.28C585.66,793.29,570.92,751,566,704.2c-56.93-427.43,393.84-574.4,654.47-259.37,3.56,3.93,7,7.91,10.51,11.92,48.63,56.4,86.84,121.29,115.09,191,147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21-24.59,6.56-49.67,13.59-75.56,13.73C578.62,1610.37,600.67,1348.24,654.16,1139.84Z"/>
<path fill-opacity=".4" d="M1346.07,647.79c147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21C1255.2,1500.83,1479.24,1006.3,1346.07,647.79ZM1231,456.75c-3.46-4-7-8-10.51-11.92C959.84,129.8,509.07,276.77,566,704.2c4.92,46.81,19.66,89.09,38.76,129.36-13.72-51.68-22.19-104.43-13-160.81C639,315,1020,236.27,1231,456.75Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path fill-opacity=".4" d="M670.18,488c-7.32,45.11-.54,87.31,10.44,128.66-15.28-32.23-27.07-66-31-103.49-45.54-341.95,315.07-459.52,523.58-207.5,2.85,3.14,5.64,6.32,8.4,9.53C1012.83,138.78,708,201.78,670.18,488Zm247.69,738c37.64,20.8,79.72,26.37,110.75,16.79,261.33-80.63,363-483.5,245.05-774.78C1380.2,754.8,1201,1150.42,917.87,1226Z"/>
<path d="M917.87,1226c283.1-75.57,462.33-471.19,355.8-758-22.6-55.8-53.18-107.72-92.08-152.84C1012.83,138.78,708,201.78,670.18,488c-7.32,45.11-.54,87.31,10.44,128.66,21.24,80,62,157.58,39.52,245-42.79,166.72-60.43,376.43,137.28,375.34C878.13,1236.86,898.2,1231.23,917.87,1226Z"/>',
'portrait' => '<path fill-opacity=".4" d="M1220.47,764.83c3.56,3.93,7,7.91,10.51,11.92C1020,556.27,639,635,591.72,992.75c-9.15,56.38-.68,109.13,13,160.82-19.1-40.28-33.84-82.56-38.76-129.37C509.07,596.77,959.84,449.8,1220.47,764.83ZM901.33,1915.28c47,26,99.64,33,138.44,21,326.65-100.79,453.77-604.38,306.3-968.48C1479.24,1326.3,1255.2,1820.83,901.33,1915.28Z"/>
<path d="M591.72,992.75c-9.15,56.38-.68,109.13,13,160.82,26.55,99.94,77.45,197,49.4,306.27-53.49,208.4-75.54,470.53,171.61,469.17,25.89-.14,51-7.17,75.56-13.73,353.87-94.45,577.91-589,444.74-947.49-28.25-69.75-66.46-134.64-115.09-191C1020,556.27,639,635,591.72,992.75Z"/>',
'square' => '<path fill-opacity=".4" d="M1346.07,647.79c147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21C1255.2,1500.83,1479.24,1006.3,1346.07,647.79ZM1231,456.75c-3.46-4-7-8-10.51-11.92C959.84,129.8,509.07,276.77,566,704.2c4.92,46.81,19.66,89.09,38.76,129.36-13.72-51.68-22.19-104.43-13-160.81C639,315,1020,236.27,1231,456.75Z"/>
<path d="M901.33,1595.28c353.87-94.45,577.91-589,444.74-947.49-28.25-69.75-66.46-134.64-115.09-191C1020,236.27,639,315,591.72,672.75c-9.15,56.38-.68,109.13,13,160.81,26.55,100,77.45,197,49.4,306.28-53.49,208.4-75.54,470.53,171.61,469.17C851.66,1608.87,876.74,1601.84,901.33,1595.28Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Bean();

View File

@@ -0,0 +1,59 @@
<?php
/**
* Background Mask Style - Blades.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Blades
*
* @since 4.15.0
*/
class ET_Builder_Mask_Blades extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Blades', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1919.53,694.81q0-29.94,0-59.74L1648,917.13v-7.3l271.5-282.05c0-131.69-.06-259.19,0-364.49L1005,1213.3V387L1377.55,0H0V1440H1202.22Z"/>
<path d="M1585.93,1440H1920s-.12-146.87-.26-346.79Z"/>',
'portrait' => '<polygon points="1919.53 694.81 1919.51 635.07 1648 917.13 1648 909.83 1919.5 627.78 1919.47 263.29 1005 1213.3 1005 387.03 1377.56 0 0 0 0 1920 740 1920 1919.53 694.81"/>
<polygon points="1124 1920 1920 1920 1919.74 1093.21 1124 1920"/>',
'square' => '<polygon points="1919.74 1093.21 769.79 2288 385.84 2288 1919.53 694.81 1919.51 635.07 1648 917.13 1648 909.83 1919.5 627.78 1919.47 263.29 1005 1213.3 1005 387.03 1377.56 0 0 0 0 2560 1919.5 2560 1920 2560 1919.74 1093.21"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1920,0V260.31l-915,953V387L1377.55,0ZM1648,909.83v7.3l272-284.59v-7.3ZM1202.22,1440h383.71L1920,1090.83V692Z"/>',
'portrait' => '<path d="M1920,691.2V1090L769.79,2288H385.84ZM1648,909.83v7.3l272-284.62v-7.3ZM1377.55,0,1005,387V1213.3l915-953.45V0Z"/>',
'square' => '<path d="M1920,625.21v7.3L1648,917.13v-7.3ZM740,1920h384l796-829.85V691.29ZM1377.55,0,1005,387V1213.3l915-953.45V0Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1174.81.47l-59.74,0L1397.13,272h-7.3L1107.78.5c-131.69,0-259.19.06-364.49,0L1693.3,915H867L0,80V1440H1920V717.78Z"/>
<path d="M1920,334.07V0s-146.87.13-346.79.26Z"/>',
'portrait' => '<polygon points="694.81 0.47 635.07 0.49 917.13 272 909.83 272 627.78 0.5 263.29 0.53 1213.3 915 387.03 915 0 542.45 0 2560 1920 2560 1920 1180 694.81 0.47"/>
<polygon points="1920 796 1920 0 1093.21 0.26 1920 796"/>',
'square' => '<polygon points="694.81 0.47 635.07 0.49 917.13 272 909.83 272 627.78 0.5 263.29 0.53 1213.3 915 387.03 915 0 542.45 0 1920 1920 1920 1920 1180 694.81 0.47"/>
<polygon points="1920 796 1920 0 1093.21 0.26 1920 796"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M0,0H741.39L1693.3,915H867L0,80ZM1389.83,272h7.3L1114.57,0h-6.83ZM1175,0l745,717.78V334.07L1573.14,0Z"/>',
'portrait' => '<path d="M0,0,262.32.06,1786.3,1477H960L0,542.45ZM909.83,272h7.3L634.88.15H628.2ZM1920,796,1093.21.26,694.9.16,1920,1180Z"/>',
'square' => '<path d="M0,0,262.32.06,1213.3,915H387L0,542.45ZM909.83,272h7.3L634.88.15H628.2ZM1920,796,1093.21.26,694.9.16,1920,1180Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Blades();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Caret.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Caret
*
* @since 4.15.0
*/
class ET_Builder_Mask_Caret extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Caret', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="1241.5 0 0 0 0 1440 1241.82 1440 1016 719.5 1241.5 0"/>',
'portrait' => '<polygon points="1327.2 0 0 0 0 2560 1327.76 2560 926.3 1279.11 1327.2 0"/>',
'square' => '<polygon points="1241.4 0 0 0 0 1920 1241.82 1920 940.73 959.33 1241.4 0"/>',
),
'default-inverted' => array(
'landscape' => '<polygon points="1920 0 1241.5 0 1016 719.5 1241.82 1440 1920 1440 1920 0"/>',
'portrait' => '<polygon points="1327.2 0 1920 0 1920 2560 1327.76 2560 926.3 1279.11 1327.2 0"/>',
'square' => '<polygon points="1241.4 0 1920 0 1920 1920 1241.82 1920 940.73 959.33 1241.4 0"/>',
),
'rotated' => array(
'landscape' => '<polygon points="0 428.6 0 1440 1920 1440 1920 428.18 959.33 729.27 0 428.6"/>',
'portrait' => '<polygon points="0 991.6 0 2560 1920 2560 1920 991.18 959.33 1292.27 0 991.6"/>',
'square' => '<polygon points="0 669.6 0 1920 1920 1920 1920 669.18 959.33 970.27 0 669.6"/>',
),
'rotated-inverted' => array(
'landscape' => '<polygon points="0 428.6 0 0 1920 0 1920 428.18 959.33 729.27 0 428.6"/>',
'portrait' => '<polygon points="0 991.6 0 0 1920 0 1920 991.18 959.33 1292.27 0 991.6"/>',
'square' => '<polygon points="0 669.6 0 0 1920 0 1920 669.18 959.33 970.27 0 669.6"/>',
),
),
);
}
}
return new ET_Builder_Mask_Caret();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Chevrons.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Chevrons
*
* @since 4.15.0
*/
class ET_Builder_Mask_Chevrons extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Chevrons', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M856.08,720,565.7,1440H0V0H565.7ZM1006.14,0H816.2l290.38,720-1.51,3.74L816.2,1440h189.94l290.39-720ZM1190.7,0H1081.62L1372,720l-290.39,720H1190.7l290.38-720ZM794.63,0H568.2L858.58,720l-.17.43L568.2,1440H794.63L1085,720Zm610.79,0H1374l290.39,720L1374,1440h31.42l290.39-720Z"/>',
'portrait' => '<path d="M1335,1280,818.72,2560H416.17L932.1,1280.77l.3-.77L416.17,0H818.72ZM411.73,0H0V2560H411.73L928,1280ZM1920,984.77,1522.83,0H1328.92l516.24,1280L1328.92,2560h193.91L1920,1575.23ZM1194.74,0H857.06L1373.3,1280l-2.69,6.65L857.06,2560h337.68L1711,1280Z"/>',
'square' => '<path d="M692.18,960,305,1920H0V0H305ZM892.25,0H639l387.17,960-2,5L639,1920H892.26l387.17-960Zm246.08,0H992.89l387.18,960L992.89,1920h145.44l387.18-960ZM610.24,0H308.33L695.51,960l-.24.58L308.33,1920H610.24L997.42,960Zm814.39,0h-41.9l387.18,960-387.18,960h41.9l387.18-960Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1664.39,720,1374,1440H1190.7l290.38-720L1190.7,0H1374Zm-805.81,0L568.2,0h-2.5L856.08,720,565.7,1440h2.5L858.41,720.43Zm223-720h-75.48l290.39,720-290.39,720h75.48L1372,720Zm25,720L816.2,0H794.63L1085,720,794.63,1440H816.2l288.87-716.26Zm589.23,0-290.39,720H1920V0H1405.42Z"/>',
'portrait' => '<path d="M1845.16,1280,1328.92,2560H1194.74L1711,1280,1194.74,0h134.18Zm-912.76,0L416.17,0h-4.44L928,1280,411.73,2560h4.44L932.1,1280.77ZM1522.83,0,1920,984.77V0ZM1373.3,1280,857.06,0H818.72L1335,1280,818.72,2560h38.34l513.55-1273.35ZM1920,2560V1575.23L1522.83,2560Z"/>',
'square' => '<path d="M1024.16,965,639,1920H610.24L997.42,960,610.24,0H639l387.17,960ZM992.89,0H892.25l387.18,960L892.26,1920H992.89l387.18-960Zm389.84,0h-244.4l387.18,960-387.18,960h244.4l387.18-960Zm429.08,960-387.18,960H1920V0H1424.63Zm-1116.3,0L308.33,0H305L692.18,960,305,1920h3.33L695.27,960.58Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M960,677.48l960,387.18v301.92L960.58,979.63l-.58-.23L0,1366.58V1064.66ZM0,1369.91V1440H1920v-70.09L960,982.73ZM620.55,0,0,250.28v41.89L724.43,0Zm678.9,0H1195.57L1920,292.17V250.28ZM0,536.58V682L960,294.83,1920,682V536.58L960,149.4ZM0,782.65v253.26L960,648.73l5,2,955,385.17V782.65L960,395.47Z"/>',
'portrait' => '<path d="M960,1493.73l960,387.18V2560H0V1880.91ZM0,1293.65v253.26l960-387.18,5,2,955,385.17V1293.65L960,906.47Zm0-246.07V1193L960,805.83,1920,1193V1047.58L960,660.4Zm0,528.08v301.92L960,1490.4l.58.23L1920,1877.58V1575.66L960,1188.48ZM0,761.28v41.89L960,416l960,387.18V761.28L960,374.1Z"/>',
'square' => '<path d="M960,1227.82,1920,1615v305H0V1615ZM0,1027.75V1281L960,893.83l5,2L1920,1281V1027.74L960,640.57ZM0,781.67V927.11L960,539.93l960,387.18V781.67L960,394.49Zm0,528.09v301.91l960-387.18.58.24L1920,1611.67V1309.76L960,922.58ZM0,495.37v41.9L960,150.09l960,387.18v-41.9L960,108.19Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1920,0V250.28L1299.45,0ZM960,648.73,0,1035.91v28.75L960,677.48l960,387.18v-28.75L965,650.74Zm0,330.67L0,1366.58v3.33L960,982.73l960,387.18v-3.33L960.58,979.63ZM0,682V782.65L960,395.47l960,387.18V682L960,294.83ZM724.43,0,0,292.17V536.58L960,149.4l960,387.18V292.17L1195.57,0ZM0,0V250.28L620.55,0Z"/>',
'portrait' => '<path d="M965,1161.74l955,385.17v28.75L960,1188.48,0,1575.66v-28.75l960-387.18Zm-5,328.66L0,1877.58v3.33l960-387.18,960,387.18v-3.33L960.58,1490.63ZM0,1193v100.64L960,906.47l960,387.18V1193L960,805.83ZM0,803.17v244.41L960,660.4l960,387.18V803.17L960,416ZM0,0V761.28L960,374.1l960,387.18V0Z"/>',
'square' => '<path d="M960,539.93l960,387.18v100.63L960,640.57,0,1027.75V927.11Zm0,353.9L0,1281v28.76L960,922.58l960,387.18V1281L965,895.84ZM0,495.37,960,108.19l960,387.18V0H0Zm0,41.9v244.4L960,394.49l960,387.18V537.27L960,150.09Zm960,687.22L0,1611.67V1615l960-387.18L1920,1615v-3.33L960.58,1224.73Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Chevrons();

View File

@@ -0,0 +1,66 @@
<?php
/**
* Background Mask Style - Corner Blob.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Blob
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Blob extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Blob', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1226.07,328.74c94-75.59,257.39,3.9,344.21-18.37,83.76-21.48,100.79-166,263.41-157.59,34.24,1.76,61.43,23.87,86.31,52.4V0H0V1440H1091.59c-52-65.69-165.68-107.33-188.19-187.31-8.34-29.63-5.63-52.8,1.35-74.62-5.56-51,24.41-80.39,39.63-129.07,2.91-86.63-76.42-153.71-33.64-221a79,79,0,0,1,11.18-15.4,78.9,78.9,0,0,1,6.22-10.79C970,732.76,1083.24,783.57,1159.21,677c.49-.69,1-1.4,1.43-2.12C1196.21,595.86,1126.27,409,1226.07,328.74Z"/>
<path fill-opacity=".3" d="M952.1,1009.94a181.86,181.86,0,0,1-7.72,39.06c2.91-86.63-76.42-153.71-33.64-221a79,79,0,0,1,11.18-15.4C894.22,871,958.69,933.43,952.1,1009.94Zm130,373.3c-42.44-67.36-155.14-109.94-174.26-188.12a133.1,133.1,0,0,1-3-17c-7,21.82-9.69,45-1.35,74.62,22.51,80,136.18,121.62,188.19,187.31h13.8C1099.67,1419.33,1092.54,1399.87,1082.06,1383.24ZM1833.69,152.78C1671.07,144.4,1654,288.89,1570.28,310.37c-86.82,22.27-250.21-57.22-344.21,18.37-99.8,80.25-29.86,267.12-65.43,346.17,43.61-67.06-22.65-252.08,75.63-325.68,89.51-67,238.38,11.83,319.54-6,78.31-17.24,98.7-150.58,249.12-137.63,49.87,4.29,81.92,54.75,115.07,101.64v-102C1895.12,176.65,1867.93,154.54,1833.69,152.78Z"/>',
'portrait' => '<path d="M1072.44,992.64c121.91-98,333.81,5.06,446.41-23.82C1627.5,941,1649.58,753.56,1860.49,764.43c21.8,1.12,41.39,8.6,59.51,20.3V0H0V2560H945.81c-6.7-23.62-11.88-48.5-17.25-73.2a237.7,237.7,0,0,0-21.95-41.23C844,2353.45,684.44,2299.35,653.94,2191c-10.81-38.44-7.3-68.49,1.76-96.79-7.21-66.08,31.66-104.26,51.39-167.39,3.78-112.37-99.12-199.36-43.63-286.59a102.92,102.92,0,0,1,14.5-20,101.63,101.63,0,0,1,8.07-14c54.28-89.61,201.16-23.71,299.68-161.88.64-.9,1.26-1.82,1.86-2.75C1033.7,1339.09,943,1096.72,1072.44,992.64Z"/>
<path fill-opacity=".3" d="M663.46,1640.21a102.92,102.92,0,0,1,14.5-20C642,1696,725.65,1776.91,717.1,1876.13a235.88,235.88,0,0,1-10,50.67C710.87,1814.43,608,1727.44,663.46,1640.21ZM653.94,2191c30.5,108.37,190.1,162.47,252.67,254.59a237.7,237.7,0,0,1,21.95,41.23c-10-45.87-20.61-91.12-42.91-126.51-55-87.37-201.2-142.58-226-244a169.76,169.76,0,0,1-3.94-22.12C646.64,2122.49,643.13,2152.54,653.94,2191ZM1860.49,764.43c-210.91-10.87-233,176.52-341.64,204.39-112.6,28.88-324.5-74.21-446.41,23.82-129.45,104.08-38.74,346.45-84.87,449,56.57-87-29.37-326.94,98.09-422.41,116.1-87,309.17,15.34,414.43-7.83,101.57-22.35,128-195.29,323.1-178.5,38.83,3.34,69.33,28.26,96.81,60.81v-109C1901.88,773,1882.29,765.55,1860.49,764.43Z"/>',
'square' => '<path d="M1116.8,599.88c103.68-83.37,283.89,4.31,379.65-20.25,92.39-23.7,111.17-183.06,290.53-173.83,55.65,2.87,94.41,54.44,133,105.62V0H0V1920H1005.68c-4.12-16.18-7.63-32.86-11.23-49.44a203,203,0,0,0-18.67-35.07c-53.21-78.34-188.94-124.34-214.87-216.51-9.2-32.68-6.21-58.24,1.49-82.31-6.14-56.19,26.92-88.67,43.7-142.35,3.22-95.56-84.29-169.54-37.1-243.72a87.59,87.59,0,0,1,12.33-17,86.8,86.8,0,0,1,6.86-11.9c46.16-76.21,171.07-20.15,254.86-137.66.54-.77,1.07-1.55,1.58-2.34C1083.86,894.52,1006.72,688.4,1116.8,599.88Z"/>
<path fill-opacity=".3" d="M769,1150.6a87.59,87.59,0,0,1,12.33-17c-30.56,64.42,40.55,133.24,33.29,217.62a200.78,200.78,0,0,1-8.52,43.09C809.32,1298.76,721.81,1224.78,769,1150.6ZM760.91,1619c25.93,92.17,161.66,138.17,214.87,216.51a203,203,0,0,1,18.67,35.07c-8.48-39-17.53-77.49-36.49-107.59-46.81-74.3-171.12-121.25-192.21-207.49a144.3,144.3,0,0,1-3.35-18.81C754.7,1560.74,751.71,1586.3,760.91,1619ZM1787,405.8c-179.36-9.23-198.14,150.13-290.53,173.83-95.76,24.56-276-63.12-379.65,20.25-110.08,88.52-32.94,294.64-72.17,381.83,48.1-74-25-278,83.42-359.23,98.73-73.94,262.93,13,352.44-6.66,86.38-19,108.86-166.08,274.77-151.8,73.38,6.31,111.79,103.23,164.74,160.55V511.42C1881.39,460.24,1842.63,408.67,1787,405.8Z"/>',
),
'default-inverted' => array(
'landscape' => '<path fill-opacity=".3" d="M952.1,1009.94a181.86,181.86,0,0,1-7.72,39.06c2.91-86.63-76.42-153.71-33.64-221a79,79,0,0,1,11.18-15.4C894.22,871,958.69,933.43,952.1,1009.94Zm130,373.3c-42.44-67.36-155.14-109.94-174.26-188.12a133.1,133.1,0,0,1-3-17c-7,21.82-9.69,45-1.35,74.62,22.51,80,136.18,121.62,188.19,187.31h13.8C1099.67,1419.33,1092.54,1399.87,1082.06,1383.24Zm154.21-1034c89.51-67,238.38,11.83,319.54-6,78.31-17.24,98.7-150.58,249.12-137.63,49.87,4.29,81.92,54.75,115.07,101.64v-102c-24.88-28.53-52.07-50.64-86.31-52.4C1671.07,144.4,1654,288.89,1570.28,310.37c-86.82,22.27-250.21-57.22-344.21,18.37-99.8,80.25-29.86,267.12-65.43,346.18C1204.25,607.85,1138,422.83,1236.27,349.23Z"/>
<path d="M1804.93,205.56C1654.51,192.61,1634.12,326,1555.81,343.19c-81.16,17.87-230-61-319.54,6-98.28,73.6-32,258.62-75.63,325.69-.47.71-.94,1.42-1.43,2.11-76,106.54-189.22,55.73-231.07,124.82a78.9,78.9,0,0,0-6.22,10.79c-27.7,58.4,36.77,120.79,30.18,197.3a181.86,181.86,0,0,1-7.72,39.06c-15.22,48.68-45.19,78.12-39.63,129.07a133.1,133.1,0,0,0,3,17c19.12,78.18,131.82,120.76,174.26,188.12,10.48,16.63,17.61,36.09,23.33,56.76H1920V307.2C1886.85,260.31,1854.8,209.85,1804.93,205.56Z"/>',
'portrait' => '<path fill-opacity=".3" d="M663.46,1640.21a102.92,102.92,0,0,1,14.5-20C642,1696,725.65,1776.91,717.1,1876.13a235.88,235.88,0,0,1-10,50.67C710.87,1814.43,608,1727.44,663.46,1640.21Zm-3.82,476.1a169.76,169.76,0,0,1-3.94-22.12c-9.06,28.3-12.57,58.35-1.76,96.79,30.5,108.37,190.1,162.47,252.67,254.59a237.7,237.7,0,0,1,21.95,41.23c-10-45.87-20.61-91.12-42.91-126.51C830.62,2272.92,684.45,2217.71,659.64,2116.31Zm426-1097.1c116.1-87,309.17,15.34,414.43-7.83,101.57-22.35,128-195.29,323.1-178.5,38.83,3.34,69.33,28.26,96.81,60.81v-109c-18.12-11.7-37.71-19.18-59.51-20.3-210.91-10.87-233,176.52-341.64,204.39-112.6,28.88-324.5-74.21-446.41,23.82-129.45,104.08-38.74,346.45-84.87,449C1044.14,1354.64,958.2,1114.68,1085.66,1019.21Z"/>
<path d="M1823.19,832.88c-195.09-16.79-221.53,156.15-323.1,178.5-105.26,23.17-298.33-79.12-414.43,7.83-127.46,95.47-41.52,335.43-98.09,422.41-.6.93-1.22,1.85-1.86,2.75-98.52,138.17-245.4,72.27-299.68,161.88a101.63,101.63,0,0,0-8.07,14C642,1696,725.65,1776.91,717.1,1876.13a235.88,235.88,0,0,1-10,50.67c-19.73,63.13-58.6,101.31-51.39,167.39a169.76,169.76,0,0,0,3.94,22.12c24.81,101.4,171,156.61,226,244,22.3,35.39,32.94,80.64,42.91,126.51,5.37,24.7,10.55,49.58,17.25,73.2H1920V893.69C1892.52,861.14,1862,836.22,1823.19,832.88Z"/>',
'square' => '<path fill-opacity=".3" d="M814.62,1351.23a200.78,200.78,0,0,1-8.52,43.09c3.22-95.56-84.29-169.54-37.1-243.72a87.59,87.59,0,0,1,12.33-17C750.77,1198,821.88,1266.85,814.62,1351.23Zm-48.87,204.25a144.3,144.3,0,0,1-3.35-18.81c-7.7,24.07-10.69,49.63-1.49,82.31,25.93,92.17,161.66,138.17,214.87,216.51a203,203,0,0,1,18.67,35.07c-8.48-39-17.53-77.49-36.49-107.59C911.15,1688.67,786.84,1641.72,765.75,1555.48Zm362.3-933c98.73-73.94,262.93,13,352.44-6.66,86.38-19,108.86-166.08,274.77-151.8,73.38,6.31,111.79,103.23,164.74,160.55V511.42c-38.61-51.18-77.37-102.75-133-105.62-179.36-9.23-198.14,150.13-290.53,173.83-95.76,24.56-276-63.12-379.65,20.25-110.08,88.52-32.94,294.64-72.17,381.83C1092.73,907.74,1019.65,703.67,1128.05,622.48Z"/>
<path d="M1755.26,464c-165.91-14.28-188.39,132.79-274.77,151.8-89.51,19.71-253.71-67.28-352.44,6.66-108.4,81.19-35.32,285.26-83.42,359.23-.51.79-1,1.57-1.58,2.34-83.79,117.51-208.7,61.45-254.86,137.66a86.8,86.8,0,0,0-6.86,11.9c-30.56,64.42,40.55,133.24,33.29,217.62a200.78,200.78,0,0,1-8.52,43.09c-16.78,53.68-49.84,86.16-43.7,142.35a144.3,144.3,0,0,0,3.35,18.81C786.84,1641.72,911.15,1688.67,958,1763c19,30.1,28,68.58,36.49,107.59,3.6,16.58,7.11,33.26,11.23,49.44H1920V624.57C1867.05,567.25,1828.64,470.33,1755.26,464Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M852,649.81c-67.45-83.88,3.48-229.67-16.39-307.15-19.17-74.74-148.1-89.94-140.63-235,2.32-45,44-76.37,85.45-107.61H0V1440H1920V739.71c-13.09,3.34-26.58,6.17-40,9.09a163.76,163.76,0,0,0-28.37,15.1C1788.25,807,1751,916.76,1676.47,937.74c-26.45,7.44-47.12,5-66.59-1.21-45.47,5-71.74-21.78-115.17-35.35-77.31-2.61-137.16,68.19-197.18,30a70.27,70.27,0,0,1-13.74-10,69.73,69.73,0,0,1-9.63-5.54c-61.65-37.35-16.3-138.41-111.37-206.19-.62-.44-1.25-.87-1.89-1.28C1090.35,676.46,923.6,738.87,852,649.81Z"/>
<path fill-opacity=".3" d="M1297.53,931.19a70.27,70.27,0,0,1-13.74-10c52.11,24.73,107.79-32.8,176.06-26.93a162.43,162.43,0,0,1,34.86,6.9C1417.4,898.57,1357.55,969.37,1297.53,931.19Zm378.94,6.55c74.56-21,111.78-130.79,175.16-173.84A163.76,163.76,0,0,1,1880,748.8c-31.56,6.86-62.69,14.18-87,29.52-60.11,37.87-98.1,138.43-167.86,155.5a116.53,116.53,0,0,1-15.22,2.71C1629.35,942.76,1650,945.18,1676.47,937.74ZM695,107.61C687.5,252.72,816.43,267.92,835.6,342.66c19.87,77.48-51.06,223.27,16.39,307.15,71.61,89.06,238.36,26.65,308.91,58.39-59.85-38.92-225,20.21-290.63-67.49-59.82-79.88,10.56-212.71-5.38-285.14C849.5,285.69,730.52,267.5,742.07,133.28,747.18,73.92,825.59,42.83,872,0H780.42C739,31.24,697.29,62.6,695,107.61Z"/>',
'portrait' => '<path d="M599.88,1070.93c-83.37-138.24,4.31-378.52-20.25-506.19C555.93,441.54,396.57,416.5,405.8,177.35,408.67,103.16,460.24,51.49,511.42,0H0V2560H1920V1219.1c-16.18,5.49-32.86,10.17-49.44,15a192.73,192.73,0,0,0-35.07,24.89c-78.34,71-124.34,251.92-216.51,286.5-32.68,12.26-58.24,8.28-82.31-2-56.19,8.18-88.67-35.9-142.35-58.27-95.56-4.29-169.54,112.39-243.72,49.47a94,94,0,0,1-17-16.45,84.34,84.34,0,0,1-11.9-9.14c-76.21-61.55-20.15-228.1-137.66-339.81-.77-.73-1.55-1.43-2.34-2.11C894.52,1114.85,688.4,1217.71,599.88,1070.93Z"/>
<path fill-opacity=".3" d="M1150.6,1534.67a94,94,0,0,1-17-16.45c64.42,40.75,133.24-54.06,217.62-44.38a157.54,157.54,0,0,1,43.09,11.36C1298.76,1480.91,1224.78,1597.59,1150.6,1534.67ZM1619,1545.46c92.17-34.58,138.17-215.55,216.51-286.5a192.73,192.73,0,0,1,35.07-24.89c-39,11.31-77.49,23.37-107.59,48.65-74.3,62.41-121.25,228.15-207.49,256.28a113.2,113.2,0,0,1-18.81,4.47C1560.74,1553.74,1586.3,1557.72,1619,1545.46ZM405.8,177.35C396.57,416.5,555.93,441.54,579.63,564.74c24.56,127.67-63.12,368,20.25,506.19,88.52,146.78,294.64,43.92,381.83,96.23-74-64.14-278,33.3-359.23-111.23-73.94-131.64,13-350.56-6.66-469.92-19-115.17-166.08-145.15-151.8-366.36C470.33,121.82,567.25,70.59,624.57,0H511.42C460.24,51.49,408.67,103.16,405.8,177.35Z"/>',
'square' => '<path d="M599.88,803.2c-83.37-103.68,4.31-283.89-20.25-379.65C555.93,331.16,396.57,312.38,405.8,133c2.87-55.65,54.44-94.41,105.62-133H0V1920H1920V914.32c-16.18,4.12-32.86,7.63-49.44,11.23a203,203,0,0,0-35.07,18.67c-78.34,53.21-124.34,188.94-216.51,214.87-32.68,9.2-58.24,6.21-82.31-1.49-56.19,6.14-88.67-26.92-142.35-43.7-95.56-3.22-169.54,84.29-243.72,37.1a87.59,87.59,0,0,1-17-12.33,86.8,86.8,0,0,1-11.9-6.86c-76.21-46.16-20.15-171.07-137.66-254.86-.77-.54-1.55-1.07-2.34-1.58C894.52,836.14,688.4,913.28,599.88,803.2Z"/>
<path fill-opacity=".3" d="M1150.6,1151a87.59,87.59,0,0,1-17-12.33c64.42,30.56,133.24-40.55,217.62-33.29a200.78,200.78,0,0,1,43.09,8.52C1298.76,1110.68,1224.78,1198.19,1150.6,1151Zm468.38,8.09c92.17-25.93,138.17-161.66,216.51-214.87a203,203,0,0,1,35.07-18.67c-39,8.48-77.49,17.53-107.59,36.49-74.3,46.81-121.25,171.12-207.49,192.21a144.3,144.3,0,0,1-18.81,3.35C1560.74,1165.3,1586.3,1168.29,1619,1159.09ZM405.8,133c-9.23,179.36,150.13,198.14,173.83,290.53,24.56,95.76-63.12,276,20.25,379.65,88.52,110.08,294.64,32.94,381.83,72.17-74-48.1-278,25-359.23-83.42-73.94-98.73,13-262.93-6.66-352.44-19-86.38-166.08-108.86-151.8-274.77C470.33,91.36,567.25,53,624.57,0H511.42C460.24,38.61,408.67,77.37,405.8,133Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path fill-opacity=".3" d="M1497.75,968.14a181.86,181.86,0,0,1,39.06,7.72c-86.63-2.92-153.71,76.42-221,33.64a79.4,79.4,0,0,1-15.4-11.18C1358.85,1026,1421.24,961.55,1497.75,968.14Zm373.3-130c-67.36,42.44-109.93,155.14-188.12,174.26a133.1,133.1,0,0,1-17,3c21.82,7,45,9.69,74.62,1.35,80-22.51,121.62-136.18,187.31-188.19v-13.8C1907.14,820.57,1887.68,827.7,1871.05,838.18ZM837,684c-67-89.52,11.83-238.38-6-319.54-17.24-78.31-150.58-98.7-137.63-249.12C697.66,65.44,748.12,33.39,795,.24H693c-28.53,24.88-50.64,52.07-52.4,86.31C632.21,249.17,776.7,266.2,798.18,350c22.27,86.82-57.22,250.21,18.37,344.2C896.8,794,1083.67,724,1162.73,759.6,1095.66,716,910.64,782.24,837,684Z"/>
<path d="M693.37,115.31C680.42,265.73,813.76,286.12,831,364.43c17.87,81.16-61,230,6,319.54,73.6,98.27,258.62,32,325.69,75.63.71.46,1.42.94,2.12,1.43,106.53,76,55.72,189.22,124.81,231.07a80,80,0,0,0,10.79,6.22c58.4,27.7,120.79-36.77,197.3-30.18a181.86,181.86,0,0,1,39.06,7.72c48.68,15.21,78.12,45.18,129.07,39.63a133.1,133.1,0,0,0,17-3c78.19-19.12,120.76-131.82,188.12-174.26,16.63-10.48,36.09-17.61,56.76-23.33V.24H795C748.12,33.39,697.66,65.44,693.37,115.31Z"/>',
'portrait' => '<path fill-opacity=".3" d="M1150.6,1534.67a94,94,0,0,1-17-16.45c64.42,40.75,133.24-54.06,217.62-44.38a157.54,157.54,0,0,1,43.09,11.36C1298.76,1480.91,1224.78,1597.59,1150.6,1534.67ZM1619,1545.46c92.17-34.58,138.17-215.55,216.51-286.5a192.73,192.73,0,0,1,35.07-24.89c-39,11.31-77.49,23.37-107.59,48.65-74.3,62.41-121.25,228.15-207.49,256.28a113.2,113.2,0,0,1-18.81,4.47C1560.74,1553.74,1586.3,1557.72,1619,1545.46ZM405.8,177.35C396.57,416.5,555.93,441.54,579.63,564.74c24.56,127.67-63.12,368,20.25,506.19,88.52,146.78,294.64,43.92,381.83,96.23-74-64.14-278,33.3-359.23-111.23-73.94-131.64,13-350.56-6.66-469.92-19-115.17-166.08-145.15-151.8-366.36C470.33,121.82,567.25,70.59,624.57,0H511.42C460.24,51.49,408.67,103.16,405.8,177.35Z"/>
<path d="M1870.56,1234.07c-39,11.31-77.49,23.37-107.59,48.65-74.3,62.41-121.25,228.15-207.49,256.28a113.2,113.2,0,0,1-18.81,4.47c-56.19,8.18-88.67-35.9-142.35-58.27a157.54,157.54,0,0,0-43.09-11.36c-84.38-9.68-153.2,85.13-217.62,44.38a84.34,84.34,0,0,1-11.9-9.14c-76.21-61.55-20.15-228.1-137.66-339.81-.77-.73-1.55-1.43-2.34-2.11-74-64.14-278,33.3-359.23-111.23-73.94-131.64,13-350.56-6.66-469.92-19-115.17-166.08-145.15-151.8-366.36C470.33,121.82,567.25,70.59,624.57,0L1920-2V1219.1C1903.82,1224.59,1887.14,1229.27,1870.56,1234.07Z"/>',
'square' => '<path fill-opacity=".3" d="M1345,1103.59a200.78,200.78,0,0,1,43.09,8.52c-95.56-3.22-169.54,84.29-243.72,37.1a87.59,87.59,0,0,1-17-12.33C1191.82,1167.44,1260.64,1096.33,1345,1103.59Zm204.25,48.87a144.3,144.3,0,0,1-18.81,3.35c24.07,7.7,49.63,10.69,82.31,1.49,92.17-25.93,138.17-161.66,216.51-214.87a203,203,0,0,1,35.07-18.67c-39,8.48-77.49,17.53-107.59,36.49C1682.46,1007.06,1635.51,1131.36,1549.27,1152.46Zm-933-362.3c-73.94-98.73,13.05-262.93-6.66-352.44-19-86.38-166.08-108.86-151.8-274.77C464.12,89.57,561,51.15,618.36-1.79H505.21C454,36.82,402.46,75.58,399.6,131.22c-9.24,179.36,150.12,198.15,173.82,290.54,24.56,95.76-63.12,276,20.25,379.65,88.52,110.08,294.64,32.94,381.83,72.17C901.53,825.47,697.46,898.56,616.27,790.16Z"/>
<path d="M457.81,163C443.53,328.86,590.6,351.34,609.61,437.72c19.71,89.51-67.28,253.71,6.66,352.44,81.19,108.4,285.26,35.31,359.23,83.42.79.51,1.57,1,2.34,1.58C1095.35,959,1039.3,1083.86,1115.5,1130a86.8,86.8,0,0,0,11.9,6.86c64.42,30.56,133.24-40.55,217.62-33.29a200.78,200.78,0,0,1,43.09,8.52c53.68,16.78,86.16,49.83,142.35,43.7a144.3,144.3,0,0,0,18.81-3.35c86.24-21.1,133.19-145.4,207.49-192.21,30.1-19,68.58-28,107.59-36.49,16.58-3.6,33.27-7.11,49.44-11.23V-1.79H618.36C561,51.15,464.12,89.57,457.81,163Z"/> ',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Blob();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Corner Lake.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Lake
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Lake extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Lake', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H0V1440H1920Z"/>',
'portrait' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H0V2560H1920Z"/>',
'square' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H0V1920H1920Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H1920Z"/>',
'portrait' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H1920Z"/>',
'square' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H1920Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M795.84,0c-5,29.37-37.43,93.29-75.84,171.75C617.09,382,846.68,441.75,846.68,720c0,221.25-199.43,405.75-383.93,405.75C105.73,1125.75,0,788.51,0,787.59V1440H1920V0Z"/>',
'portrait' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V2560H1920V0Z"/>',
'square' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V1920H1920V0Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M795.84,0c-5,29.37-37.43,93.29-75.84,171.75C617.09,382,846.68,441.75,846.68,720c0,221.25-199.43,405.75-383.93,405.75C105.73,1125.75,0,788.51,0,787.59V0Z"/>',
'portrait' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V0Z"/>',
'square' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Lake();

View File

@@ -0,0 +1,63 @@
<?php
/**
* Background Mask Style - Corner Paint.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Paint
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Paint extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Paint', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1897.91,761c-108.84,85.71-243.64,272.72-358.87,364.85-40.53,32.41-117.39,145.61-144.5,95.37-3.43-6.34,24.11-14.4,32.15-27,35-54.92,15.21-52.52,12.43-114.64-1.41-31.46-22.88-49.87-22.77-79.55.07-20.86,41.76-26.62,53-45.1,22.5-37.08,107.59-113.32,64.62-118.8C1431,823,1480.73,897.9,1352.75,942.83c-53.09,18.63-40,31.2-98,48.18-34.22,10-47,100.9-78.38,85.7-12.52-6.07,12.86-20.41,17.93-30.87,6-12.49-32.49,1.7-30.35-12,4-25.89,77.29-74.23,43.54-70.2-32.32,3.86-114.09,121.48-114.2,68.3-.1-48.79,130.3-85.05,96-116.26-8.56-7.8-11.48-2.09-19.08-1.74-11.57.53-21.86,41.07-31.24,34.24-28.1-20.46,155.9-163.66,121.21-155.82-5.65,1.28-15.57,17.15-15.57,17.15-23.92-45.91,47.83-51,28.08-85.56-12.52-21.87-41-9.86-61.87,2.83-19.87,12.1-24.65,29.35-31.36,15.19-14.92-31.48-36.87-6.9-62.36,15.45-25.1,22,10.39-30.82,1.85-49.45C1080.56,624.06,986.93,826.3,928,832c-46.94,4.54-96,86-104.9,76.86C811,896.41,943.78,769.67,1005.49,701.3c131.22-145.4,45.54-66.26,5.73-128.07-36.22-56.23,15.29-51.41,39-130.93,3.66-12.28-1-14.57,13.89-30.63,17.26-18.62,47.88-6,61.16-16.41,8.17-6.39,7.57-2.21,16.7-11.43,6-6.07-1.5-9.42,2.64-12.8,13.09-10.67-16.84-16.73-16.26-27.15,2-36.37-13.94-62.73-18.2-108.42-3.28-35.22-23.88,5.36-36.64,7-98.25,13,11.51-167.61,73.21-201.1C1167.14,30.33,1186.17,16,1204.4,0H0V1440H1920V740.4C1910.13,750.29,1902.37,757.5,1897.91,761Zm-863.57,124.8c-12.16-1-5.62-.11-13.07,6.64-4.41,4-3.62,11.6-7.6,15.83-8.33,8.85,10.91-4.55,12.61,3.29.41,1.86-7,9.5-1.15,14.52.74.62-13.64,17.53-14.14,8.76-.53-9.27,14.1-10.35-2.27-13.81-10.47-2.21-13.63-18.41-19.2-26.83-2.81-4.25-9.8-3.31-11.62-8.55-1.12-3.25,24.57-4.22,3.91-10.89-17.72-5.72,3.31-8.25,4.42-21.82.74-8.94,7.45-7.39,9.77-16.11,5.59-21,42.49-52.28,57.87-37.65,19.35,18.41-1.13,5.82,6.14,17,1.93,3,4.72-5.63,7.55-4.46,1.61.66,1.07,5.89-.3,7C1055,828.37,1081,843,1080.2,849.2,1077.4,870.75,1052.74,887.38,1034.34,885.82Z"/>
<path d="M1121.73,560.21c-22.33,29.93,34.74-16,26.41-28.13C1139.13,519,1126.83,553.37,1121.73,560.21Z"/>
<path d="M1148.8,357.83c-.07.15.58.31.58.31C1149.67,357.86,1148.91,357.6,1148.8,357.83Z"/>',
'portrait' => '<path d="M1702.91,1301c-108.84,85.71-243.64,272.72-358.87,364.85-40.53,32.41-117.39,145.61-144.5,95.37-3.43-6.34,24.11-14.4,32.15-27,35-54.92,15.21-52.52,12.43-114.64-1.41-31.46-22.88-49.87-22.77-79.55.07-20.86,41.76-26.62,53-45.1,22.5-37.08,107.59-113.32,64.62-118.8-102.94-13.15-53.21,61.75-181.19,106.68-53.09,18.63-40,31.2-98,48.18-34.22,10-47,100.9-78.38,85.7-12.52-6.07,12.86-20.41,17.93-30.87,6-12.49-32.49,1.7-30.35-12,4-25.89,77.29-74.23,43.54-70.2-32.32,3.86-114.09,121.48-114.2,68.3-.1-48.79,130.3-85.05,96-116.26-8.56-7.8-11.48-2.09-19.08-1.74-11.57.53-21.86,41.07-31.24,34.24-28.1-20.46,155.9-163.66,121.21-155.82-5.65,1.28-15.57,17.15-15.57,17.15-23.92-45.91,47.83-51,28.08-85.56-12.52-21.87-41-9.86-61.87,2.83-19.87,12.1-24.65,29.35-31.36,15.19-14.92-31.48-36.87-6.9-62.36,15.45-25.1,22,10.39-30.82,1.85-49.45C885.56,1164.06,791.93,1366.3,733,1372c-46.94,4.54-96,86-104.9,76.86C616,1436.41,748.78,1309.67,810.49,1241.3c131.22-145.4,45.54-66.26,5.73-128.07-36.22-56.23,15.29-51.41,39-130.93,3.66-12.28-1-14.57,13.89-30.63,17.26-18.62,47.88-6,61.16-16.41,8.17-6.39,7.57-2.21,16.7-11.43,6-6.07-1.5-9.42,2.64-12.8,13.09-10.67-16.84-16.73-16.26-27.15,2-36.37-13.94-62.73-18.2-108.42-3.28-35.22-23.88,5.36-36.64,7-98.25,13,11.51-167.61,73.21-201.1C1024.39,542,1320.08,208.19,1528.74,0H0V2560H1920V1073.7C1806.44,1196.23,1713.5,1292.68,1702.91,1301Zm-863.57,124.8c-12.16-1-5.62-.11-13.07,6.64-4.41,4-3.62,11.6-7.6,15.83-8.33,8.85,10.91-4.55,12.61,3.29.41,1.86-7,9.5-1.15,14.52.74.62-13.64,17.53-14.14,8.76-.53-9.27,14.1-10.35-2.27-13.81-10.47-2.21-13.63-18.41-19.2-26.83-2.81-4.25-9.8-3.31-11.62-8.55-1.12-3.25,24.57-4.22,3.91-10.89-17.72-5.72,3.31-8.25,4.42-21.82.73-8.94,7.45-7.39,9.77-16.11,5.59-21,42.49-52.28,57.87-37.65,19.35,18.41-1.13,5.82,6.14,17,1.93,3,4.72-5.63,7.55-4.46,1.61.66,1.07,5.9-.3,7C860,1368.37,886,1383,885.2,1389.2,882.4,1410.75,857.74,1427.38,839.34,1425.82Z"/>
<path d="M926.73,1100.21c-22.33,29.93,34.74-16,26.41-28.13C944.13,1059,931.83,1093.37,926.73,1100.21Z"/>
<path d="M953.8,897.83c-.07.15.58.31.58.31C954.67,897.86,953.91,897.6,953.8,897.83Z"/>',
'square' => '<path d="M1811.91,966c-108.84,85.71-243.64,272.72-358.87,364.85-40.53,32.41-117.39,145.61-144.5,95.37-3.43-6.34,24.11-14.4,32.15-27,35-54.92,15.21-52.52,12.43-114.64-1.41-31.46-22.88-49.87-22.77-79.55.07-20.86,41.76-26.62,53-45.1,22.5-37.08,107.59-113.32,64.62-118.8-102.94-13.15-53.21,61.75-181.19,106.68-53.09,18.63-40,31.2-98,48.18-34.22,10-47,100.9-78.38,85.7-12.52-6.07,12.86-20.41,17.93-30.87,6-12.49-32.49,1.7-30.35-12,4-25.89,77.29-74.23,43.54-70.2-32.32,3.86-114.09,121.48-114.2,68.3-.1-48.79,130.3-85.05,96-116.26-8.56-7.8-11.48-2.09-19.08-1.74-11.57.53-21.86,41.07-31.24,34.24-28.1-20.46,155.9-163.66,121.21-155.82-5.65,1.28-15.57,17.15-15.57,17.15-23.92-45.91,47.83-51,28.08-85.56-12.52-21.87-41-9.86-61.87,2.83-19.87,12.1-24.65,29.35-31.36,15.19-14.92-31.48-36.87-6.9-62.36,15.45-25.1,22,10.39-30.82,1.85-49.45C994.56,829.06,900.93,1031.3,842,1037c-46.94,4.54-96,86-104.9,76.86C725,1101.41,857.78,974.67,919.49,906.3,1050.71,760.9,965,840,925.22,778.23,889,722,940.51,726.82,964.23,647.3c3.66-12.28-1-14.57,13.89-30.63,17.26-18.62,47.88-6,61.16-16.41,8.17-6.39,7.57-2.21,16.7-11.43,6-6.07-1.5-9.42,2.64-12.8,13.09-10.67-16.84-16.73-16.26-27.15,2-36.37-13.94-62.73-18.2-108.42-3.28-35.22-23.88,5.36-36.64,7.05-98.25,13,11.51-167.61,73.21-201.1,38.32-20.8,138.68-123.47,255.58-246.41H0V1920H1920V855.09C1860.47,917.94,1818.79,960.6,1811.91,966Zm-863.57,124.8c-12.16-1-5.62-.11-13.07,6.64-4.41,4-3.62,11.6-7.6,15.83-8.33,8.85,10.91-4.55,12.61,3.29.41,1.86-7,9.5-1.15,14.52.74.62-13.64,17.53-14.14,8.76-.53-9.27,14.1-10.35-2.27-13.81-10.47-2.21-13.63-18.41-19.2-26.83-2.81-4.25-9.8-3.31-11.62-8.55-1.12-3.25,24.57-4.22,3.91-10.89-17.72-5.72,3.31-8.25,4.42-21.82.74-8.94,7.45-7.39,9.77-16.11,5.59-21,42.49-52.28,57.87-37.65,19.35,18.41-1.13,5.82,6.14,17,1.93,3,4.72-5.63,7.55-4.46,1.61.66,1.07,5.89-.3,7C969,1033.37,995,1048,994.2,1054.2,991.4,1075.75,966.74,1092.38,948.34,1090.82Z"/>
<path d="M1062.8,562.83c-.07.15.58.31.58.31C1063.67,562.86,1062.91,562.6,1062.8,562.83Z"/>
<path d="M1035.73,765.21c-22.33,29.93,34.74-16,26.41-28.13C1053.13,724,1040.83,758.37,1035.73,765.21Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1067.26,818.72c1.37-1.07,1.91-6.31.3-7-2.83-1.17-5.62,7.43-7.55,4.46-7.27-11.19,13.21,1.4-6.14-17-15.38-14.63-52.28,16.63-57.87,37.65-2.32,8.72-9,7.17-9.77,16.11-1.11,13.57-22.14,16.1-4.42,21.82,20.66,6.67-5,7.64-3.91,10.89,1.82,5.24,8.81,4.3,11.62,8.55,5.57,8.42,8.73,24.62,19.2,26.83,16.37,3.46,1.74,4.54,2.27,13.81.5,8.77,14.88-8.14,14.14-8.76-5.86-5,1.56-12.66,1.15-14.52-1.7-7.84-20.94,5.56-12.61-3.29,4-4.23,3.19-11.84,7.6-15.83,7.45-6.75.91-7.67,13.07-6.64,18.4,1.56,43.06-15.07,45.86-36.62C1081,843,1055,828.37,1067.26,818.72Z"/>
<path d="M1204.4,0c-18.23,16-37.26,30.33-57.67,41.41-61.7,33.49-171.46,214.12-73.21,201.1,12.76-1.69,33.36-42.27,36.64-7,4.26,45.69,20.24,72,18.2,108.42-.58,10.42,29.35,16.48,16.26,27.15-4.14,3.38,3.37,6.73-2.64,12.8-9.13,9.22-8.53,5-16.7,11.43-13.28,10.4-43.9-2.21-61.16,16.41-14.9,16.06-10.23,18.35-13.89,30.63-23.72,79.52-75.23,74.7-39,130.93C1051,635,1136.71,555.9,1005.49,701.3,943.78,769.67,811,896.41,823.1,908.86,832,918,881.06,836.54,928,832c58.93-5.7,152.56-207.94,191-124.07,8.54,18.63-27,71.46-1.85,49.45,25.49-22.35,47.44-46.93,62.36-15.45,6.71,14.16,11.49-3.09,31.36-15.19,20.83-12.69,49.35-24.7,61.87-2.83,19.75,34.52-52,39.65-28.08,85.56,0,0,9.92-15.87,15.57-17.15,34.69-7.84-149.31,135.36-121.21,155.82,9.38,6.83,19.67-33.71,31.24-34.24,7.6-.35,10.52-6.06,19.08,1.74,34.27,31.21-96.13,67.47-96,116.26.11,53.18,81.88-64.44,114.2-68.3,33.75-4-39.52,44.31-43.54,70.2-2.14,13.74,36.39-.45,30.35,12-5.07,10.46-30.45,24.8-17.93,30.87,31.39,15.2,44.16-75.68,78.38-85.7,58-17,44.9-29.55,98-48.18,128-44.93,78.25-119.83,181.19-106.68,43,5.48-42.12,81.72-64.62,118.8-11.21,18.48-52.9,24.24-53,45.1-.11,29.68,21.36,48.09,22.77,79.55,2.78,62.12,22.57,59.72-12.43,114.64-8,12.6-35.58,20.66-32.15,27,27.11,50.24,104-63,144.5-95.37,115.23-92.13,250-279.14,358.87-364.85,4.46-3.52,12.22-10.73,22.09-20.62V0Zm-82.67,560.21c5.1-6.84,17.4-41.21,26.41-28.13C1156.47,544.17,1099.4,590.14,1121.73,560.21Zm27.65-202.07s-.65-.16-.58-.31S1149.67,357.86,1149.38,358.14Z"/>',
'portrait' => '<path d="M872.26,1358.72c1.37-1.07,1.91-6.31.3-7-2.83-1.17-5.62,7.43-7.55,4.46-7.27-11.19,13.21,1.4-6.14-17-15.38-14.63-52.28,16.63-57.87,37.65-2.32,8.72-9,7.17-9.77,16.11-1.11,13.57-22.14,16.1-4.42,21.82,20.66,6.67-5,7.64-3.91,10.89,1.82,5.24,8.81,4.3,11.62,8.55,5.57,8.42,8.73,24.62,19.2,26.83,16.37,3.46,1.74,4.54,2.27,13.81.5,8.77,14.88-8.14,14.14-8.76-5.86-5,1.56-12.66,1.15-14.52-1.7-7.84-20.94,5.56-12.61-3.29,4-4.23,3.19-11.84,7.6-15.83,7.45-6.75.91-7.67,13.07-6.64,18.4,1.56,43.06-15.07,45.86-36.62C886,1383,860,1368.37,872.26,1358.72Z"/>
<path d="M1528.74,0c-208.66,208.19-504.35,542-577,581.41C890,614.9,780.27,795.53,878.52,782.51c12.76-1.69,33.36-42.27,36.64-7,4.26,45.69,20.24,72,18.2,108.42-.58,10.42,29.35,16.48,16.26,27.15-4.14,3.38,3.37,6.73-2.64,12.8-9.13,9.22-8.53,5-16.7,11.43-13.28,10.4-43.9-2.21-61.16,16.41-14.9,16.06-10.23,18.35-13.89,30.63-23.72,79.52-75.23,74.7-39,130.93C856,1175,941.71,1095.9,810.49,1241.3,748.78,1309.67,616,1436.41,628.1,1448.86c8.9,9.14,58-72.32,104.9-76.86,58.93-5.7,152.56-207.94,191-124.07,8.54,18.63-27,71.46-1.85,49.45,25.49-22.35,47.44-46.93,62.36-15.45,6.71,14.16,11.49-3.09,31.36-15.19,20.83-12.69,49.35-24.7,61.87-2.83,19.75,34.52-52,39.65-28.08,85.56,0,0,9.92-15.87,15.57-17.15,34.69-7.84-149.31,135.36-121.21,155.82,9.38,6.83,19.67-33.71,31.24-34.24,7.6-.35,10.52-6.06,19.08,1.74,34.27,31.21-96.13,67.47-96,116.26.11,53.18,81.88-64.44,114.2-68.3,33.75-4-39.52,44.31-43.54,70.2-2.14,13.74,36.39-.45,30.35,12-5.07,10.46-30.45,24.8-17.93,30.87,31.39,15.2,44.16-75.68,78.38-85.7,58-17,44.9-29.55,98-48.18,128-44.93,78.25-119.83,181.19-106.68,43,5.48-42.12,81.72-64.62,118.8-11.21,18.48-52.9,24.24-53,45.1-.11,29.68,21.36,48.09,22.77,79.55,2.78,62.12,22.57,59.72-12.43,114.64-8,12.6-35.58,20.66-32.15,27,27.11,50.24,104-63,144.5-95.37,115.23-92.13,250-279.14,358.87-364.85,10.59-8.34,103.53-104.79,217.09-227.32V0Zm-602,1100.21c5.1-6.84,17.4-41.21,26.41-28.13C961.47,1084.17,904.4,1130.14,926.73,1100.21Zm27.65-202.07s-.65-.16-.58-.31S954.67,897.86,954.38,898.14Z"/>',
'square' => '<path d="M981.26,1023.72c1.37-1.07,1.91-6.31.3-7-2.83-1.17-5.62,7.43-7.55,4.46-7.27-11.19,13.21,1.4-6.14-17-15.38-14.63-52.28,16.63-57.87,37.65-2.32,8.72-9,7.17-9.77,16.11-1.11,13.57-22.14,16.1-4.42,21.82,20.66,6.67-5,7.64-3.91,10.89,1.82,5.24,8.81,4.3,11.62,8.55,5.57,8.42,8.73,24.62,19.2,26.83,16.37,3.46,1.74,4.54,2.27,13.81.5,8.77,14.88-8.14,14.14-8.76-5.86-5,1.56-12.66,1.15-14.52-1.7-7.84-20.94,5.56-12.61-3.29,4-4.23,3.19-11.84,7.6-15.83,7.45-6.75.91-7.67,13.07-6.64,18.4,1.56,43.06-15.07,45.86-36.62C995,1048,969,1033.37,981.26,1023.72Z"/>
<path d="M1316.31,0c-116.9,122.94-217.26,225.61-255.58,246.41C999,279.9,889.27,460.53,987.52,447.51c12.76-1.69,33.36-42.27,36.64-7.05,4.26,45.69,20.24,72.05,18.2,108.42-.58,10.42,29.35,16.48,16.26,27.15-4.14,3.38,3.37,6.73-2.64,12.8-9.13,9.22-8.53,5-16.7,11.43-13.28,10.4-43.9-2.21-61.16,16.41-14.9,16.06-10.23,18.35-13.89,30.63-23.72,79.52-75.23,74.7-39,130.93C965,840,1050.71,760.9,919.49,906.3,857.78,974.67,725,1101.41,737.1,1113.86c8.9,9.14,58-72.32,104.9-76.86,58.93-5.7,152.56-207.94,191-124.07,8.54,18.63-27,71.46-1.85,49.45,25.49-22.35,47.44-46.93,62.36-15.45,6.71,14.16,11.49-3.09,31.36-15.19,20.83-12.69,49.35-24.7,61.87-2.83,19.75,34.52-52,39.65-28.08,85.56,0,0,9.92-15.87,15.57-17.15,34.69-7.84-149.31,135.36-121.21,155.82,9.38,6.83,19.67-33.71,31.24-34.24,7.6-.35,10.52-6.06,19.08,1.74,34.27,31.21-96.13,67.47-96,116.26.11,53.18,81.88-64.44,114.2-68.3,33.75-4-39.52,44.31-43.54,70.2-2.14,13.74,36.39-.45,30.35,12-5.07,10.46-30.45,24.8-17.93,30.87,31.39,15.2,44.16-75.68,78.38-85.7,58-17,44.9-29.55,98-48.18,128-44.93,78.25-119.83,181.19-106.68,43,5.48-42.12,81.72-64.62,118.8-11.21,18.48-52.9,24.24-53,45.1-.11,29.68,21.36,48.09,22.77,79.55,2.78,62.12,22.57,59.72-12.43,114.64-8,12.6-35.58,20.66-32.15,27,27.11,50.24,104-63,144.5-95.37,115.23-92.13,250-279.14,358.87-364.85,6.88-5.43,48.56-48.08,108.09-110.93V0ZM1035.73,765.21c5.1-6.84,17.4-41.21,26.41-28.13C1070.47,749.17,1013.4,795.14,1035.73,765.21Zm27.65-202.07s-.65-.16-.58-.31S1063.67,562.86,1063.38,563.14Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M761,22.09C846.73,130.93,1033.74,265.73,1125.87,381c32.41,40.53,145.61,117.39,95.37,144.5-6.34,3.43-14.4-24.11-27-32.15-54.92-35-52.52-15.21-114.64-12.43-31.46,1.41-49.87,22.88-79.55,22.77-20.86-.07-26.62-41.76-45.1-53-37.08-22.5-113.32-107.59-118.8-64.62C823,489,897.9,439.27,942.83,567.25c18.63,53.09,31.2,40,48.18,98,10,34.22,100.9,47,85.7,78.38-6.07,12.52-20.41-12.86-30.87-17.93-12.49-6,1.7,32.49-12,30.35-25.89-4-74.23-77.29-70.2-43.54,3.86,32.32,121.48,114.09,68.3,114.2-48.79.1-85.05-130.3-116.26-96-7.8,8.56-2.09,11.48-1.74,19.08.53,11.57,41.07,21.86,34.24,31.24-20.46,28.1-163.66-155.9-155.82-121.21,1.28,5.65,17.15,15.57,17.15,15.57-45.91,23.92-51-47.83-85.56-28.08-21.87,12.52-9.86,41,2.83,61.87,12.1,19.87,29.35,24.65,15.19,31.36-31.48,14.92-6.9,36.87,15.45,62.36,22,25.1-30.82-10.39-49.45-1.85C624.06,839.44,826.3,933.07,832,992c4.54,46.94,86,96,76.86,104.9C896.41,1109,769.67,976.22,701.3,914.51,555.9,783.29,635,869,573.23,908.78,517,945,521.82,893.49,442.3,869.77c-12.28-3.66-14.57,1-30.63-13.89-18.62-17.26-6-47.88-16.41-61.16-6.39-8.17-2.21-7.57-11.43-16.7-6.07-6-9.42,1.5-12.8-2.64-10.67-13.09-16.73,16.84-27.15,16.26-36.37-2-62.73,13.94-108.42,18.2-35.22,3.28,5.36,23.88,7,36.64,13,98.25-167.61-11.51-201.1-73.21C30.33,752.86,16,733.83,0,715.6V1440H1920V0H740.4C750.29,9.87,757.5,17.63,761,22.09Zm124.8,863.57c-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15.62-.74,17.53,13.64,8.76,14.14-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.89-1.07,7,.3C828.37,865,843,839,849.2,839.8,870.75,842.6,887.38,867.26,885.82,885.66ZM532.08,771.86c12.09-8.33,58.06,48.74,28.13,26.41C553.37,793.17,519,780.87,532.08,771.86Zm-173.94-1.24s-.16.65-.31.58S357.86,770.33,358.14,770.62Z"/>',
'portrait' => '<path d="M1009.41,113c89.56,113.73,285,254.58,381.25,375,33.86,42.36,152.15,122.67,99.65,151-6.62,3.58-15-25.2-28.21-33.59-57.39-36.58-54.89-15.9-119.79-13-32.88,1.47-52.12,23.9-83.13,23.79-21.79-.08-27.81-43.63-47.12-55.35-38.75-23.51-118.41-112.42-124.14-67.53-13.74,107.57,64.53,55.6,111.47,189.33,19.47,55.48,32.6,41.84,50.34,102.39,10.48,35.76,105.44,49.11,89.55,81.91C1333,880,1318,853.45,1307,848.16c-13-6.32,1.77,33.94-12.58,31.71-27-4.21-77.57-80.76-73.36-45.5,4,33.77,126.94,119.21,71.37,119.33-51,.1-88.87-136.15-121.48-100.34-8.14,8.94-2.18,12-1.82,19.93.56,12.1,42.92,22.85,35.79,32.65-21.38,29.36-171-162.91-162.83-126.66,1.34,5.91,17.92,16.27,17.92,16.27-48,25-53.33-50-89.4-29.34-22.86,13.08-10.3,42.88,3,64.65,12.64,20.76,30.67,25.76,15.87,32.77-32.9,15.59-7.21,38.52,16.15,65.16,23,26.23-32.21-10.85-51.68-1.93-87.64,40.15,123.69,138,129.64,199.57,4.75,49,89.87,100.31,80.31,109.61-13,12.66-145.43-126.1-216.88-190.58-151.93-137.12-69.23-47.59-133.82-6-58.76,37.84-53.72-16-136.81-40.76-12.84-3.83-15.23,1-32-14.52-19.45-18-6.28-50-17.14-63.91-6.68-8.54-2.31-7.9-12-17.45-6.34-6.28-9.84,1.57-13.37-2.76-11.16-13.67-17.49,17.6-28.37,17-38-2.13-65.55,14.57-113.29,19-36.81,3.43,5.6,25,7.37,38.29,13.6,102.67-175.14-12-210.14-76.5C235.74,857.83,128.46,753,0,630.81V2560H1920V0H893.51C959.18,62.2,1003.75,105.76,1009.41,113Zm130.41,902.36c-1.07,12.7-.11,5.88,6.94,13.66,4.17,4.6,12.12,3.77,16.54,7.94,9.25,8.7-4.75-11.4,3.44-13.18,1.94-.42,9.93,7.33,15.17,1.2.65-.77,18.32,14.26,9.15,14.78-9.69.55-10.81-14.74-14.43,2.37-2.31,10.94-19.24,14.24-28,20.06-4.45,2.94-3.46,10.24-8.93,12.14-3.4,1.18-4.41-25.67-11.38-4.08-6,18.51-8.62-3.46-22.8-4.62-9.35-.77-7.73-7.79-16.84-10.21-22-5.84-54.62-44.4-39.34-60.46,19.24-20.23,6.09,1.17,17.77-6.42,3.11-2-5.88-4.94-4.66-7.89.7-1.68,6.16-1.13,7.29.31,10.08,12.83,25.37-14.36,31.85-13.52C1124.07,970.31,1141.45,996.08,1139.82,1015.31ZM588.44,895.1s-.17.68-.33.61S588.14,894.8,588.44,895.1Zm181.75,1.3c12.64-8.7,60.67,50.92,29.39,27.59C792.44,918.66,756.52,905.81,770.19,896.4Z"/>',
'square' => '<path d="M966,108.09c85.71,108.84,272.72,243.64,364.85,358.87,32.41,40.53,145.61,117.39,95.37,144.5-6.34,3.43-14.4-24.11-27-32.15-54.92-35-52.52-15.21-114.64-12.43-31.46,1.41-49.87,22.88-79.55,22.77-20.86-.07-26.62-41.76-45.1-53-37.08-22.5-113.32-107.59-118.8-64.62C1028,575,1102.9,525.27,1147.83,653.25c18.63,53.09,31.2,40,48.18,98,10,34.22,100.9,47,85.7,78.38-6.07,12.52-20.41-12.86-30.87-17.93-12.49-6,1.7,32.49-12,30.35-25.89-4-74.23-77.29-70.2-43.54,3.86,32.32,121.48,114.09,68.3,114.2-48.79.1-85.05-130.3-116.26-96-7.8,8.56-2.09,11.48-1.74,19.08.53,11.57,41.07,21.86,34.24,31.24-20.46,28.1-163.66-155.9-155.82-121.21,1.28,5.65,17.15,15.57,17.15,15.57-45.91,23.92-51-47.83-85.56-28.08-21.87,12.52-9.86,41,2.83,61.87,12.1,19.87,29.35,24.65,15.19,31.36-31.48,14.92-6.9,36.87,15.45,62.36,22,25.1-30.82-10.39-49.45-1.85-83.87,38.43,118.37,132.06,124.07,191,4.54,46.94,86,96,76.86,104.9-12.45,12.12-139.19-120.68-207.56-182.39C760.9,869.29,840,955,778.23,994.78c-56.23,36.22-51.41-15.29-130.93-39-12.28-3.66-14.57,1-30.63-13.89-18.62-17.26-6-47.88-16.41-61.16-6.39-8.17-2.21-7.57-11.43-16.7-6.07-6-9.42,1.5-12.8-2.64-10.67-13.09-16.73,16.84-27.15,16.26-36.37-2-62.73,13.94-108.42,18.2-35.22,3.28,5.36,23.88,7.05,36.64,13,98.25-167.61-11.51-201.1-73.21C225.61,821,122.94,720.59,0,603.69V1920H1920V0H855.09C917.94,59.53,960.6,101.21,966,108.09Zm124.8,863.57c-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15.62-.74,17.53,13.64,8.76,14.14-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.89-1.07,7,.3C1033.37,951,1048,925,1054.2,925.8,1075.75,928.6,1092.38,953.26,1090.82,971.66Zm-527.68-115s-.16.65-.31.58S562.86,856.33,563.14,856.62Zm173.94,1.24c12.09-8.33,58.06,48.74,28.13,26.41C758.37,879.17,724,866.87,737.08,857.86Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M242.51,846.48c-1.69-12.76-42.27-33.36-7-36.64,45.69-4.26,72-20.24,108.42-18.2,10.42.58,16.48-29.35,27.15-16.26,3.38,4.14,6.73-3.37,12.8,2.64,9.22,9.13,5,8.53,11.43,16.7,10.4,13.28-2.21,43.9,16.41,61.16,16.06,14.9,18.35,10.23,30.63,13.89,79.52,23.72,74.7,75.23,130.93,39C635,869,555.9,783.29,701.3,914.51,769.67,976.22,896.41,1109,908.86,1096.9c9.14-8.9-72.32-58-76.86-104.9-5.7-58.93-207.94-152.56-124.07-191,18.63-8.54,71.46,27,49.45,1.85-22.35-25.49-46.93-47.44-15.45-62.36,14.16-6.71-3.09-11.49-15.19-31.36-12.69-20.83-24.7-49.35-2.83-61.87,34.52-19.75,39.65,52,85.56,28.08,0,0-15.87-9.92-17.15-15.57C784.48,625.09,927.68,809.09,948.14,781c6.83-9.38-33.71-19.67-34.24-31.24-.35-7.6-6.06-10.52,1.74-19.08,31.21-34.27,67.47,96.13,116.26,96,53.18-.11-64.44-81.88-68.3-114.2-4-33.75,44.31,39.52,70.2,43.54,13.74,2.14-.45-36.39,12-30.35,10.46,5.07,24.8,30.45,30.87,17.93,15.2-31.39-75.68-44.16-85.7-78.38-17-58-29.55-44.9-48.18-98C897.9,439.27,823,489,836.15,386.06c5.48-43,81.72,42.12,118.8,64.62,18.48,11.21,24.24,52.9,45.1,53,29.68.11,48.09-21.36,79.55-22.77,62.12-2.78,59.72-22.57,114.64,12.43,12.6,8,20.66,35.58,27,32.15,50.24-27.11-63-104-95.37-144.5C1033.74,265.73,846.73,130.93,761,22.09,757.5,17.63,750.29,9.87,740.4,0H0V715.6c16,18.23,30.33,37.26,41.41,57.67C74.9,835,255.53,944.73,242.51,846.48Zm289.57-74.62c12.09-8.33,58.06,48.74,28.13,26.41C553.37,793.17,519,780.87,532.08,771.86Zm-173.94-1.24s-.16.65-.31.58S357.86,770.33,358.14,770.62ZM934.86,909c-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.89-1.07,7,.3C828.37,865,843,839,849.2,839.8c21.55,2.8,38.18,27.46,36.62,45.86-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15C926.72,894.13,943.63,908.51,934.86,909Z"/>',
'portrait' => '<path d="M1191.06,1039.71c-9.69.55-10.81-14.74-14.43,2.37-2.31,10.94-19.24,14.24-28,20.06-4.45,2.94-3.46,10.24-8.93,12.14-3.4,1.18-4.41-25.67-11.38-4.08-6,18.51-8.62-3.46-22.8-4.62-9.35-.77-7.73-7.79-16.84-10.21-22-5.84-54.62-44.4-39.34-60.46,19.24-20.23,6.09,1.17,17.77-6.42,3.11-2-5.88-4.94-4.66-7.89.7-1.68,6.16-1.13,7.29.31,10.08,12.83,25.37-14.36,31.85-13.52,22.51,2.92,39.89,28.69,38.26,47.92-1.07,12.7-.11,5.88,6.94,13.66,4.17,4.6,12.12,3.77,16.54,7.94,9.25,8.7-4.75-11.4,3.44-13.18,1.94-.42,9.93,7.33,15.17,1.2C1182.56,1024.16,1200.23,1039.19,1191.06,1039.71ZM0,630.81V0H893.51c65.67,62.2,110.24,105.76,115.9,113,89.56,113.73,285,254.58,381.25,375,33.86,42.36,152.15,122.67,99.65,151-6.62,3.58-15-25.2-28.21-33.59-57.39-36.58-54.89-15.9-119.79-13-32.88,1.47-52.12,23.9-83.13,23.79-21.79-.08-27.81-43.63-47.12-55.35-38.75-23.52-118.41-112.42-124.14-67.53-13.74,107.57,64.53,55.6,111.47,189.33,19.47,55.48,32.6,41.84,50.34,102.39,10.48,35.76,105.44,49.11,89.55,81.91C1333,880,1318,853.45,1307,848.16c-13-6.32,1.77,33.94-12.58,31.71-27-4.21-77.57-80.76-73.36-45.5,4,33.77,126.94,119.21,71.37,119.33-51,.1-88.87-136.15-121.48-100.34-8.14,8.94-2.18,12-1.82,19.93.56,12.1,42.92,22.85,35.79,32.65-21.38,29.36-171-162.91-162.83-126.66,1.34,5.91,17.92,16.27,17.92,16.27-48,25-53.33-50-89.4-29.34-22.86,13.08-10.3,42.88,3,64.65,12.64,20.76,30.67,25.76,15.87,32.77-32.9,15.59-7.21,38.52,16.15,65.16,23,26.23-32.21-10.85-51.68-1.93-87.64,40.16,123.69,138,129.64,199.57,4.75,49,89.87,100.31,80.31,109.61-13,12.66-145.43-126.1-216.88-190.58-151.93-137.12-69.23-47.59-133.82-6-58.76,37.84-53.72-16-136.81-40.76-12.84-3.83-15.23,1-32-14.52-19.45-18-6.28-50-17.14-63.91-6.68-8.54-2.31-7.9-11.94-17.45-6.35-6.28-9.85,1.57-13.38-2.76-11.16-13.67-17.49,17.6-28.37,17-38-2.13-65.55,14.57-113.29,19-36.81,3.43,5.6,25,7.37,38.29,13.6,102.67-175.14-12-210.14-76.5C235.74,857.83,128.46,753,0,630.81ZM799.58,924c31.28,23.33-16.75-36.29-29.39-27.59C756.52,905.81,792.44,918.66,799.58,924ZM588.11,895.71c.16.07.33-.61.33-.61C588.14,894.8,587.87,895.6,588.11,895.71Z"/>',
'square' => '<path d="M1139.86,995c-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.9-1.07,7,.3C1033.37,951,1048,925,1054.2,925.8c21.55,2.8,38.18,27.46,36.62,45.86-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15C1131.72,980.13,1148.63,994.51,1139.86,995ZM0,603.69V0H855.09C917.94,59.53,960.59,101.21,966,108.09c85.71,108.84,272.72,243.64,364.85,358.87,32.41,40.53,145.61,117.39,95.37,144.5-6.34,3.43-14.4-24.11-27-32.15-54.92-35-52.52-15.21-114.64-12.43-31.46,1.41-49.87,22.88-79.55,22.77-20.86-.07-26.62-41.76-45.1-53-37.08-22.5-113.32-107.59-118.8-64.62C1028,575,1102.9,525.27,1147.83,653.25c18.63,53.09,31.2,40,48.18,98,10,34.22,100.9,47,85.7,78.38-6.07,12.52-20.41-12.86-30.87-17.93-12.49-6,1.7,32.49-12,30.35-25.89-4-74.23-77.29-70.2-43.54,3.86,32.32,121.48,114.09,68.3,114.2-48.79.1-85.05-130.3-116.26-96-7.8,8.56-2.09,11.48-1.74,19.08.53,11.57,41.07,21.86,34.24,31.24-20.46,28.1-163.66-155.9-155.82-121.21,1.28,5.65,17.15,15.57,17.15,15.57-45.91,23.92-51-47.83-85.56-28.08-21.87,12.52-9.86,41,2.83,61.87,12.1,19.87,29.35,24.65,15.19,31.36-31.48,14.92-6.9,36.87,15.45,62.36,22,25.1-30.82-10.39-49.45-1.85-83.87,38.43,118.37,132.06,124.07,191,4.54,46.94,86,96,76.86,104.9-12.45,12.12-139.19-120.68-207.56-182.39C760.9,869.29,840,955,778.23,994.78c-56.23,36.22-51.41-15.29-130.93-39-12.28-3.66-14.57,1-30.63-13.89-18.62-17.26-6-47.88-16.41-61.16-6.39-8.17-2.21-7.57-11.43-16.7-6.07-6-9.42,1.5-12.8-2.64-10.67-13.09-16.73,16.84-27.15,16.26-36.37-2-62.73,13.94-108.42,18.2-35.22,3.28,5.36,23.88,7.05,36.64,13,98.25-167.61-11.51-201.1-73.21C225.61,821,122.94,720.59,0,603.69ZM765.21,884.27c29.93,22.33-16-34.74-28.13-26.41C724,866.87,758.37,879.17,765.21,884.27ZM562.83,857.2c.15.07.31-.58.31-.58C562.86,856.33,562.6,857.09,562.83,857.2Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Paint();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Corner Pill.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Pill
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Pill extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Pill', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1056.87,850.36h0c-112.36-168-67.24-395.33,100.78-507.7L1670.06,0H0V1440H1920V713.45L1564.57,951.14C1396.54,1063.51,1169.24,1018.39,1056.87,850.36Z"/>',
'portrait' => '<path d="M1003.61,1013.35h0c-126-188.46-75.42-443.4,113-569.43L1780.48,0H0V2560H1920V894.36l-347,232C1384.58,1252.42,1129.64,1201.81,1003.61,1013.35Z"/>',
'square' => '<path d="M1081.61,887.35h0c-126-188.46-75.42-443.4,113-569.43L1670.06,0H0V1920H1920V820.52l-269,179.87C1462.58,1126.42,1207.64,1075.81,1081.61,887.35Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1670.06,0,1157.65,342.66c-168,112.37-213.14,339.67-100.78,507.7h0c112.37,168,339.67,213.15,507.7,100.78L1920,713.45V0Z"/>',
'portrait' => '<path d="M1780.48,0,1116.65,443.92c-188.46,126-239.07,381-113,569.43h0c126,188.46,381,239.07,569.43,113l347-232V0Z"/>',
'square' => '<path d="M1670.06,0,1194.65,317.92c-188.46,126-239.07,381-113,569.43h0c126,188.46,381,239.07,569.43,113l269-179.87V0Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M850.36,863.13h0c-168,112.36-395.33,67.24-507.7-100.78L0,249.94V1440H1920V0H713.45L951.14,355.43C1063.51,523.46,1018.39,750.76,850.36,863.13Z"/>',
'portrait' => '<path d="M0,139.52,443.92,803.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L894.36,0H1920V2560H0Z"/>',
'square' => '<path d="M0,249.94,317.92,725.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L820.52,0H1920V1920H0Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M850.36,863.13h0c-168,112.36-395.33,67.24-507.7-100.78L0,249.94V0H713.45L951.14,355.43C1063.51,523.46,1018.39,750.76,850.36,863.13Z"/>',
'portrait' => '<path d="M0,139.52,443.92,803.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L894.36,0H0Z"/>',
'square' => '<path d="M0,249.94,317.92,725.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L820.52,0H0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Pill();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Corner Square.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Square
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Square extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Square', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1423.43,1145.79a147.64,147.64,0,0,1-190.28-85.94L832.83,0H0V1440H1920V958.23Z"/>',
'portrait' => '<path d="M1423.43,1145.79a147.64,147.64,0,0,1-190.28-85.94L832.83,0H0V2560H1920V958.23Z"/>',
'square' => '<path d="M1423.43,1145.79a147.64,147.64,0,0,1-190.28-85.94L832.83,0H0V1920H1920V958.23Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1423.43,1145.79,1920,958.23V0H832.83l400.32,1059.85A147.64,147.64,0,0,0,1423.43,1145.79Z"/>',
'portrait' => '<path d="M1423.43,1145.79,1920,958.23V0H832.83l400.32,1059.85A147.64,147.64,0,0,0,1423.43,1145.79Z"/>',
'square' => '<path d="M1423.43,1145.79,1920,958.23V0H832.83l400.32,1059.85A147.64,147.64,0,0,0,1423.43,1145.79Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V1440H1920V0H958.23Z"/>',
'portrait' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V2560H1920V0H958.23Z"/>',
'square' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V1920H1920V0H958.23Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V0H958.23Z"/>',
'portrait' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V0H958.23Z"/>',
'square' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V0H958.23Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Square();

View File

@@ -0,0 +1,62 @@
<?php
/**
* Background Mask Style - Diagonal Bars 2.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal_Bars_2
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal_Bars_2 extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Bars 2', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="390 803.5 390 389.7 779.86 0 558 0 390.5 167.5 390.5 0 0 0 0 1440 1920 1440 1920 0 1829 0 389.5 1439.5 389.5 1025.7 1415.61 0 1193.5 0 390 803.5"/>',
'portrait' => '<polygon points="390 1284.5 390 870.7 1261.05 0 1038.5 0 390 648.5 390 234.7 624.8 0 0 0 0 2560 1920 2560 1920 1026 389.5 2556.5 389.5 2142.7 1920 612.81 1920 390.5 390 1920.5 390 1506.7 1897.3 0 1674.5 0 390 1284.5"/>',
'square' => '<polygon points="1920 1920 1920 390 390 1920 1920 1920"/>
<polygon points="390 1284.5 390 870.7 1261.05 0 1039 0 390.5 648.5 390.5 234.7 625.3 0 0 0 0 1920 389.5 1920 389.5 1506.7 1896.8 0 1674.5 0 390 1284.5"/>',
),
'default-inverted' => array(
'landscape' => '<polygon points="389.5 1439.5 1829 0 1415.61 0 389.5 1025.7 389.5 1439.5"/>
<polygon points="390 803.5 1193.5 0 779.86 0 390 389.7 390 803.5"/>
<polygon points="558 0 390.5 0 390.5 167.5 558 0"/>',
'portrait' => '<polygon points="389.5 2556.5 1920 1026 1920 612.81 389.5 2142.7 389.5 2556.5"/>
<polygon points="390 1920.5 1920 390.5 1920 0 1897.3 0 390 1506.7 390 1920.5"/>
<polygon points="390 1284.5 1674.5 0 1261.05 0 390 870.7 390 1284.5"/>
<polygon points="390 648.5 1038.5 0 624.8 0 390 234.7 390 648.5"/>',
'square' => '<polygon points="389.5 1920 390 1920 1920 390 1920 0 1896.8 0 389.5 1506.7 389.5 1920"/>
<polygon points="390 1284.5 1674.5 0 1261.05 0 390 870.7 390 1284.5"/>
<polygon points="390.5 648.5 1039 0 625.3 0 390.5 234.7 390.5 648.5"/>',
),
'rotated' => array(
'landscape' => '<path d="M234.5,0H456.62L1506.7,1050.5H1920V1440H0V814.7l234.7,234.8H648.5L0,401V179L870.7,1050h413.8ZM1920,0H870L1920,1050Z"/>',
'portrait' => '<path d="M1920.5,1530.5,390,0H1920Zm2.5,638H1509.2L0,659V881L1287,2168H873.2L0,1294.7V2560H1920l.1-616.1L0,23.2V245.5Z"/>',
'square' => '<path d="M1920,1530,390,0H1920Zm-635.5,0H870.7L0,659V881l648.5,648.5H234.7L0,1294.7V1920H1920V1530.5H1506.7L0,23.2V245.5Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M234.7,1049.5,0,814.7V401l648.5,648.5ZM456.62,0,1506.7,1050.5H1920v-.5L870,0ZM1284.5,1050,234.5,0H0V179L870.7,1050Z"/>',
'portrait' => '<path d="M1920,2165.5l.06.06v2.94H1920Zm-633,2.5L0,881v413.7L873.2,2168Zm633-638L390,0H0V23.2L1920,1943.8Zm0,638.5v-3L0,245.5V659L1509.2,2168.5Z"/>',
'square' => '<path d="M234.7,1529.5,0,1294.7V881l648.5,648.5Zm1049.8.5L0,245.5V659L870.7,1530ZM0,0V23.2L1506.7,1530.5H1920v-.5L390,0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal_Bars_2();

View File

@@ -0,0 +1,66 @@
<?php
/**
* Background Mask Style - Diagonal Lines.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal_Bars
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal_Bars extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Lines', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="0 0 0 1440 1431.18 1440 955.79 0 0 0"/>
<polygon points="1291.92 0 1767.32 1440 1816.13 1440 1340.73 0 1291.92 0"/>
<polygon points="1725.68 0 1676.87 0 1920 736.45 1920 588.61 1725.68 0"/>',
'portrait' => '<polygon points="0 0 0 2560 1801.04 2560 955.79 0 0 0"/>
<polygon points="1920 1754.63 1340.73 0 1291.92 0 1920 1902.48 1920 1754.63"/>
<polygon points="1920 588.61 1725.68 0 1676.87 0 1920 736.45 1920 588.61"/>',
'square' => '<polygon points="1725.68 0 1676.87 0 1920 736.45 1920 588.61 1725.68 0"/>
<polygon points="1291.92 0 1920 1902.48 1920 1754.63 1340.73 0 1291.92 0"/>
<polygon points="0 0 0 1920 1589.65 1920 955.79 0 0 0"/>',
),
'default-inverted' => array(
'landscape' => '<polygon points="955.79 0 1431.18 1440 1767.32 1440 1291.92 0 955.79 0"/>
<polygon points="1340.73 0 1816.13 1440 1920 1440 1920 736.45 1676.87 0 1340.73 0"/>
<polygon points="1920 0 1725.68 0 1920 588.61 1920 0"/>',
'portrait' => '<polygon points="955.79 0 1801 2560 1920 2560 1920 1902.48 1291.92 0 955.79 0"/>
<polygon points="1340.73 0 1920 1754.63 1920 736.45 1676.87 0 1340.73 0"/>
<polygon points="1920 0 1725.68 0 1920 588.61 1920 0"/>',
'square' => '<polygon points="955.79 0 1589.65 1920 1920 1920 1920 1902.48 1291.92 0 955.79 0"/>
<polygon points="1340.73 0 1920 1754.63 1920 736.45 1676.87 0 1340.73 0"/>
<polygon points="1920 0 1725.68 0 1920 588.61 1920 0"/>',
),
'rotated' => array(
'landscape' => '<path d="M588.61,0H736.45L0,243.13V194.32ZM0,628.08,1902.48,0H1754.63L0,579.27ZM0,1440H1920V330.35L0,964.21Z"/>',
'portrait' => '<path d="M588.61,0H736.45L0,243.13V194.32ZM0,628.08,1902.48,0H1754.63L0,579.27ZM0,2560H1920V330.35L0,964.21Z"/>',
'square' => '<path d="M588.61,0H736.45L0,243.13V194.32ZM0,628.08,1902.48,0H1754.63L0,579.27ZM0,1920H1920V330.35L0,964.21Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M0,628.08,1902.48,0H1920V330.35L0,964.21Zm0-48.81L1754.63,0H736.45L0,243.13ZM0,0V194.32L588.61,0Z"/>',
'portrait' => '<path d="M0,628.08,1902.48,0H1920V330.35L0,964.21Zm0-48.81L1754.63,0H736.45L0,243.13ZM0,0V194.32L588.61,0Z"/>',
'square' => '<path d="M0,628.08,1902.48,0H1920V330.35L0,964.21Zm0-48.81L1754.63,0H736.45L0,243.13ZM0,0V194.32L588.61,0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal_Bars();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Diagonal Pills.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal_Pills
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal_Pills extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Pills', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1731.17,1001.24h0a118.5,118.5,0,0,1-26.62-165.46l215.45-298V429L1556.62,931.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1920,24.4V0h-61.84L1526.62,458.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1565.72,0H0V1440H525l637.07-881.3a118.5,118.5,0,0,1,165.46-26.62h0a118.5,118.5,0,0,1,26.62,165.46L817.48,1440H897l295.15-408.3a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L1189.4,1440h78.65l264.06-365.3a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L1560.48,1440H1920V942.29l-23.38,32.34A118.49,118.49,0,0,1,1731.17,1001.24Z"/>',
'portrait' => '<path d="M1731.17,1001.24h0a118.5,118.5,0,0,1-26.62-165.46l215.45-298V429L1556.62,931.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1920,24.4V0h-61.84L1526.62,458.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1565.72,0H0V2560H1920V942.29l-23.38,32.34A118.49,118.49,0,0,1,1731.17,1001.24ZM480.91,1501.05l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.5,118.5,0,0,1,26.62,165.46L673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0A118.5,118.5,0,0,1,480.91,1501.05Zm56.61,638.46h0a118.5,118.5,0,0,1-26.61-165.46l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L703,2112.89A118.5,118.5,0,0,1,537.52,2139.51Zm1186.67-926-261.55,361.81A118.49,118.49,0,0,1,1297.18,1602h0a118.5,118.5,0,0,1-26.61-165.45l261.54-361.81a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1724.19,1213.54Z"/>',
'square' => '<path d="M1731.17,1001.24h0a118.5,118.5,0,0,1-26.62-165.46l215.45-298V429L1556.62,931.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1920,24.4V0h-61.84L1526.62,458.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1565.72,0H0V1920H550l642.13-888.3a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L842.42,1920H1920V942.29l-23.38,32.34A118.49,118.49,0,0,1,1731.17,1001.24ZM673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0a118.5,118.5,0,0,1-26.61-165.46l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.5,118.5,0,0,1,26.62,165.46Zm1051.21-426.35-261.55,361.81A118.49,118.49,0,0,1,1297.18,1602h0a118.5,118.5,0,0,1-26.61-165.45l261.54-361.81a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1724.19,1213.54Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1354.19,697.54,817.48,1440H525l637.07-881.3a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1354.19,697.54Zm7-212.3h0a118.49,118.49,0,0,0,165.45-26.61L1858.16,0H1565.72L1334.55,319.78A118.5,118.5,0,0,0,1361.17,485.24Zm-3.6,519.84h0a118.5,118.5,0,0,0-165.46,26.62L897,1440H1189.4l194.79-269.46A118.51,118.51,0,0,0,1357.57,1005.08Zm33.6-46.84h0a118.49,118.49,0,0,0,165.45-26.61L1920,429V24.4L1364.55,792.78A118.5,118.5,0,0,0,1391.17,958.24Zm306.4,89.84h0a118.5,118.5,0,0,0-165.46,26.62L1268.05,1440h292.43l163.71-226.46A118.51,118.51,0,0,0,1697.57,1048.08Zm7-212.3a118.5,118.5,0,0,0,26.62,165.46h0a118.49,118.49,0,0,0,165.45-26.61L1920,942.29V537.74Z"/>',
'portrait' => '<path d="M480.91,1501.05l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0A118.5,118.5,0,0,1,480.91,1501.05ZM1361.17,485.24h0a118.49,118.49,0,0,0,165.45-26.61L1858.16,0H1565.72L1334.55,319.78A118.5,118.5,0,0,0,1361.17,485.24Zm-3.6,519.84h0a118.5,118.5,0,0,0-165.46,26.62l-681.2,942.35a118.5,118.5,0,0,0,26.61,165.46h0A118.5,118.5,0,0,0,703,2112.89l681.21-942.35A118.51,118.51,0,0,0,1357.57,1005.08Zm33.6-46.84h0a118.49,118.49,0,0,0,165.45-26.61L1920,429V24.4L1364.55,792.78A118.5,118.5,0,0,0,1391.17,958.24Zm306.4,89.84h0a118.5,118.5,0,0,0-165.46,26.62l-261.54,361.81A118.5,118.5,0,0,0,1297.18,1602h0a118.49,118.49,0,0,0,165.46-26.61l261.55-361.81A118.51,118.51,0,0,0,1697.57,1048.08Zm7-212.3a118.5,118.5,0,0,0,26.62,165.46h0a118.49,118.49,0,0,0,165.45-26.61L1920,942.29V537.74Z"/>',
'square' => '<path d="M1354.19,697.54,673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0a118.5,118.5,0,0,1-26.61-165.46l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1354.19,697.54Zm7-212.3h0a118.49,118.49,0,0,0,165.45-26.61L1858.16,0H1565.72L1334.55,319.78A118.5,118.5,0,0,0,1361.17,485.24Zm-3.6,519.84h0a118.5,118.5,0,0,0-165.46,26.62L550,1920H842.42l541.77-749.46A118.51,118.51,0,0,0,1357.57,1005.08Zm33.6-46.84h0a118.49,118.49,0,0,0,165.45-26.61L1920,429V24.4L1364.55,792.78A118.5,118.5,0,0,0,1391.17,958.24Zm306.4,89.84h0a118.5,118.5,0,0,0-165.46,26.62l-261.54,361.81A118.5,118.5,0,0,0,1297.18,1602h0a118.49,118.49,0,0,0,165.46-26.61l261.55-361.81A118.51,118.51,0,0,0,1697.57,1048.08Zm7-212.3a118.5,118.5,0,0,0,26.62,165.46h0a118.49,118.49,0,0,0,165.45-26.61L1920,942.29V537.74Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1005.08,562.43a118.51,118.51,0,0,1,165.46-26.62L1920,1077.58V0H942.29l32.34,23.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L537.74,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L24.4,0H0V61.84L458.63,393.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L0,354.28V1440H1502.34l-1.29-.91L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0a118.5,118.5,0,0,1,165.46-26.62L1639.89,1247a118.55,118.55,0,0,1-1.23,193H1920v-70L1031.7,727.89a118.5,118.5,0,0,1-26.62-165.46Zm43-340h0a118.51,118.51,0,0,1,165.46-26.62l361.81,261.55A118.49,118.49,0,0,1,1602,622.82h0a118.5,118.5,0,0,1-165.45,26.61L1074.7,387.89A118.5,118.5,0,0,1,1048.08,222.43Z"/>',
'portrait' => '<path d="M1001.24,188.83h0a118.5,118.5,0,0,1-165.46,26.62L537.74,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L24.4,0H0V61.84L458.63,393.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L0,354.28V2560H1920V1370L1031.7,727.89a118.5,118.5,0,0,1-26.62-165.46h0a118.51,118.51,0,0,1,165.46-26.62L1920,1077.58V0H942.29l32.34,23.38A118.49,118.49,0,0,1,1001.24,188.83ZM1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0a118.5,118.5,0,0,1,165.46-26.62ZM1213.54,195.81l361.81,261.55A118.49,118.49,0,0,1,1602,622.82h0a118.5,118.5,0,0,1-165.45,26.61L1074.7,387.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,1213.54,195.81Z"/>',
'square' => '<path d="M1001.24,188.83h0a118.5,118.5,0,0,1-165.46,26.62L537.74,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L24.4,0H0V61.84L458.63,393.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L0,354.28V1920H1920V1370L1031.7,727.89a118.5,118.5,0,0,1-26.62-165.46h0a118.51,118.51,0,0,1,165.46-26.62L1920,1077.58V0H942.29l32.34,23.38A118.49,118.49,0,0,1,1001.24,188.83ZM1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0a118.5,118.5,0,0,1,165.46-26.62ZM1213.54,195.81l361.81,261.55A118.49,118.49,0,0,1,1602,622.82h0a118.5,118.5,0,0,1-165.45,26.61L1074.7,387.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,1213.54,195.81Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M792.78,555.45,24.4,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0A118.5,118.5,0,0,1,792.78,555.45Zm208.46-366.62h0A118.49,118.49,0,0,0,974.63,23.38L942.29,0H537.74l298,215.45A118.5,118.5,0,0,0,1001.24,188.83Zm73.46,199.06,361.81,261.54A118.5,118.5,0,0,0,1602,622.82h0a118.49,118.49,0,0,0-26.61-165.46L1213.54,195.81a118.51,118.51,0,0,0-165.46,26.62h0A118.5,118.5,0,0,0,1074.7,387.89Zm95.84,147.92a118.51,118.51,0,0,0-165.46,26.62h0a118.5,118.5,0,0,0,26.62,165.46L1920,1370V1077.58ZM458.63,393.38,0,61.84V354.28L319.78,585.45a118.5,118.5,0,0,0,165.46-26.62h0A118.49,118.49,0,0,0,458.63,393.38Zm1207.88,1019.1A118.5,118.5,0,0,0,1639.89,1247L697.54,565.81a118.51,118.51,0,0,0-165.46,26.62h0A118.5,118.5,0,0,0,558.7,757.89l942.35,681.2,1.29.91h136.32A118.18,118.18,0,0,0,1666.51,1412.48Z"/>',
'portrait' => '<path d="M697.54,565.81,1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,697.54,565.81Zm-212.3-7h0a118.49,118.49,0,0,0-26.61-165.45L0,61.84V354.28L319.78,585.45A118.5,118.5,0,0,0,485.24,558.83Zm519.84,3.6h0a118.5,118.5,0,0,0,26.62,165.46L1920,1370V1077.58L1170.54,535.81A118.51,118.51,0,0,0,1005.08,562.43Zm-46.84-33.6h0a118.49,118.49,0,0,0-26.61-165.45L429,0H24.4L792.78,555.45A118.5,118.5,0,0,0,958.24,528.83Zm89.84-306.4h0a118.5,118.5,0,0,0,26.62,165.46l361.81,261.54A118.5,118.5,0,0,0,1602,622.82h0a118.49,118.49,0,0,0-26.61-165.46L1213.54,195.81A118.51,118.51,0,0,0,1048.08,222.43Zm-212.3-7a118.5,118.5,0,0,0,165.46-26.62h0A118.49,118.49,0,0,0,974.63,23.38L942.29,0H537.74Z"/>',
'square' => '<path d="M697.54,565.81,1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,697.54,565.81Zm-212.3-7h0a118.49,118.49,0,0,0-26.61-165.45L0,61.84V354.28L319.78,585.45A118.5,118.5,0,0,0,485.24,558.83Zm519.84,3.6h0a118.5,118.5,0,0,0,26.62,165.46L1920,1370V1077.58L1170.54,535.81A118.51,118.51,0,0,0,1005.08,562.43Zm-46.84-33.6h0a118.49,118.49,0,0,0-26.61-165.45L429,0H24.4L792.78,555.45A118.5,118.5,0,0,0,958.24,528.83Zm89.84-306.4h0a118.5,118.5,0,0,0,26.62,165.46l361.81,261.54A118.5,118.5,0,0,0,1602,622.82h0a118.49,118.49,0,0,0-26.61-165.46L1213.54,195.81A118.51,118.51,0,0,0,1048.08,222.43Zm-212.3-7a118.5,118.5,0,0,0,165.46-26.62h0A118.49,118.49,0,0,0,974.63,23.38L942.29,0H537.74Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal_Pills();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Diagonal.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0Zm1023.07-137.75,307.2-1187.92A85.83,85.83,0,0,1,1413.36,50h384.43A72.21,72.21,0,0,1,1870,122.21V1317.79a72.21,72.21,0,0,1-72.21,72.21H1091A70.18,70.18,0,0,1,1023.07,1302.25Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1870,2437.79a72.21,72.21,0,0,1-72.21,72.21h-823a70.18,70.18,0,0,1-67.94-87.76L1503.73,114.33A85.83,85.83,0,0,1,1586.81,50h211A72.21,72.21,0,0,1,1870,122.21Z"/>',
'square' => '<path d="M0,1920H1920V0H0Zm970.41-137.75L1401.74,114.33A85.81,85.81,0,0,1,1484.82,50h313A72.21,72.21,0,0,1,1870,122.21V1797.79a72.21,72.21,0,0,1-72.21,72.21H1038.35A70.18,70.18,0,0,1,970.41,1782.25Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1023.07,1302.25l307.2-1187.92A85.83,85.83,0,0,1,1413.36,50h384.43A72.21,72.21,0,0,1,1870,122.21V1317.79a72.21,72.21,0,0,1-72.21,72.21H1091A70.18,70.18,0,0,1,1023.07,1302.25Z"/>',
'portrait' => '<path d="M906.87,2422.24,1503.73,114.33A85.83,85.83,0,0,1,1586.81,50h211A72.21,72.21,0,0,1,1870,122.21V2437.79a72.21,72.21,0,0,1-72.21,72.21h-823A70.18,70.18,0,0,1,906.87,2422.24Z"/>',
'square' => '<path d="M970.41,1782.25,1401.74,114.33A85.81,85.81,0,0,1,1484.82,50h313A72.21,72.21,0,0,1,1870,122.21V1797.79a72.21,72.21,0,0,1-72.21,72.21H1038.35A70.18,70.18,0,0,1,970.41,1782.25Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
'portrait' => '<path d="M1920,2560V0H0V2560ZM1782.25,1360.59,114.33,929.26A85.81,85.81,0,0,1,50,846.18v-724A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V1292.65A70.18,70.18,0,0,1,1782.25,1360.59Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
'portrait' => '<path d="M1782.25,1360.59,114.33,929.26A85.81,85.81,0,0,1,50,846.18v-724A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V1292.65A70.18,70.18,0,0,1,1782.25,1360.59Z"/>',
'square' => '<path d="M1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Ellipse.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Ellipse
*
* @since 4.15.0
*/
class ET_Builder_Mask_Ellipse extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Ellipse', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM870.4,382.19c386.66-102.56,740.21-34.45,789.7,152.12s-223.85,421-610.5,523.5-740.21,34.45-789.7-152.12S483.75,484.74,870.4,382.19Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1049.6,1617.81c-386.66,102.56-740.21,34.45-789.7-152.12s223.85-420.95,610.5-523.5,740.21-34.45,789.7,152.12S1436.25,1515.26,1049.6,1617.81Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM870.4,622.19c386.66-102.56,740.21-34.45,789.7,152.12s-223.85,421-610.5,523.5-740.21,34.45-789.7-152.12S483.75,724.74,870.4,622.19Z"/>',
),
'default-inverted' => array(
'landscape' => '<ellipse cx="960" cy="720" rx="724.3" ry="349.49" transform="matrix(0.97, -0.26, 0.26, 0.97, -152.5, 270.17)"/>',
'portrait' => '<ellipse cx="960" cy="1280" rx="724.3" ry="349.49" transform="translate(-296.06 288.89) rotate(-14.85)"/>',
'square' => '<ellipse cx="960" cy="960" rx="724.3" ry="349.49" transform="translate(-214.03 278.19) rotate(-14.85)"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM689.75,791.68c-82-309.32-27.55-592.17,121.7-631.76s336.76,179.08,418.8,488.4,27.55,592.17-121.7,631.76S771.79,1101,689.75,791.68Z"/>',
'portrait' => '<path d="M0,2560H1920V0H0ZM1297.81,1190.4c102.56,386.66,34.45,740.21-152.12,789.7s-420.95-223.85-523.5-610.5S587.74,629.39,774.31,579.9,1195.26,803.75,1297.81,1190.4Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM622.19,1049.6C519.63,662.94,587.74,309.39,774.31,259.9s421,223.85,523.5,610.5,34.45,740.21-152.12,789.7S724.74,1436.25,622.19,1049.6Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<ellipse cx="960" cy="720" rx="279.6" ry="579.44" transform="translate(-152.5 270.17) rotate(-14.85)"/>',
'portrait' => '<ellipse cx="960" cy="1280" rx="349.49" ry="724.3" transform="translate(-296.06 288.89) rotate(-14.85)"/>',
'square' => '<ellipse cx="960" cy="960" rx="349.49" ry="724.3" transform="matrix(0.97, -0.26, 0.26, 0.97, -214.03, 278.19)"/>',
),
),
);
}
}
return new ET_Builder_Mask_Ellipse();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Floating Squares.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Floating_Squares
*
* @since 4.15.0
*/
class ET_Builder_Mask_Floating_Squares extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Floating Squares', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1723.8,1226.09l122,213.91H1920V0H849.49L628.61,596.91a131.67,131.67,0,0,1-169.19,77.8L0,504.71V1440H953.29l503.22-287C1550.51,1099.35,1670.18,1132.08,1723.8,1226.09ZM1637,210.26l82.29-33.21a18,18,0,0,1,23.44,10L1776,269.3a18,18,0,0,1-10,23.44L1683.7,326a18,18,0,0,1-23.44-10l-33.21-82.29A18,18,0,0,1,1637,210.26Z"/>',
'portrait' => '<path d="M546.09,1827.2,1384.51,1349c94-53.61,213.67-20.88,267.29,73.13L1920,1892.28V0H662.32l41.59,15.39a131.67,131.67,0,0,1,77.8,169.19L556.61,792.91a131.67,131.67,0,0,1-169.19,77.8L0,727.35V2560H738.49L473,2094.49C419.35,2000.49,452.08,1880.82,546.09,1827.2ZM1565,406.26l82.29-33.21a18,18,0,0,1,23.44,10L1704,465.3a18,18,0,0,1-10,23.44L1611.7,522a18,18,0,0,1-23.44-10l-33.21-82.29A18,18,0,0,1,1565,406.26Z"/>',
'square' => '<path d="M538.09,1667.2,1376.51,1189c94-53.61,213.67-20.88,267.29,73.13L1920,1746.31V0H780.21a132,132,0,0,1-6.5,24.58L548.61,632.91a131.67,131.67,0,0,1-169.19,77.8L0,570.31V1920H457.48C414.83,1828.52,448.85,1718.1,538.09,1667.2ZM1557,246.26l82.29-33.21a18,18,0,0,1,23.44,10L1696,305.3a18,18,0,0,1-10,23.44L1603.7,362a18,18,0,0,1-23.44-10l-33.21-82.29A18,18,0,0,1,1557,246.26Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M459.42,674.71,0,504.71V0H849.49L628.61,596.91A131.67,131.67,0,0,1,459.42,674.71ZM1723.8,1226.09c-53.62-94-173.29-126.74-267.29-73.13L953.29,1440h892.53ZM1660.26,316a18,18,0,0,0,23.44,10L1766,292.74a18,18,0,0,0,10-23.44L1742.74,187a18,18,0,0,0-23.44-10L1637,210.26a18,18,0,0,0-10,23.44Z"/>',
'portrait' => '<path d="M387.42,870.71,0,727.35V0H662.32l41.59,15.39a131.67,131.67,0,0,1,77.8,169.19L556.61,792.91A131.67,131.67,0,0,1,387.42,870.71ZM1920,1892.28l-268.2-470.19c-53.62-94-173.29-126.74-267.29-73.13L546.09,1827.2c-94,53.62-126.74,173.29-73.13,267.29L738.49,2560H1920ZM1588.26,512a18,18,0,0,0,23.44,10L1694,488.74a18,18,0,0,0,10-23.44L1670.74,383a18,18,0,0,0-23.44-10L1565,406.26a18,18,0,0,0-10,23.44Z"/>',
'square' => '<path d="M379.42,710.71,0,570.31V0H780.21a132,132,0,0,1-6.5,24.58L548.61,632.91A131.67,131.67,0,0,1,379.42,710.71ZM1920,1746.31l-276.2-484.22c-53.62-94-173.29-126.74-267.29-73.13L538.09,1667.2c-89.24,50.9-123.26,161.32-80.61,252.8H1920ZM1580.26,352a18,18,0,0,0,23.44,10L1686,328.74a18,18,0,0,0,10-23.44L1662.74,223a18,18,0,0,0-23.44-10L1557,246.26a18,18,0,0,0-10,23.44Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1700.21,1201.49l-415.8-729A170.37,170.37,0,0,1,1348,240.14L1769,0H0V831.79a132,132,0,0,1,24.58,6.5l608.33,225.1a131.67,131.67,0,0,1,77.8,169.19L634,1440H1920V1271.57A170.37,170.37,0,0,1,1700.21,1201.49ZM352,339.74,269.7,373a18,18,0,0,1-23.44-10L213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3A18,18,0,0,1,352,339.74Z"/>',
'portrait' => '<path d="M1667.2,1381.91,1189,543.49c-53.61-94-20.88-213.67,73.13-267.29L1746.31,0H0V1139.4l632.6,231.5a130.82,130.82,0,0,1,77.9,167.81L468.44,2200.17a130.82,130.82,0,0,1-167.81,77.9L0,2168.05V2560H1920V1462.52C1828.52,1505.17,1718.1,1471.15,1667.2,1381.91ZM352,339.74,269.7,373a18,18,0,0,1-23.44-10L213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3A18,18,0,0,1,352,339.74Z"/>',
'square' => '<path d="M1667.2,1381.91,1189,543.49c-53.61-94-20.88-213.67,73.13-267.29L1746.31,0H0V1139.79a132,132,0,0,1,24.58,6.5l608.33,225.1a131.67,131.67,0,0,1,77.8,169.19L570.31,1920H1920V1462.52C1828.52,1505.17,1718.1,1471.15,1667.2,1381.91ZM352,339.74,269.7,373a18,18,0,0,1-23.44-10L213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3A18,18,0,0,1,352,339.74Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3a18,18,0,0,1-10,23.44L269.7,373a18,18,0,0,1-23.44-10ZM634,1440l76.75-207.42a131.67,131.67,0,0,0-77.8-169.19L24.58,838.29A132,132,0,0,0,0,831.79V1440ZM1769,0,1348,240.14a170.37,170.37,0,0,0-63.57,232.39l415.8,729A170.37,170.37,0,0,0,1920,1271.57V0Z"/>',
'portrait' => '<path d="M1746.31,0,1262.09,276.2c-94,53.62-126.74,173.29-73.13,267.29l478.24,838.42c50.9,89.24,161.32,123.26,252.8,80.61V0ZM352,339.74a18,18,0,0,0,10-23.44L328.74,234a18,18,0,0,0-23.44-10L223,257.26a18,18,0,0,0-10,23.44L246.26,363a18,18,0,0,0,23.44,10Zm358.51,1199L468.44,2200.17a130.82,130.82,0,0,1-167.81,77.9L0,2168.05V1139.4l632.6,231.5A130.82,130.82,0,0,1,710.5,1538.71Z"/>',
'square' => '<path d="M710.71,1540.58,570.31,1920H0V1139.79a132,132,0,0,1,24.58,6.5l608.33,225.1A131.67,131.67,0,0,1,710.71,1540.58ZM1746.31,0,1262.09,276.2c-94,53.62-126.74,173.29-73.13,267.29l478.24,838.42c50.9,89.24,161.32,123.26,252.8,80.61V0ZM352,339.74a18,18,0,0,0,10-23.44L328.74,234a18,18,0,0,0-23.44-10L223,257.26a18,18,0,0,0-10,23.44L246.26,363a18,18,0,0,0,23.44,10Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Floating_Squares();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Honeycomb.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Honeycomb
*
* @since 4.15.0
*/
class ET_Builder_Mask_Honeycomb extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Honeycomb', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1864.72,1098.91,1785.26,1053a33.58,33.58,0,0,1-16.74-29V932.3a33.58,33.58,0,0,1,16.74-29l79.46-45.87a33.58,33.58,0,0,1,33.48,0L1920,870V560l-25.61,14.78a28.2,28.2,0,0,1-28.1,0L1795.72,534a28.19,28.19,0,0,1-14-24.34V428.18a28.19,28.19,0,0,1,14-24.34l70.57-40.74a28.2,28.2,0,0,1,28.1,0L1920,377.89V0H1718.91V12.52a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a41,41,0,0,1-37.74,1.59q-1.31-.84-2.64-1.62L1475,47.86c-1-.61-2.11-1.17-3.17-1.71a41,41,0,0,1-17.7-33.63V0h-29.77V12.38a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0L1180,47.74a40.94,40.94,0,0,1-20.41-35.36V0H0V1440H1197.13v-1.21a26.68,26.68,0,0,1,13.31-23l68.12-39.33a26.71,26.71,0,0,1,26.61,0l68.12,39.33a26.67,26.67,0,0,1,13.3,23V1440H1920V1086.33l-21.8,12.58A33.58,33.58,0,0,1,1864.72,1098.91Zm-18.17-463.22A41,41,0,0,1,1867,671.05V776.79a41,41,0,0,1-20.42,35.36L1755,865a40.93,40.93,0,0,1-39.36.79c-.45-.27-.89-.55-1.35-.81l-91.57-52.87c-.48-.28-1-.54-1.47-.81a40.93,40.93,0,0,1-19.06-34.52V671.05a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a41,41,0,0,1,40.83,0ZM1678.94,192.14a14.87,14.87,0,0,1,7.41-12.83l38.86-22.44a14.86,14.86,0,0,1,14.82,0l38.86,22.44a14.87,14.87,0,0,1,7.41,12.83V237a14.87,14.87,0,0,1-7.41,12.83L1740,272.29a14.86,14.86,0,0,1-14.82,0l-38.86-22.44a14.87,14.87,0,0,1-7.41-12.83Zm-92.1,130.47a40.74,40.74,0,0,1,20.41,5.46l91.57,52.86a40.93,40.93,0,0,1,20.42,35.36V522a40.93,40.93,0,0,1-20.42,35.36l-91.57,52.87a40.92,40.92,0,0,1-37.68,1.61c-1-.61-1.91-1.21-2.9-1.77l-91.57-52.87c-1-.6-2.08-1.16-3.14-1.7a40.94,40.94,0,0,1-17.52-33.5V416.29a40.93,40.93,0,0,1,19.07-34.52q.73-.39,1.47-.81l91.57-52.87c.45-.26.89-.53,1.33-.8A40.9,40.9,0,0,1,1586.84,322.61ZM1307.46,161.54a41,41,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36V267.27a41,41,0,0,1-20.41,35.37l-91.57,52.86a40.94,40.94,0,0,1-40.83,0l-91.57-52.86a41,41,0,0,1-20.42-35.37Zm-35.61,166.39a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16a41,41,0,0,1,20.42-35.36Zm-240.24-159.8a33.86,33.86,0,0,1,16.88-29.24l79.92-46.14a33.84,33.84,0,0,1,33.76,0l79.92,46.14A33.86,33.86,0,0,1,1259,168.13v92.28a33.86,33.86,0,0,1-16.88,29.24l-79.92,46.14a33.86,33.86,0,0,1-33.76,0l-79.92-46.14a33.86,33.86,0,0,1-16.88-29.24ZM1012.7,776.3V670.57a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a40.9,40.9,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V776.3a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87A40.94,40.94,0,0,1,1012.7,776.3ZM1240.34,1264a26.88,26.88,0,0,1-13.41,23.21l-68.43,39.51a26.88,26.88,0,0,1-26.8,0l-68.44-39.51a26.87,26.87,0,0,1-13.4-23.21v-79a26.87,26.87,0,0,1,13.4-23.21l68.44-39.51a26.87,26.87,0,0,1,26.8,0l68.43,39.51a26.88,26.88,0,0,1,13.41,23.21Zm123.25-254.81a17.53,17.53,0,0,1-8.75,15.15L1301.76,1055a17.56,17.56,0,0,1-17.49,0l-53.08-30.65a17.54,17.54,0,0,1-8.74-15.15V947.89a17.55,17.55,0,0,1,8.74-15.15l53.08-30.64a17.51,17.51,0,0,1,17.49,0l53.08,30.64a17.54,17.54,0,0,1,8.75,15.15ZM1328,812a41,41,0,0,1-20.42-35.36V670.91A41,41,0,0,1,1328,635.55l91.57-52.87a41,41,0,0,1,40.83,0L1552,635.55a40.94,40.94,0,0,1,20.41,35.36V776.65A40.94,40.94,0,0,1,1552,812l-91.57,52.87a40.94,40.94,0,0,1-40.83,0Zm136.1,434.77-23.36,13.49-23.37-13.49v-27l23.37-13.48,23.36,13.48Zm103.07-127-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V925.81a40.93,40.93,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87A40.94,40.94,0,0,1,1720,925.81v105.73a40.94,40.94,0,0,1-20.41,35.36L1608,1119.77A40.94,40.94,0,0,1,1567.18,1119.77Zm300.54,166.53a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V1180.56a40.93,40.93,0,0,1,20.42-35.36l91.56-52.87a41,41,0,0,1,40.84,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36Z"/>',
'portrait' => '<path d="M1808.38,1912.2V1774.92a53.15,53.15,0,0,1,26.5-45.91l85.12-49.14v-44.51L1815,1696a53.2,53.2,0,0,1-53,0l-118.89-68.64a53.15,53.15,0,0,1-26.5-45.91V1444.17a53.15,53.15,0,0,1,26.5-45.91L1762,1329.62a53.15,53.15,0,0,1,53,0l105,60.64v-44.07l-85.94-49.62c-.74-.42-1.49-.84-2.24-1.24a53.17,53.17,0,0,1-24.42-44.64V1113.42a53.15,53.15,0,0,1,26.5-45.91l86.1-49.71V973.29l-106,61.2a53.18,53.18,0,0,1-48.93,2.1q-1.85-1.2-3.75-2.31l-118.89-68.64q-2.07-1.18-4.19-2.26a53.16,53.16,0,0,1-22.64-43.44V782.67A53.2,53.2,0,0,1,1640,738c.75-.4,1.5-.81,2.23-1.23l118.89-68.64c.59-.34,1.16-.7,1.74-1a53.07,53.07,0,0,1,51.11,1l106,61.2V311.54L1813.58,373a53.14,53.14,0,0,1-49,2.07c-1.12-.72-2.26-1.42-3.43-2.1l-118.89-68.63c-1.37-.8-2.77-1.55-4.18-2.26a53.17,53.17,0,0,1-22.91-43.62V121.16a53.16,53.16,0,0,1,26.51-45.91L1760.57,6.61A52.86,52.86,0,0,1,1780.06,0H1412.74a52.73,52.73,0,0,1,18.39,6.43L1550,75.07A53.16,53.16,0,0,1,1576.52,121V258.26A53.16,53.16,0,0,1,1550,304.17l-118.88,68.64a53.18,53.18,0,0,1-53,0l-118.89-68.64a53.15,53.15,0,0,1-26.5-45.91V121a53.15,53.15,0,0,1,26.5-45.91L1378.12,6.43A52.73,52.73,0,0,1,1396.51,0H0V2560H1920V2007.25l-85.12-49.14A53.15,53.15,0,0,1,1808.38,1912.2Zm-185-913.51,118.89,68.64a53.17,53.17,0,0,1,26.5,45.91v137.28a53.16,53.16,0,0,1-26.5,45.9l-118.89,68.64a53.15,53.15,0,0,1-53,0l-118.89-68.64a53.14,53.14,0,0,1-26.5-45.9V1113.24a53.15,53.15,0,0,1,26.5-45.91l118.89-68.64a53.15,53.15,0,0,1,53,0Zm-125.7,474.15v79.58a22.76,22.76,0,0,1-11.36,19.66l-68.91,39.79a22.74,22.74,0,0,1-22.71,0l-68.91-39.79a22.76,22.76,0,0,1-11.36-19.66v-79.58a22.77,22.77,0,0,1,11.36-19.67l68.91-39.78a22.73,22.73,0,0,1,22.71,0l68.91,39.78A22.77,22.77,0,0,1,1497.65,1472.84ZM1424.78,451.91A53.16,53.16,0,0,1,1451.29,406l118.88-68.64a53.22,53.22,0,0,1,53,0L1742.07,406a53.15,53.15,0,0,1,26.5,45.91V589.19a53.15,53.15,0,0,1-26.5,45.91l-118.89,68.64a53.15,53.15,0,0,1-53,0L1451.29,635.1a53.16,53.16,0,0,1-26.51-45.91Zm-46.24,216a53.15,53.15,0,0,1,53,0l118.89,68.64a53.15,53.15,0,0,1,26.5,45.91V919.76a53.15,53.15,0,0,1-26.5,45.91l-118.89,68.64a53.16,53.16,0,0,1-48.92,2.1c-1.37-.89-2.76-1.76-4.18-2.58l-118.89-68.64c-1.34-.78-2.71-1.5-4.08-2.21a53.17,53.17,0,0,1-22.33-43.22V782.49a53.16,53.16,0,0,1,26.51-45.91Zm-311.9-207.47a44,44,0,0,1,21.92-38l103.75-59.91a44,44,0,0,1,43.84,0l103.75,59.91a44,44,0,0,1,21.92,38v119.8a44,44,0,0,1-21.92,38l-103.75,59.9a44,44,0,0,1-43.84,0l-103.75-59.9a44,44,0,0,1-21.92-38Zm-24.56,789.6V1112.79a53.16,53.16,0,0,1,26.51-45.91l118.88-68.64a53.15,53.15,0,0,1,53,0l118.89,68.64a53.15,53.15,0,0,1,26.5,45.91v137.28a53.14,53.14,0,0,1-26.5,45.9l-118.89,68.64a53.15,53.15,0,0,1-53,0L1068.59,1296A53.15,53.15,0,0,1,1042.08,1250.07Zm154.5,714.6-88.85-51.3a34.91,34.91,0,0,1-17.4-30.14V1780.64a34.9,34.9,0,0,1,17.4-30.14l88.85-51.3a34.88,34.88,0,0,1,34.8,0l88.85,51.3a34.9,34.9,0,0,1,17.4,30.14v102.59a34.91,34.91,0,0,1-17.4,30.14l-88.85,51.3A34.93,34.93,0,0,1,1196.58,1964.67Zm330.93,247.64a34.63,34.63,0,0,1-17.27,29.92l-88.44,51.06a34.66,34.66,0,0,1-34.55,0l-88.44-51.06a34.65,34.65,0,0,1-17.27-29.92V2110.19a34.64,34.64,0,0,1,17.27-29.92l88.44-51.06a34.61,34.61,0,0,1,34.55,0l88.44,51.06a34.62,34.62,0,0,1,17.27,29.92Zm100.64-351.42-30.33,17.52-30.33-17.52v-35l30.33-17.51,30.33,17.51ZM1813.58,6.61A53,53,0,0,0,1794.09,0H1920V68.05Z"/>',
'square' => '<path d="M1864.72,1098.91,1785.26,1053a33.58,33.58,0,0,1-16.74-29V932.3a33.58,33.58,0,0,1,16.74-29l79.46-45.87a33.58,33.58,0,0,1,33.48,0L1920,870V560l-25.61,14.78a28.2,28.2,0,0,1-28.1,0L1795.72,534a28.19,28.19,0,0,1-14-24.34V428.18a28.19,28.19,0,0,1,14-24.34l70.57-40.74a28.2,28.2,0,0,1,28.1,0L1920,377.89V0H1718.91V12.52a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a41,41,0,0,1-37.74,1.59q-1.31-.84-2.64-1.62L1475,47.86c-1-.61-2.1-1.17-3.17-1.71a41,41,0,0,1-17.7-33.63V0h-29.77V12.38a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0L1180,47.74a40.94,40.94,0,0,1-20.41-35.36V0H0V1920H1920V1086.33l-21.8,12.58A33.58,33.58,0,0,1,1864.72,1098.91Zm-18.17-463.22A41,41,0,0,1,1867,671.05V776.79a41,41,0,0,1-20.42,35.36L1755,865a40.93,40.93,0,0,1-39.36.79c-.45-.27-.89-.55-1.35-.81l-91.57-52.87c-.48-.28-1-.54-1.47-.81a40.93,40.93,0,0,1-19.06-34.52V671.05a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a41,41,0,0,1,40.83,0ZM1679.4,192.34a14.76,14.76,0,0,1,7.35-12.73l38.52-22.24a14.76,14.76,0,0,1,14.7,0l38.52,22.24a14.75,14.75,0,0,1,7.34,12.73v44.48a14.75,14.75,0,0,1-7.34,12.73L1740,271.79a14.78,14.78,0,0,1-14.7,0l-38.52-22.24a14.76,14.76,0,0,1-7.35-12.73Zm-92.56,130.27a40.74,40.74,0,0,1,20.41,5.46l91.57,52.86a40.93,40.93,0,0,1,20.42,35.36V522a40.93,40.93,0,0,1-20.42,35.36l-91.57,52.87a40.92,40.92,0,0,1-37.68,1.61c-1-.61-1.91-1.21-2.9-1.77l-91.57-52.87c-1-.6-2.08-1.16-3.14-1.7a40.94,40.94,0,0,1-17.52-33.5V416.29a40.93,40.93,0,0,1,19.07-34.52q.73-.39,1.47-.81l91.57-52.87c.45-.26.89-.53,1.33-.8A40.9,40.9,0,0,1,1586.84,322.61ZM1328,812a41,41,0,0,1-20.42-35.36V670.91A41,41,0,0,1,1328,635.55l91.57-52.87a41,41,0,0,1,40.83,0L1552,635.55a40.94,40.94,0,0,1,20.41,35.36V776.65A40.94,40.94,0,0,1,1552,812l-91.57,52.87a40.94,40.94,0,0,1-40.83,0Zm35.58,135.88v61.29a17.53,17.53,0,0,1-8.75,15.15L1301.76,1055a17.56,17.56,0,0,1-17.49,0l-53.08-30.65a17.54,17.54,0,0,1-8.74-15.15V947.89a17.55,17.55,0,0,1,8.74-15.15l53.08-30.64a17.51,17.51,0,0,1,17.49,0l53.08,30.64A17.54,17.54,0,0,1,1363.59,947.89Zm-56.13-786.35a41,41,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36V267.27a41,41,0,0,1-20.41,35.37l-91.57,52.86a40.94,40.94,0,0,1-40.83,0l-91.57-52.86a41,41,0,0,1-20.42-35.37Zm-35.61,166.39a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16a41,41,0,0,1,20.42-35.36Zm-240.24-159.8a33.86,33.86,0,0,1,16.88-29.24l79.92-46.14a33.84,33.84,0,0,1,33.76,0l79.92,46.14A33.86,33.86,0,0,1,1259,168.13v92.28a33.86,33.86,0,0,1-16.88,29.24l-79.92,46.14a33.86,33.86,0,0,1-33.76,0l-79.92-46.14a33.86,33.86,0,0,1-16.88-29.24ZM1012.7,776.3V670.57a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a40.9,40.9,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V776.3a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87A40.94,40.94,0,0,1,1012.7,776.3Zm119,550.41-68.44-39.51a26.87,26.87,0,0,1-13.4-23.21v-79a26.87,26.87,0,0,1,13.4-23.21l68.44-39.51a26.87,26.87,0,0,1,26.8,0l68.43,39.51a26.88,26.88,0,0,1,13.41,23.21v79a26.88,26.88,0,0,1-13.41,23.21l-68.43,39.51A26.88,26.88,0,0,1,1131.7,1326.71Zm254.89,190.74a26.68,26.68,0,0,1-13.3,23l-68.12,39.33a26.72,26.72,0,0,1-26.61,0l-68.12-39.33a26.69,26.69,0,0,1-13.31-23v-78.66a26.68,26.68,0,0,1,13.31-23l68.12-39.33a26.71,26.71,0,0,1,26.61,0l68.12,39.33a26.67,26.67,0,0,1,13.3,23Zm77.52-270.67-23.36,13.49-23.37-13.49v-27l23.37-13.48,23.36,13.48Zm103.07-127-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V925.81a40.93,40.93,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87A40.94,40.94,0,0,1,1720,925.81v105.73a40.94,40.94,0,0,1-20.41,35.36L1608,1119.77A40.94,40.94,0,0,1,1567.18,1119.77Zm300.54,166.53a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V1180.56a40.93,40.93,0,0,1,20.42-35.36l91.56-52.87a41,41,0,0,1,40.84,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1180.28,380.8l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16A41,41,0,0,1,1180.28,380.8Zm193,1035-68.12-39.33a26.71,26.71,0,0,0-26.61,0l-68.12,39.33a26.68,26.68,0,0,0-13.31,23V1440h189.46v-1.21A26.67,26.67,0,0,0,1373.29,1415.75ZM1566.55,328.09,1475,381q-.74.42-1.47.81a40.93,40.93,0,0,0-19.07,34.52V522a40.94,40.94,0,0,0,17.52,33.5c1.06.54,2.11,1.1,3.14,1.7l91.57,52.87c1,.56,1.95,1.16,2.9,1.77a40.92,40.92,0,0,0,37.68-1.61l91.57-52.87A40.93,40.93,0,0,0,1719.24,522V416.29a40.93,40.93,0,0,0-20.42-35.36l-91.57-52.86a40.81,40.81,0,0,0-39.37-.78C1567.44,327.56,1567,327.83,1566.55,328.09Zm119.8-78.24,38.86,22.44a14.86,14.86,0,0,0,14.82,0l38.86-22.44A14.87,14.87,0,0,0,1786.3,237V192.14a14.87,14.87,0,0,0-7.41-12.83L1740,156.87a14.86,14.86,0,0,0-14.82,0l-38.86,22.44a14.87,14.87,0,0,0-7.41,12.83V237A14.87,14.87,0,0,0,1686.35,249.85Zm194,109.5a28.15,28.15,0,0,0-14,3.75l-70.57,40.74a28.19,28.19,0,0,0-14,24.34v81.48a28.19,28.19,0,0,0,14,24.34l70.57,40.74a28.2,28.2,0,0,0,28.1,0L1920,560V377.89l-25.61-14.79A28.1,28.1,0,0,0,1880.34,359.35ZM1460.41,864.88,1552,812a40.94,40.94,0,0,0,20.41-35.36V670.91A40.94,40.94,0,0,0,1552,635.55l-91.57-52.87a41,41,0,0,0-40.83,0L1328,635.55a41,41,0,0,0-20.42,35.36V776.65A41,41,0,0,0,1328,812l91.57,52.87A40.94,40.94,0,0,0,1460.41,864.88Zm-294.9-.35,91.57-52.87a41,41,0,0,0,20.42-35.36V670.57a41,41,0,0,0-20.42-35.36l-91.57-52.87a40.9,40.9,0,0,0-40.83,0l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.3a40.94,40.94,0,0,0,20.41,35.36l91.57,52.87A40.94,40.94,0,0,0,1165.51,864.53Zm61.42,297.22-68.43-39.51a26.87,26.87,0,0,0-26.8,0l-68.44,39.51a26.87,26.87,0,0,0-13.4,23.21v79a26.87,26.87,0,0,0,13.4,23.21l68.44,39.51a26.88,26.88,0,0,0,26.8,0l68.43-39.51a26.88,26.88,0,0,0,13.41-23.21v-79A26.88,26.88,0,0,0,1226.93,1161.75Zm507.64-584.38a40.9,40.9,0,0,0-20.42,5.45l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.79a40.93,40.93,0,0,0,19.06,34.52c.5.27,1,.53,1.47.81L1714.27,865c.46.26.9.54,1.35.81A40.93,40.93,0,0,0,1755,865l91.57-52.86A41,41,0,0,0,1867,776.79V671.05a41,41,0,0,0-20.42-35.36L1755,582.82A40.83,40.83,0,0,0,1734.57,577.37ZM1354.84,932.74l-53.08-30.64a17.51,17.51,0,0,0-17.49,0l-53.08,30.64a17.55,17.55,0,0,0-8.74,15.15v61.29a17.54,17.54,0,0,0,8.74,15.15l53.08,30.65a17.56,17.56,0,0,0,17.49,0l53.08-30.65a17.53,17.53,0,0,0,8.75-15.15V947.89A17.54,17.54,0,0,0,1354.84,932.74Zm344.74,134.16a40.94,40.94,0,0,0,20.41-35.36V925.81a40.94,40.94,0,0,0-20.41-35.36L1608,837.58a41,41,0,0,0-40.83,0l-91.57,52.87a40.93,40.93,0,0,0-20.42,35.36v105.73a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0ZM1898.2,857.43a33.58,33.58,0,0,0-33.48,0l-79.46,45.87a33.58,33.58,0,0,0-16.74,29V1024a33.58,33.58,0,0,0,16.74,29l79.46,45.87a33.58,33.58,0,0,0,33.48,0l21.8-12.58V870ZM1417.38,1219.8v27l23.37,13.49,23.36-13.49v-27l-23.36-13.48Zm429.93-74.6-91.57-52.87a41,41,0,0,0-40.84,0l-91.56,52.87a40.93,40.93,0,0,0-20.42,35.36V1286.3a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V1180.56A40.94,40.94,0,0,0,1847.31,1145.2ZM1180,47.74l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a41,41,0,0,0,20.42-35.36V0h-264.8V12.38A40.94,40.94,0,0,0,1180,47.74Zm291.86-1.59c1.06.54,2.12,1.1,3.17,1.71l91.57,52.86q1.34.78,2.64,1.62a41,41,0,0,0,37.74-1.59l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V0h-264.8V12.52A41,41,0,0,0,1471.81,46.15Zm-423.32,243.5,79.92,46.14a33.86,33.86,0,0,0,33.76,0l79.92-46.14A33.86,33.86,0,0,0,1259,260.41V168.13a33.86,33.86,0,0,0-16.88-29.24l-79.92-46.14a33.84,33.84,0,0,0-33.76,0l-79.92,46.14a33.86,33.86,0,0,0-16.88,29.24v92.28A33.86,33.86,0,0,0,1048.49,289.65Zm279.39,13,91.57,52.86a40.94,40.94,0,0,0,40.83,0l91.57-52.86a41,41,0,0,0,20.41-35.37V161.54a40.94,40.94,0,0,0-20.41-35.36l-91.57-52.87a41,41,0,0,0-40.83,0l-91.57,52.87a41,41,0,0,0-20.42,35.36V267.27A41,41,0,0,0,1327.88,302.64Z"/>',
'portrait' => '<path d="M1259.66,736.58l118.88-68.64a53.15,53.15,0,0,1,53,0l118.89,68.64a53.15,53.15,0,0,1,26.5,45.91V919.76a53.15,53.15,0,0,1-26.5,45.91l-118.89,68.64a53.16,53.16,0,0,1-48.92,2.1c-1.37-.89-2.76-1.76-4.18-2.58l-118.89-68.64c-1.34-.78-2.71-1.5-4.08-2.21a53.17,53.17,0,0,1-22.33-43.22V782.49A53.16,53.16,0,0,1,1259.66,736.58Zm250.58,1343.69-88.44-51.06a34.61,34.61,0,0,0-34.55,0l-88.44,51.06a34.64,34.64,0,0,0-17.27,29.92v102.12a34.65,34.65,0,0,0,17.27,29.92l88.44,51.06a34.66,34.66,0,0,0,34.55,0l88.44-51.06a34.63,34.63,0,0,0,17.27-29.92V2110.19A34.62,34.62,0,0,0,1510.24,2080.27ZM1787.5,661a53.12,53.12,0,0,0-24.61,6.06c-.58.35-1.15.71-1.74,1l-118.89,68.64c-.73.42-1.48.83-2.23,1.23a53.2,53.2,0,0,0-24.43,44.65V919.94a53.16,53.16,0,0,0,22.64,43.44q2.12,1.08,4.19,2.26l118.89,68.64q1.9,1.11,3.75,2.31a53.18,53.18,0,0,0,48.93-2.1l106-61.2v-244l-106-61.19A53,53,0,0,0,1787.5,661ZM1570.34,998.69l-118.89,68.64a53.15,53.15,0,0,0-26.5,45.91v137.28a53.14,53.14,0,0,0,26.5,45.9l118.89,68.64a53.15,53.15,0,0,0,53,0l118.89-68.64a53.16,53.16,0,0,0,26.5-45.9V1113.24a53.17,53.17,0,0,0-26.5-45.91l-118.89-68.64a53.15,53.15,0,0,0-53,0Zm-329.86,365.92L1359.37,1296a53.14,53.14,0,0,0,26.5-45.9V1112.79a53.15,53.15,0,0,0-26.5-45.91l-118.89-68.64a53.15,53.15,0,0,0-53,0l-118.88,68.64a53.16,53.16,0,0,0-26.51,45.91v137.28a53.15,53.15,0,0,0,26.51,45.9l118.88,68.64A53.15,53.15,0,0,0,1240.48,1364.61Zm97.15,518.62V1780.64a34.9,34.9,0,0,0-17.4-30.14l-88.85-51.3a34.88,34.88,0,0,0-34.8,0l-88.85,51.3a34.9,34.9,0,0,0-17.4,30.14v102.59a34.91,34.91,0,0,0,17.4,30.14l88.85,51.3a34.93,34.93,0,0,0,34.8,0l88.85-51.3A34.91,34.91,0,0,0,1337.63,1883.23Zm469.77-769.81v137.27a53.17,53.17,0,0,0,24.42,44.64c.75.4,1.5.82,2.24,1.24l85.94,49.62V1017.8l-86.1,49.71A53.15,53.15,0,0,0,1807.4,1113.42Zm-390,300a22.73,22.73,0,0,0-22.71,0l-68.91,39.78a22.77,22.77,0,0,0-11.36,19.67v79.58a22.76,22.76,0,0,0,11.36,19.66l68.91,39.79a22.74,22.74,0,0,0,22.71,0l68.91-39.79a22.76,22.76,0,0,0,11.36-19.66v-79.58a22.77,22.77,0,0,0-11.36-19.67Zm371.1-90.85a53,53,0,0,0-26.51,7.08l-118.89,68.64a53.15,53.15,0,0,0-26.5,45.91v137.28a53.15,53.15,0,0,0,26.5,45.91L1762,1696a53.2,53.2,0,0,0,53,0l105-60.64V1390.25l-105-60.63A53,53,0,0,0,1788.48,1322.54Zm-221,503.33v35l30.33,17.52,30.33-17.52v-35l-30.33-17.51ZM1834.88,1729a53.15,53.15,0,0,0-26.5,45.91V1912.2a53.15,53.15,0,0,0,26.5,45.91l85.12,49.14V1679.87ZM1259.23,75.07a53.15,53.15,0,0,0-26.5,45.91V258.26a53.15,53.15,0,0,0,26.5,45.91l118.89,68.64a53.18,53.18,0,0,0,53,0L1550,304.17a53.16,53.16,0,0,0,26.51-45.91V121A53.16,53.16,0,0,0,1550,75.07L1431.13,6.43A52.73,52.73,0,0,0,1412.74,0h-16.23a52.73,52.73,0,0,0-18.39,6.43Zm382.45.18a53.16,53.16,0,0,0-26.51,45.91V258.44a53.17,53.17,0,0,0,22.91,43.62c1.41.71,2.81,1.46,4.18,2.26L1761.15,373c1.17.68,2.31,1.38,3.43,2.1a53.14,53.14,0,0,0,49-2.07L1920,311.54V68.05L1813.58,6.61A53,53,0,0,0,1794.09,0h-14a52.86,52.86,0,0,0-19.49,6.61Zm-553.12,543,103.75,59.9a44,44,0,0,0,43.84,0l103.75-59.9a44,44,0,0,0,21.92-38V460.47a44,44,0,0,0-21.92-38L1236.15,362.6a44,44,0,0,0-43.84,0l-103.75,59.91a44,44,0,0,0-21.92,38v119.8A44,44,0,0,0,1088.56,618.24Zm362.73,16.86,118.88,68.64a53.15,53.15,0,0,0,53,0l118.89-68.64a53.15,53.15,0,0,0,26.5-45.91V451.91a53.15,53.15,0,0,0-26.5-45.91l-118.89-68.64a53.22,53.22,0,0,0-53,0L1451.29,406a53.16,53.16,0,0,0-26.51,45.91V589.19A53.16,53.16,0,0,0,1451.29,635.1Z"/>',
'square' => '<path d="M1180.28,380.8l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16A41,41,0,0,1,1180.28,380.8Zm193,1035-68.12-39.33a26.71,26.71,0,0,0-26.61,0l-68.12,39.33a26.68,26.68,0,0,0-13.31,23v78.66a26.69,26.69,0,0,0,13.31,23l68.12,39.33a26.72,26.72,0,0,0,26.61,0l68.12-39.33a26.68,26.68,0,0,0,13.3-23v-78.66A26.67,26.67,0,0,0,1373.29,1415.75ZM1566.55,328.09,1475,381q-.74.42-1.47.81a40.93,40.93,0,0,0-19.07,34.52V522a40.94,40.94,0,0,0,17.52,33.5c1.06.54,2.11,1.1,3.14,1.7l91.57,52.87c1,.56,1.95,1.16,2.9,1.77a40.92,40.92,0,0,0,37.68-1.61l91.57-52.87A40.93,40.93,0,0,0,1719.24,522V416.29a40.93,40.93,0,0,0-20.42-35.36l-91.57-52.86a40.81,40.81,0,0,0-39.37-.78C1567.44,327.56,1567,327.83,1566.55,328.09Zm120.2-78.54,38.52,22.24a14.78,14.78,0,0,0,14.7,0l38.52-22.24a14.75,14.75,0,0,0,7.34-12.73V192.34a14.75,14.75,0,0,0-7.34-12.73L1740,157.37a14.76,14.76,0,0,0-14.7,0l-38.52,22.24a14.76,14.76,0,0,0-7.35,12.73v44.48A14.76,14.76,0,0,0,1686.75,249.55Zm193.59,109.8a28.15,28.15,0,0,0-14,3.75l-70.57,40.74a28.19,28.19,0,0,0-14,24.34v81.48a28.19,28.19,0,0,0,14,24.34l70.57,40.74a28.2,28.2,0,0,0,28.1,0L1920,560V377.89l-25.61-14.79A28.1,28.1,0,0,0,1880.34,359.35ZM1460.41,864.88,1552,812a40.94,40.94,0,0,0,20.41-35.36V670.91A40.94,40.94,0,0,0,1552,635.55l-91.57-52.87a41,41,0,0,0-40.83,0L1328,635.55a41,41,0,0,0-20.42,35.36V776.65A41,41,0,0,0,1328,812l91.57,52.87A40.94,40.94,0,0,0,1460.41,864.88Zm-294.9-.35,91.57-52.87a41,41,0,0,0,20.42-35.36V670.57a41,41,0,0,0-20.42-35.36l-91.57-52.87a40.9,40.9,0,0,0-40.83,0l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.3a40.94,40.94,0,0,0,20.41,35.36l91.57,52.87A40.94,40.94,0,0,0,1165.51,864.53ZM1240.34,1264v-79a26.88,26.88,0,0,0-13.41-23.21l-68.43-39.51a26.87,26.87,0,0,0-26.8,0l-68.44,39.51a26.87,26.87,0,0,0-13.4,23.21v79a26.87,26.87,0,0,0,13.4,23.21l68.44,39.51a26.88,26.88,0,0,0,26.8,0l68.43-39.51A26.88,26.88,0,0,0,1240.34,1264Zm494.23-686.62a40.9,40.9,0,0,0-20.42,5.45l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.79a40.93,40.93,0,0,0,19.06,34.52c.5.27,1,.53,1.47.81L1714.27,865c.46.26.9.54,1.35.81A40.93,40.93,0,0,0,1755,865l91.57-52.86A41,41,0,0,0,1867,776.79V671.05a41,41,0,0,0-20.42-35.36L1755,582.82A40.83,40.83,0,0,0,1734.57,577.37ZM1301.76,902.1a17.51,17.51,0,0,0-17.49,0l-53.08,30.64a17.55,17.55,0,0,0-8.74,15.15v61.29a17.54,17.54,0,0,0,8.74,15.15l53.08,30.65a17.56,17.56,0,0,0,17.49,0l53.08-30.65a17.53,17.53,0,0,0,8.75-15.15V947.89a17.54,17.54,0,0,0-8.75-15.15Zm397.82,164.8a40.94,40.94,0,0,0,20.41-35.36V925.81a40.94,40.94,0,0,0-20.41-35.36L1608,837.58a41,41,0,0,0-40.83,0l-91.57,52.87a40.93,40.93,0,0,0-20.42,35.36v105.73a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0ZM1898.2,857.43a33.58,33.58,0,0,0-33.48,0l-79.46,45.87a33.58,33.58,0,0,0-16.74,29V1024a33.58,33.58,0,0,0,16.74,29l79.46,45.87a33.58,33.58,0,0,0,33.48,0l21.8-12.58V870ZM1417.38,1219.8v27l23.37,13.49,23.36-13.49v-27l-23.36-13.48Zm429.93-74.6-91.57-52.87a41,41,0,0,0-40.84,0l-91.56,52.87a40.93,40.93,0,0,0-20.42,35.36V1286.3a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V1180.56A40.94,40.94,0,0,0,1847.31,1145.2ZM1180,47.74l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a41,41,0,0,0,20.42-35.36V0h-264.8V12.38A40.94,40.94,0,0,0,1180,47.74Zm291.86-1.59c1.07.54,2.12,1.1,3.17,1.71l91.57,52.86q1.34.78,2.64,1.62a41,41,0,0,0,37.74-1.59l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V0h-264.8V12.52A41,41,0,0,0,1471.81,46.15Zm-423.32,243.5,79.92,46.14a33.86,33.86,0,0,0,33.76,0l79.92-46.14A33.86,33.86,0,0,0,1259,260.41V168.13a33.86,33.86,0,0,0-16.88-29.24l-79.92-46.14a33.84,33.84,0,0,0-33.76,0l-79.92,46.14a33.86,33.86,0,0,0-16.88,29.24v92.28A33.86,33.86,0,0,0,1048.49,289.65Zm279.39,13,91.57,52.86a40.94,40.94,0,0,0,40.83,0l91.57-52.86a41,41,0,0,0,20.41-35.37V161.54a40.94,40.94,0,0,0-20.41-35.36l-91.57-52.87a41,41,0,0,0-40.83,0l-91.57,52.87a41,41,0,0,0-20.42,35.36V267.27A41,41,0,0,0,1327.88,302.64Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1098.91,55.28,1053,134.74a33.58,33.58,0,0,1-29,16.74H932.3a33.58,33.58,0,0,1-29-16.74L857.43,55.28a33.58,33.58,0,0,1,0-33.48L870,0H560l14.78,25.61a28.2,28.2,0,0,1,0,28.1L534,124.28a28.19,28.19,0,0,1-24.34,14H428.18a28.19,28.19,0,0,1-24.34-14L363.1,53.71a28.2,28.2,0,0,1,0-28.1L377.89,0H0V201.09H12.52A40.94,40.94,0,0,1,47.88,221.5l52.87,91.57a41,41,0,0,1,1.59,37.74q-.84,1.31-1.62,2.64L47.86,445c-.61,1.05-1.17,2.1-1.71,3.17a41,41,0,0,1-33.63,17.7H0v29.77H12.38a41,41,0,0,1,35.36,20.42l52.87,91.57a40.94,40.94,0,0,1,0,40.83L47.74,740.05a40.94,40.94,0,0,1-35.36,20.41H0V1440H1920V0H1086.33l12.58,21.8A33.58,33.58,0,0,1,1098.91,55.28ZM635.69,73.45A41,41,0,0,1,671.05,53H776.79a41,41,0,0,1,35.36,20.42L865,165a40.93,40.93,0,0,1,.79,39.36c-.27.45-.55.89-.81,1.35L812.12,297.3c-.28.48-.54,1-.81,1.47a40.93,40.93,0,0,1-34.52,19.06H671.05a40.94,40.94,0,0,1-35.36-20.41l-52.87-91.57a41,41,0,0,1,0-40.83ZM192.34,240.6a14.76,14.76,0,0,1-12.73-7.35l-22.24-38.52a14.76,14.76,0,0,1,0-14.7l22.24-38.52a14.75,14.75,0,0,1,12.73-7.34h44.48a14.75,14.75,0,0,1,12.73,7.34L271.79,180a14.78,14.78,0,0,1,0,14.7l-22.24,38.52a14.76,14.76,0,0,1-12.73,7.35Zm130.27,92.56a40.74,40.74,0,0,1,5.46-20.41l52.86-91.57a40.93,40.93,0,0,1,35.36-20.42H522a40.93,40.93,0,0,1,35.36,20.42l52.87,91.57a40.92,40.92,0,0,1,1.61,37.68c-.61.95-1.21,1.91-1.77,2.9L557.23,444.9c-.6,1-1.16,2.08-1.7,3.14A40.94,40.94,0,0,1,522,465.56H416.29a40.93,40.93,0,0,1-34.52-19.07q-.39-.74-.81-1.47l-52.87-91.57c-.26-.45-.53-.89-.8-1.33A40.9,40.9,0,0,1,322.61,333.16ZM812,592a41,41,0,0,1-35.36,20.42H670.91A41,41,0,0,1,635.55,592l-52.87-91.57a41,41,0,0,1,0-40.83L635.55,368a40.94,40.94,0,0,1,35.36-20.41H776.65A40.94,40.94,0,0,1,812,368l52.87,91.57a40.94,40.94,0,0,1,0,40.83Zm135.88-35.58h61.29a17.53,17.53,0,0,1,15.15,8.75L1055,618.24a17.56,17.56,0,0,1,0,17.49l-30.65,53.08a17.54,17.54,0,0,1-15.15,8.74H947.89a17.55,17.55,0,0,1-15.15-8.74L902.1,635.73a17.51,17.51,0,0,1,0-17.49l30.64-53.08A17.54,17.54,0,0,1,947.89,556.41ZM161.54,612.54a41,41,0,0,1-35.36-20.42L73.31,500.55a41,41,0,0,1,0-40.83l52.87-91.57a40.94,40.94,0,0,1,35.36-20.41H267.27a41,41,0,0,1,35.37,20.41l52.86,91.57a40.94,40.94,0,0,1,0,40.83l-52.86,91.57a41,41,0,0,1-35.37,20.42Zm166.39,35.61a41,41,0,0,1,0-40.83l52.87-91.57a41,41,0,0,1,35.36-20.42H521.89a41,41,0,0,1,35.36,20.42l52.87,91.57A41,41,0,0,1,611.74,645c-.69,1.06-1.36,2.13-2,3.22l-52.87,91.57c-.57,1-1.12,2-1.64,3a41,41,0,0,1-33.35,17.31H416.16a41,41,0,0,1-35.36-20.42ZM168.13,888.39a33.86,33.86,0,0,1-29.24-16.88L92.75,791.59a33.84,33.84,0,0,1,0-33.76l46.14-79.92A33.86,33.86,0,0,1,168.13,661h92.28a33.86,33.86,0,0,1,29.24,16.88l46.14,79.92a33.86,33.86,0,0,1,0,33.76l-46.14,79.92a33.86,33.86,0,0,1-29.24,16.88ZM776.3,907.3H670.57a40.94,40.94,0,0,1-35.36-20.41l-52.87-91.57a40.9,40.9,0,0,1,0-40.83l52.87-91.57a41,41,0,0,1,35.36-20.42H776.3a41,41,0,0,1,35.36,20.42l52.87,91.57a40.94,40.94,0,0,1,0,40.83l-52.87,91.57A40.94,40.94,0,0,1,776.3,907.3Zm550.41-119-39.51,68.44a26.87,26.87,0,0,1-23.21,13.4h-79a26.87,26.87,0,0,1-23.21-13.4l-39.51-68.44a26.87,26.87,0,0,1,0-26.8l39.51-68.43A26.88,26.88,0,0,1,1185,679.66h79a26.88,26.88,0,0,1,23.21,13.41l39.51,68.43A26.88,26.88,0,0,1,1326.71,788.3Zm190.74-254.89a26.68,26.68,0,0,1,23,13.3l39.33,68.12a26.72,26.72,0,0,1,0,26.61l-39.33,68.12a26.69,26.69,0,0,1-23,13.31h-78.66a26.68,26.68,0,0,1-23-13.31l-39.33-68.12a26.71,26.71,0,0,1,0-26.61l39.33-68.12a26.67,26.67,0,0,1,23-13.3Zm-270.67-77.52,13.49,23.36-13.49,23.37h-27l-13.48-23.37,13.48-23.36Zm-127-103.07-52.87,91.57a40.93,40.93,0,0,1-35.36,20.42H925.81a40.93,40.93,0,0,1-35.36-20.42l-52.87-91.57a41,41,0,0,1,0-40.83l52.87-91.57A40.94,40.94,0,0,1,925.81,200h105.73a40.94,40.94,0,0,1,35.36,20.41L1119.77,312A40.94,40.94,0,0,1,1119.77,352.82ZM1286.3,52.28a40.94,40.94,0,0,1,35.36,20.41l52.87,91.57a40.94,40.94,0,0,1,0,40.83l-52.87,91.57a40.93,40.93,0,0,1-35.36,20.42H1180.56a40.93,40.93,0,0,1-35.36-20.42l-52.87-91.56a41,41,0,0,1,0-40.84l52.87-91.57a40.94,40.94,0,0,1,35.36-20.41Z"/>',
'portrait' => '<path d="M1849.45,926.93l-51.38-89a34.87,34.87,0,0,1,0-34.76l51.38-89a34.87,34.87,0,0,1,30.11-17.38H1920V0H1419.11l16.44,28.48a43.85,43.85,0,0,1,0,43.74L1375.63,176a43.87,43.87,0,0,1-37.88,21.87H1217.9A43.86,43.86,0,0,1,1180,176L1120.09,72.22a43.87,43.87,0,0,1,0-43.74L1136.53,0h-405l19.32,33.45a36.84,36.84,0,0,1,0,36.71l-53.23,92.19A36.79,36.79,0,0,1,665.8,180.7H559.35a36.79,36.79,0,0,1-31.79-18.35L474.33,70.16a36.83,36.83,0,0,1,0-36.71L493.65,0H0V262.69H16.35a53.5,53.5,0,0,1,46.2,26.67L131.61,409a53.52,53.52,0,0,1,2.08,49.3c-.72,1.13-1.43,2.28-2.11,3.45L62.52,581.35c-.79,1.37-1.53,2.75-2.24,4.14a53.48,53.48,0,0,1-43.93,23.12H0V647.5H16.17a53.5,53.5,0,0,1,46.2,26.67l69.06,119.62a53.48,53.48,0,0,1,0,53.34L62.37,966.75a53.5,53.5,0,0,1-46.2,26.67H0V2560H1920V944.31h-40.44A34.87,34.87,0,0,1,1849.45,926.93ZM1427,214.58,1496,95a53.5,53.5,0,0,1,46.2-26.67h138.12A53.5,53.5,0,0,1,1726.54,95l69.06,119.62a53.48,53.48,0,0,1,0,53.34l-69.06,119.62a53.5,53.5,0,0,1-46.2,26.67H1542.22a53.5,53.5,0,0,1-46.2-26.67L1427,267.92a53.51,53.51,0,0,1,0-53.34Zm219.38,411.49-17.62,30.52h-35.24l-17.62-30.52,17.62-30.52h35.24Zm-885-410.5L830.43,96a53.49,53.49,0,0,1,46.19-26.67h138.13A53.49,53.49,0,0,1,1060.94,96L1130,215.57a53.46,53.46,0,0,1,1,51.43c-.35.58-.71,1.16-1,1.75l-69.06,119.62c-.37.63-.72,1.28-1.07,1.92a53.48,53.48,0,0,1-45.09,24.91H876.62a53.49,53.49,0,0,1-46.19-26.67L761.36,268.91a53.51,53.51,0,0,1,0-53.34Zm-332.79,193,69.06-119.62a53.49,53.49,0,0,1,46.19-26.67H682a53.49,53.49,0,0,1,46.19,26.67l69.07,119.62a53.49,53.49,0,0,1,2.1,49.24c-.79,1.24-1.57,2.49-2.32,3.77L727.93,581.18c-.78,1.36-1.51,2.73-2.22,4.11A53.49,53.49,0,0,1,682,608.18H543.82a53.45,53.45,0,0,1-45.09-24.91c-.35-.64-.7-1.28-1.07-1.92L428.6,461.73c-.34-.59-.7-1.16-1.05-1.74a53.36,53.36,0,0,1,1-51.44Zm-223-173.37,29.06-50.32a19.22,19.22,0,0,1,16.62-9.59h58.11A19.25,19.25,0,0,1,326,184.86l29.06,50.32a19.3,19.3,0,0,1,0,19.2L326,304.7a19.25,19.25,0,0,1-16.62,9.6H251.26a19.23,19.23,0,0,1-16.62-9.6l-29.06-50.32a19.28,19.28,0,0,1,0-19.2ZM95.77,653.89a53.51,53.51,0,0,1,0-53.34l69.06-119.62A53.49,53.49,0,0,1,211,454.26H349.15a53.47,53.47,0,0,1,46.19,26.67l69.07,119.62a53.5,53.5,0,0,1,0,53.34L395.34,773.51a53.47,53.47,0,0,1-46.19,26.67H211a53.49,53.49,0,0,1-46.19-26.67Zm342.88,380.2-60.27,104.39a44.23,44.23,0,0,1-38.2,22.06H219.63a44.21,44.21,0,0,1-38.19-22.06l-60.28-104.39a44.24,44.24,0,0,1,0-44.11l60.28-104.39a44.21,44.21,0,0,1,38.19-22.06H340.18a44.23,44.23,0,0,1,38.2,22.06L438.65,990A44.23,44.23,0,0,1,438.65,1034.09Zm286.68-63.7A53.5,53.5,0,0,1,681.77,993H543.64a53.49,53.49,0,0,1-46.19-26.67L428.39,846.7a53.43,53.43,0,0,1,0-53.33l69.06-119.62a53.49,53.49,0,0,1,46.19-26.67H681.77A53.49,53.49,0,0,1,728,673.75L797,793.37a53.45,53.45,0,0,1,2.12,49.22q-1.35,2.07-2.6,4.21L727.48,966.42C726.72,967.72,726,969.05,725.33,970.39Zm404,68.57-69.06,119.62a53.5,53.5,0,0,1-46.2,26.67H876a53.5,53.5,0,0,1-46.2-26.67L760.73,1039a53.51,53.51,0,0,1,0-53.34L829.79,866A53.5,53.5,0,0,1,876,839.33h138.12a53.5,53.5,0,0,1,46.2,26.67l69.06,119.62A53.48,53.48,0,0,1,1129.37,1039Zm.45-385.24-69.06,119.62A53.49,53.49,0,0,1,1014.57,800H876.44a53.49,53.49,0,0,1-46.19-26.67L761.18,653.72a53.51,53.51,0,0,1,0-53.34l69.07-119.62a53.49,53.49,0,0,1,46.19-26.67h138.13a53.49,53.49,0,0,1,46.19,26.67l69.06,119.62A53.48,53.48,0,0,1,1129.82,653.72Zm248.34,176.76-40,69.34a22.91,22.91,0,0,1-19.78,11.42h-80.07a22.92,22.92,0,0,1-19.79-11.42l-40-69.34a22.86,22.86,0,0,1,0-22.85l40-69.34a22.91,22.91,0,0,1,19.79-11.43h80.07a22.9,22.9,0,0,1,19.78,11.43l40,69.34A22.91,22.91,0,0,1,1378.16,830.48ZM1347.54,607.2H1209.42a53.47,53.47,0,0,1-46.19-26.67l-69.07-119.62a53.51,53.51,0,0,1,0-53.34L1163.23,288a53.47,53.47,0,0,1,46.19-26.67h138.12a53.5,53.5,0,0,1,46.2,26.67l69.06,119.62a53.48,53.48,0,0,1,0,53.34l-69.06,119.62A53.5,53.5,0,0,1,1347.54,607.2Zm385.59,422.59-51.61,89.4a35.11,35.11,0,0,1-30.32,17.51H1548a35.13,35.13,0,0,1-30.33-17.51l-51.61-89.4a35.08,35.08,0,0,1,0-35l51.61-89.4A35.13,35.13,0,0,1,1548,887.87H1651.2a35.11,35.11,0,0,1,30.32,17.51l51.61,89.4A35.08,35.08,0,0,1,1733.13,1029.79Z"/>',
'square' => '<path d="M1805,906.87a33.46,33.46,0,0,1-28.91-16.69l-49.34-85.46a33.46,33.46,0,0,1,0-33.38l49.34-85.46A33.46,33.46,0,0,1,1805,669.19h98.68a33.36,33.36,0,0,1,16.28,4.26V0H1362.85l15.79,27.35a42.13,42.13,0,0,1,0,42L1321.09,169a42.12,42.12,0,0,1-36.38,21h-115.1a42.12,42.12,0,0,1-36.37-21l-57.55-99.67a42.13,42.13,0,0,1,0-42L1091.48,0h-389L721,32.13a35.33,35.33,0,0,1,0,35.25l-51.11,88.53a35.36,35.36,0,0,1-30.53,17.62H537.17a35.36,35.36,0,0,1-30.53-17.62L455.53,67.38a35.33,35.33,0,0,1,0-35.25L474.08,0H0V252.27H15.7a51.37,51.37,0,0,1,44.37,25.62l66.32,114.87a51.39,51.39,0,0,1,2,47.35c-.7,1.09-1.38,2.19-2,3.32L60,558.31c-.76,1.3-1.47,2.63-2.15,4a51.37,51.37,0,0,1-42.19,22.2H0v37.35H15.53a51.37,51.37,0,0,1,44.36,25.62l66.33,114.87a51.38,51.38,0,0,1,0,51.23L59.89,928.43A51.38,51.38,0,0,1,15.53,954H0v966H1920V902.6a33.26,33.26,0,0,1-16.28,4.27ZM1370.39,206.08,1436.71,91.2a51.38,51.38,0,0,1,44.37-25.61h132.65a51.36,51.36,0,0,1,44.36,25.61l66.32,114.88a51.36,51.36,0,0,1,0,51.22l-66.32,114.88a51.36,51.36,0,0,1-44.36,25.61H1481.08a51.38,51.38,0,0,1-44.37-25.61L1370.39,257.3a51.36,51.36,0,0,1,0-51.22Zm210.68,395.17-16.92,29.31h-33.84l-16.92-29.31,16.92-29.31h33.84ZM731.18,207,797.51,92.14a51.38,51.38,0,0,1,44.36-25.61H974.52a51.38,51.38,0,0,1,44.36,25.61L1085.2,207a51.32,51.32,0,0,1,1,49.39c-.33.56-.68,1.12-1,1.68L1018.85,373c-.35.61-.69,1.23-1,1.85a51.38,51.38,0,0,1-43.31,23.92H841.87a51.37,51.37,0,0,1-44.36-25.62L731.18,258.25a51.38,51.38,0,0,1,0-51.23ZM411.58,392.36,477.9,277.48a51.37,51.37,0,0,1,44.36-25.62H654.91a51.39,51.39,0,0,1,44.37,25.62L765.6,392.36a51.37,51.37,0,0,1,2,47.28c-.77,1.19-1.52,2.39-2.23,3.62L699.07,558.14c-.75,1.3-1.45,2.62-2.13,4a51.36,51.36,0,0,1-42,22H522.26A51.38,51.38,0,0,1,479,560.15c-.33-.62-.67-1.24-1-1.85L411.61,443.43c-.33-.57-.67-1.12-1-1.68a51.28,51.28,0,0,1,1-49.39ZM197.43,225.86l27.9-48.33a18.5,18.5,0,0,1,16-9.21h55.8a18.49,18.49,0,0,1,16,9.21L341,225.86a18.51,18.51,0,0,1,0,18.44l-27.9,48.32a18.48,18.48,0,0,1-16,9.22H241.3a18.49,18.49,0,0,1-16-9.22l-27.9-48.32a18.51,18.51,0,0,1,0-18.44ZM92,628a51.38,51.38,0,0,1,0-51.23L158.3,461.86a51.38,51.38,0,0,1,44.36-25.61H335.31a51.38,51.38,0,0,1,44.36,25.61L446,576.74A51.38,51.38,0,0,1,446,628L379.67,742.84a51.37,51.37,0,0,1-44.36,25.62H202.66a51.37,51.37,0,0,1-44.36-25.62ZM421.26,993.09l-57.88,100.26a42.49,42.49,0,0,1-36.69,21.18H210.93a42.5,42.5,0,0,1-36.69-21.18L116.36,993.09a42.46,42.46,0,0,1,0-42.36l57.88-100.25a42.48,42.48,0,0,1,36.69-21.18H326.69a42.47,42.47,0,0,1,36.69,21.18l57.88,100.25A42.49,42.49,0,0,1,421.26,993.09Zm275.32-61.18a51.38,51.38,0,0,1-41.84,21.72H522.09A51.38,51.38,0,0,1,477.73,928L411.4,813.14a51.38,51.38,0,0,1,0-51.23L477.73,647a51.37,51.37,0,0,1,44.36-25.62H654.74A51.37,51.37,0,0,1,699.1,647l66.33,114.87a51.4,51.4,0,0,1,2,47.28c-.87,1.32-1.7,2.66-2.5,4L698.64,928.1C697.91,929.36,697.23,930.63,696.58,931.91Zm388,65.86-66.33,114.88a51.38,51.38,0,0,1-44.36,25.61H841.26a51.38,51.38,0,0,1-44.36-25.61L730.57,997.77a51.38,51.38,0,0,1,0-51.23L796.9,831.67a51.37,51.37,0,0,1,44.36-25.62H973.91a51.37,51.37,0,0,1,44.36,25.62l66.33,114.87A51.38,51.38,0,0,1,1084.6,997.77Zm.43-370-66.32,114.87a51.39,51.39,0,0,1-44.37,25.62H841.69a51.37,51.37,0,0,1-44.36-25.62L731,627.81a51.38,51.38,0,0,1,0-51.23L797.33,461.7a51.36,51.36,0,0,1,44.36-25.61H974.34a51.38,51.38,0,0,1,44.37,25.61L1085,576.58A51.38,51.38,0,0,1,1085,627.81Zm238.49,169.74-38.45,66.59a22,22,0,0,1-19,11h-76.89a22,22,0,0,1-19-11l-38.44-66.59a22,22,0,0,1,0-21.94L1170.17,709a22,22,0,0,1,19-11h76.89a22,22,0,0,1,19,11l38.45,66.59A22,22,0,0,1,1323.52,797.55Zm-29.4-214.42H1161.47a51.37,51.37,0,0,1-44.36-25.62l-66.33-114.87a51.38,51.38,0,0,1,0-51.23l66.33-114.88a51.36,51.36,0,0,1,44.36-25.61h132.65a51.36,51.36,0,0,1,44.36,25.61l66.33,114.88a51.36,51.36,0,0,1,0,51.22l-66.33,114.88A51.37,51.37,0,0,1,1294.12,583.13ZM1664.42,989l-49.56,85.85a33.74,33.74,0,0,1-29.13,16.82H1486.6a33.71,33.71,0,0,1-29.12-16.82L1407.91,989a33.73,33.73,0,0,1,0-33.63l49.57-85.85a33.71,33.71,0,0,1,29.12-16.82h99.13a33.74,33.74,0,0,1,29.13,16.82l49.56,85.85A33.71,33.71,0,0,1,1664.42,989Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M380.8,739.72l-52.87-91.57a41,41,0,0,1,0-40.83l52.87-91.57a41,41,0,0,1,35.36-20.42H521.89a41,41,0,0,1,35.36,20.42l52.87,91.57A41,41,0,0,1,611.74,645c-.69,1.06-1.36,2.13-2,3.22l-52.87,91.57c-.57,1-1.12,2-1.64,3a41,41,0,0,1-33.35,17.31H416.16A41,41,0,0,1,380.8,739.72Zm1035-193-39.33,68.12a26.71,26.71,0,0,0,0,26.61l39.33,68.12a26.68,26.68,0,0,0,23,13.31h78.66a26.69,26.69,0,0,0,23-13.31l39.33-68.12a26.72,26.72,0,0,0,0-26.61l-39.33-68.12a26.68,26.68,0,0,0-23-13.3h-78.66A26.67,26.67,0,0,0,1415.75,546.71ZM328.09,353.45,381,445q.42.74.81,1.47a40.93,40.93,0,0,0,34.52,19.07H522A40.94,40.94,0,0,0,555.53,448c.54-1.06,1.1-2.11,1.7-3.14l52.87-91.57c.56-1,1.16-1.95,1.77-2.9a40.92,40.92,0,0,0-1.61-37.68l-52.87-91.57A40.93,40.93,0,0,0,522,200.76H416.29a40.93,40.93,0,0,0-35.36,20.42l-52.86,91.57a40.81,40.81,0,0,0-.78,39.37C327.56,352.56,327.83,353,328.09,353.45Zm-78.54-120.2,22.24-38.52a14.78,14.78,0,0,0,0-14.7l-22.24-38.52a14.75,14.75,0,0,0-12.73-7.34H192.34a14.75,14.75,0,0,0-12.73,7.34L157.37,180a14.76,14.76,0,0,0,0,14.7l22.24,38.52a14.76,14.76,0,0,0,12.73,7.35h44.48A14.76,14.76,0,0,0,249.55,233.25ZM359.35,39.66a28.15,28.15,0,0,0,3.75,14.05l40.74,70.57a28.19,28.19,0,0,0,24.34,14h81.48a28.19,28.19,0,0,0,24.34-14l40.74-70.57a28.2,28.2,0,0,0,0-28.1L560,0H377.89L363.1,25.61A28.1,28.1,0,0,0,359.35,39.66ZM864.88,459.59,812,368a40.94,40.94,0,0,0-35.36-20.41H670.91A40.94,40.94,0,0,0,635.55,368l-52.87,91.57a41,41,0,0,0,0,40.83L635.55,592a41,41,0,0,0,35.36,20.42H776.65A41,41,0,0,0,812,592l52.87-91.57A40.94,40.94,0,0,0,864.88,459.59Zm-.35,294.9-52.87-91.57A41,41,0,0,0,776.3,642.5H670.57a41,41,0,0,0-35.36,20.42l-52.87,91.57a40.9,40.9,0,0,0,0,40.83l52.87,91.57a40.94,40.94,0,0,0,35.36,20.41H776.3a40.94,40.94,0,0,0,35.36-20.41l52.87-91.57A40.94,40.94,0,0,0,864.53,754.49ZM1264,679.66h-79a26.88,26.88,0,0,0-23.21,13.41l-39.51,68.43a26.87,26.87,0,0,0,0,26.8l39.51,68.44a26.87,26.87,0,0,0,23.21,13.4h79a26.87,26.87,0,0,0,23.21-13.4l39.51-68.44a26.88,26.88,0,0,0,0-26.8l-39.51-68.43A26.88,26.88,0,0,0,1264,679.66ZM577.37,185.43a40.9,40.9,0,0,0,5.45,20.42l52.87,91.57a40.94,40.94,0,0,0,35.36,20.41H776.79a40.93,40.93,0,0,0,34.52-19.06c.27-.5.53-1,.81-1.47L865,205.73c.26-.46.54-.9.81-1.35A40.93,40.93,0,0,0,865,165L812.15,73.45A41,41,0,0,0,776.79,53H671.05a41,41,0,0,0-35.36,20.42L582.82,165A40.83,40.83,0,0,0,577.37,185.43ZM902.1,618.24a17.51,17.51,0,0,0,0,17.49l30.64,53.08a17.55,17.55,0,0,0,15.15,8.74h61.29a17.54,17.54,0,0,0,15.15-8.74L1055,635.73a17.56,17.56,0,0,0,0-17.49l-30.65-53.08a17.53,17.53,0,0,0-15.15-8.75H947.89a17.54,17.54,0,0,0-15.15,8.75Zm164.8-397.82A40.94,40.94,0,0,0,1031.54,200H925.81a40.94,40.94,0,0,0-35.36,20.41L837.58,312a41,41,0,0,0,0,40.83l52.87,91.57a40.93,40.93,0,0,0,35.36,20.42h105.73a40.93,40.93,0,0,0,35.36-20.42l52.87-91.57a40.94,40.94,0,0,0,0-40.83ZM857.43,21.8a33.58,33.58,0,0,0,0,33.48l45.87,79.46a33.58,33.58,0,0,0,29,16.74H1024a33.58,33.58,0,0,0,29-16.74l45.87-79.46a33.58,33.58,0,0,0,0-33.48L1086.33,0H870ZM1219.8,502.62h27l13.49-23.37-13.49-23.36h-27l-13.48,23.36ZM1145.2,72.69l-52.87,91.57a41,41,0,0,0,0,40.84l52.87,91.56a40.93,40.93,0,0,0,35.36,20.42H1286.3a40.93,40.93,0,0,0,35.36-20.42l52.87-91.57a40.94,40.94,0,0,0,0-40.83l-52.87-91.57a40.94,40.94,0,0,0-35.36-20.41H1180.56A40.94,40.94,0,0,0,1145.2,72.69ZM47.74,740.05l52.87-91.57a40.94,40.94,0,0,0,0-40.83L47.74,516.08a41,41,0,0,0-35.36-20.42H0v264.8H12.38A40.94,40.94,0,0,0,47.74,740.05ZM46.15,448.19c.54-1.07,1.1-2.12,1.71-3.17l52.86-91.57q.78-1.33,1.62-2.64a41,41,0,0,0-1.59-37.74L47.88,221.5a40.94,40.94,0,0,0-35.36-20.41H0v264.8H12.52A41,41,0,0,0,46.15,448.19Zm243.5,423.32,46.14-79.92a33.86,33.86,0,0,0,0-33.76l-46.14-79.92A33.86,33.86,0,0,0,260.41,661H168.13a33.86,33.86,0,0,0-29.24,16.88L92.75,757.83a33.84,33.84,0,0,0,0,33.76l46.14,79.92a33.86,33.86,0,0,0,29.24,16.88h92.28A33.86,33.86,0,0,0,289.65,871.51Zm13-279.39,52.86-91.57a40.94,40.94,0,0,0,0-40.83l-52.86-91.57a41,41,0,0,0-35.37-20.41H161.54a40.94,40.94,0,0,0-35.36,20.41L73.31,459.72a41,41,0,0,0,0,40.83l52.87,91.57a41,41,0,0,0,35.36,20.42H267.27A41,41,0,0,0,302.64,592.12Z"/>',
'portrait' => '<path d="M474.33,70.16a36.83,36.83,0,0,1,0-36.71L493.65,0H731.49l19.32,33.45a36.84,36.84,0,0,1,0,36.71l-53.23,92.19A36.79,36.79,0,0,1,665.8,180.7H559.35a36.79,36.79,0,0,1-31.79-18.35ZM428.6,461.73l69.06,119.62c.37.64.72,1.28,1.07,1.92a53.45,53.45,0,0,0,45.09,24.91H682a53.49,53.49,0,0,0,43.76-22.89c.71-1.38,1.44-2.75,2.22-4.1L797,461.56c.75-1.28,1.53-2.53,2.32-3.77a53.49,53.49,0,0,0-2.1-49.24L728.14,288.93A53.49,53.49,0,0,0,682,262.26H543.82a53.49,53.49,0,0,0-46.19,26.67L428.57,408.55a53.36,53.36,0,0,0-1,51.44C427.9,460.57,428.26,461.14,428.6,461.73Zm-194-157a19.23,19.23,0,0,0,16.62,9.6h58.11A19.25,19.25,0,0,0,326,304.7l29.06-50.32a19.3,19.3,0,0,0,0-19.2L326,184.86a19.25,19.25,0,0,0-16.62-9.59H251.26a19.22,19.22,0,0,0-16.62,9.59l-29.06,50.32a19.28,19.28,0,0,0,0,19.2Zm-146,322.52a53.31,53.31,0,0,0,7.12,26.67l69.06,119.62A53.49,53.49,0,0,0,211,800.18H349.15a53.47,53.47,0,0,0,46.19-26.67l69.07-119.62a53.5,53.5,0,0,0,0-53.34L395.34,480.93a53.47,53.47,0,0,0-46.19-26.67H211a53.49,53.49,0,0,0-46.19,26.67L95.77,600.55A53.33,53.33,0,0,0,88.65,627.22ZM1180,176a43.86,43.86,0,0,0,37.88,21.87h119.85A43.87,43.87,0,0,0,1375.63,176l59.92-103.79a43.85,43.85,0,0,0,0-43.74L1419.11,0H1136.53l-16.44,28.48a43.87,43.87,0,0,0,0,43.74Zm395.84,450.06,17.62,30.52h35.24l17.62-30.52-17.62-30.52h-35.24Zm-156-384.82a53.28,53.28,0,0,0,7.12,26.67L1496,387.54a53.5,53.5,0,0,0,46.2,26.67h138.12a53.5,53.5,0,0,0,46.2-26.67l69.06-119.62a53.48,53.48,0,0,0,0-53.34L1726.54,95a53.5,53.5,0,0,0-46.2-26.67H1542.22A53.5,53.5,0,0,0,1496,95L1427,214.58A53.33,53.33,0,0,0,1419.84,241.25ZM761.36,268.91l69.07,119.62a53.49,53.49,0,0,0,46.19,26.67h138.13a53.48,53.48,0,0,0,45.09-24.91c.35-.64.7-1.29,1.07-1.92L1130,268.75c.34-.59.7-1.17,1-1.75a53.46,53.46,0,0,0-1-51.43L1060.94,96a53.49,53.49,0,0,0-46.19-26.67H876.62A53.49,53.49,0,0,0,830.43,96L761.36,215.57a53.51,53.51,0,0,0,0,53.34ZM131.43,793.79,62.37,674.17a53.5,53.5,0,0,0-46.2-26.67H0V993.42H16.17a53.5,53.5,0,0,0,46.2-26.67l69.06-119.62A53.48,53.48,0,0,0,131.43,793.79ZM60.28,585.49c.71-1.39,1.45-2.78,2.24-4.14l69.06-119.62c.68-1.17,1.39-2.32,2.11-3.45a53.52,53.52,0,0,0-2.08-49.3L62.55,289.36a53.5,53.5,0,0,0-46.2-26.67H0V608.61H16.35A53.48,53.48,0,0,0,60.28,585.49ZM1879.56,696.81a34.87,34.87,0,0,0-30.11,17.38l-51.38,89a34.87,34.87,0,0,0,0,34.76l51.38,89a34.87,34.87,0,0,0,30.11,17.38H1920V696.81ZM1462.8,407.57,1393.74,288a53.5,53.5,0,0,0-46.2-26.67H1209.42A53.47,53.47,0,0,0,1163.23,288l-69.07,119.62a53.51,53.51,0,0,0,0,53.34l69.07,119.62a53.47,53.47,0,0,0,46.19,26.67h138.12a53.5,53.5,0,0,0,46.2-26.67l69.06-119.62A53.48,53.48,0,0,0,1462.8,407.57Zm218.72,497.81a35.11,35.11,0,0,0-30.32-17.51H1548a35.13,35.13,0,0,0-30.33,17.51L1466,994.78a35.08,35.08,0,0,0,0,35l51.61,89.4A35.13,35.13,0,0,0,1548,1136.7H1651.2a35.11,35.11,0,0,0,30.32-17.51l51.61-89.4a35.08,35.08,0,0,0,0-35ZM1060.31,866a53.5,53.5,0,0,0-46.2-26.67H876A53.5,53.5,0,0,0,829.79,866L760.73,985.62a53.51,53.51,0,0,0,0,53.34l69.06,119.62a53.5,53.5,0,0,0,46.2,26.67h138.12a53.5,53.5,0,0,0,46.2-26.67L1129.37,1039a53.48,53.48,0,0,0,0-53.34Zm277.81-127.71a22.9,22.9,0,0,0-19.78-11.43h-80.07a22.91,22.91,0,0,0-19.79,11.43l-40,69.34a22.86,22.86,0,0,0,0,22.85l40,69.34a22.92,22.92,0,0,0,19.79,11.42h80.07a22.91,22.91,0,0,0,19.78-11.42l40-69.34a22.91,22.91,0,0,0,0-22.85ZM378.38,885.59a44.23,44.23,0,0,0-38.2-22.06H219.63a44.21,44.21,0,0,0-38.19,22.06L121.16,990a44.24,44.24,0,0,0,0,44.11l60.28,104.39a44.21,44.21,0,0,0,38.19,22.06H340.18a44.23,44.23,0,0,0,38.2-22.06l60.27-104.39a44.23,44.23,0,0,0,0-44.11Zm420.76-43A53.45,53.45,0,0,0,797,793.37L728,673.75a53.49,53.49,0,0,0-46.19-26.67H543.64a53.49,53.49,0,0,0-46.19,26.67L428.39,793.37a53.45,53.45,0,0,0,0,53.34l69.06,119.62A53.49,53.49,0,0,0,543.64,993H681.77a53.5,53.5,0,0,0,43.56-22.61c.69-1.34,1.39-2.67,2.15-4L796.54,846.8Q797.79,844.66,799.14,842.59Zm261.62-361.83a53.49,53.49,0,0,0-46.19-26.67H876.44a53.49,53.49,0,0,0-46.19,26.67L761.18,600.38a53.51,53.51,0,0,0,0,53.34l69.07,119.62A53.49,53.49,0,0,0,876.44,800h138.13a53.49,53.49,0,0,0,46.19-26.67l69.06-119.62a53.48,53.48,0,0,0,0-53.34Z"/>',
'square' => '<path d="M15.7,584.48H0V252.27H15.7a51.37,51.37,0,0,1,44.37,25.62l66.32,114.88a51.37,51.37,0,0,1,2,47.34c-.7,1.09-1.38,2.19-2,3.32L60,558.31c-.76,1.3-1.47,2.63-2.15,4A51.37,51.37,0,0,1,15.7,584.48ZM225.33,292.62a18.49,18.49,0,0,0,16,9.22h55.8a18.48,18.48,0,0,0,16-9.22L341,244.3a18.51,18.51,0,0,0,0-18.44l-27.9-48.33a18.49,18.49,0,0,0-16-9.21H241.3a18.5,18.5,0,0,0-16,9.21l-27.9,48.33a18.51,18.51,0,0,0,0,18.44ZM411.61,443.43,477.93,558.3c.35.61.69,1.23,1,1.85a51.38,51.38,0,0,0,43.31,23.92H654.91a51.36,51.36,0,0,0,42-22c.68-1.33,1.38-2.65,2.13-4L765.4,443.26c.71-1.23,1.46-2.43,2.22-3.62a51.34,51.34,0,0,0-2-47.28L699.28,277.48a51.39,51.39,0,0,0-44.37-25.62H522.26a51.37,51.37,0,0,0-44.36,25.62L411.58,392.36a51.28,51.28,0,0,0-1,49.39C410.94,442.31,411.28,442.86,411.61,443.43Zm951.94-211.74a51.2,51.2,0,0,0,6.84,25.61l66.32,114.88a51.38,51.38,0,0,0,44.37,25.61h132.65a51.36,51.36,0,0,0,44.36-25.61l66.32-114.88a51.36,51.36,0,0,0,0-51.22L1658.09,91.2a51.36,51.36,0,0,0-44.36-25.61H1481.08a51.38,51.38,0,0,0-44.37,25.61l-66.32,114.88A51.18,51.18,0,0,0,1363.55,231.69ZM85.13,602.35A51.24,51.24,0,0,0,92,628L158.3,742.84a51.37,51.37,0,0,0,44.36,25.62H335.31a51.37,51.37,0,0,0,44.36-25.62L446,628a51.38,51.38,0,0,0,0-51.23L379.67,461.86a51.38,51.38,0,0,0-44.36-25.61H202.66a51.38,51.38,0,0,0-44.36,25.61L92,576.74A51.23,51.23,0,0,0,85.13,602.35ZM506.64,155.91a35.36,35.36,0,0,0,30.53,17.62H639.4a35.36,35.36,0,0,0,30.53-17.62L721,67.38a35.33,35.33,0,0,0,0-35.25L702.49,0H474.08L455.53,32.13a35.33,35.33,0,0,0,0,35.25ZM1133.24,169a42.12,42.12,0,0,0,36.37,21h115.1a42.12,42.12,0,0,0,36.38-21l57.55-99.67a42.13,42.13,0,0,0,0-42L1362.85,0H1091.48l-15.79,27.35a42.13,42.13,0,0,0,0,42Zm380.15,432.22,16.92,29.31h33.84l16.92-29.31-16.92-29.31h-33.84Zm-782.21-343,66.33,114.87a51.37,51.37,0,0,0,44.36,25.62H974.52a51.38,51.38,0,0,0,43.31-23.92c.33-.62.67-1.24,1-1.85l66.33-114.88c.32-.56.67-1.12,1-1.68a51.32,51.32,0,0,0-1-49.39L1018.88,92.14a51.38,51.38,0,0,0-44.36-25.61H841.87a51.38,51.38,0,0,0-44.36,25.61L731.18,207a51.38,51.38,0,0,0,0,51.23ZM1018.71,461.7a51.38,51.38,0,0,0-44.37-25.61H841.69a51.36,51.36,0,0,0-44.36,25.61L731,576.58a51.38,51.38,0,0,0,0,51.23l66.32,114.87a51.37,51.37,0,0,0,44.36,25.62H974.34a51.39,51.39,0,0,0,44.37-25.62L1085,627.81a51.38,51.38,0,0,0,0-51.23Zm885,207.49H1805a33.46,33.46,0,0,0-28.91,16.69l-49.34,85.46a33.46,33.46,0,0,0,0,33.38l49.34,85.46A33.46,33.46,0,0,0,1805,906.87h98.68A33.26,33.26,0,0,0,1920,902.6V673.45A33.36,33.36,0,0,0,1903.72,669.19Zm-288.86,200.3a33.74,33.74,0,0,0-29.13-16.82H1486.6a33.71,33.71,0,0,0-29.12,16.82l-49.57,85.85a33.73,33.73,0,0,0,0,33.63l49.57,85.85a33.71,33.71,0,0,0,29.12,16.82h99.13a33.74,33.74,0,0,0,29.13-16.82L1664.42,989a33.71,33.71,0,0,0,0-33.63ZM126.22,762.32,59.89,647.45a51.37,51.37,0,0,0-44.36-25.62H0V954H15.53a51.38,51.38,0,0,0,44.36-25.61l66.33-114.88A51.38,51.38,0,0,0,126.22,762.32ZM1404.81,391.41l-66.33-114.88a51.36,51.36,0,0,0-44.36-25.61H1161.47a51.36,51.36,0,0,0-44.36,25.61l-66.33,114.88a51.38,51.38,0,0,0,0,51.23l66.33,114.87a51.37,51.37,0,0,0,44.36,25.62h132.65a51.37,51.37,0,0,0,44.36-25.62l66.33-114.88A51.36,51.36,0,0,0,1404.81,391.41ZM767.46,809.19a51.4,51.4,0,0,0-2-47.28L699.1,647a51.37,51.37,0,0,0-44.36-25.62H522.09A51.37,51.37,0,0,0,477.73,647L411.4,761.91a51.38,51.38,0,0,0,0,51.23L477.73,928a51.38,51.38,0,0,0,44.36,25.61H654.74a51.4,51.4,0,0,0,41.84-21.71c.65-1.29,1.33-2.56,2.06-3.82L765,813.23C765.76,811.85,766.59,810.51,767.46,809.19ZM1285.07,709a22,22,0,0,0-19-11h-76.89a22,22,0,0,0-19,11l-38.44,66.59a22,22,0,0,0,0,21.94l38.44,66.59a22,22,0,0,0,19,11h76.89a22,22,0,0,0,19-11l38.45-66.59a22,22,0,0,0,0-21.94ZM363.38,850.48a42.47,42.47,0,0,0-36.69-21.18H210.93a42.48,42.48,0,0,0-36.69,21.18L116.36,950.73a42.46,42.46,0,0,0,0,42.36l57.88,100.26a42.5,42.5,0,0,0,36.69,21.18H326.69a42.49,42.49,0,0,0,36.69-21.18l57.88-100.26a42.49,42.49,0,0,0,0-42.36Zm654.89-18.81a51.37,51.37,0,0,0-44.36-25.62H841.26a51.37,51.37,0,0,0-44.36,25.62L730.57,946.54a51.38,51.38,0,0,0,0,51.23l66.33,114.88a51.38,51.38,0,0,0,44.36,25.61H973.91a51.38,51.38,0,0,0,44.36-25.61l66.33-114.88a51.38,51.38,0,0,0,0-51.23Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Honeycomb();

View File

@@ -0,0 +1,78 @@
<?php
/**
* Background Mask Style - Layer Blob.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Layer_Blob
*
* @since 4.15.0
*/
class ET_Builder_Mask_Layer_Blob extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Layer Blob', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path fill-opacity=".2" d="M1563.9,270.35c-7.56-5.89-9.15-17.15-6.22-26.28a35.21,35.21,0,0,1,18.3-20.81c16.44-7.72,45.26-2.27,45.33,19.61,0,8.95-5,17.45-12.08,22.91s-16,8.12-24.94,8.93C1577.2,275.36,1569.52,274.73,1563.9,270.35ZM1920,0V257.8q-21.74-23.88-46.58-46.35c-120.07-108.24-330.64-127.15-434-2.82-96.83,116.49-72,311-190.33,405.5-66.33,53-157.62,56.81-240,77.14S837.37,767.76,837,852.64s81.93,132.7,138.57,181.23c77.74,66.61,100.39,114,97.62,217.68-2.07,77.73,4,141.69,64.37,188.45H0V0ZM915.94,473.16c-8.74,40.26,19.23,76.38,55,95.31,58.7,31,135.19,19.25,190.09-14.4,42.32-25.93,75.61-66.93,91.82-113.9,13.42-38.89,15.28-82.59.14-120.84s-48.51-70-88.78-78.42-86,9.39-106.06,45.29c-10.78,19.28-14,42.08-24.79,61.37a93.18,93.18,0,0,1-6.15,9.56c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88A77.22,77.22,0,0,0,915.94,473.16ZM671.61,699.81a46.88,46.88,0,0,0-4.68-9.31c-14-21.44-43.39-26.88-67.81-20.46-36.4,9.57-74.36,62.06-45.67,97.11,10.75,13.13,28.35,19.46,45.31,19.13C640.84,785.48,688.85,746.1,671.61,699.81Zm155.72,530.1a31.69,31.69,0,0,0-5.68-12,21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87C828.1,1244.28,829,1236.87,827.33,1229.91Zm55-5.49c-.16,13.52-6.35,24.62-3.77,38.73,2.7,14.81,14,26.78,24.74,33.67,24.08,15.5,50.53,14.89,67.84-1.57s24.92-48.25,19.54-81.53l.4,4c-4.06-28.83-18-58.52-36.83-78.55s-42.26-30-61.95-26.42c-15.39,2.81-29.32,16.25-28.48,38.3C864.79,1175.24,882.67,1200.67,882.38,1224.42Zm770.84,162.78c-37.63,19.33-80,37.33-123.65,52.8H1920V1159.48C1849.68,1253.37,1759.09,1332.79,1653.22,1387.2Z"/>
<path fill-opacity=".5" d="M1621.31,242.87c0,8.95-5,17.45-12.08,22.91s-16,8.12-24.94,8.93c-7.09.65-14.77,0-20.39-4.36-7.56-5.89-9.15-17.15-6.22-26.28a35.21,35.21,0,0,1,18.3-20.81C1592.42,215.54,1621.24,221,1621.31,242.87ZM1920,1440V1294.47A788.66,788.66,0,0,1,1717.55,1440ZM1920,0V170.18c-76-67.47-182.35-105.59-280.83-103.24-78.3,1.86-151.64,29.29-200.84,87.89-104.16,124-70.95,336.48-199.66,436-72.12,55.74-173.36,57.31-264.26,77.07S785.94,746.2,788,838.59s94.77,146.81,159,201.26c88.23,74.75,114.73,126.94,114.64,239.78,0,61.6,4.5,115.36,33.4,160.37H0V0ZM971.63,583.69c60.69,33.94,139.29,22,195.48-13.77,43.31-27.54,77.19-71.38,93.44-121.8,13.46-41.75,15-88.79-1-130.11s-50.56-75.82-92.07-85.25-88.39,9.32-108.73,47.79c-10.92,20.67-14,45.18-25,65.85a100.26,100.26,0,0,1-6.58,10.73c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C902.19,519.33,932.49,561.8,971.63,583.69ZM597.7,793.78c50.52-1.65,107.52-46.59,86-98.11A51.27,51.27,0,0,0,678,685.33c-17.16-23.75-52.56-29.32-81.78-21.69C552.63,675,507.91,734.45,543,773.17,556.09,787.68,577.33,794.45,597.7,793.78Zm229.63,436.13a31.69,31.69,0,0,0-5.68-12,21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87C828.1,1244.28,829,1236.87,827.33,1229.91Zm71.37,80.61c27.74,18.17,58.48,17.74,78.85-1.11s29.72-55.5,24-94l.4,4.66c-4.26-33.37-20-67.83-41.55-91.18s-48.64-35.15-71.57-31.19c-17.93,3.09-34.33,18.48-33.7,44,.68,27.94,21.06,57.52,20.35,85-.4,15.64-7.77,28.4-5,44.74C873.38,1288.48,886.37,1302.44,898.7,1310.52Z"/>
<path d="M1621.31,242.87c0,8.95-5,17.45-12.08,22.91s-16,8.12-24.94,8.93c-7.09.65-14.77,0-20.39-4.36-7.56-5.89-9.15-17.15-6.22-26.28a35.21,35.21,0,0,1,18.3-20.81C1592.42,215.54,1621.24,221,1621.31,242.87ZM1920,1440V1294.47A788.66,788.66,0,0,1,1717.55,1440Zm-875.71-160.37c0,61.6,4.49,115.36,33.39,160.37H0V0H1920V170.18c-76-67.47-182.35-105.59-280.83-103.24-84.73-2-165.38,25-218.2,87.89-104.15,124-71,336.48-199.66,436-72.12,55.74-173.36,57.31-264.26,77.07S768.59,746.2,770.59,838.59s94.78,146.81,159,201.26C1017.87,1114.6,1044.37,1166.79,1044.29,1279.63ZM971.63,583.69c60.69,33.94,139.29,22,195.48-13.77,43.31-27.54,77.19-71.38,93.44-121.8,13.46-41.75,15-88.79-1-130.11s-50.56-75.82-92.07-85.25-88.39,9.32-108.73,47.79c-10.92,20.67-14,45.18-25,65.85a100.26,100.26,0,0,1-6.58,10.73c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C902.19,519.33,932.49,561.8,971.63,583.69ZM702.31,705.78a67.79,67.79,0,0,0-3.6-14c-12.48-33-49.34-48-82.88-45.38-50,3.91-113.57,66.46-85.57,122,10.48,20.79,31.72,34,53.92,37.84C639.22,815.79,712.36,773.84,702.31,705.78Zm125,524.13a31.69,31.69,0,0,0-5.68-12,21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87C828.1,1244.28,829,1236.87,827.33,1229.91Zm177.9-18.29.32,5c-3.89-35.78-20.87-72.39-44.93-96.88s-54.72-36.37-81.13-31.44c-20.65,3.86-39.9,20.9-39.94,48.32,0,30,22.44,61.26,20.81,90.81-.92,16.84-9.74,30.79-7.05,48.29,2.82,18.36,17.3,33,31.19,41.32,31.26,18.73,66.52,17.35,90.44-3.53S1010.66,1252.9,1005.23,1211.62Z"/>',
'portrait' => '<path fill-opacity=".2" d="M1701,1001.36c-10.23-8-12.37-23.19-8.41-35.53a47.59,47.59,0,0,1,24.75-28.16c22.23-10.44,61.2-3.07,61.3,26.52,0,12.11-6.76,23.61-16.34,31s-21.68,11-33.73,12.07C1719,1008.14,1708.6,1007.28,1701,1001.36ZM1920,0V816.64c-141.15-36-295.51-9.19-387.3,101.25-131,157.55-97.32,420.59-257.41,548.41-89.71,71.62-213.17,76.83-324.61,104.33S718.43,1674.07,717.9,1788.87c-.54,114.62,110.8,179.46,187.4,245.09,105.14,90.09,135.77,154.12,132,294.41-2.47,92.77,3.63,171.05,61.23,231.63H0V0ZM824.69,1275.65c-11.83,54.45,26,103.3,74.46,128.9,79.38,42,182.83,26,257.08-19.47,57.23-35.07,102.26-90.52,124.17-154,18.15-52.59,20.66-111.69.19-163.42s-65.6-94.68-120.07-106.06-116.27,12.69-143.43,61.25c-14.59,26.08-19,56.9-33.53,83a127.75,127.75,0,0,1-8.31,12.94c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21A104.38,104.38,0,0,0,824.69,1275.65ZM494.25,1582.17a63.9,63.9,0,0,0-6.32-12.59c-18.93-29-58.69-36.35-91.71-27.67-49.23,12.94-100.58,83.94-61.77,131.33,14.54,17.76,38.34,26.32,61.28,25.88C452.63,1698,517.57,1644.78,494.25,1582.17Zm210.6,716.92a42.9,42.9,0,0,0-7.68-16.25,28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18C705.9,2318.54,707.06,2308.51,704.85,2299.09Zm221-21.89.54,5.45c-5.48-39-24.3-79.14-49.8-106.23s-57.16-40.6-83.78-35.73c-20.82,3.8-39.65,22-38.52,51.8,1.24,32.67,25.42,67.06,25,99.17-.22,18.3-8.59,33.3-5.1,52.39,3.65,20,19,36.22,33.46,45.54,32.57,21,68.34,20.13,91.75-2.13S933.12,2322.21,925.83,2277.2ZM1715.91,2560H1920V2454a999.53,999.53,0,0,1-98.2,57.8C1788.77,2528.79,1753.06,2545,1715.91,2560Z"/>
<path fill-opacity=".5" d="M1778.65,964.19c0,12.11-6.76,23.61-16.34,31s-21.68,11-33.73,12.07c-9.59.88-20,0-27.57-5.9-10.23-8-12.37-23.19-8.41-35.53a47.59,47.59,0,0,1,24.75-28.16C1739.58,927.23,1778.55,934.6,1778.65,964.19ZM1920,0V736.93a530.62,530.62,0,0,0-117.2-10.67c-105.89,2.52-205.08,39.62-271.62,118.87-140.86,167.74-96,455.06-270,589.61-97.53,75.38-234.45,77.51-357.39,104.23s-254.88,105.94-252.17,230.89c2.7,124.76,128.18,198.55,215.11,272.2,119.32,101.09,155.16,171.68,155,324.28,0,73,4.66,137.79,32.07,193.66H0V0ZM900,1425.13c82.08,45.9,188.38,29.7,264.38-18.62,58.56-37.24,104.4-96.53,126.37-164.73,18.2-56.46,20.24-120.08-1.3-176s-68.38-102.55-124.52-115.29-119.54,12.6-147,64.63c-14.78,27.95-19,61.1-33.74,89.06a137.3,137.3,0,0,1-8.9,14.51c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C806.1,1338.09,847.07,1395.53,900,1425.13ZM394.29,1709.27c68.32-2.24,145.42-63,116.37-132.7a69.28,69.28,0,0,0-7.81-14c-23.2-32.13-71.08-39.65-110.6-29.34-58.9,15.37-119.38,95.76-72,148.13C338,1701,366.74,1710.17,394.29,1709.27Zm310.56,589.82a42.9,42.9,0,0,0-7.68-16.25,28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18C705.9,2318.54,707.06,2308.51,704.85,2299.09Zm96.52,109c37.52,24.58,79.09,24,106.64-1.49s40.2-75.07,32.45-127.18l.54,6.31c-5.76-45.13-27-91.73-56.2-123.32S819,2114.9,788,2120.25c-24.25,4.18-46.42,25-45.58,59.47.93,37.78,28.48,77.78,27.53,114.9-.55,21.15-10.51,38.4-6.76,60.51C767.14,2378.31,784.7,2397.19,801.37,2408.11Z"/>
<path d="M1778.65,964.19c0,12.11-6.76,23.61-16.34,31s-21.68,11-33.73,12.07c-9.59.88-20,0-27.57-5.9-10.23-8-12.37-23.19-8.41-35.53a47.59,47.59,0,0,1,24.75-28.16C1739.58,927.23,1778.55,934.6,1778.65,964.19ZM998.27,2366.34c-.06,73,4.65,137.79,32.07,193.66H0V0H1920V736.93a530.62,530.62,0,0,0-117.2-10.67c-114.59-2.71-223.66,33.79-295.1,118.87-140.85,167.74-96,455.06-270,589.61-97.54,75.38-234.46,77.51-357.39,104.23s-254.88,105.94-252.18,230.89c2.7,124.76,128.18,198.55,215.11,272.2C962.54,2143.15,998.39,2213.74,998.27,2366.34ZM900,1425.13c82.08,45.9,188.38,29.7,264.38-18.62,58.56-37.24,104.4-96.53,126.37-164.73,18.2-56.46,20.24-120.08-1.3-176s-68.38-102.55-124.52-115.29-119.54,12.6-147,64.63c-14.78,27.95-19,61.1-33.74,89.06a137.3,137.3,0,0,1-8.9,14.51c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C806.1,1338.09,847.07,1395.53,900,1425.13ZM535.77,1590.25a91.53,91.53,0,0,0-4.87-18.92c-16.88-44.69-66.73-64.92-112.09-61.37-67.63,5.29-153.59,89.89-115.73,164.94,14.18,28.12,42.9,45.94,72.93,51.17C450.45,1739,549.36,1682.29,535.77,1590.25Zm169.08,708.84a42.9,42.9,0,0,0-7.68-16.25,28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18C705.9,2318.54,707.06,2308.51,704.85,2299.09Zm240.6-24.74.43,6.77c-5.26-48.39-28.22-97.9-60.77-131s-74-49.19-109.72-42.52c-27.92,5.22-54,28.27-54,65.35,0,40.63,30.35,82.85,28.15,122.82-1.25,22.77-13.18,41.63-9.54,65.3,3.83,24.83,23.4,44.63,42.19,55.88,42.28,25.33,90,23.47,122.31-4.77S952.79,2330.19,945.45,2274.35Z"/>',
'square' => '<path fill-opacity=".2" d="M1787.6,508.31c-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12c19.84-9.32,54.62-2.74,54.71,23.66,0,10.81-6,21.08-14.59,27.66s-19.34,9.8-30.09,10.78C1803.65,514.35,1794.38,513.59,1787.6,508.31ZM1920,0V332.19c-106.89-11-214.22,19.33-282.61,101.62-116.87,140.61-86.85,375.36-229.73,489.44-80.06,63.91-190.24,68.56-289.69,93.1s-207.28,92.32-207.75,194.77c-.48,102.29,98.88,160.16,167.25,218.74,93.83,80.4,121.16,137.54,117.83,262.74-2.5,93.78,4.83,171,77.62,227.4H0V0ZM1005.52,753.09c-10.55,48.6,23.21,92.2,66.45,115,70.85,37.44,163.17,23.23,229.44-17.38,51.07-31.31,91.26-80.79,110.82-137.48,16.2-46.94,18.44-99.69.16-145.85s-58.55-84.5-107.15-94.65-103.77,11.32-128,54.66c-13,23.27-16.91,50.78-29.92,74.07a115.11,115.11,0,0,1-7.42,11.54c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24A93.48,93.48,0,0,0,1005.52,753.09Zm-294.9,273.56a56.48,56.48,0,0,0-5.65-11.23c-16.88-25.88-52.37-32.45-81.84-24.7-43.93,11.55-89.76,74.91-55.13,117.21,13,15.85,34.22,23.49,54.7,23.1C673.48,1130.06,731.43,1082.53,710.62,1026.65Zm188,639.83a38.29,38.29,0,0,0-6.85-14.51,25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72c-2.68,6.17-2.84,13.57.31,19.51,3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1C899.5,1683.83,900.55,1674.88,898.57,1666.48Zm197.22-19.54.48,4.86c-4.89-34.8-21.69-70.63-44.44-94.81s-51-36.23-74.78-31.89c-18.58,3.4-35.39,19.62-34.38,46.23,1.11,29.17,22.69,59.85,22.35,88.52-.2,16.33-7.67,29.71-4.56,46.75,3.26,17.87,16.95,32.32,29.86,40.64,29.07,18.71,61,18,81.88-1.9S1102.29,1687.11,1095.79,1646.94ZM1746.31,1920H1920v-76.82q-12.18,6.75-24.6,13.14C1850,1879.64,1799,1901.34,1746.31,1920Z"/>
<path fill-opacity=".5" d="M1856.89,475.13c0,10.81-6,21.08-14.59,27.66s-19.34,9.8-30.09,10.78c-8.56.78-17.83,0-24.61-5.26-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12C1822,442.15,1856.8,448.73,1856.89,475.13ZM1920,0V263.76c-13.93-1-27.81-1.3-41.56-1-94.5,2.25-183,35.36-242.41,106.08-125.71,149.71-85.63,406.13-241,526.2-87,67.28-209.24,69.18-319,93s-227.47,94.55-225,206.06c2.4,111.34,114.39,177.19,192,242.92,106.49,90.22,138.48,153.22,138.37,289.41-.05,74.32,5.43,139.2,40.28,193.51H0V0ZM932.11,1559.94c.83,33.72,25.42,69.42,24.57,102.55-.49,18.87-9.38,34.27-6,54,3.51,20.69,19.18,37.54,34.06,47.29,33.48,21.93,70.59,21.41,95.17-1.34s35.88-67,29-113.49l.48,5.62c-5.14-40.27-24.09-81.86-50.15-110s-58.7-42.42-86.39-37.65C951.15,1510.59,931.36,1529.17,932.11,1559.94ZM725.26,1021.66a62.07,62.07,0,0,0-7-12.48c-20.72-28.67-63.45-35.38-98.71-26.18C567,996.72,513,1068.47,555.34,1115.2c15.85,17.51,41.48,25.68,66.07,24.88C682.38,1138.08,751.19,1083.84,725.26,1021.66Zm128.08,655.57c3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1,7.12-5.06,8.17-14,6.19-22.41a38.29,38.29,0,0,0-6.85-14.51,25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72C850.35,1663.89,850.19,1671.29,853.34,1677.23Zm567-1111.4c-19.23-49.88-61-91.52-111.13-102.89s-106.68,11.24-131.23,57.68c-13.18,25-16.94,54.53-30.11,79.48a121.81,121.81,0,0,1-7.94,12.95c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24a93.48,93.48,0,0,0-5.16,16.24c-16.59,55.73,20,107,67.22,133.41,73.25,41,168.12,26.51,235.94-16.62,52.27-33.23,93.17-86.15,112.78-147C1437.7,672.48,1439.53,615.71,1420.3,565.83Z"/>
<path d="M1856.89,475.13c0,10.81-6,21.08-14.59,27.66s-19.34,9.8-30.09,10.78c-8.56.78-17.83,0-24.61-5.26-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12C1822,442.15,1856.8,448.73,1856.89,475.13ZM1160.43,1726.49c0,74.32,5.43,139.2,40.28,193.51H0V0H1920V263.76c-13.93-1-27.81-1.3-41.56-1-102.27-2.42-199.6,30.16-263.36,106.08-125.71,149.71-85.63,406.13-241,526.2-87,67.28-209.24,69.18-319,93s-227.47,94.55-225.05,206.06c2.4,111.34,114.39,177.19,192,242.92C1128.55,1527.3,1160.54,1590.3,1160.43,1726.49Zm-87.69-840c73.25,41,168.12,26.51,235.94-16.62,52.27-33.23,93.17-86.15,112.78-147,16.24-50.39,18.07-107.16-1.16-157s-61-91.52-111.13-102.89-106.68,11.24-131.23,57.68c-13.18,25-16.94,54.53-30.11,79.48a121.81,121.81,0,0,1-7.94,12.95c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24a93.48,93.48,0,0,0-5.16,16.24C988.93,808.82,1025.5,860.08,1072.74,886.5ZM747.67,1033.86a81.7,81.7,0,0,0-4.34-16.88c-15.07-39.89-59.55-57.94-100-54.77-60.35,4.72-137.07,80.22-103.28,147.2,12.66,25.09,38.29,41,65.08,45.67C671.53,1166.65,759.81,1116,747.67,1033.86Zm150.9,632.62a38.29,38.29,0,0,0-6.85-14.51,25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72c-2.68,6.17-2.84,13.57.31,19.51,3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1C899.5,1683.83,900.55,1674.88,898.57,1666.48Zm214.72-22.08.39,6c-4.69-43.19-25.19-87.38-54.23-116.94s-66.05-43.9-97.93-37.94c-24.92,4.65-48.16,25.23-48.2,58.32-.05,36.26,27.08,73.94,25.12,109.61-1.12,20.32-11.76,37.15-8.51,58.28,3.41,22.16,20.88,39.83,37.64,49.87,37.74,22.61,80.3,20.95,109.16-4.26S1119.85,1694.23,1113.29,1644.4Z"/>',
),
'default-inverted' => array(
'landscape' => '<path fill-opacity=".2" d="M827.33,1229.91c1.64,7,.77,14.37-5.13,18.57-5.28,3.75-12.56,3.06-18.65.87-5.55-2-10.94-5.32-13.7-10.53a19,19,0,0,1-.25-16.16,21.92,21.92,0,0,1,10-10.48c4.14-2.15,7.54-2.84,12.11-1.32a21.33,21.33,0,0,1,9.9,7A31.69,31.69,0,0,1,827.33,1229.91ZM1920,170.18V1294.47A788.66,788.66,0,0,1,1717.55,1440H1077.68c-28.9-45-33.44-98.77-33.39-160.37.08-112.84-26.42-165-114.65-239.78-64.27-54.45-157.06-109-159-201.26s95.56-151,186.46-170.73,192.14-21.33,264.26-77.07c128.71-99.48,95.51-311.93,199.66-436,52.82-62.91,133.47-89.9,218.2-87.89C1737.65,64.59,1844,102.71,1920,170.18Zm-298.69,72.69c-.07-21.88-28.89-27.33-45.33-19.61a35.21,35.21,0,0,0-18.3,20.81c-2.93,9.13-1.34,20.39,6.22,26.28,5.62,4.38,13.3,5,20.39,4.36,8.91-.81,17.85-3.47,24.94-8.93S1621.34,251.82,1621.31,242.87ZM698.71,691.79c-12.48-33-49.34-48-82.88-45.38-50,3.91-113.57,66.47-85.57,122,10.48,20.79,31.72,34,53.92,37.84,55,9.58,128.18-32.37,118.13-100.43A67.79,67.79,0,0,0,698.71,691.79Zm272.92-108.1c60.69,33.94,139.29,22,195.48-13.77,43.31-27.54,77.19-71.38,93.44-121.8,13.46-41.75,15-88.79-1-130.11s-50.56-75.82-92.07-85.25-88.39,9.32-108.73,47.79c-10.92,20.67-14,45.18-25,65.85a100.26,100.26,0,0,1-6.58,10.73c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C902.19,519.33,932.49,561.8,971.63,583.69Zm33.92,632.93c-3.89-35.78-20.87-72.39-44.93-96.88s-54.72-36.37-81.13-31.44c-20.65,3.86-39.9,20.9-39.94,48.32,0,30,22.44,61.26,20.81,90.81-.92,16.84-9.74,30.79-7.05,48.29,2.82,18.36,17.3,33,31.19,41.32,31.26,18.73,66.52,17.35,90.44-3.53s35.72-60.61,30.29-101.89Z"/>
<path fill-opacity=".5" d="M915.94,473.16a77.22,77.22,0,0,1,4.27-13.46c9.82-23.41,32.87-40.4,52.72-54.88,19.54-14.24,40.25-28.36,54.33-47.69a93.18,93.18,0,0,0,6.15-9.56c10.78-19.29,14-42.09,24.79-61.37,20.09-35.9,65.79-53.7,106.06-45.29s73.64,40.17,88.78,78.42,13.28,81.95-.14,120.84c-16.21,47-49.5,88-91.82,113.9-54.9,33.65-131.39,45.43-190.09,14.4C935.17,549.54,907.2,513.42,915.94,473.16Zm-94.29,744.73a21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87,5.9-4.2,6.77-11.61,5.13-18.57A31.69,31.69,0,0,0,821.65,1217.89ZM1920,170.18V1294.47A788.66,788.66,0,0,1,1717.55,1440H1095c-28.9-45-33.44-98.77-33.4-160.37.09-112.84-26.41-165-114.64-239.78-64.28-54.45-157.06-109-159-201.26s95.56-151,186.46-170.73,192.14-21.33,264.26-77.07c128.71-99.48,95.5-311.93,199.66-436,49.2-58.6,122.54-86,200.84-87.89C1737.65,64.59,1844,102.71,1920,170.18Zm-344,53.08a35.21,35.21,0,0,0-18.3,20.81c-2.93,9.13-1.34,20.39,6.22,26.28,5.62,4.38,13.3,5,20.39,4.36,8.91-.81,17.85-3.47,24.94-8.93s12.11-14,12.08-22.91C1621.24,221,1592.42,215.54,1576,223.26Zm-574,996.78c-4.26-33.37-20-67.83-41.55-91.18s-48.64-35.15-71.57-31.19c-17.93,3.09-34.33,18.48-33.7,44,.68,27.94,21.06,57.52,20.35,85-.4,15.64-7.77,28.4-5,44.74,2.9,17.14,15.89,31.1,28.22,39.18,27.74,18.17,58.48,17.74,78.85-1.11s29.72-55.5,24-94ZM678,685.33c-17.16-23.75-52.56-29.32-81.78-21.69C552.63,675,507.91,734.45,543,773.17c13.13,14.51,34.37,21.28,54.74,20.61,50.52-1.65,107.52-46.59,86-98.11A51.27,51.27,0,0,0,678,685.33Z"/>
<path d="M671.61,699.81c17.24,46.29-30.77,85.67-72.85,86.47-17,.33-34.56-6-45.31-19.13-28.69-35,9.27-87.54,45.67-97.11,24.42-6.42,53.82-1,67.81,20.46A46.88,46.88,0,0,1,671.61,699.81ZM971,568.47c58.7,31,135.19,19.25,190.09-14.4,42.32-25.93,75.61-66.93,91.82-113.9,13.42-38.89,15.28-82.59.14-120.84s-48.51-70-88.78-78.42-86,9.39-106.06,45.29c-10.78,19.28-14,42.08-24.79,61.37a93.18,93.18,0,0,1-6.15,9.56c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C907.2,513.42,935.17,549.54,971,568.47ZM821.65,1217.89a21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87,5.9-4.2,6.77-11.61,5.13-18.57A31.69,31.69,0,0,0,821.65,1217.89ZM1920,257.8v901.68c-70.32,93.89-160.91,173.31-266.78,227.72-37.63,19.33-80,37.33-123.65,52.8h-392c-60.36-46.76-66.44-110.72-64.37-188.45,2.77-103.72-19.88-151.07-97.62-217.68-56.64-48.53-139-96.48-138.57-181.23s89.72-141,172.12-161.37,173.69-24.18,240-77.14c118.38-94.51,93.5-289,190.33-405.5,103.33-124.33,313.9-105.42,434,2.82Q1898.3,233.88,1920,257.8Zm-298.69-14.93c-.07-21.88-28.89-27.33-45.33-19.61a35.21,35.21,0,0,0-18.3,20.81c-2.93,9.13-1.34,20.39,6.22,26.28,5.62,4.38,13.3,5,20.39,4.36,8.91-.81,17.85-3.47,24.94-8.93S1621.34,251.82,1621.31,242.87ZM991.13,1217.75c-4.06-28.83-18-58.52-36.83-78.55s-42.26-30-61.95-26.42c-15.39,2.81-29.32,16.25-28.48,38.3.92,24.16,18.8,49.59,18.51,73.34-.16,13.52-6.35,24.62-3.77,38.73,2.7,14.81,14,26.78,24.74,33.67,24.08,15.5,50.53,14.89,67.84-1.57s24.92-48.25,19.54-81.53Z"/>',
'portrait' => '<path fill-opacity=".2" d="M704.85,2299.09c2.21,9.42,1,19.45-6.94,25.12-7.14,5.07-17,4.13-25.22,1.18-7.51-2.69-14.8-7.2-18.52-14.24-3.53-6.67-3.35-15-.34-21.86a29.54,29.54,0,0,1,13.57-14.17c5.6-2.91,10.2-3.84,16.38-1.79a28.82,28.82,0,0,1,13.39,9.51A42.9,42.9,0,0,1,704.85,2299.09ZM1920,736.93V2560H1030.34c-27.42-55.87-32.13-120.7-32.07-193.66.12-152.6-35.73-223.19-155-324.28-86.93-73.65-212.41-147.44-215.11-272.2-2.7-124.95,129.24-204.16,252.18-230.89s259.85-28.85,357.39-104.23c174.07-134.55,129.17-421.87,270-589.61,71.44-85.08,180.51-121.58,295.1-118.87A530.62,530.62,0,0,1,1920,736.93ZM1778.65,964.19c-.1-29.59-39.07-37-61.3-26.52a47.59,47.59,0,0,0-24.75,28.16c-4,12.34-1.82,27.57,8.41,35.53,7.59,5.92,18,6.78,27.57,5.9,12.05-1.09,24.14-4.69,33.73-12.07S1778.7,976.3,1778.65,964.19ZM530.9,1571.33c-16.88-44.69-66.73-64.92-112.09-61.37-67.63,5.29-153.59,89.89-115.73,164.94,14.18,28.12,42.9,45.94,72.93,51.17,74.44,13,173.35-43.78,159.76-135.82A91.53,91.53,0,0,0,530.9,1571.33ZM900,1425.13c82.08,45.9,188.38,29.7,264.38-18.62,58.56-37.24,104.4-96.53,126.37-164.73,18.2-56.46,20.24-120.08-1.3-176s-68.38-102.55-124.52-115.29-119.54,12.6-147,64.63c-14.78,27.95-19,61.1-33.74,89.06a137.3,137.3,0,0,1-8.9,14.51c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C806.1,1338.09,847.07,1395.53,900,1425.13Zm45.88,856c-5.26-48.39-28.22-97.9-60.77-131s-74-49.19-109.72-42.52c-27.92,5.22-54,28.27-54,65.35,0,40.63,30.35,82.85,28.15,122.82-1.25,22.77-13.18,41.63-9.54,65.3,3.83,24.83,23.4,44.63,42.19,55.88,42.28,25.33,90,23.47,122.31-4.77s48.31-82,41-137.81Z"/>
<path fill-opacity=".5" d="M824.69,1275.65a104.38,104.38,0,0,1,5.78-18.21c13.28-31.66,44.45-54.64,71.3-74.21,26.43-19.27,54.43-38.36,73.48-64.5a127.75,127.75,0,0,0,8.31-12.94c14.58-26.09,18.94-56.91,33.53-83,27.16-48.56,89-72.62,143.43-61.25s99.59,54.33,120.07,106.06,18,110.83-.19,163.42c-21.91,63.53-66.94,119-124.17,154-74.25,45.51-177.7,61.43-257.08,19.47C850.7,1379,812.86,1330.1,824.69,1275.65ZM697.17,2282.84a28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18,8-5.67,9.15-15.7,6.94-25.12A42.9,42.9,0,0,0,697.17,2282.84ZM1920,736.93V2560H1053.81c-27.41-55.87-32.12-120.7-32.07-193.66.12-152.6-35.72-223.19-155-324.28-86.93-73.65-212.41-147.44-215.11-272.2C648.88,1644.91,780.83,1565.7,903.76,1539s259.86-28.85,357.39-104.23c174.08-134.55,129.17-421.87,270-589.61,66.54-79.25,165.73-116.35,271.62-118.87A530.62,530.62,0,0,1,1920,736.93Zm-191.42,270.33c12.05-1.09,24.14-4.69,33.73-12.07s16.39-18.89,16.34-31c-.1-29.59-39.07-37-61.3-26.52a47.59,47.59,0,0,0-24.75,28.16c-4,12.34-1.82,27.57,8.41,35.53C1708.6,1007.28,1719,1008.14,1728.58,1007.26ZM941,2285.75c-5.76-45.13-27-91.73-56.2-123.32S819,2114.9,788,2120.25c-24.25,4.18-46.42,25-45.58,59.47.93,37.78,28.48,77.78,27.53,114.9-.55,21.15-10.51,38.4-6.76,60.51,3.94,23.18,21.5,42.06,38.17,53,37.52,24.58,79.09,24,106.64-1.49s40.2-75.07,32.45-127.18ZM502.85,1562.6c-23.2-32.13-71.08-39.65-110.6-29.34-58.9,15.37-119.38,95.76-72,148.13,17.76,19.62,46.48,28.78,74,27.88,68.32-2.24,145.42-63,116.37-132.7A69.28,69.28,0,0,0,502.85,1562.6Z"/>
<path d="M925.83,2277.2c7.29,45-3,88-26.42,110.26s-59.18,23.09-91.75,2.13c-14.47-9.32-29.81-25.51-33.46-45.54-3.49-19.09,4.88-34.09,5.1-52.39.39-32.11-23.79-66.5-25-99.17-1.13-29.82,17.7-48,38.52-51.8,26.62-4.87,58.29,8.63,83.78,35.73s44.32,67.24,49.8,106.23Zm-437.9-707.62c-18.93-29-58.69-36.35-91.71-27.67-49.23,12.94-100.58,83.94-61.77,131.33,14.54,17.76,38.34,26.32,61.28,25.88,56.9-1.09,121.84-54.34,98.52-116.95A63.9,63.9,0,0,0,487.93,1569.58Zm411.22-165c79.38,42,182.83,26,257.08-19.47,57.23-35.08,102.26-90.52,124.17-154,18.15-52.59,20.66-111.69.19-163.42s-65.6-94.68-120.07-106.06-116.27,12.69-143.43,61.25c-14.59,26.08-19,56.9-33.53,83a127.75,127.75,0,0,1-8.31,12.94c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C812.86,1330.1,850.7,1379,899.15,1404.55ZM1920,816.64V2454a999.53,999.53,0,0,1-98.2,57.8c-33,17-68.74,33.18-105.89,48.19H1098.56c-57.6-60.58-63.7-138.86-61.23-231.63,3.74-140.29-26.89-204.32-132-294.41-76.6-65.63-187.94-130.47-187.4-245.09.53-114.8,121.34-190.75,232.78-218.24s234.9-32.71,324.61-104.33c160.09-127.82,126.45-390.86,257.41-548.41C1624.49,807.45,1778.85,780.59,1920,816.64ZM1778.65,964.19c-.1-29.59-39.07-37-61.3-26.52a47.59,47.59,0,0,0-24.75,28.16c-4,12.34-1.82,27.57,8.41,35.53,7.59,5.92,18,6.78,27.57,5.9,12.05-1.09,24.14-4.69,33.73-12.07S1778.7,976.3,1778.65,964.19ZM697.17,2282.84a28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18,8-5.67,9.15-15.7,6.94-25.12A42.9,42.9,0,0,0,697.17,2282.84Z"/>',
'square' => '<path fill-opacity=".2" d="M898.57,1666.48c2,8.4.93,17.35-6.19,22.41-6.37,4.53-15.15,3.69-22.51,1-6.7-2.4-13.21-6.42-16.53-12.71-3.15-5.94-3-13.34-.31-19.51a26.44,26.44,0,0,1,12.11-12.64c5-2.59,9.11-3.42,14.63-1.6a25.79,25.79,0,0,1,12,8.49A38.29,38.29,0,0,1,898.57,1666.48ZM1920,263.76V1920H1200.71c-34.85-54.31-40.33-119.19-40.28-193.51.11-136.19-31.88-199.19-138.37-289.41-77.58-65.73-189.57-131.58-192-242.92C827.67,1082.65,945.43,1012,1055.14,988.1s231.91-25.75,319-93c155.35-120.07,115.27-376.49,241-526.2,63.76-75.92,161.09-108.5,263.36-106.08C1892.19,262.46,1906.07,262.8,1920,263.76Zm-63.11,211.37c-.09-26.4-34.87-33-54.71-23.66a42.41,42.41,0,0,0-22.08,25.12c-3.54,11-1.63,24.61,7.5,31.72,6.78,5.28,16.05,6,24.61,5.26,10.75-1,21.54-4.19,30.09-10.78S1856.93,485.94,1856.89,475.13ZM743.33,1017c-15.07-39.89-59.55-57.94-100-54.77-60.35,4.72-137.07,80.22-103.28,147.2,12.66,25.09,38.29,41,65.08,45.67,66.44,11.57,154.72-39.07,142.58-121.22A81.7,81.7,0,0,0,743.33,1017ZM1072.74,886.5c73.25,41,168.12,26.51,235.94-16.62,52.27-33.23,93.17-86.15,112.78-147,16.24-50.39,18.07-107.16-1.16-157s-61-91.52-111.13-102.89-106.68,11.24-131.23,57.68c-13.18,25-16.94,54.53-30.11,79.48a121.81,121.81,0,0,1-7.94,12.95c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24a93.48,93.48,0,0,0-5.16,16.24C988.93,808.82,1025.5,860.08,1072.74,886.5Zm40.94,763.94c-4.69-43.19-25.19-87.38-54.23-116.94s-66.05-43.9-97.93-37.94c-24.92,4.65-48.16,25.23-48.2,58.32-.05,36.26,27.08,73.94,25.12,109.61-1.12,20.32-11.76,37.16-8.51,58.28,3.41,22.16,20.88,39.83,37.64,49.87,37.74,22.61,80.3,20.95,109.16-4.26s43.12-73.15,36.56-123Z"/>
<path fill-opacity=".5" d="M1005.52,753.09a93.48,93.48,0,0,1,5.16-16.24c11.85-28.26,39.67-48.77,63.63-66.24,23.59-17.19,48.58-34.23,65.58-57.56a115.11,115.11,0,0,0,7.42-11.54c13-23.29,16.9-50.8,29.92-74.07,24.24-43.34,79.41-64.82,128-54.66s88.88,48.48,107.15,94.65,16,98.91-.16,145.85c-19.56,56.69-59.75,106.17-110.82,137.48-66.27,40.61-158.59,54.82-229.44,17.38C1028.73,845.29,995,801.69,1005.52,753.09ZM891.72,1652a25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72c-2.68,6.17-2.84,13.57.31,19.51,3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1,7.12-5.06,8.17-14,6.19-22.41A38.29,38.29,0,0,0,891.72,1652ZM1920,263.76V1920H1221.66c-34.85-54.31-40.33-119.19-40.28-193.51.11-136.19-31.88-199.19-138.37-289.41-77.58-65.73-189.57-131.58-192-242.92-2.42-111.51,115.34-182.21,225-206.06s231.91-25.75,319-93C1550.4,775,1510.32,518.58,1636,368.87c59.39-70.72,147.91-103.83,242.41-106.08C1892.19,262.46,1906.07,262.8,1920,263.76ZM1802.18,451.47a42.41,42.41,0,0,0-22.08,25.12c-3.54,11-1.63,24.61,7.5,31.72,6.78,5.28,16.05,6,24.61,5.26,10.75-1,21.54-4.19,30.09-10.78s14.63-16.85,14.59-27.66C1856.8,448.73,1822,442.15,1802.18,451.47ZM1109.32,1654.56c-5.14-40.27-24.09-81.86-50.15-110s-58.7-42.42-86.39-37.65c-21.63,3.73-41.42,22.31-40.67,53.08.83,33.72,25.42,69.42,24.57,102.55-.49,18.87-9.38,34.27-6,54,3.51,20.69,19.18,37.54,34.06,47.29,33.48,21.93,70.59,21.41,95.17-1.34s35.88-67,29-113.49Zm-391-645.38c-20.72-28.67-63.45-35.38-98.71-26.18C567,996.72,513,1068.47,555.34,1115.2c15.85,17.51,41.48,25.68,66.07,24.88,61-2,129.78-56.24,103.85-118.42A62.07,62.07,0,0,0,718.3,1009.18Z"/>
<path d="M1637.39,433.81c-116.87,140.61-86.85,375.36-229.73,489.44-80.06,63.91-190.24,68.56-289.69,93.1s-207.28,92.32-207.75,194.77c-.48,102.29,98.88,160.16,167.25,218.74,93.83,80.4,121.16,137.54,117.83,262.74-2.5,93.78,4.83,171,77.62,227.4h473.39c52.68-18.66,103.72-40.36,149.09-63.68q12.42-6.39,24.6-13.14v-1511C1813.11,321.22,1705.78,351.52,1637.39,433.81Zm204.91,69c-8.55,6.59-19.34,9.8-30.09,10.78-8.56.78-17.83,0-24.61-5.26-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12c19.84-9.32,54.62-2.74,54.71,23.66C1856.93,485.94,1850.86,496.21,1842.3,502.79Zm-836.78,250.3a93.48,93.48,0,0,1,5.16-16.24c11.85-28.26,39.67-48.77,63.63-66.24,23.59-17.19,48.58-34.23,65.58-57.56a115.11,115.11,0,0,0,7.42-11.54c13-23.29,16.9-50.8,29.92-74.07,24.24-43.34,79.41-64.82,128-54.66s88.88,48.48,107.15,94.65,16,98.91-.16,145.85c-19.56,56.69-59.75,106.17-110.82,137.48-66.27,40.61-158.59,54.82-229.44,17.38C1028.73,845.29,995,801.69,1005.52,753.09Zm-294.9,273.56c20.81,55.88-37.14,103.41-87.92,104.38-20.48.39-41.72-7.25-54.7-23.1-34.63-42.3,11.2-105.66,55.13-117.21,29.47-7.75,65-1.18,81.84,24.7A56.48,56.48,0,0,1,710.62,1026.65Zm188,639.83c2,8.4.93,17.35-6.19,22.41-6.37,4.53-15.15,3.69-22.51,1-6.7-2.4-13.21-6.42-16.53-12.71-3.15-5.94-3-13.34-.31-19.51a26.44,26.44,0,0,1,12.11-12.64c5-2.59,9.11-3.42,14.63-1.6a25.79,25.79,0,0,1,12,8.49A38.29,38.29,0,0,1,898.57,1666.48Zm197.22-19.54c6.5,40.17-2.7,78.53-23.59,98.4s-52.81,20.61-81.88,1.9c-12.91-8.32-26.6-22.77-29.86-40.64-3.11-17,4.36-30.42,4.56-46.75.34-28.67-21.24-59.35-22.35-88.52-1-26.61,15.8-42.83,34.38-46.23,23.76-4.34,52,7.71,74.78,31.89s39.55,60,44.44,94.81Z"/>',
),
'rotated' => array(
'landscape' => '<path fill-opacity=".2" d="M508.31,132.4c-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09C514.35,116.35,513.59,125.62,508.31,132.4ZM0,0H332.19c-11,106.89,19.33,214.22,101.62,282.61,140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V1440H0ZM753.09,914.48c48.6,10.55,92.2-23.21,115-66.45,37.44-70.85,23.23-163.17-17.38-229.44C819.45,567.52,770,527.33,713.28,507.77c-46.94-16.2-99.69-18.44-145.85-.16s-84.5,58.55-94.65,107.15,11.32,103.77,54.66,128c23.27,13,50.78,16.91,74.07,29.92a115.11,115.11,0,0,1,11.54,7.42c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63A93.48,93.48,0,0,0,753.09,914.48Zm273.56,294.9a56.48,56.48,0,0,0-11.23,5.65c-25.88,16.88-32.45,52.37-24.7,81.84,11.55,43.93,74.91,89.76,117.21,55.13,15.85-13,23.49-34.22,23.1-54.7C1130.06,1246.52,1082.53,1188.57,1026.65,1209.38Zm639.83-188a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43Zm-19.54-197.22,4.86-.48c-34.8,4.89-70.63,21.69-94.81,44.44s-36.23,51-31.89,74.78c3.4,18.58,19.62,35.39,46.23,34.38,29.17-1.11,59.85-22.69,88.52-22.35,16.33.2,29.71,7.67,46.75,4.56,17.87-3.26,32.32-16.95,40.64-29.86,18.71-29.07,18-61-1.9-81.88S1687.11,817.71,1646.94,824.21ZM1920,173.69V0h-76.82q6.75,12.18,13.14,24.6C1879.64,70,1901.34,121,1920,173.69Z"/>
<path fill-opacity=".5" d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM0,0H263.76c-1,13.93-1.3,27.81-1,41.56,2.25,94.5,35.36,183,106.08,242.41C518.58,409.68,775,369.6,895.07,525c67.28,87,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192,90.22-106.49,153.22-138.48,289.41-138.37,74.32,0,139.2-5.43,193.51-40.28V1440H0ZM1559.94,987.89c33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29l5.62-.48c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39C1510.59,968.85,1529.17,988.64,1559.94,987.89Zm-538.28,206.85a62.07,62.07,0,0,0-12.48,7c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07C1138.08,1237.62,1083.84,1168.81,1021.66,1194.74Zm655.57-128.08c6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11C1663.89,1069.65,1671.29,1069.81,1677.23,1066.66Zm-1111.4-567c-49.88,19.23-91.52,61-102.89,111.13s11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16c55.73,16.59,107-20,133.41-67.22,41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78C672.48,482.3,615.71,480.47,565.83,499.7Z"/>
<path d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM1726.49,759.57c74.32,0,139.2-5.43,193.51-40.28V1440H0V0H263.76c-1,13.93-1.3,27.81-1,41.56C260.37,143.83,293,241.16,368.87,304.92c149.71,125.71,406.13,85.63,526.2,241,67.28,87.05,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192C1527.3,791.45,1590.3,759.46,1726.49,759.57Zm-840,87.69c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C808.82,931.07,860.08,894.5,886.5,847.26Zm147.36,325.07a81.7,81.7,0,0,0-16.88,4.34c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08C1166.65,1248.47,1116,1160.19,1033.86,1172.33Zm632.62-150.9a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43ZM1644.4,806.71l6-.39c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.15,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16S1694.23,800.15,1644.4,806.71Z"/>',
'portrait' => '<path fill-opacity=".2" d="M508.31,132.4c-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09C514.35,116.35,513.59,125.62,508.31,132.4ZM0,0H332.19c-11,106.89,19.33,214.22,101.62,282.61,140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V2560H0ZM753.09,914.48c48.6,10.55,92.2-23.21,115-66.45,37.44-70.85,23.23-163.17-17.38-229.44C819.45,567.52,770,527.33,713.28,507.77c-46.94-16.2-99.69-18.44-145.85-.16s-84.5,58.55-94.65,107.15,11.32,103.77,54.66,128c23.27,13,50.78,16.91,74.07,29.92a115.11,115.11,0,0,1,11.54,7.42c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63A93.48,93.48,0,0,0,753.09,914.48Zm273.56,294.9a56.48,56.48,0,0,0-11.23,5.65c-25.88,16.88-32.45,52.37-24.7,81.84,11.55,43.93,74.91,89.76,117.21,55.13,15.85-13,23.49-34.22,23.1-54.7C1130.06,1246.52,1082.53,1188.57,1026.65,1209.38Zm639.83-188a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43Zm-19.54-197.22,4.86-.48c-34.8,4.89-70.63,21.69-94.81,44.44s-36.23,51-31.89,74.78c3.4,18.58,19.62,35.39,46.23,34.38,29.17-1.11,59.85-22.69,88.52-22.35,16.33.2,29.71,7.67,46.75,4.56,17.87-3.26,32.32-16.95,40.64-29.86,18.71-29.07,18-61-1.9-81.88S1687.11,817.71,1646.94,824.21ZM1920,173.69V0h-76.82q6.75,12.18,13.14,24.6C1879.64,70,1901.34,121,1920,173.69Z"/>
<path fill-opacity=".5" d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM0,0H263.76c-1,13.93-1.3,27.81-1,41.56,2.25,94.5,35.36,183,106.08,242.41C518.58,409.68,775,369.6,895.07,525c67.28,87,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192,90.22-106.49,153.22-138.48,289.41-138.37,74.32,0,139.2-5.43,193.51-40.28V2560H0ZM1559.94,987.89c33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29l5.62-.48c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39C1510.59,968.85,1529.17,988.64,1559.94,987.89Zm-538.28,206.85a62.07,62.07,0,0,0-12.48,7c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07C1138.08,1237.62,1083.84,1168.81,1021.66,1194.74Zm655.57-128.08c6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11C1663.89,1069.65,1671.29,1069.81,1677.23,1066.66Zm-1111.4-567c-49.88,19.23-91.52,61-102.89,111.13s11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16c55.73,16.59,107-20,133.41-67.22,41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78C672.48,482.3,615.71,480.47,565.83,499.7Z"/>
<path d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM1726.49,759.57c74.32,0,139.2-5.43,193.51-40.28V2560H0V0H263.76c-1,13.93-1.3,27.81-1,41.56C260.37,143.83,293,241.16,368.87,304.92c149.71,125.71,406.13,85.63,526.2,241,67.28,87.05,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192C1527.3,791.45,1590.3,759.46,1726.49,759.57Zm-840,87.69c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C808.82,931.07,860.08,894.5,886.5,847.26Zm147.36,325.07a81.7,81.7,0,0,0-16.88,4.34c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08C1166.65,1248.47,1116,1160.19,1033.86,1172.33Zm632.62-150.9a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43ZM1644.4,806.71l6-.39c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.15,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16S1694.23,800.15,1644.4,806.71Z"/>',
'square' => '<path fill-opacity=".2" d="M508.31,132.4c-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09C514.35,116.35,513.59,125.62,508.31,132.4ZM0,0H332.19c-11,106.89,19.33,214.22,101.62,282.61,140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V1920H0ZM753.09,914.48c48.6,10.55,92.2-23.21,115-66.45,37.44-70.85,23.23-163.17-17.38-229.44C819.45,567.52,770,527.33,713.28,507.77c-46.94-16.2-99.69-18.44-145.85-.16s-84.5,58.55-94.65,107.15,11.32,103.77,54.66,128c23.27,13,50.78,16.91,74.07,29.92a115.11,115.11,0,0,1,11.54,7.42c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63A93.48,93.48,0,0,0,753.09,914.48Zm273.56,294.9a56.48,56.48,0,0,0-11.23,5.65c-25.88,16.88-32.45,52.37-24.7,81.84,11.55,43.93,74.91,89.76,117.21,55.13,15.85-13,23.49-34.22,23.1-54.7C1130.06,1246.52,1082.53,1188.57,1026.65,1209.38Zm639.83-188a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43Zm-19.54-197.22,4.86-.48c-34.8,4.89-70.63,21.69-94.81,44.44s-36.23,51-31.89,74.78c3.4,18.58,19.62,35.39,46.23,34.38,29.17-1.11,59.85-22.69,88.52-22.35,16.33.2,29.71,7.67,46.75,4.56,17.87-3.26,32.32-16.95,40.64-29.86,18.71-29.07,18-61-1.9-81.88S1687.11,817.71,1646.94,824.21ZM1920,173.69V0h-76.82q6.75,12.18,13.14,24.6C1879.64,70,1901.34,121,1920,173.69Z"/>
<path fill-opacity=".5" d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM0,0H263.76c-1,13.93-1.3,27.81-1,41.56,2.25,94.5,35.36,183,106.08,242.41C518.58,409.68,775,369.6,895.07,525c67.28,87,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192,90.22-106.49,153.22-138.48,289.41-138.37,74.32,0,139.2-5.43,193.51-40.28V1920H0ZM1559.94,987.89c33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29l5.62-.48c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39C1510.59,968.85,1529.17,988.64,1559.94,987.89Zm-538.28,206.85a62.07,62.07,0,0,0-12.48,7c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07C1138.08,1237.62,1083.84,1168.81,1021.66,1194.74Zm655.57-128.08c6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11C1663.89,1069.65,1671.29,1069.81,1677.23,1066.66Zm-1111.4-567c-49.88,19.23-91.52,61-102.89,111.13s11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16c55.73,16.59,107-20,133.41-67.22,41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78C672.48,482.3,615.71,480.47,565.83,499.7Z"/>
<path d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM1726.49,759.57c74.32,0,139.2-5.43,193.51-40.28V1920H0V0H263.76c-1,13.93-1.3,27.81-1,41.56C260.37,143.83,293,241.16,368.87,304.92c149.71,125.71,406.13,85.63,526.2,241,67.28,87.05,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192C1527.3,791.45,1590.3,759.46,1726.49,759.57Zm-840,87.69c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C808.82,931.07,860.08,894.5,886.5,847.26Zm147.36,325.07a81.7,81.7,0,0,0-16.88,4.34c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08C1166.65,1248.47,1116,1160.19,1033.86,1172.33Zm632.62-150.9a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43ZM1644.4,806.71l6-.39c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.15,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16S1694.23,800.15,1644.4,806.71Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path fill-opacity=".2" d="M1672.48,1021.43c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43ZM269.76,0H1926V719.29c-54.31,34.85-119.19,40.33-193.51,40.28-136.19-.11-199.19,31.88-289.41,138.37-65.73,77.58-131.58,189.57-242.92,192C1088.65,1092.33,1018,974.57,994.1,864.86s-25.75-231.91-93-319C781,390.55,524.58,430.63,374.87,304.92,299,241.16,266.37,143.83,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM481.13,63.11c-26.4.09-33,34.87-23.66,54.71a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09S491.94,63.07,481.13,63.11ZM1023,1176.67c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08,11.57-66.44-39.07-154.72-121.22-142.58A81.7,81.7,0,0,0,1023,1176.67ZM892.5,847.26c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C814.82,931.07,866.08,894.5,892.5,847.26Zm763.94-40.94c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.16,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16s-73.15-43.12-123-36.56Z"/>
<path fill-opacity=".5" d="M759.09,914.48a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48ZM1658,1028.28a25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19A38.29,38.29,0,0,0,1658,1028.28ZM269.76,0H1926V698.34c-54.31,34.85-119.19,40.33-193.51,40.28C1596.3,738.51,1533.3,770.5,1443.08,877c-65.73,77.58-131.58,189.57-242.92,192C1088.65,1071.38,1018,953.62,994.1,843.91s-25.75-231.91-93-319C781,369.6,524.58,409.68,374.87,284,304.15,224.58,271,136.06,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM457.47,117.82a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09s-16.85-14.63-27.66-14.59C454.73,63.2,448.15,98,457.47,117.82ZM1660.56,810.68c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39c3.73,21.63,22.31,41.42,53.08,40.67,33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29Zm-645.38,391c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07-2-61-56.24-129.78-118.42-103.85A62.07,62.07,0,0,0,1015.18,1201.7Z"/>
<path d="M439.81,282.61c140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V173.69C1907.34,121,1885.64,70,1862.32,24.6q-6.39-12.42-13.14-24.6h-1511C327.22,106.89,357.52,214.22,439.81,282.61Zm69-204.91c6.59,8.55,9.8,19.34,10.78,30.09.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C448.15,98,454.73,63.2,481.13,63.11,491.94,63.07,502.21,69.14,508.79,77.7Zm250.3,836.78a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48Zm273.56,294.9c55.88-20.81,103.41,37.14,104.38,87.92.39,20.48-7.25,41.72-23.1,54.7-42.3,34.63-105.66-11.2-117.21-55.13-7.75-29.47-1.18-65,24.7-81.84A56.48,56.48,0,0,1,1032.65,1209.38Zm639.83-188c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43Zm-19.54-197.22c40.17-6.5,78.53,2.7,98.4,23.59s20.61,52.81,1.9,81.88c-8.32,12.91-22.77,26.6-40.64,29.86-17,3.11-30.42-4.36-46.75-4.56-28.67-.34-59.35,21.24-88.52,22.35-26.61,1-42.83-15.8-46.23-34.38-4.34-23.76,7.71-52,31.89-74.78s60-39.55,94.81-44.44Z"/>',
'portrait' => '<path fill-opacity=".2" d="M1672.48,1021.43c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43ZM269.76,0H1926V719.29c-54.31,34.85-119.19,40.33-193.51,40.28-136.19-.11-199.19,31.88-289.41,138.37-65.73,77.58-131.58,189.57-242.92,192C1088.65,1092.33,1018,974.57,994.1,864.86s-25.75-231.91-93-319C781,390.55,524.58,430.63,374.87,304.92,299,241.16,266.37,143.83,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM481.13,63.11c-26.4.09-33,34.87-23.66,54.71a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09S491.94,63.07,481.13,63.11ZM1023,1176.67c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08,11.57-66.44-39.07-154.72-121.22-142.58A81.7,81.7,0,0,0,1023,1176.67ZM892.5,847.26c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C814.82,931.07,866.08,894.5,892.5,847.26Zm763.94-40.94c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.16,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16s-73.15-43.12-123-36.56Z"/>
<path fill-opacity=".5" d="M759.09,914.48a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48ZM1658,1028.28a25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19A38.29,38.29,0,0,0,1658,1028.28ZM269.76,0H1926V698.34c-54.31,34.85-119.19,40.33-193.51,40.28C1596.3,738.51,1533.3,770.5,1443.08,877c-65.73,77.58-131.58,189.57-242.92,192C1088.65,1071.38,1018,953.62,994.1,843.91s-25.75-231.91-93-319C781,369.6,524.58,409.68,374.87,284,304.15,224.58,271,136.06,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM457.47,117.82a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09s-16.85-14.63-27.66-14.59C454.73,63.2,448.15,98,457.47,117.82ZM1660.56,810.68c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39c3.73,21.63,22.31,41.42,53.08,40.67,33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29Zm-645.38,391c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07-2-61-56.24-129.78-118.42-103.85A62.07,62.07,0,0,0,1015.18,1201.7Z"/>
<path d="M439.81,282.61c140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V173.69C1907.34,121,1885.64,70,1862.32,24.6q-6.39-12.42-13.14-24.6h-1511C327.22,106.89,357.52,214.22,439.81,282.61Zm69-204.91c6.59,8.55,9.8,19.34,10.78,30.09.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C448.15,98,454.73,63.2,481.13,63.11,491.94,63.07,502.21,69.14,508.79,77.7Zm250.3,836.78a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48Zm273.56,294.9c55.88-20.81,103.41,37.14,104.38,87.92.39,20.48-7.25,41.72-23.1,54.7-42.3,34.63-105.66-11.2-117.21-55.13-7.75-29.47-1.18-65,24.7-81.84A56.48,56.48,0,0,1,1032.65,1209.38Zm639.83-188c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43Zm-19.54-197.22c40.17-6.5,78.53,2.7,98.4,23.59s20.61,52.81,1.9,81.88c-8.32,12.91-22.77,26.6-40.64,29.86-17,3.11-30.42-4.36-46.75-4.56-28.67-.34-59.35,21.24-88.52,22.35-26.61,1-42.83-15.8-46.23-34.38-4.34-23.76,7.71-52,31.89-74.78s60-39.55,94.81-44.44Z"/>',
'square' => '<path fill-opacity=".2" d="M1672.48,1021.43c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43ZM269.76,0H1926V719.29c-54.31,34.85-119.19,40.33-193.51,40.28-136.19-.11-199.19,31.88-289.41,138.37-65.73,77.58-131.58,189.57-242.92,192C1088.65,1092.33,1018,974.57,994.1,864.86s-25.75-231.91-93-319C781,390.55,524.58,430.63,374.87,304.92,299,241.16,266.37,143.83,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM481.13,63.11c-26.4.09-33,34.87-23.66,54.71a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09S491.94,63.07,481.13,63.11ZM1023,1176.67c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08,11.57-66.44-39.07-154.72-121.22-142.58A81.7,81.7,0,0,0,1023,1176.67ZM892.5,847.26c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C814.82,931.07,866.08,894.5,892.5,847.26Zm763.94-40.94c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.16,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16s-73.15-43.12-123-36.56Z"/>
<path fill-opacity=".5" d="M759.09,914.48a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48ZM1658,1028.28a25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19A38.29,38.29,0,0,0,1658,1028.28ZM269.76,0H1926V698.34c-54.31,34.85-119.19,40.33-193.51,40.28C1596.3,738.51,1533.3,770.5,1443.08,877c-65.73,77.58-131.58,189.57-242.92,192C1088.65,1071.38,1018,953.62,994.1,843.91s-25.75-231.91-93-319C781,369.6,524.58,409.68,374.87,284,304.15,224.58,271,136.06,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM457.47,117.82a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09s-16.85-14.63-27.66-14.59C454.73,63.2,448.15,98,457.47,117.82ZM1660.56,810.68c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39c3.73,21.63,22.31,41.42,53.08,40.67,33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29Zm-645.38,391c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07-2-61-56.24-129.78-118.42-103.85A62.07,62.07,0,0,0,1015.18,1201.7Z"/>
<path d="M439.81,282.61c140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V173.69C1907.34,121,1885.64,70,1862.32,24.6q-6.39-12.42-13.14-24.6h-1511C327.22,106.89,357.52,214.22,439.81,282.61Zm69-204.91c6.59,8.55,9.8,19.34,10.78,30.09.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C448.15,98,454.73,63.2,481.13,63.11,491.94,63.07,502.21,69.14,508.79,77.7Zm250.3,836.78a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48Zm273.56,294.9c55.88-20.81,103.41,37.14,104.38,87.92.39,20.48-7.25,41.72-23.1,54.7-42.3,34.63-105.66-11.2-117.21-55.13-7.75-29.47-1.18-65,24.7-81.84A56.48,56.48,0,0,1,1032.65,1209.38Zm639.83-188c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43Zm-19.54-197.22c40.17-6.5,78.53,2.7,98.4,23.59s20.61,52.81,1.9,81.88c-8.32,12.91-22.77,26.6-40.64,29.86-17,3.11-30.42-4.36-46.75-4.56-28.67-.34-59.35,21.24-88.52,22.35-26.61,1-42.83-15.8-46.23-34.38-4.34-23.76,7.71-52,31.89-74.78s60-39.55,94.81-44.44Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Layer_Blob();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Rock Stack.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Rock_Stack
*
* @since 4.15.0
*/
class ET_Builder_Mask_Rock_Stack extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Rock Stack', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM1180.15,189.62c17.81-72.88,132.41-107.49,256-77.3S1645.41,226.07,1627.6,299s-132.41,107.49-256,77.3S1162.34,262.5,1180.15,189.62Zm94.73,269.2c158.35-70.73,320.55-52.34,362.27,41.07S1584.31,726.35,1426,797.08,1105.39,849.42,1063.68,756,1116.52,529.55,1274.88,458.82ZM1379.33,858.5c231.74,0,419.61,110.81,419.61,247.5s-187.87,247.5-419.61,247.5-419.6-110.81-419.6-247.5S1147.59,858.5,1379.33,858.5Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM978.86,523c30.69-125.6,228.19-185.25,441.14-133.22s360.69,196,330,321.64-228.2,185.24-441.14,133.21S948.17,648.62,978.86,523ZM1162.11,987c272.91-121.89,552.44-90.2,624.33,70.78s-91.06,390.29-364,512.18-552.44,90.2-624.33-70.78S889.19,1108.84,1162.11,987Zm84.72,1380.65c-326.39,0-591-156.07-591-348.59s264.59-348.59,591-348.59,591,156.07,591,348.59S1573.22,2367.6,1246.83,2367.6Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM1044.44,304.23c21.69-88.76,161.25-130.91,311.72-94.14S1611,348.61,1589.35,437.37s-161.25,130.9-311.72,94.13S1022.75,393,1044.44,304.23Zm115.35,327.83c192.86-86.13,390.38-63.74,441.18,50s-64.35,275.79-257.2,361.92-390.37,63.74-441.18-50S966.94,718.19,1159.79,632.06ZM1287,1118.79c282.22,0,511,135,511,301.41s-228.78,301.41-511,301.41S776,1586.66,776,1420.2,1004.79,1118.79,1287,1118.79Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M959.73,1106c0-136.69,187.86-247.5,419.6-247.5s419.61,110.81,419.61,247.5-187.87,247.5-419.61,247.5S959.73,1242.69,959.73,1106ZM1426,797.08c158.36-70.73,252.91-203.79,211.2-297.19s-203.92-111.8-362.27-41.07S1022,662.6,1063.68,756,1267.59,867.8,1426,797.08Zm-54.32-420.83c123.56,30.19,238.17-4.42,256-77.3s-67.92-156.44-191.48-186.63-238.16,4.42-256,77.3S1248.07,346.06,1371.63,376.25Z"/>',
'portrait' => '<path d="M1837.81,2019c0,192.52-264.59,348.59-591,348.59s-591-156.07-591-348.59,264.59-348.59,591-348.59S1837.81,1826.49,1837.81,2019Zm-415.35-449.1c272.92-121.89,435.88-351.2,364-512.18S1435,865.06,1162.11,987s-435.88,351.2-364,512.18S1149.55,1691.8,1422.46,1569.91Zm-113.6-725.26c212.94,52,410.45-7.61,441.14-133.21S1632.94,441.83,1420,389.8,1009.55,397.42,978.86,523,1095.92,792.62,1308.86,844.65Z"/>',
'square' => '<path d="M776,1420.2c0-166.46,228.78-301.41,511-301.41s511,135,511,301.41-228.78,301.41-511,301.41S776,1586.66,776,1420.2ZM1343.77,1044c192.85-86.13,308-248.17,257.2-361.92s-248.32-136.14-441.18-50S851.79,880.23,902.59,994,1150.92,1130.12,1343.77,1044ZM1277.63,531.5c150.47,36.77,290-5.38,311.72-94.13s-82.72-190.51-233.19-227.28-290,5.38-311.72,94.14S1127.16,494.74,1277.63,531.5Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'portrait' => '<path d="M1920,2560V0H0V2560ZM304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'portrait' => '<path d="M304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'square' => '<path d="M304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Rock_Stack();

View File

@@ -0,0 +1,84 @@
<?php
/**
* Background Mask Style - Square Stripes.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Square_Stripes
*
* @since 4.15.0
*/
class ET_Builder_Mask_Square_Stripes extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Square Stripes', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<g>
<polygon points="1479.38 478.41 1252.46 0 1097.51 0 1412.89 664.9 1920 424.36 1920 269.41 1479.38 478.41"/>
<polygon points="1436.38 61.07 1545.87 291.92 1776.72 182.42 1690.19 0 1565.13 0 1436.38 61.07"/>
<polygon points="1920 0 1845.14 0 1920 157.81 1920 0"/>
<polygon points="1346.39 851.39 942.56 0 787.61 0 1279.9 1037.88 1920 734.26 1920 579.31 1346.39 851.39"/>
<polygon points="1213.4 1224.37 632.66 0 0 0 0 1440 1920 1440 1920 889.22 1213.4 1224.37"/>
</g>',
'portrait' => '<g>
<rect x="1478.8" y="690" width="255.5" height="255.5" transform="translate(-195.44 767.4) rotate(-25.38)"/>
<polygon points="1479.38 1174.41 1249.89 690.58 1733.72 461.08 1920 853.82 1920 527.14 1800.21 274.6 1063.4 624.08 1412.89 1360.9 1920 1120.36 1920 965.41 1479.38 1174.41"/>
<polygon points="1213.4 1920.37 503.93 424.6 1399.1 0 0 0 0 2560 1920 2560 1920 1585.22 1213.4 1920.37"/>
<polygon points="1346.39 1547.39 876.91 557.59 1866.71 88.1 1920 200.46 1920 0 1725.78 0 690.42 491.1 1279.9 1733.88 1920 1430.27 1920 1275.31 1346.39 1547.39"/>
</g>',
'square' => '<g>
<rect x="1478.8" y="210" width="255.5" height="255.5" transform="translate(10.26 721.09) rotate(-25.38)"/>
<polygon points="1920 373.81 1920 47.14 1897.64 0 1742.69 0 1920 373.81"/>
<polygon points="1479.38 694.41 1249.89 210.58 1693.84 0 1367.16 0 1063.4 144.08 1412.89 880.9 1920 640.36 1920 485.41 1479.38 694.41"/>
<polygon points="1346.39 1067.39 876.91 77.59 1040.49 0 713.81 0 690.42 11.1 1279.9 1253.88 1920 950.26 1920 795.31 1346.39 1067.39"/>
<polygon points="1213.4 1440.37 530.2 0 0 0 0 1920 1920 1920 1920 1105.22 1213.4 1440.37"/>
</g>',
),
'default-inverted' => array(
'landscape' => '<g>
<polygon points="1920 889.22 1920 734.26 1279.9 1037.88 787.61 0 632.66 0 1213.4 1224.37 1920 889.22"/>
<polygon points="1920 579.31 1920 424.36 1412.89 664.9 1097.51 0 942.56 0 1346.39 851.39 1920 579.31"/>
<polygon points="1920 269.41 1920 157.81 1845.14 0 1690.19 0 1776.72 182.42 1545.87 291.92 1436.38 61.07 1565.13 0 1252.46 0 1479.38 478.41 1920 269.41"/>
</g>',
'portrait' => '<g>
<polygon points="1213.4 1920.37 1920 1585.22 1920 1430.27 1279.9 1733.88 690.42 491.1 1725.78 0 1399.1 0 503.93 424.6 1213.4 1920.37"/>
<polygon points="876.91 557.59 1346.39 1547.39 1920 1275.31 1920 1120.36 1412.89 1360.9 1063.4 624.08 1800.21 274.6 1920 527.14 1920 200.46 1866.71 88.1 876.91 557.59"/>
<path d="M1249.89,690.58l229.49,483.83,440.62-209V853.81L1733.72,461.08Zm296,297.34L1436.38,757.07l230.85-109.49,109.49,230.84Z"/>
</g>',
'square' => '<g>
<polygon points="1920 1105.22 1920 950.26 1279.9 1253.88 690.42 11.1 713.81 0 530.2 0 1213.4 1440.37 1920 1105.22"/>
<polygon points="1346.39 1067.39 1920 795.31 1920 640.36 1412.89 880.9 1063.4 144.08 1367.16 0 1040.49 0 876.91 77.59 1346.39 1067.39"/>
<polygon points="1920 0 1897.64 0 1920 47.14 1920 0"/>
<path d="M1693.84,0,1249.89,210.58l229.49,483.83,440.62-209V373.81L1742.69,0Zm-148,507.92L1436.38,277.07l230.85-109.49,109.49,230.84Z"/>
</g>',
),
'rotated' => array(
'landscape' => '<path d="M167.58,252.77,398.42,143.28l109.5,230.85L277.07,483.62ZM373.81,0H47.14L0,22.36v155Zm320.6,440.62L210.58,670.11,0,226.16V552.84L144.08,856.6,880.9,507.11,640.36,0H485.41Zm373,133L77.59,1043.09,0,879.51v326.68l11.1,23.39L1253.88,640.1,950.27,0h-155Zm373,133L0,1389.8V1440H1920V0H1105.22Z"/>',
'portrait' => '<path d="M167.58,252.77,398.42,143.28l109.5,230.85L277.07,483.62ZM373.81,0H47.14L0,22.36v155Zm320.6,440.62L210.58,670.11,0,226.16V552.84L144.08,856.6,880.9,507.11,640.36,0H485.41Zm373,133L77.59,1043.09,0,879.51v326.68l11.1,23.39L1253.88,640.1,950.27,0h-155Zm373,133L0,1389.8V2560H1920V0H1105.22Z"/>',
'square' => '<path d="M167.58,252.77,398.42,143.28l109.5,230.85L277.07,483.62ZM373.81,0H47.14L0,22.36v155Zm320.6,440.62L210.58,670.11,0,226.16V552.84L144.08,856.6,880.9,507.11,640.36,0H485.41Zm373,133L77.59,1043.09,0,879.51v326.68l11.1,23.39L1253.88,640.1,950.27,0h-155Zm373,133L0,1389.8V1920H1920V0H1105.22Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M77.59,1043.09,0,879.51V552.84L144.08,856.6,880.9,507.11,640.36,0H795.31l272.08,573.61Zm133-373L0,226.16V177.31L373.81,0h111.6l209,440.62Zm-43-417.34L277.07,483.62,507.92,374.13,398.42,143.28ZM1105.22,0h-155l303.61,640.1L11.1,1229.58,0,1206.19V1389.8L1440.37,706.6ZM0,0V22.36L47.14,0Z"/>',
'portrait' => '<path d="M694.41,440.62,485.41,0H373.81L0,177.31v48.85l210.58,444Zm-296-297.34,109.5,230.85L277.07,483.62,167.58,252.77ZM77.59,1043.09,0,879.51V552.84L144.08,856.6,880.9,507.11,640.36,0H795.31l272.08,573.61ZM1440.37,706.6,0,1389.8V1206.19l11.1,23.39L1253.88,640.1,950.27,0h155ZM47.14,0,0,22.36V0Z"/>',
'square' => '<path d="M77.59,1043.09,0,879.51V552.84L144.08,856.6,880.9,507.11,640.36,0H795.31l272.08,573.61Zm133-373L0,226.16V177.31L373.81,0h111.6l209,440.62Zm-43-417.34L277.07,483.62,507.92,374.13,398.42,143.28ZM0,0V22.36L47.14,0ZM1105.22,0h-155l303.61,640.1L11.1,1229.58,0,1206.19V1389.8L1440.37,706.6Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Square_Stripes();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Triangles.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Triangles
*
* @since 4.15.0
*/
class ET_Builder_Mask_Triangles extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Triangles', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="1920 98.49 1568 776.05 1164.83 0 0 0 0 1440 1331.44 1440 1920 307.07 1920 98.49"/>',
'portrait' => '<polygon points="1920 540.23 1586.65 1181.89 972.65 0 0 0 0 2560 997.76 2560 1920 784.79 1920 540.23"/>',
'square' => '<polygon points="1920 230.67 1484.67 1068.63 929.51 0 0 0 0 1920 1150.9 1920 1920 439.56 1920 230.67"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1568,776.06,1164.83,0H1920V98.49Zm352-469L1331.44,1440H1920Z"/>',
'portrait' => '<path d="M1586.65,1181.9,972.65,0H1920V540.23ZM1920,784.79,997.77,2560H1920Z"/>',
'square' => '<path d="M1484.67,1068.63,929.51,0H1920V230.67ZM1920,439.56,1150.9,1920H1920Z"/>',
),
'rotated' => array(
'landscape' => '<polygon points="230.67 0 1068.63 435.33 0 990.49 0 1440 1920 1440 1920 769.1 439.56 0 230.67 0"/>',
'portrait' => '<polygon points="230.67 0 1068.63 435.33 0 990.49 0 2560 1920 2560 1920 769.1 439.56 0 230.67 0"/>',
'square' => '<polygon points="230.67 0 1068.63 435.33 0 990.49 0 1920 1920 1920 1920 769.1 439.56 0 230.67 0"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1068.63,435.33,0,990.49V0H230.67ZM439.56,0,1920,769.1V0Z"/>',
'portrait' => '<path d="M1068.63,435.33,0,990.49V0H230.67ZM439.56,0,1920,769.1V0Z"/>',
'square' => '<path d="M1068.63,435.33,0,990.49V0H230.67ZM439.56,0,1920,769.1V0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Triangles();

View File

@@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Wave.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Wave
*
* @since 4.15.0
*/
class ET_Builder_Mask_Wave extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Wave', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM1734.14,50H1830a40,40,0,0,1,40,40V1350a40,40,0,0,1-40,40H405.31C1070.07,1390,1069.38,50,1734.14,50Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1870,2470a40,40,0,0,1-40,40H434.48C1086,2510,1085.32,50,1736.85,50H1830a40,40,0,0,1,40,40Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM1737.77,50H1830a40,40,0,0,1,40,40V1830a40,40,0,0,1-40,40H444.47C1091.46,1870,1090.78,50,1737.77,50Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M405.31,1390c664.76,0,664.07-1340,1328.83-1340H1830a40,40,0,0,1,40,40V1350a40,40,0,0,1-40,40Z"/>',
'portrait' => '<path d="M434.48,2510C1086,2510,1085.32,50,1736.85,50H1830a40,40,0,0,1,40,40V2470a40,40,0,0,1-40,40Z"/>',
'square' => '<path d="M444.47,1870c647,0,646.31-1820,1293.3-1820H1830a40,40,0,0,1,40,40V1830a40,40,0,0,1-40,40Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1187C1870,540,50,829.22,50,182.23Z"/>',
'portrait' => '<path d="M1920,2560V0H0V2560ZM50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1187C1870,540,50,829.22,50,182.23Z"/>',
'portrait' => '<path d="M50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
'square' => '<path d="M50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Wave();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - 3D Diamonds.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_3D_Diamonds
*
* @since 4.15.0
*/
class ET_Builder_Pattern_3D_Diamonds extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( '3D Diamonds', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M20,48H48L0,96V68Zm0,0L0,28V48ZM48,20.15,28,0H0L48,48,96,0H68Zm48,48L76,48H48L96,96ZM96,48V28L76,48ZM28,96H68L48,76Z"/>',
'default-inverted' => '<path d="M76,48H48L96,0V28Zm0,0L96,68V48ZM48,75.85,68,96H96L48,48,0,96H28Zm-48-48L20,48H48L0,0ZM0,48V68L20,48ZM68,0H28L48,20Z"/>',
'rotated' => '<path d="M48,76V48L96,96H68Zm0,0L28,96H48ZM20.15,48,0,68V96L48,48,0,0V28Zm48-48L48,20V48L96,0ZM48,0H28L48,20ZM96,68V28L76,48Z"/>',
'rotated-inverted' => '<path d="M48,20V48L0,0H28Zm0,0L68,0H48ZM75.85,48,96,28V0L48,48,96,96V68Zm-48,48L48,76V48L0,96ZM48,96H68L48,76ZM0,28V68L20,48Z"/>',
'thumbnail' => '<path d="M13.33,15,0,30V21.25L5.56,15ZM0,15H5.56L0,8.75ZM26.67,0H18.89L13.33,6.3,7.78,0H0L13.33,15ZM13.33,23.75,7.78,30H18.89ZM32.22,15l-5.55,6.25v.05L21.11,15H13.33L26.67,30,40,15Zm0,0L26.67,8.75,21.11,15H32.22ZM53.33,0H45.56L40,6.3,34.44,0H26.67L40,15ZM40,23.75,34.44,30H45.56ZM58.89,15l-5.56,6.25v.05L47.78,15H40L53.33,30,66.67,15Zm0,0L53.33,8.75,47.78,15H58.89ZM80,0H72.22L66.67,6.3,61.11,0H53.33L66.67,15Zm0,30V21.3L74.44,15H66.67Zm0-15V8.75L74.44,15ZM66.67,23.75,61.11,30H72.22ZM5.56,45,0,51.25V60L13.33,45ZM0,45H5.56L0,38.75Zm13.33-8.7L7.78,30H0L13.33,45,26.67,30H18.89ZM7.78,60H18.89l-5.56-6.25ZM32.22,45l-5.55,6.25v0L21.11,45H13.33L26.67,60,40,45Zm0,0-5.55-6.25L21.11,45H32.22ZM53.33,30H45.56L40,36.3,34.44,30H26.67L40,45ZM34.44,60H45.56L40,53.75ZM58.89,45l-5.56,6.25v0L47.78,45H40L53.33,60,66.67,45Zm0,0-5.56-6.25L47.78,45H58.89Zm7.78-8.7L61.11,30H53.33L66.67,45,80,30H72.22ZM80,60V51.3L74.44,45H66.67Zm0-15V38.75L74.44,45ZM61.11,60H72.22l-5.55-6.25Z"/>',
),
'width' => '96px',
'height' => '96px',
);
}
}
return new ET_Builder_Pattern_3D_Diamonds();

View File

@@ -0,0 +1,75 @@
# Adding New Pattern Style
To add new Pattern style in the Divi Builder follow the Actions Items.
## Action Items
- [ ] Copy Pattern Template (see bellow).
- [ ] Replace `NAME`, all the `ET_Builder_Pattern_NAME` in the template (3 places).
- [ ] Replace `TITLE` in the template (2 places).
- [ ] Replace `PRIORITY` in the template, lower number will make it show-up early in Pattern Style Dropdown list in the VB.
- [ ] Save in a new file, e.g: `some-name.php`, in this folder, add/commit to the repository.
**Tip**:
- For `NAME`, if it's multiple words like `Diagonal Lines`, use `_` to join, e.g `Diagonal_Lines`.
- For `filename`, if it's multiple words like `Diagonal Lines`, use `-` to join and make it lower case, e.g `diagonal-lines.php`.
- Once new `filename.php` placed in this folder, the new pattern would automatically appear in the VB (just refresh).
- default', 'default-inverted', 'thumbnail' should only contain all tags inside the `<svg></svg>` file, e.g:
```
'thumbnail' => '<path d="M28,28H56V56H28ZM0,0H28V28H0Z"/>',
```
<hr>
### Pattern Template:
```
<?php
/**
* Background Pattern Style - TITLE.
*
* @package Divi
* @sub-package Builder
* @since ??
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_NAME
*
* @since ??
*/
class ET_Builder_Pattern_NAME extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'TITLE', 'et-builder' ),
'svgContent' => array(
'default' => '',
'default-inverted' => '',
'rotated' => '',
'rotated-inverted' => '',
'thumbnail' => '',
),
'width' => '11px',
'height' => '11px',
// Replace following PRIORITY with number (1-9) and uncomment to make it on top 9 list.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- temporary comment.
// 'priority' => PRIORITY,
);
}
}
return new ET_Builder_Pattern_NAME();
```
<hr>
**Last Updated**: Mar 10, 2022.

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Checkerboard.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Checkerboard
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Checkerboard extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Checkerboard', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M28,28H56V56H28ZM0,0H28V28H0Z"/>',
'default-inverted' => '<path d="M28,28V56H0V28ZM56,0V28H28V0Z"/>',
'rotated' => '<path d="M28,28V56H0V28ZM56,0V28H28V0Z"/>',
'rotated-inverted' => '<path d="M28,28H56V56H28ZM0,0H28V28H0Z"/>',
'thumbnail' => '<path d="M0,0H10V10H0ZM0,20H10V30H0ZM10,10H20V20H10Zm0,20H20V40H10ZM20,0H30V10H20Zm0,20H30V30H20ZM30,10H40V20H30Zm0,20H40V40H30ZM40,0H50V10H40Zm0,20H50V30H40ZM50,10H60V20H50Zm0,20H60V40H50ZM60,0H70V10H60Zm0,20H70V30H60ZM70,10H80V20H70Zm0,20H80V40H70ZM0,40H10V50H0ZM10,50H20V60H10ZM20,40H30V50H20ZM30,50H40V60H30ZM40,40H50V50H40ZM50,50H60V60H50ZM60,40H70V50H60ZM70,50H80V60H70Z"/>',
),
'height' => '56px',
'width' => '56px',
);
}
}
return new ET_Builder_Pattern_Checkerboard();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Confetti.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Confetti
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Confetti extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Confetti', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M150.25,58l-7.2-3.5a20.42,20.42,0,1,1,36.71,17.88l-7.19-3.5A12.42,12.42,0,0,0,150.25,58ZM20.93,48.68l-6.17-5.1A12.41,12.41,0,0,1,0,46.94v8.48a20.6,20.6,0,0,0,5.17.67A20.38,20.38,0,0,0,20.93,48.68Zm376.35-3.43a12.43,12.43,0,0,1-1.67-17.48l-6.17-5.09a20.44,20.44,0,0,0,2.75,28.74,20.19,20.19,0,0,0,7.81,4V46.94A12.17,12.17,0,0,1,397.28,45.25Zm-137.62,153h-.09l0,8a12.43,12.43,0,0,1,12.47,12.37l8,0A20.44,20.44,0,0,0,259.66,198.2ZM97,210.39a12.41,12.41,0,0,1-20.45,10.38,12.28,12.28,0,0,1-4.3-8.47l-8,.62a20.44,20.44,0,0,0,20.34,18.84q.8,0,1.59-.06A20.43,20.43,0,0,0,105,209.77ZM227.69,42.08l6.62,4.5,22-32.33-6.62-4.5ZM36.75,154.67,8.15,128,2.7,133.84l28.59,26.68ZM359.28,258l5.48,5.83,28.51-26.77-5.47-5.83ZM310.33,115.33a13,13,0,1,1-13-13A13,13,0,0,1,310.33,115.33Zm-8,0a5,5,0,1,0-5,5A5,5,0,0,0,302.33,115.33ZM38,268.62a13,13,0,1,1-13-13A13,13,0,0,1,38,268.62Zm-8,0a5,5,0,1,0-5,5A5,5,0,0,0,30,268.62Zm165.45-43.47a9,9,0,1,0,9,9A9,9,0,0,0,195.47,225.15ZM365.14,57.48a9,9,0,1,0-9,9A9,9,0,0,0,365.14,57.48ZM172.83,164.26a6.36,6.36,0,1,0-6.36,6.36A6.37,6.37,0,0,0,172.83,164.26Zm176,6.73a4.69,4.69,0,1,0,4.68,4.69A4.69,4.69,0,0,0,348.8,171ZM263.15,287.32a4.68,4.68,0,1,0,4.68,4.68A4.67,4.67,0,0,0,263.15,287.32ZM77.47,96.73a9,9,0,1,0-9-9A9,9,0,0,0,77.47,96.73Zm24.63,33.69-7.16,17.09L112,154.68A18.54,18.54,0,0,0,102.1,130.42ZM217,129.1l18-4.37-4.37-18A18.52,18.52,0,0,0,217,129.1ZM88.76,0H74.07l6.51,7.3ZM68.25,293.46,74.07,300H88.76l5.65-5A18.54,18.54,0,0,0,68.25,293.46Z"/>',
'default-inverted' => '<path d="M30,268.62a5,5,0,1,1-5-5A5,5,0,0,1,30,268.62ZM297.33,110.33a5,5,0,1,0,5,5A5,5,0,0,0,297.33,110.33Zm94.86-58.91a20.19,20.19,0,0,0,7.81,4V300H88.76l5.65-5a18.54,18.54,0,0,0-26.16-1.51L74.07,300H0V55.42a20.6,20.6,0,0,0,5.17.67,20.38,20.38,0,0,0,15.76-7.41l-6.17-5.1A12.41,12.41,0,0,1,0,46.94V0H74.07l6.51,7.3L88.76,0H400V46.94a12.17,12.17,0,0,1-2.72-1.69,12.43,12.43,0,0,1-1.67-17.48l-6.17-5.09A20.44,20.44,0,0,0,392.19,51.42ZM68.47,87.73a9,9,0,1,0,9-9A9,9,0,0,0,68.47,87.73ZM2.7,133.84l28.59,26.68,5.46-5.85L8.15,128ZM38,268.62a13,13,0,1,0-13,13A13,13,0,0,0,38,268.62ZM105,209.77l-8,.62a12.41,12.41,0,0,1-20.45,10.38,12.28,12.28,0,0,1-4.3-8.47l-8,.62a20.44,20.44,0,0,0,20.34,18.84q.8,0,1.59-.06A20.43,20.43,0,0,0,105,209.77Zm-2.85-79.35-7.16,17.09L112,154.68A18.54,18.54,0,0,0,102.1,130.42Zm64.75-78.1a12.43,12.43,0,0,1,5.72,16.6l7.19,3.5a20.42,20.42,0,0,0-36.71-17.88l7.2,3.5A12.43,12.43,0,0,1,166.85,52.32Zm-.38,118.3a6.37,6.37,0,1,0-6.36-6.36A6.36,6.36,0,0,0,166.47,170.62Zm38,63.53a9,9,0,1,0-9,9A9,9,0,0,0,204.47,234.15ZM235,124.73l-4.37-18A18.52,18.52,0,0,0,217,129.1ZM256.31,14.25l-6.62-4.5-22,32.33,6.62,4.5ZM267.83,292a4.68,4.68,0,1,0-4.68,4.68A4.68,4.68,0,0,0,267.83,292Zm12.24-73.46a20.44,20.44,0,0,0-20.41-20.34h-.09l0,8a12.43,12.43,0,0,1,12.47,12.37Zm30.26-103.21a13,13,0,1,0-13,13A13,13,0,0,0,310.33,115.33Zm43.15,60.35a4.68,4.68,0,1,0-4.68,4.68A4.68,4.68,0,0,0,353.48,175.68Zm2.66-109.2a9,9,0,1,0-9-9A9,9,0,0,0,356.14,66.48Zm37.13,170.58-5.47-5.83L359.28,258l5.48,5.83Z"/>',
'rotated' => '<path d="M58,249.75l-3.5,7.2a20.42,20.42,0,1,1,17.88-36.71l-3.5,7.19A12.42,12.42,0,0,0,58,249.75ZM48.68,379.07l-5.1,6.17A12.41,12.41,0,0,1,46.94,400h8.48a20.6,20.6,0,0,0,.67-5.17A20.38,20.38,0,0,0,48.68,379.07ZM45.25,2.72a12.33,12.33,0,0,1-8.39,4.45,12.33,12.33,0,0,1-9.09-2.78l-5.09,6.17A20.44,20.44,0,0,0,51.42,7.81a20.19,20.19,0,0,0,4-7.81H46.94A12.17,12.17,0,0,1,45.25,2.72Zm153,137.62v.09l8,0a12.43,12.43,0,0,1,12.37-12.47l0-8A20.44,20.44,0,0,0,198.2,140.34ZM210.39,303a12.41,12.41,0,0,1,10.38,20.45,12.28,12.28,0,0,1-8.47,4.3l.62,8a20.44,20.44,0,0,0,18.84-20.34q0-.8-.06-1.59a20.43,20.43,0,0,0-21.93-18.78ZM42.08,172.31l4.5-6.62-32.33-22-4.5,6.62ZM154.67,363.25,128,391.85l5.85,5.45,26.68-28.59ZM258,40.72l5.83-5.48L237.06,6.73l-5.83,5.47Zm-142.67,49a13,13,0,1,1-13,13A13,13,0,0,1,115.33,89.67Zm0,8a5,5,0,1,0,5,5A5,5,0,0,0,115.33,97.67ZM268.62,362a13,13,0,1,1-13,13A13,13,0,0,1,268.62,362Zm0,8a5,5,0,1,0,5,5A5,5,0,0,0,268.62,370ZM225.15,204.53a9,9,0,1,0,9-9A9,9,0,0,0,225.15,204.53ZM57.48,34.86a9,9,0,1,0,9,9A9,9,0,0,0,57.48,34.86ZM164.26,227.17a6.36,6.36,0,1,0,6.36,6.36A6.37,6.37,0,0,0,164.26,227.17ZM171,51.2a4.69,4.69,0,1,0,4.69-4.68A4.69,4.69,0,0,0,171,51.2Zm116.33,85.65a4.68,4.68,0,1,0,4.68-4.68A4.67,4.67,0,0,0,287.32,136.85ZM96.73,322.53a9,9,0,1,0-9,9A9,9,0,0,0,96.73,322.53Zm33.69-24.63,17.09,7.16L154.68,288A18.54,18.54,0,0,0,130.42,297.9ZM129.1,183l-4.37-18-18,4.37A18.52,18.52,0,0,0,129.1,183ZM0,311.24v14.69l7.3-6.51Zm293.46,20.51,6.54-5.82V311.24l-5-5.65A18.54,18.54,0,0,0,293.46,331.75Z"/>',
'rotated-inverted' => '<path d="M268.62,370a5,5,0,1,1-5,5A5,5,0,0,1,268.62,370ZM110.33,102.67a5,5,0,1,0,5-5A5,5,0,0,0,110.33,102.67ZM51.42,7.81a20.19,20.19,0,0,0,4-7.81H300V311.24l-5-5.65a18.54,18.54,0,0,0-1.51,26.16l6.54-5.82V400H55.42a20.6,20.6,0,0,0,.67-5.17,20.38,20.38,0,0,0-7.41-15.76l-5.1,6.17A12.41,12.41,0,0,1,46.94,400H0V325.93l7.3-6.51L0,311.24V0H46.94a12.17,12.17,0,0,1-1.69,2.72,12.33,12.33,0,0,1-8.39,4.45,12.33,12.33,0,0,1-9.09-2.78l-5.09,6.17A20.44,20.44,0,0,0,51.42,7.81ZM87.73,331.53a9,9,0,1,0-9-9A9,9,0,0,0,87.73,331.53Zm46.11,65.77,26.68-28.59-5.85-5.46L128,391.85ZM268.62,362a13,13,0,1,0,13,13A13,13,0,0,0,268.62,362Zm-58.85-66.93.62,8a12.41,12.41,0,0,1,10.38,20.45,12.28,12.28,0,0,1-8.47,4.3l.62,8a20.44,20.44,0,0,0,18.84-20.34q0-.8-.06-1.59a20.43,20.43,0,0,0-21.93-18.78Zm-79.35,2.85,17.09,7.16L154.68,288A18.54,18.54,0,0,0,130.42,297.9Zm-78.1-64.75a12.43,12.43,0,0,1,16.6-5.72l3.5-7.19A20.42,20.42,0,0,0,54.54,257l3.5-7.2A12.43,12.43,0,0,1,52.32,233.15Zm118.3.38a6.37,6.37,0,1,0-6.36,6.36A6.36,6.36,0,0,0,170.62,233.53Zm63.53-38a9,9,0,1,0,9,9A9,9,0,0,0,234.15,195.53ZM124.73,165l-18,4.37A18.52,18.52,0,0,0,129.1,183ZM14.25,143.69l-4.5,6.62,32.33,22,4.5-6.62ZM292,132.17a4.68,4.68,0,1,0,4.68,4.68A4.68,4.68,0,0,0,292,132.17Zm-73.46-12.24a20.44,20.44,0,0,0-20.34,20.41v.09l8,0a12.43,12.43,0,0,1,12.37-12.47ZM115.33,89.67a13,13,0,1,0,13,13A13,13,0,0,0,115.33,89.67Zm60.35-43.15a4.68,4.68,0,1,0,4.68,4.68A4.68,4.68,0,0,0,175.68,46.52ZM66.48,43.86a9,9,0,1,0-9,9A9,9,0,0,0,66.48,43.86ZM237.06,6.73l-5.83,5.47L258,40.72l5.83-5.48Z"/>',
'thumbnail' => '<path d="M30.05,11.61l-1.44-.7A4.08,4.08,0,0,1,34.07,9,4.07,4.07,0,0,1,36,14.48l-1.44-.7a2.48,2.48,0,1,0-4.46-2.17ZM4.19,9.74,3,8.72A2.49,2.49,0,0,1,0,9.39v1.69a4.06,4.06,0,0,0,1,.14A4.11,4.11,0,0,0,4.19,9.74Zm75.27-.69a2.5,2.5,0,0,1-.34-3.5l-1.23-1a4.08,4.08,0,0,0,.55,5.74,3.94,3.94,0,0,0,1.56.8V9.39A2.57,2.57,0,0,1,79.46,9.05ZM51.93,39.64h0v1.6a2.47,2.47,0,0,1,2.49,2.47H56A4.08,4.08,0,0,0,51.93,39.64ZM15.39,43.08a2.47,2.47,0,0,1-2.28,2.66,2.41,2.41,0,0,1-1.81-.59,2.47,2.47,0,0,1-.86-1.69l-1.59.12a4.09,4.09,0,0,0,4.07,3.77h.31A4.09,4.09,0,0,0,17,43ZM45.54,8.42l1.32.9,4.4-6.47L49.94,2ZM7.35,30.93,1.63,25.6.54,26.77,6.26,32.1ZM71.86,51.6,73,52.77l5.7-5.36-1.09-1.16ZM62.07,23.07a2.6,2.6,0,1,1-2.6-2.6A2.61,2.61,0,0,1,62.07,23.07Zm-1.6,0a1,1,0,1,0-1,1A1,1,0,0,0,60.47,23.07ZM7.6,53.72A2.6,2.6,0,1,1,5,51.12,2.59,2.59,0,0,1,7.6,53.72Zm-1.6,0a1,1,0,1,0-1,1A1,1,0,0,0,6,53.72ZM35.09,45a1.8,1.8,0,1,0,1.8,1.8A1.81,1.81,0,0,0,35.09,45ZM73,11.5a1.8,1.8,0,1,0-1.8,1.8A1.8,1.8,0,0,0,73,11.5ZM34.57,32.85a1.28,1.28,0,1,0-1.28,1.27A1.27,1.27,0,0,0,34.57,32.85ZM69.76,34.2a.94.94,0,1,0,.94.94A.94.94,0,0,0,69.76,34.2ZM52.63,57.46a.94.94,0,1,0,.94.94A.94.94,0,0,0,52.63,57.46ZM17.49,19.35a1.8,1.8,0,1,0-1.8-1.8A1.8,1.8,0,0,0,17.49,19.35Zm.93,9.73L17,32.5l3.42,1.44A3.72,3.72,0,0,0,18.42,29.08Zm27-3.26L49,25l-.88-3.6A3.69,3.69,0,0,0,45.41,25.82ZM17.75,0H14.81l1.31,1.46Zm-4.1,58.69L14.81,60h2.94l1.13-1A3.71,3.71,0,0,0,13.65,58.69Z"/>',
),
'width' => '400px',
'height' => '300px',
);
}
}
return new ET_Builder_Pattern_Confetti();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Crosses.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Crosses
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Crosses extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Crosses', 'et-builder' ),
'svgContent' => array(
'default' => '<polygon points="40 24 32 24 32 32 24 32 24 40 32 40 32 48 40 48 40 40 48 40 48 32 40 32 40 24"/>',
'default-inverted' => '<path d="M0,0V72H72V0ZM48,40H40v8H32V40H24V32h8V24h8v8h8Z"/>',
'rotated' => '<polygon points="40 24 32 24 32 32 24 32 24 40 32 40 32 48 40 48 40 40 48 40 48 32 40 32 40 24"/>',
'rotated-inverted' => '<path d="M0,0V72H72V0ZM48,40H40v8H32V40H24V32h8V24h8v8h8Z"/>',
'thumbnail' => '<path d="M28.89,11.11H26.67V8.89h2.22V6.67h2.22V8.89h2.22v2.22H31.11v2.22H28.89Zm-20,2.22h2.22V11.11h2.22V8.89H11.11V6.67H8.89V8.89H6.67v2.22H8.89Zm2.22,20V31.11h2.22V28.89H11.11V26.67H8.89v2.22H6.67v2.22H8.89v2.22Zm20-6.66H28.89v2.22H26.67v2.22h2.22v2.22h2.22V31.11h2.22V28.89H31.11Zm20,0H48.89v2.22H46.67v2.22h2.22v2.22h2.22V31.11h2.22V28.89H51.11ZM68.89,13.33h2.22V11.11h2.22V8.89H71.11V6.67H68.89V8.89H66.67v2.22h2.22Zm-20,0h2.22V11.11h2.22V8.89H51.11V6.67H48.89V8.89H46.67v2.22h2.22Zm20,13.34v2.22H66.67v2.22h2.22v2.22h2.22V31.11h2.22V28.89H71.11V26.67Zm2.22,20H68.89v2.22H66.67v2.22h2.22v2.22h2.22V51.11h2.22V48.89H71.11Zm-60,0H8.89v2.22H6.67v2.22H8.89v2.22h2.22V51.11h2.22V48.89H11.11Zm20,0H28.89v2.22H26.67v2.22h2.22v2.22h2.22V51.11h2.22V48.89H31.11Zm20,0H48.89v2.22H46.67v2.22h2.22v2.22h2.22V51.11h2.22V48.89H51.11Z"/>',
),
'width' => '72px',
'height' => '72px',
);
}
}
return new ET_Builder_Pattern_Crosses();

View File

@@ -0,0 +1,46 @@
<?php
/**
* Background Pattern Style - Cubes.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Cubes
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Cubes extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Cubes', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M56,129.33,0,97,56,64.67,112,97ZM56,0H0V32.33Zm56,32.33V0H56ZM56,194h56V161.67ZM0,161.67V194H56Z"/>
<path fill-opacity=".5" d="M56,0V64.67L0,97V32.33Zm0,129.33V194l56-32.33V97Z"/>',
'default-inverted' => '<path fill-opacity=".5" d="M112,32.33V97L56,64.67V0ZM0,97v64.67L56,194V129.33Z"/>
<path d="M0,32.33,56,0V64.66L0,97Zm56,97L112,97v64.67L56,194Z"/>',
'rotated' => '<path d="M129.33,56,97,112,64.67,56,97,0ZM0,56v56H32.33ZM32.33,0H0V56ZM194,56V0H161.67Zm-32.33,56H194V56Z"/>
<path fill-opacity=".5" d="M0,56H64.67L97,112H32.33Zm129.33,0H194L161.67,0H97Z"/>',
'rotated-inverted' => '<path fill-opacity=".5" d="M32.33,0H97L64.67,56H0ZM97,112h64.67L194,56H129.33Z"/>
<path d="M32.33,112,0,56H64.66L97,112Zm97-56L97,0h64.67L194,56Z"/>',
'thumbnail' => '<path d="M10,36,0,42V30Zm0-24L0,18l10,6,10-6ZM0,0V6L10,0ZM30,0H10L20,6Zm0,24,10-6L30,12,20,18Zm0,12,10,6,10-6L40,30ZM40,18l10,6,10-6L50,12ZM50,36l10,6,10-6L60,30ZM50,0H30L40,6ZM70,24l10-6L70,12,60,18ZM80,0H70L80,6ZM70,0H50L60,6ZM10,48,0,54l10,6,10-6Zm10,6,10,6,10-6L30,48ZM30,36,20,30,10,36l10,6ZM40,54l10,6,10-6L50,48Zm30,6,10-6L70,48,60,54ZM80,42V30L70,36Z"/>
<path fill-opacity=".5" d="M20,30,10,36V24l10-6ZM0,6V18l10-6V0ZM40,18,30,24V36l10-6ZM20,18l10-6V0L20,6Zm20,0,10-6V0L40,6ZM50,36l10-6V18L50,24Zm20,0,10-6V18L70,24ZM60,6V18l10-6V0ZM20,54,10,60H20ZM0,42V54l10-6V36Zm20,0V54l10-6V36ZM40,54,30,60H40Zm20,0L50,60H60ZM40,54l10-6V36L40,42Zm20,0,10-6V36L60,42Zm20,6V54L70,60Z"/>',
),
'width' => '112px',
'height' => '194px',
);
}
}
return new ET_Builder_Pattern_Cubes();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Diagonal Stripes 2.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Diagonal_Srtipes_2
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Diagonal_Srtipes_2 extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Stripes 2', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M1.41,0,0,1.41V0ZM11,0H9.59L0,9.59V11H1.41L11,1.41Zm0,9.59L9.59,11H11Z"/>',
'default-inverted' => '<path d="M9.59,0,0,9.59V1.41L1.41,0ZM11,1.41,1.41,11H9.59L11,9.59Z"/>',
'rotated' => '<path d="M0,9.59,1.41,11H0ZM0,0V1.41L9.59,11H11V9.59L1.41,0ZM9.59,0,11,1.41V0Z"/>',
'rotated-inverted' => '<path d="M0,1.41,9.59,11H1.41L0,9.59ZM1.41,0,11,9.59V1.41L9.59,0Z"/>',
'thumbnail' => '<path d="M.86,0,0,1V0ZM6.67,1l.85-1H5.81L0,6.54V8.46ZM79.14,0,25.81,60h1.71L80,1V0ZM6.67,8.46,14.19,0H12.48L0,14V16ZM73.33,14,32.48,60h1.71L80,8.46V6.54ZM6.67,16,20.86,0H19.14L0,21.54v1.92Zm66.66,5.58L39.14,60h1.72L80,16V14ZM6.67,23.46,27.52,0H25.81L0,29V31ZM73.33,29,45.81,60h1.71L80,23.46V21.54ZM6.67,31,34.19,0H32.48L0,36.54v1.92Zm66.66,5.58L52.48,60h1.71L80,31V29ZM6.67,38.46,40.86,0H39.14L0,44V46ZM73.33,44,59.14,60h1.72L80,38.46V36.54ZM6.67,46,47.52,0H45.81L0,51.54v1.92Zm66.66,5.58L65.81,60h1.71L80,46V44Zm-65.81,1L54.19,0H52.48L0,59v1H.86Zm6.67,0L60.86,0H59.14L5.81,60H7.52Zm6.67,0L67.52,0H65.81L12.48,60h1.71Zm6.66,0L74.19,0H72.48L19.14,60h1.72ZM73.33,59l-.85,1h1.71L80,53.46V51.54ZM80,60V59l-.86,1Z"/>',
),
'width' => '11px',
'height' => '11px',
);
}
}
return new ET_Builder_Pattern_Diagonal_Srtipes_2();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Diagonal Stripes.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Diagonal_Stripes
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Diagonal_Stripes extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Stripes', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M32,0,0,32V0Zm0,64L64,32V0L0,64Z"/>',
'default-inverted' => '<path d="M32,64,64,32V64ZM32,0,0,32V64L64,0Z"/>',
'rotated' => '<path d="M0,32,32,64H0Zm64,0L32,0H0L64,64Z"/>',
'rotated-inverted' => '<path d="M64,32,32,0H64ZM0,32,32,64H64L0,0Z"/>',
'thumbnail' => '<path d="M6.67,0,0,7.5V0Zm6.66,7.5L20,0H13.33L0,15v7.5ZM66.67,15l-40,45h6.66L80,7.5V0ZM13.33,22.5,33.33,0H26.67L0,30v7.5Zm0,15L46.67,0H40L0,45v7.5Zm40,7.5L40,60h6.67L80,22.5V15ZM20,45,60,0H53.33L0,60H6.67Zm13.33,0,40-45H66.67L13.33,60H20Zm20,15H60L80,37.5V30Zm20,0L80,52.5V45L66.67,60Z"/>',
),
'width' => '64px',
'height' => '64px',
);
}
}
return new ET_Builder_Pattern_Diagonal_Stripes();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Diamonds.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Diamonds
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Diamonds extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diamonds', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M20,0,0,32V0ZM40,0H20L40,32ZM0,64H20L0,32ZM40,32,20,64H40Z"/>',
'default-inverted' => '<polygon points="20 0 0 32 20 64 40 32 20 0"/>',
'rotated' => '<path d="M0,20,32,40H0ZM0,0V20L32,0ZM64,40V20L32,40ZM32,0,64,20V0Z"/>',
'rotated-inverted' => '<polygon points="0 20 32 40 64 20 32 0 0 20"/>',
'thumbnail' => '<path d="M13.33,10,6.67,20,0,10,6.67,0ZM20,0,13.33,10,20,20l6.67-10ZM33.33,0,26.67,10l6.66,10L40,10ZM46.67,0,40,10l6.67,10,6.66-10ZM60,0,53.33,10,60,20l6.67-10ZM73.33,0,66.67,10l6.66,10L80,10ZM6.67,20,0,30,6.67,40l6.66-10ZM20,20,13.33,30,20,40l6.67-10Zm13.33,0L26.67,30l6.66,10L40,30Zm13.34,0L40,30l6.67,10,6.66-10ZM60,20,53.33,30,60,40l6.67-10Zm13.33,0L66.67,30l6.66,10L80,30ZM6.67,40,0,50,6.67,60l6.66-10ZM20,40,13.33,50,20,60l6.67-10Zm13.33,0L26.67,50l6.66,10L40,50Zm13.34,0L40,50l6.67,10,6.66-10ZM60,40,53.33,50,60,60l6.67-10Zm13.33,0L66.67,50l6.66,10L80,50Z"/>',
),
'width' => '40px',
'height' => '64px',
);
}
}
return new ET_Builder_Pattern_Diamonds();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Honeycomb.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Honeycomb
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Honeycomb extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Honeycomb', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M41.12,40,53,16.28,60.62,1H80V0H58.88L40,37.76,21.12,0H0V1H19.38L27,16.28,38.88,40,19.38,79H0v2H19.38l19.5,39-19.5,39H0v1H21.12L40,122.24,58.88,160H80v-1H60.62l-19.5-39,19.5-39H80V79H60.62ZM40,117.76,21.12,80,40,42.24,58.88,80Z"/>',
'default-inverted' => '<path d="M21.12,0H58.88L40,37.76ZM38.88,40,27,16.28,19.38,1H0V79H19.38ZM21.12,80,40,117.76,58.88,80,40,42.24Zm17.76,40L19.38,81H0v78H19.38ZM60.62,1,53,16.28,41.12,40l19.5,39H80V1ZM41.12,120l19.5,39H80V81H60.62ZM40,122.24,21.12,160H58.88Z"/>',
'rotated' => '<path d="M40,38.88,16.28,27,1,19.38V0H0V21.12L37.76,40,0,58.88V80H1V60.62L16.28,53,40,41.12l39,19.5V80h2V60.62l39-19.5,39,19.5V80h1V58.88L122.24,40,160,21.12V0h-1V19.38l-39,19.5L81,19.38V0H79V19.38ZM117.76,40,80,58.88,42.24,40,80,21.12Z"/>',
'rotated-inverted' => '<path d="M0,58.88V21.12L37.76,40ZM40,41.12,16.28,53,1,60.62V80H79V60.62ZM80,58.88,117.76,40,80,21.12,42.24,40Zm40-17.76L81,60.62V80h78V60.62ZM1,19.38,16.28,27,40,38.88l39-19.5V0H1Zm119,19.5,39-19.5V0H81V19.38ZM122.24,40,160,58.88V21.12Z"/>',
'thumbnail' => '<path d="M73.54.38H80V0H73L66.67,14.16,60.37,0H46.29L40,14.16,33.71,0H19.63l-6.3,14.16L7,0H0V.38H6.46L9,6.11,13,15,6.46,29.62H0v.76H6.46L13,45,6.46,59.62H0V60H7l6.29-14.16L19.63,60H33.71L40,45.84,46.29,60H60.37l6.3-14.16L73,60h7v-.38H73.54L67,45l6.5-14.62H80v-.76H73.54L67,15,71,6.11ZM44.33,6.11,46.87.38H59.79l2.55,5.73,4,8.89-6.5,14.62H46.87L40.37,15Zm-26.67,0L20.21.38H33.13l2.54,5.73,4,8.89-6.5,14.62H20.21L13.71,15ZM7,30l6.29-14.16L19.63,30l-6.3,14.16ZM33.13,59.62H20.21L13.71,45l6.5-14.62H33.13L39.63,45ZM33.71,30,40,15.84,46.29,30,40,44.16ZM59.79,59.62H46.87L40.37,45l6.5-14.62H59.79L66.29,45ZM73,30,66.67,44.16,60.37,30l6.3-14.16Z"/>',
),
'width' => '80px',
'height' => '160px',
);
}
}
return new ET_Builder_Pattern_Honeycomb();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Inverted Chevrons 2.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Inverted_Chevrons_2
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Inverted_Chevrons_2 extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Inverted Chevrons 2', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M50,140,0,105V70l50,35Zm0-35,50-35H50Zm50,0L50,140h50ZM50,0l50,35V70L50,35Zm0,35L0,70H50ZM0,35,50,0H0Z"/>',
'default-inverted' => '<path d="M50,105l50-35v35L50,140Zm0-35H0l50,35ZM0,140H50L0,105ZM50,35,0,70V35L50,0Zm0,35h50L50,35ZM100,0H50l50,35Z"/>',
'rotated' => '<path d="M140,50l-35,50H70l35-50Zm-35,0L70,0V50Zm0-50,35,50V0ZM0,50,35,0H70L35,50Zm35,0,35,50V50Zm0,50L0,50v50Z"/>',
'rotated-inverted' => '<path d="M105,50,70,0h35l35,50ZM70,50v50l35-50Zm70,50V50l-35,50ZM35,50l35,50H35L0,50Zm35,0V0L35,50ZM0,0V50L35,0Z"/>',
'thumbnail' => '<path d="M13,40,0,30V20L13,30Zm0-10L26.33,20H13Zm14,0L13,40H27ZM13,.25,27,10V20L13,10ZM13,10-.33,20H13ZM0,10,13,0H0ZM40,40,27,30V20L40,30Zm0-10L53,20H40Zm13,0L40,40H53ZM40,.25,53,10V20L40,10ZM40,10,26.67,20H40ZM27,10,40,0H27ZM67,40,53,30V20L67,30Zm0-10L80.33,20H67Zm13,0L66.67,40H80ZM67,.25,80,10V20L67,10ZM67,10,53,20H67ZM53,10,66.33,0H53ZM13,40,27,50v9.75L13,50Zm0,10L-.33,60H13ZM0,50,13,40H0ZM40,40,53,50v9.75L40,50Zm0,10L26.67,60H40ZM27,50,40,40H27ZM67,40,80,50v9.75L67,50Zm0,10L53,60H67ZM53,50,66.33,40H53Z"/>',
),
'width' => '100px',
'height' => '140px',
);
}
}
return new ET_Builder_Pattern_Inverted_Chevrons_2();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Inverted Chevrons.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Inverted_Chevrons
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Inverted_Chevrons extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Inverted Chevrons', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M50,0V40L0,0Zm0,80L0,40V80Zm50-40V0L50,40V80Z"/>',
'default-inverted' => '<path d="M100,0,50,40V0Zm0,80V40L50,80ZM50,80V40L0,0V40Z"/>',
'rotated' => '<path d="M0,50H40L0,100Zm80,0L40,100H80ZM40,0H0L40,50H80Z"/>',
'rotated-inverted' => '<path d="M0,0,40,50H0ZM80,0H40L80,50Zm0,50H40L0,100H40Z"/>',
'thumbnail' => '<path d="M14,0V10L-.33,0ZM0,10.25V20l14,9.75V20Zm27-10L14,10v9.75L27,10ZM40,0H26.67L40,10ZM53,10V.25L40,10v9.75ZM67,0H53.67L67,10ZM53,10.25V20l14,9.75V20ZM80,10V.25L67,10v9.75ZM0,30.25V40l14,9.75V40Zm27-10L14,30v9.75L27,30ZM40,20,27,10.25V20l13,9.75ZM27,30.25V40l13,9.75V40Zm13,9.5L53,30V20.25L40,30ZM53,40l14,9.75V40L53,30.25ZM80,30V20.25L67,30v9.75ZM0,60H14.33L0,50ZM14,50v9.75L27,50V40.25ZM27,60H40.33L27,50ZM40,50v9.75L53,50V40.25ZM53,60H67.33L53,50ZM80,50V40.25L67,50v9.75Z"/>',
),
'width' => '100px',
'height' => '80px',
);
}
}
return new ET_Builder_Pattern_Inverted_Chevrons();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Pills.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Pills
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Pills extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Pills', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M27,180a13,13,0,0,1-26,0V60a13,13,0,0,1,26,0ZM55,0V60a13,13,0,0,1-26,0V0H0V240H29V180a13,13,0,0,1,26,0v60h1V0Z"/>',
'default-inverted' => '<path d="M14,193A13,13,0,0,1,1,180V60a13,13,0,0,1,26,0V180A13,13,0,0,1,14,193ZM55,60V0H29V60a13,13,0,0,0,26,0Zm0,180V180a13,13,0,0,0-26,0v60Z"/>',
'rotated' => '<path d="M180,29a13,13,0,0,1,0,26H60a13,13,0,0,1,0-26ZM0,1H60a13,13,0,0,1,0,26H0V56H240V27H180a13,13,0,0,1,0-26h60V0H0Z"/>',
'rotated-inverted' => '<path d="M193,42a13,13,0,0,1-13,13H60a13,13,0,0,1,0-26H180A13,13,0,0,1,193,42ZM60,1H0V27H60A13,13,0,0,0,60,1ZM240,1H180a13,13,0,0,0,0,26h60Z"/>',
'thumbnail' => '<path d="M79,0V15s-.63,3.25-2.33,3.25A2.64,2.64,0,0,1,74,15V0H66V15a3,3,0,1,1-6,0V0H53V15a3,3,0,1,1-6,0V0H40V15a3,3,0,1,1-6,0V0H26V15a3.14,3.14,0,0,1-3,3.25A3.14,3.14,0,0,1,20,15V0H13V15a3.14,3.14,0,0,1-3,3.25A3.14,3.14,0,0,1,7,15V0H0V60H7V45a3.14,3.14,0,0,1,3-3.25A3.14,3.14,0,0,1,13,45V60h7V45a3.14,3.14,0,0,1,3-3.25A3.14,3.14,0,0,1,26,45V60h8V45a3,3,0,1,1,6,0V60h7V45a3,3,0,1,1,6,0V60h7V45a3,3,0,1,1,6,0V60h8V45a2.64,2.64,0,0,1,2.67-3.25C78.37,41.75,79,45,79,45V60h1V0ZM6,44.54a3.08,3.08,0,0,1-3,3.15,3.08,3.08,0,0,1-3-3.15V15.46a3.08,3.08,0,0,1,3-3.15,3.08,3.08,0,0,1,3,3.15Zm14,0a3,3,0,1,1-6,0V15.46a3,3,0,1,1,6,0Zm13,0a3,3,0,1,1-6,0V15.46a3,3,0,1,1,6,0Zm13,0a3,3,0,1,1-6,0V15.46a3,3,0,1,1,6,0Zm14,0a3,3,0,1,1-6,0V15.46a3,3,0,1,1,6,0Zm13,0a3,3,0,1,1-6,0V15.46a3,3,0,1,1,6,0Z"/>',
),
'width' => '56px',
'height' => '240px',
);
}
}
return new ET_Builder_Pattern_Pills();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Pinwheel.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Pinwheel
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Pinwheel extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Pinwheel', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M52,50A48.06,48.06,0,0,1,98,2V98A48.06,48.06,0,0,1,52,50Zm-4,0A48.06,48.06,0,0,0,2,2V98A48.06,48.06,0,0,0,48,50ZM152,150a48.06,48.06,0,0,0,46,48V102A48.06,48.06,0,0,0,152,150Zm-50-48V198A48,48,0,0,0,102,102Zm48-50a48.06,48.06,0,0,0-48,46H198A48.06,48.06,0,0,0,150,52ZM198,2H102a48.06,48.06,0,0,0,48,46A48.06,48.06,0,0,0,198,2ZM50,152A48.06,48.06,0,0,0,2,198H98A48.06,48.06,0,0,0,50,152Zm0-4a48.06,48.06,0,0,0,48-46H2A48.06,48.06,0,0,0,50,148Z"/>',
'default-inverted' => '<path d="M0,0V200H200V0ZM198,2a48.06,48.06,0,0,1-48,46A48.06,48.06,0,0,1,102,2ZM150,52a48.06,48.06,0,0,1,48,46H102A48.06,48.06,0,0,1,150,52ZM2,2A48.06,48.06,0,0,1,48,50,48.06,48.06,0,0,1,2,98ZM2,198A48,48,0,0,1,98,198Zm48-50A48.06,48.06,0,0,1,2,102H98A48.06,48.06,0,0,1,50,148ZM98,98A48,48,0,0,1,98,2Zm4,100V102A48,48,0,0,1,102,198Zm96,0A48,48,0,0,1,198,102Z"/>',
'rotated' => '<path d="M52,50A48.06,48.06,0,0,1,98,2V98A48.06,48.06,0,0,1,52,50Zm-4,0A48.06,48.06,0,0,0,2,2V98A48.06,48.06,0,0,0,48,50ZM152,150a48.06,48.06,0,0,0,46,48V102A48.06,48.06,0,0,0,152,150Zm-50-48V198A48,48,0,0,0,102,102Zm48-50a48.06,48.06,0,0,0-48,46H198A48.06,48.06,0,0,0,150,52ZM198,2H102a48.06,48.06,0,0,0,48,46A48.06,48.06,0,0,0,198,2ZM50,152A48.06,48.06,0,0,0,2,198H98A48.06,48.06,0,0,0,50,152Zm0-4a48.06,48.06,0,0,0,48-46H2A48.06,48.06,0,0,0,50,148Z"/>',
'rotated-inverted' => '<path d="M0,0V200H200V0ZM198,2a48.06,48.06,0,0,1-48,46A48.06,48.06,0,0,1,102,2ZM150,52a48.06,48.06,0,0,1,48,46H102A48.06,48.06,0,0,1,150,52ZM2,2A48.06,48.06,0,0,1,48,50,48.06,48.06,0,0,1,2,98ZM2,198A48,48,0,0,1,98,198Zm48-50A48.06,48.06,0,0,1,2,102H98A48.06,48.06,0,0,1,50,148ZM98,98A48,48,0,0,1,98,2Zm4,100V102A48,48,0,0,1,102,198Zm96,0A48,48,0,0,1,198,102Z"/>',
'thumbnail' => '<path d="M0,0V60H80V0ZM79.59.4A9.61,9.61,0,0,1,70,9.6,9.61,9.61,0,0,1,60.41.4Zm0,20V39.59a9.6,9.6,0,0,1,0-19.18ZM70,10.4a9.61,9.61,0,0,1,9.59,9.2H60.41A9.61,9.61,0,0,1,70,10.4Zm-9.6,10a9.6,9.6,0,0,1,0,19.18Zm-.8-20V19.59A9.6,9.6,0,0,1,59.6.41ZM50,29.6a9.61,9.61,0,0,1-9.59-9.2H59.59A9.61,9.61,0,0,1,50,29.6Zm9.59,10H40.41a9.6,9.6,0,0,1,19.18,0ZM40.4.41a9.6,9.6,0,0,1,0,19.18Zm-.81,0A9.61,9.61,0,0,1,30,9.6,9.61,9.61,0,0,1,20.41.4Zm0,20V39.59a9.6,9.6,0,0,1,0-19.18ZM30,10.4a9.61,9.61,0,0,1,9.59,9.2H20.41A9.61,9.61,0,0,1,30,10.4Zm-9.6,10a9.6,9.6,0,0,1,0,19.18Zm-.8-20V19.59A9.6,9.6,0,0,1,19.6.41ZM10,29.6A9.61,9.61,0,0,1,.41,20.4H19.59A9.61,9.61,0,0,1,10,29.6Zm9.59,10H.41a9.6,9.6,0,0,1,19.18,0ZM.4.41A9.61,9.61,0,0,1,9.6,10,9.61,9.61,0,0,1,.4,19.59Zm0,59.18V40.41A9.61,9.61,0,0,1,9.6,50,9.61,9.61,0,0,1,.4,59.59Zm19.2,0a9.6,9.6,0,0,1,0-19.18Zm.81,0a9.6,9.6,0,0,1,19.18,0ZM30,49.6a9.61,9.61,0,0,1-9.59-9.2H39.59A9.61,9.61,0,0,1,30,49.6Zm10.4,10V40.41a9.6,9.6,0,0,1,0,19.18Zm19.2,0a9.6,9.6,0,0,1,0-19.18Zm.81,0a9.6,9.6,0,0,1,19.18,0ZM70,49.6a9.61,9.61,0,0,1-9.59-9.2H79.59A9.61,9.61,0,0,1,70,49.6Z"/>',
),
'height' => '200px',
'width' => '200px',
);
}
}
return new ET_Builder_Pattern_Pinwheel();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Polka Dots.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Polka_Dots
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Polka_Dots extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Polka Dots', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M0,8V0H8A8,8,0,0,1,0,8ZM80,8V0H72A8,8,0,0,0,80,8ZM0,72v8H8A8,8,0,0,0,0,72ZM40,32a8,8,0,1,0,8,8A8,8,0,0,0,40,32ZM80,72a8,8,0,0,0-8,8h8Z"/>',
'default-inverted' => '<path d="M80,72V8a8,8,0,0,1-8-8H8A8,8,0,0,1,0,8V72a8,8,0,0,1,8,8H72A8,8,0,0,1,80,72ZM40,48a8,8,0,1,1,8-8A8,8,0,0,1,40,48Z"/>',
'rotated' => '<path d="M0,8V0H8A8,8,0,0,1,0,8ZM80,8V0H72A8,8,0,0,0,80,8ZM0,72v8H8A8,8,0,0,0,0,72ZM40,32a8,8,0,1,0,8,8A8,8,0,0,0,40,32ZM80,72a8,8,0,0,0-8,8h8Z"/>',
'rotated-inverted' => '<path d="M80,72V8a8,8,0,0,1-8-8H8A8,8,0,0,1,0,8V72a8,8,0,0,1,8,8H72A8,8,0,0,1,80,72ZM40,48a8,8,0,1,1,8-8A8,8,0,0,1,40,48Z"/>',
'thumbnail' => '<path d="M0,0H1.6A1.6,1.6,0,0,1,0,1.6ZM14.4,0A1.6,1.6,0,0,0,16,1.6,1.6,1.6,0,0,0,17.6,0H14.4ZM0,14.4v3.2A1.6,1.6,0,0,0,1.6,16,1.6,1.6,0,0,0,0,14.4Zm8-8A1.6,1.6,0,1,0,9.6,8,1.6,1.6,0,0,0,8,6.4ZM30.4,0A1.6,1.6,0,0,0,32,1.6,1.6,1.6,0,0,0,33.6,0H30.4ZM16,14.4A1.6,1.6,0,1,0,17.6,16,1.6,1.6,0,0,0,16,14.4Zm8-8A1.6,1.6,0,1,0,25.6,8,1.6,1.6,0,0,0,24,6.4ZM46.4,0A1.6,1.6,0,0,0,48,1.6,1.6,1.6,0,0,0,49.6,0H46.4ZM32,14.4A1.6,1.6,0,1,0,33.6,16,1.6,1.6,0,0,0,32,14.4Zm8-8A1.6,1.6,0,1,0,41.6,8,1.6,1.6,0,0,0,40,6.4ZM62.4,0A1.6,1.6,0,0,0,64,1.6,1.6,1.6,0,0,0,65.6,0H62.4ZM48,14.4A1.6,1.6,0,1,0,49.6,16,1.6,1.6,0,0,0,48,14.4Zm8-8A1.6,1.6,0,1,0,57.6,8,1.6,1.6,0,0,0,56,6.4ZM78.4,0A1.6,1.6,0,0,0,80,1.6V0ZM64,14.4A1.6,1.6,0,1,0,65.6,16,1.6,1.6,0,0,0,64,14.4Zm8-8A1.6,1.6,0,1,0,73.6,8,1.6,1.6,0,0,0,72,6.4ZM78.4,16A1.6,1.6,0,0,0,80,17.6V14.4A1.6,1.6,0,0,0,78.4,16ZM0,30.4v3.2A1.6,1.6,0,0,0,1.6,32,1.6,1.6,0,0,0,0,30.4Zm8-8A1.6,1.6,0,1,0,9.6,24,1.6,1.6,0,0,0,8,22.4Zm8,8A1.6,1.6,0,1,0,17.6,32,1.6,1.6,0,0,0,16,30.4Zm8-8A1.6,1.6,0,1,0,25.6,24,1.6,1.6,0,0,0,24,22.4Zm8,8A1.6,1.6,0,1,0,33.6,32,1.6,1.6,0,0,0,32,30.4Zm8-8A1.6,1.6,0,1,0,41.6,24,1.6,1.6,0,0,0,40,22.4Zm8,8A1.6,1.6,0,1,0,49.6,32,1.6,1.6,0,0,0,48,30.4Zm8-8A1.6,1.6,0,1,0,57.6,24,1.6,1.6,0,0,0,56,22.4Zm8,8A1.6,1.6,0,1,0,65.6,32,1.6,1.6,0,0,0,64,30.4Zm8-8A1.6,1.6,0,1,0,73.6,24,1.6,1.6,0,0,0,72,22.4ZM78.4,32A1.6,1.6,0,0,0,80,33.6V30.4A1.6,1.6,0,0,0,78.4,32ZM0,46.4v3.2A1.6,1.6,0,0,0,1.6,48,1.6,1.6,0,0,0,0,46.4Zm8-8A1.6,1.6,0,1,0,9.6,40,1.6,1.6,0,0,0,8,38.4Zm8,8A1.6,1.6,0,1,0,17.6,48,1.6,1.6,0,0,0,16,46.4Zm8-8A1.6,1.6,0,1,0,25.6,40,1.6,1.6,0,0,0,24,38.4Zm8,8A1.6,1.6,0,1,0,33.6,48,1.6,1.6,0,0,0,32,46.4Zm8-8A1.6,1.6,0,1,0,41.6,40,1.6,1.6,0,0,0,40,38.4Zm8,8A1.6,1.6,0,1,0,49.6,48,1.6,1.6,0,0,0,48,46.4Zm8-8A1.6,1.6,0,1,0,57.6,40,1.6,1.6,0,0,0,56,38.4Zm8,8A1.6,1.6,0,1,0,65.6,48,1.6,1.6,0,0,0,64,46.4Zm8-8A1.6,1.6,0,1,0,73.6,40,1.6,1.6,0,0,0,72,38.4ZM78.4,48A1.6,1.6,0,0,0,80,49.6V46.4A1.6,1.6,0,0,0,78.4,48ZM8,54.4A1.6,1.6,0,1,0,9.6,56,1.6,1.6,0,0,0,8,54.4Zm16,0A1.6,1.6,0,1,0,25.6,56,1.6,1.6,0,0,0,24,54.4Zm16,0A1.6,1.6,0,1,0,41.6,56,1.6,1.6,0,0,0,40,54.4Zm16,0A1.6,1.6,0,1,0,57.6,56,1.6,1.6,0,0,0,56,54.4Zm16,0A1.6,1.6,0,1,0,73.6,56,1.6,1.6,0,0,0,72,54.4Z"/>',
),
'width' => '80px',
'height' => '80px',
);
}
}
return new ET_Builder_Pattern_Polka_Dots();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Scallops.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Scallops
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Scallops extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Scallops', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M0,21.68a50,50,0,0,0,39.77,28A40.1,40.1,0,0,1,0,85.05V95a40.1,40.1,0,0,1,39.77,35.37A50,50,0,0,0,0,158.32V180H5a40.09,40.09,0,0,1,35.37-39.76,50.08,50.08,0,0,0,28,39.76h43.36a50.08,50.08,0,0,0,28-39.76A40.09,40.09,0,0,1,175.05,180H180V158.32a50,50,0,0,0-39.77-28A40.1,40.1,0,0,1,180,95v-9.9a40.1,40.1,0,0,1-39.77-35.37,50,50,0,0,0,39.77-28V0h-4.95a40.09,40.09,0,0,1-35.37,39.76A50.08,50.08,0,0,0,111.65,0H68.35a50.08,50.08,0,0,0-28,39.76A40.09,40.09,0,0,1,5,0H0ZM90,175.05a40.1,40.1,0,0,1-39.77-35.37,50,50,0,0,0,39.77-28,50,50,0,0,0,39.77,28A40.1,40.1,0,0,1,90,175.05ZM158.32,90a50.08,50.08,0,0,0-28,39.76,40,40,0,0,1,0-79.52A50.08,50.08,0,0,0,158.32,90ZM90,5a40.1,40.1,0,0,1,39.77,35.37A50,50,0,0,0,90,68.32a50,50,0,0,0-39.77-28A40.1,40.1,0,0,1,90,5ZM49.68,50.24a40,40,0,0,1,0,79.52A50.08,50.08,0,0,0,21.68,90,50.08,50.08,0,0,0,49.68,50.24Z"/>',
'default-inverted' => '<path d="M0,158.32V95a40.1,40.1,0,0,1,39.77,35.37A50,50,0,0,0,0,158.32Zm40.32-18.08A40.09,40.09,0,0,0,5,180H68.32A50.08,50.08,0,0,1,40.32,140.24Zm-.55-90.56A50,50,0,0,1,0,21.68V85.05A40.1,40.1,0,0,0,39.77,49.68Zm50.23,62a50,50,0,0,1-39.77,28,40,40,0,0,0,79.54,0A50,50,0,0,1,90,111.68Zm0-43.36a50,50,0,0,1,39.77-28,40,40,0,0,0-79.54,0A50,50,0,0,1,90,68.32ZM95,90a40.09,40.09,0,0,0,35.37,39.76,50.08,50.08,0,0,1,28-39.76,50.08,50.08,0,0,1-28-39.76A40.09,40.09,0,0,0,95,90ZM40.32,39.76A50.08,50.08,0,0,1,68.35,0H5A40.09,40.09,0,0,0,40.32,39.76ZM21.68,90a50.08,50.08,0,0,1,28,39.76,40,40,0,0,0,0-79.52A50.08,50.08,0,0,1,21.68,90Zm118-50.24A40.09,40.09,0,0,0,175.05,0h-63.4A50.08,50.08,0,0,1,139.68,39.76Zm.55,90.56a50,50,0,0,1,39.77,28V95A40.1,40.1,0,0,0,140.23,130.32Zm0-80.64A40.1,40.1,0,0,0,180,85.05V21.68A50,50,0,0,1,140.23,49.68Zm-.55,90.56a50.08,50.08,0,0,1-28,39.76h63.37A40.09,40.09,0,0,0,139.68,140.24Z"/>',
'rotated' => '<path d="M21.68,180a50,50,0,0,0,28-39.77A40.1,40.1,0,0,1,85.05,180H95a40.1,40.1,0,0,1,35.37-39.77,50,50,0,0,0,28,39.77H180v-4.95h0a40.09,40.09,0,0,1-39.76-35.37,50.08,50.08,0,0,0,39.76-28h0V68.32h0a50.08,50.08,0,0,0-39.76-28A40.09,40.09,0,0,1,180,5h0V0H158.32a50,50,0,0,0-28,39.77A40.1,40.1,0,0,1,95,0h-9.9A40.1,40.1,0,0,1,49.68,39.77,50,50,0,0,0,21.68,0H0V5H0A40.09,40.09,0,0,1,39.76,40.32,50.08,50.08,0,0,0,0,68.35v43.3a50.08,50.08,0,0,0,39.76,28A40.09,40.09,0,0,1,0,175.05H0V180ZM175.05,90a40.1,40.1,0,0,1-35.37,39.77,50,50,0,0,0-28-39.77,50,50,0,0,0,28-39.77A40.1,40.1,0,0,1,175.05,90ZM90,21.68a50.08,50.08,0,0,0,39.76,28,40,40,0,0,1-79.52,0A50.08,50.08,0,0,0,90,21.68ZM5,90A40.1,40.1,0,0,1,40.32,50.23,50,50,0,0,0,68.32,90a50,50,0,0,0-28,39.77A40.1,40.1,0,0,1,5,90Zm45.29,40.32a40,40,0,0,1,79.52,0,50.08,50.08,0,0,0-39.76,28A50.08,50.08,0,0,0,50.24,130.32Z"/>',
'rotated-inverted' => '<path d="M158.32,180H95a40.1,40.1,0,0,1,35.37-39.77A50,50,0,0,0,158.32,180Zm-18.08-40.32A40.09,40.09,0,0,0,180,175.05h0V111.68h0A50.08,50.08,0,0,1,140.24,139.68Zm-90.56.55a50,50,0,0,1-28,39.77H85.05A40.1,40.1,0,0,0,49.68,140.23Zm62-50.23a50,50,0,0,1,28,39.77,40,40,0,0,0,0-79.54A50,50,0,0,1,111.68,90ZM68.32,90a50,50,0,0,1-28-39.77,40,40,0,0,0,0,79.54A50,50,0,0,1,68.32,90Zm21.68-5a40.09,40.09,0,0,0,39.76-35.37A50.08,50.08,0,0,1,90,21.68a50.08,50.08,0,0,1-39.76,28A40.09,40.09,0,0,0,90,85.05ZM39.76,139.68A50.08,50.08,0,0,1,0,111.65v63.4H0A40.09,40.09,0,0,0,39.76,139.68ZM90,158.32a50.08,50.08,0,0,1,39.76-28,40,40,0,0,0-79.52,0A50.08,50.08,0,0,1,90,158.32Zm-50.24-118A40.09,40.09,0,0,0,0,5H0v63.4A50.08,50.08,0,0,1,39.76,40.32Zm90.56-.55A50,50,0,0,1,158.32,0H95A40.1,40.1,0,0,0,130.32,39.77Zm-80.64,0A40.1,40.1,0,0,0,85.05,0H21.68A50,50,0,0,1,49.68,39.77Zm90.56.55a50.08,50.08,0,0,1,39.76,28h0V5h0A40.09,40.09,0,0,0,140.24,40.32Z"/>',
'thumbnail' => '<path d="M24.81,40h0A11.14,11.14,0,0,0,31,31.16,8.91,8.91,0,0,1,38.9,40h0A8.91,8.91,0,0,1,31,48.84,11.13,11.13,0,0,0,24.81,40Zm4,9A11.14,11.14,0,0,0,20,55.18,11.14,11.14,0,0,0,11.16,49a8.9,8.9,0,0,1,17.68,0ZM20,38.9A8.91,8.91,0,0,1,11.16,31,11.14,11.14,0,0,0,20,24.82,11.14,11.14,0,0,0,28.84,31,8.91,8.91,0,0,1,20,38.9ZM31.16,29a8.9,8.9,0,0,1,17.68,0A11.14,11.14,0,0,0,40,35.18,11.14,11.14,0,0,0,31.16,29ZM40,44.82A11.14,11.14,0,0,0,48.84,51a8.9,8.9,0,0,1-17.68,0A11.14,11.14,0,0,0,40,44.82ZM41.1,40h0A8.91,8.91,0,0,1,49,31.16,11.14,11.14,0,0,0,55.18,40h0A11.13,11.13,0,0,0,49,48.84,8.91,8.91,0,0,1,41.1,40Zm10.06-9A11.14,11.14,0,0,0,60,24.82,11.14,11.14,0,0,0,68.84,31a8.9,8.9,0,0,1-17.68,0ZM60,41.1A8.91,8.91,0,0,1,68.84,49,11.14,11.14,0,0,0,60,55.18,11.14,11.14,0,0,0,51.16,49,8.91,8.91,0,0,1,60,41.1ZM64.81,40h0A11.14,11.14,0,0,0,71,31.16,8.91,8.91,0,0,1,78.9,40h0A8.91,8.91,0,0,1,71,48.84,11.13,11.13,0,0,0,64.81,40ZM75.18,20A11.14,11.14,0,0,0,69,28.84a8.9,8.9,0,0,1,0-17.68A11.14,11.14,0,0,0,75.18,20ZM60,1.1A8.91,8.91,0,0,1,68.84,9,11.14,11.14,0,0,0,60,15.18,11.14,11.14,0,0,0,51.16,9,8.91,8.91,0,0,1,60,1.1ZM51,11.16a8.9,8.9,0,0,1,0,17.68A11.14,11.14,0,0,0,44.82,20,11.14,11.14,0,0,0,51,11.16ZM40,4.82A11.14,11.14,0,0,0,48.84,11a8.9,8.9,0,0,1-17.68,0A11.14,11.14,0,0,0,40,4.82ZM35.18,20A11.14,11.14,0,0,0,29,28.84a8.9,8.9,0,0,1,0-17.68A11.14,11.14,0,0,0,35.18,20ZM20,1.1A8.91,8.91,0,0,1,28.84,9,11.14,11.14,0,0,0,20,15.18,11.14,11.14,0,0,0,11.16,9,8.91,8.91,0,0,1,20,1.1ZM4.82,20A11.14,11.14,0,0,0,11,11.16a8.9,8.9,0,0,1,0,17.68A11.14,11.14,0,0,0,4.82,20ZM1.1,40h0A8.91,8.91,0,0,1,9,31.16,11.14,11.14,0,0,0,15.18,40h0A11.13,11.13,0,0,0,9,48.84,8.91,8.91,0,0,1,1.1,40ZM80,0H78.9A8.91,8.91,0,0,1,71,8.84,11.13,11.13,0,0,0,64.81,0H55.19A11.13,11.13,0,0,0,49,8.84,8.91,8.91,0,0,1,41.1,0H38.9A8.91,8.91,0,0,1,31,8.84,11.13,11.13,0,0,0,24.81,0H15.19A11.13,11.13,0,0,0,9,8.84,8.91,8.91,0,0,1,1.1,0H0V4.82A11.14,11.14,0,0,0,8.84,11,8.91,8.91,0,0,1,0,18.9v2.2A8.91,8.91,0,0,1,8.84,29,11.14,11.14,0,0,0,0,35.18v9.64A11.14,11.14,0,0,0,8.84,51,8.91,8.91,0,0,1,0,58.9V60H4.82A11.14,11.14,0,0,0,11,51.16,8.91,8.91,0,0,1,18.9,60h2.2A8.91,8.91,0,0,1,29,51.16,11.14,11.14,0,0,0,35.18,60h9.64A11.14,11.14,0,0,0,51,51.16,8.91,8.91,0,0,1,58.9,60h2.2A8.91,8.91,0,0,1,69,51.16,11.14,11.14,0,0,0,75.18,60H80V58.9A8.91,8.91,0,0,1,71.16,51,11.14,11.14,0,0,0,80,44.82V35.18A11.14,11.14,0,0,0,71.16,29,8.91,8.91,0,0,1,80,21.1V18.9A8.91,8.91,0,0,1,71.16,11,11.14,11.14,0,0,0,80,4.82Z"/>',
),
'width' => '180px',
'height' => '180px',
);
}
}
return new ET_Builder_Pattern_Scallops();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Shippo.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Shippo
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Shippo extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Shippo', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M48,0A48,48,0,0,1,96,48,48,48,0,0,1,48,0Zm0,0A48,48,0,0,0,0,48,48,48,0,0,0,48,0ZM96,48A48,48,0,0,0,48,96,48,48,0,0,0,96,48ZM0,48A48,48,0,0,0,48,96,48,48,0,0,0,0,48Z"/>',
'default-inverted' => '<path d="M96,48V96H48A48,48,0,0,0,96,48ZM0,48V96H48A48,48,0,0,1,0,48ZM48,0H0V48A48,48,0,0,1,48,0Zm0,0A48,48,0,0,1,0,48,48,48,0,0,1,48,96,48,48,0,0,1,96,48,48,48,0,0,1,48,0Zm0,0A48,48,0,0,1,96,48V0Z"/>',
'rotated' => '<path d="M48,0A48,48,0,0,1,96,48,48,48,0,0,1,48,0Zm0,0A48,48,0,0,0,0,48,48,48,0,0,0,48,0ZM96,48A48,48,0,0,0,48,96,48,48,0,0,0,96,48ZM0,48A48,48,0,0,0,48,96,48,48,0,0,0,0,48Z"/>',
'rotated-inverted' => '<path d="M96,48V96H48A48,48,0,0,0,96,48ZM0,48V96H48A48,48,0,0,1,0,48ZM48,0H0V48A48,48,0,0,1,48,0Zm0,0A48,48,0,0,1,0,48,48,48,0,0,1,48,96,48,48,0,0,1,96,48,48,48,0,0,1,48,0Zm0,0A48,48,0,0,1,96,48V0Z"/>',
'thumbnail' => '<path d="M10,0A10,10,0,0,1,20,10,10,10,0,0,1,10,0Zm0,0A10,10,0,0,0,0,10,10,10,0,0,0,10,0ZM20,10A10,10,0,0,0,10,20,10,10,0,0,0,20,10ZM0,10A10,10,0,0,0,10,20,10,10,0,0,0,0,10Zm40,0A10,10,0,0,0,30,0,10,10,0,0,0,40,10ZM30,0A10,10,0,0,0,20,10,10,10,0,0,0,30,0ZM40,10A10,10,0,0,0,30,20,10,10,0,0,0,40,10ZM20,10A10,10,0,0,0,30,20,10,10,0,0,0,20,10Zm40,0A10,10,0,0,0,50,0,10,10,0,0,0,60,10ZM50,0A10,10,0,0,0,40,10,10,10,0,0,0,50,0ZM60,10A10,10,0,0,0,50,20,10,10,0,0,0,60,10ZM40,10A10,10,0,0,0,50,20,10,10,0,0,0,40,10Zm40,0A10,10,0,0,0,70,0,10,10,0,0,0,80,10ZM70,0A10,10,0,0,0,60,10,10,10,0,0,0,70,0ZM80,10A10,10,0,0,0,70,20,10,10,0,0,0,80,10ZM60,10A10,10,0,0,0,70,20,10,10,0,0,0,60,10ZM20,30A10,10,0,0,0,10,20,10,10,0,0,0,20,30ZM10,20A10,10,0,0,0,0,30,10,10,0,0,0,10,20ZM20,30A10,10,0,0,0,10,40,10,10,0,0,0,20,30ZM0,30A10,10,0,0,0,10,40,10,10,0,0,0,0,30Zm40,0A10,10,0,0,0,30,20,10,10,0,0,0,40,30ZM30,20A10,10,0,0,0,20,30,10,10,0,0,0,30,20ZM40,30A10,10,0,0,0,30,40,10,10,0,0,0,40,30ZM20,30A10,10,0,0,0,30,40,10,10,0,0,0,20,30Zm40,0A10,10,0,0,0,50,20,10,10,0,0,0,60,30ZM50,20A10,10,0,0,0,40,30,10,10,0,0,0,50,20ZM60,30A10,10,0,0,0,50,40,10,10,0,0,0,60,30ZM40,30A10,10,0,0,0,50,40,10,10,0,0,0,40,30Zm40,0A10,10,0,0,0,70,20,10,10,0,0,0,80,30ZM70,20A10,10,0,0,0,60,30,10,10,0,0,0,70,20ZM80,30A10,10,0,0,0,70,40,10,10,0,0,0,80,30ZM60,30A10,10,0,0,0,70,40,10,10,0,0,0,60,30ZM20,50A10,10,0,0,0,10,40,10,10,0,0,0,20,50ZM10,40A10,10,0,0,0,0,50,10,10,0,0,0,10,40ZM20,50A10,10,0,0,0,10,60,10,10,0,0,0,20,50ZM0,50A10,10,0,0,0,10,60,10,10,0,0,0,0,50Zm40,0A10,10,0,0,0,30,40,10,10,0,0,0,40,50ZM30,40A10,10,0,0,0,20,50,10,10,0,0,0,30,40ZM40,50A10,10,0,0,0,30,60,10,10,0,0,0,40,50ZM20,50A10,10,0,0,0,30,60,10,10,0,0,0,20,50Zm40,0A10,10,0,0,0,50,40,10,10,0,0,0,60,50ZM50,40A10,10,0,0,0,40,50,10,10,0,0,0,50,40ZM60,50A10,10,0,0,0,50,60,10,10,0,0,0,60,50ZM40,50A10,10,0,0,0,50,60,10,10,0,0,0,40,50Zm40,0A10,10,0,0,0,70,40,10,10,0,0,0,80,50ZM70,40A10,10,0,0,0,60,50,10,10,0,0,0,70,40ZM80,50A10,10,0,0,0,70,60,10,10,0,0,0,80,50ZM60,50A10,10,0,0,0,70,60,10,10,0,0,0,60,50Z"/>',
),
'width' => '96px',
'height' => '96px',
);
}
}
return new ET_Builder_Pattern_Shippo();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Smiles.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Smiles
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Smiles extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Smiles', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M41.2,72.38A23.15,23.15,0,0,0,38.08,37,2.5,2.5,0,0,1,41,32.91a29.88,29.88,0,0,1,3.79,3.17,28.21,28.21,0,0,1,0,39.84A29.88,29.88,0,0,1,41,79.09a2.54,2.54,0,0,1-1.43.45A2.5,2.5,0,0,1,38.08,75,23.32,23.32,0,0,0,41.2,72.38ZM15.66,0H10.12a23.27,23.27,0,0,1-4.4,5.86A23.17,23.17,0,0,1,0,9.89v5.49A28.29,28.29,0,0,0,9.18,9.46,28.14,28.14,0,0,0,15.66,0Zm1.81,284.78a2.5,2.5,0,0,0-4.94.77,23.3,23.3,0,0,1,.28,4.06A23,23,0,0,1,10.12,300h5.54a28.18,28.18,0,0,0,2.15-10.29A28.26,28.26,0,0,0,17.47,284.78ZM285.17,11.89a2.5,2.5,0,0,0-1,4.91,28.46,28.46,0,0,0,4.91.53h.55A28.15,28.15,0,0,0,300,15.38V9.89a23.08,23.08,0,0,1-10.79,2.44A23.33,23.33,0,0,1,285.17,11.89Zm-82.73,63.6a29.71,29.71,0,0,0-4.85-.94,2.5,2.5,0,0,0-.53,5,23.59,23.59,0,0,1,4,.78,23.13,23.13,0,0,1,14.38,32.46,2.5,2.5,0,0,0,4.49,2.2,27.06,27.06,0,0,0,1.78-4.61,28.16,28.16,0,0,0-19.27-34.86ZM262.38,58a28.27,28.27,0,0,0,14-3.74A2.5,2.5,0,0,0,273.88,50a24,24,0,0,1-3.69,1.71,23.13,23.13,0,0,1-30.67-17.9,2.5,2.5,0,0,0-4.93.85A28.19,28.19,0,0,0,262.38,58Zm-58,111.57h0a2.49,2.49,0,0,0-2.5,2.49,24.49,24.49,0,0,1-.37,4.05,23.2,23.2,0,0,1-26.94,18.65,22.91,22.91,0,0,1-3.92-1.08,2.5,2.5,0,1,0-1.73,4.69,28.31,28.31,0,0,0,4.76,1.31A28.13,28.13,0,0,0,206.44,177a28.49,28.49,0,0,0,.45-4.92A2.51,2.51,0,0,0,204.4,169.61Zm-18.8,83.24a23.13,23.13,0,0,1-26.2-27.49,2.5,2.5,0,1,0-4.9-1,28.53,28.53,0,0,0-.56,4.91,28.18,28.18,0,0,0,27.48,28.84h.65a29.46,29.46,0,0,0,4.28-.32,2.5,2.5,0,1,0-.75-5ZM254,121.26a23.92,23.92,0,0,1,3.34-2.32,2.5,2.5,0,0,0-2.5-4.33,27.65,27.65,0,0,0-4.05,2.83,28.12,28.12,0,0,0,.05,43.16,2.42,2.42,0,0,0,1.6.59,2.5,2.5,0,0,0,1.61-4.42,22.32,22.32,0,0,1-2.88-2.87A23.18,23.18,0,0,1,254,121.26Zm24.05,91.85a28.19,28.19,0,0,0-39.82,1,28.5,28.5,0,0,0-3.08,3.86,2.5,2.5,0,0,0,.7,3.46,2.45,2.45,0,0,0,1.38.42,2.51,2.51,0,0,0,2.09-1.11,23.11,23.11,0,0,1,35.28-4,22.66,22.66,0,0,1,2.69,3.06,2.5,2.5,0,0,0,4-3A28.38,28.38,0,0,0,278.05,213.11Zm-9.73,72a28,28,0,0,0-13.33-17,29.54,29.54,0,0,0-4.5-2,2.5,2.5,0,1,0-1.65,4.72,23.84,23.84,0,0,1,3.7,1.67A23.15,23.15,0,0,1,263.19,300h5.23A28,28,0,0,0,268.32,285.1ZM259.1,7.41A2.5,2.5,0,1,0,263,10.58a27.54,27.54,0,0,0,2.79-4.08A28.33,28.33,0,0,0,268.42,0h-5.23a23.55,23.55,0,0,1-1.79,4.06A22.92,22.92,0,0,1,259.1,7.41ZM80.45,256.51a28,28,0,0,0-20.28-7.3,28.42,28.42,0,0,0-4.89.66,2.5,2.5,0,1,0,1.1,4.88,23.37,23.37,0,0,1,4-.55,23.16,23.16,0,0,1,24.22,22.06,22.23,22.23,0,0,1-.17,4.06,2.51,2.51,0,0,0,2.16,2.8l.33,0A2.5,2.5,0,0,0,89.42,281a29.36,29.36,0,0,0,.21-4.94A28,28,0,0,0,80.45,256.51ZM97.35,93.44a2.5,2.5,0,0,0-3,1.92,23.15,23.15,0,0,1-35,14.84,2.5,2.5,0,1,0-2.65,4.24,28.53,28.53,0,0,0,4.4,2.25,28.16,28.16,0,0,0,36.66-15.56,28.78,28.78,0,0,0,1.44-4.73A2.49,2.49,0,0,0,97.35,93.44Zm34-49.5a28.18,28.18,0,0,0,39.46-5.41,28.34,28.34,0,0,0,2.63-4.18A2.5,2.5,0,1,0,169,32.07,23.16,23.16,0,0,1,134.36,40a23.44,23.44,0,0,1-3-2.74,2.5,2.5,0,0,0-3.66,3.4A28.51,28.51,0,0,0,131.34,43.94ZM192.55,8.17a28,28,0,0,0,14-3.76,28.42,28.42,0,0,0,4.05-2.84A2.48,2.48,0,0,0,211.48,0H204.2a.5.5,0,0,0-.12.08,23.07,23.07,0,0,1-17.59,2.3A23.4,23.4,0,0,1,180.83,0h-8.16A28.26,28.26,0,0,0,192.55,8.17Zm18.38,289.88a2.51,2.51,0,0,0-3.53-.31,23.18,23.18,0,0,1-3.2,2.26h7.28A2.5,2.5,0,0,0,210.93,298.05Zm-38.49-6.47a23.43,23.43,0,0,1-1.72-3.69,2.5,2.5,0,1,0-4.7,1.7A28.06,28.06,0,0,0,172.67,300h8.16A23,23,0,0,1,172.44,291.58Zm-19-193.11A23,23,0,0,1,143.19,84a22.34,22.34,0,0,1-.54-4,2.5,2.5,0,1,0-5,.24,28.14,28.14,0,0,0,13.1,22.5,27.93,27.93,0,0,0,15,4.36,28.4,28.4,0,0,0,6.26-.7,28.87,28.87,0,0,0,4.7-1.51,2.5,2.5,0,1,0-1.93-4.61,23.15,23.15,0,0,1-21.34-1.77ZM155.19,140a23.44,23.44,0,0,1,4.05.36,2.5,2.5,0,1,0,.86-4.92,27.41,27.41,0,0,0-4.91-.44A28.12,28.12,0,0,0,127.46,168a2.49,2.49,0,0,0,2.45,2.07,2.18,2.18,0,0,0,.44,0,2.5,2.5,0,0,0,2-2.89A23.15,23.15,0,0,1,155.19,140ZM45.49,150.05a23.46,23.46,0,0,1-.41-4.05,2.48,2.48,0,0,0-2.54-2.46,2.5,2.5,0,0,0-2.46,2.54,27.63,27.63,0,0,0,.5,4.92,28.11,28.11,0,0,0,33,22.32A28.4,28.4,0,0,0,78.32,172a2.5,2.5,0,1,0-1.79-4.67,23.16,23.16,0,0,1-31-17.24Zm60.74,38.69a2.5,2.5,0,1,0-3,4,23.15,23.15,0,0,1-.8,38,2.5,2.5,0,0,0,1.39,4.58,2.54,2.54,0,0,0,1.39-.42,29.1,29.1,0,0,0,3.85-3.09A28.17,28.17,0,0,0,110,192,28.34,28.34,0,0,0,106.23,188.74ZM59.5,208.6a2.5,2.5,0,0,0-1.38-3.26A28.14,28.14,0,0,0,20,225.5a28.41,28.41,0,0,0-.6,4.91,2.5,2.5,0,0,0,2.4,2.59h.1a2.49,2.49,0,0,0,2.49-2.41,24.25,24.25,0,0,1,.5-4A23.16,23.16,0,0,1,56.24,210,2.5,2.5,0,0,0,59.5,208.6ZM19.38,106.89a23.47,23.47,0,0,1,3.88,1.21,2.5,2.5,0,1,0,1.88-4.63A28.09,28.09,0,0,0,0,105.41v6.08a20.78,20.78,0,0,1,1.94-1.4A23,23,0,0,1,19.38,106.89Zm279.84-1a28.05,28.05,0,0,0-12.85,22.64,2.49,2.49,0,0,0,2.4,2.59h.1a2.49,2.49,0,0,0,2.49-2.41,23.25,23.25,0,0,1,.5-4A23,23,0,0,1,300,111.49v-6.08C299.74,105.57,299.48,105.72,299.22,105.89ZM83.12,47.37a2.25,2.25,0,0,0,.44,0,2.49,2.49,0,0,0,2-2.9,24.19,24.19,0,0,1-.36-4,23.15,23.15,0,0,1,27.22-22.8,2.5,2.5,0,0,0,.87-4.93A28.13,28.13,0,0,0,80.66,45.3,2.5,2.5,0,0,0,83.12,47.37Z"/>',
'default-inverted' => '<path d="M291.86,124.68a23.25,23.25,0,0,0-.5,4,2.49,2.49,0,0,1-2.49,2.41h-.1a2.49,2.49,0,0,1-2.4-2.59,28.05,28.05,0,0,1,12.85-22.64c.26-.17.52-.32.78-.48v-90a28.15,28.15,0,0,1-10.34,1.95h-.55a28.46,28.46,0,0,1-4.91-.53,2.5,2.5,0,0,1,1-4.91,23.33,23.33,0,0,0,4,.44A23.08,23.08,0,0,0,300,9.89V0H268.42a28.33,28.33,0,0,1-2.66,6.5A27.54,27.54,0,0,1,263,10.58a2.5,2.5,0,0,1-3.87-3.17,22.92,22.92,0,0,0,2.3-3.35A23.55,23.55,0,0,0,263.19,0H211.48a2.48,2.48,0,0,1-.86,1.57,28.42,28.42,0,0,1-4.05,2.84,28,28,0,0,1-14,3.76A28.26,28.26,0,0,1,172.67,0h-157A28.14,28.14,0,0,1,9.18,9.46,28.29,28.29,0,0,1,0,15.38v90a28.09,28.09,0,0,1,25.14-1.94,2.5,2.5,0,1,1-1.88,4.63,23.47,23.47,0,0,0-3.88-1.21,23,23,0,0,0-17.44,3.2A20.78,20.78,0,0,0,0,111.49V300H10.12a23,23,0,0,0,2.69-10.39,23.3,23.3,0,0,0-.28-4.06,2.5,2.5,0,0,1,4.94-.77,28.26,28.26,0,0,1,.34,4.93A28.18,28.18,0,0,1,15.66,300h157A28.06,28.06,0,0,1,166,289.59a2.5,2.5,0,1,1,4.7-1.7,23.43,23.43,0,0,0,1.72,3.69,23,23,0,0,0,8.39,8.42H204.2a23.18,23.18,0,0,0,3.2-2.26,2.49,2.49,0,0,1,4.08,2.26h51.71a23.15,23.15,0,0,0-10.65-27.49,23.84,23.84,0,0,0-3.7-1.67,2.5,2.5,0,1,1,1.65-4.72,29.54,29.54,0,0,1,4.5,2A28.2,28.2,0,0,1,268.42,300H300V111.49A23,23,0,0,0,291.86,124.68ZM178,101.58a2.49,2.49,0,0,1-1.34,3.27,28.87,28.87,0,0,1-4.7,1.51,28.4,28.4,0,0,1-6.26.7,28.2,28.2,0,0,1-27.42-22,28.22,28.22,0,0,1-.66-4.89,2.5,2.5,0,1,1,5-.24,22.34,22.34,0,0,0,.54,4,23.16,23.16,0,0,0,31.57,16.25A2.49,2.49,0,0,1,178,101.58ZM127.82,37.09a2.5,2.5,0,0,1,3.53.13,23.44,23.44,0,0,0,3,2.74A23.15,23.15,0,0,0,169,32.07a2.5,2.5,0,1,1,4.45,2.28,28.16,28.16,0,0,1-25.1,15.31,28,28,0,0,1-17-5.72,28.51,28.51,0,0,1-3.65-3.32A2.5,2.5,0,0,1,127.82,37.09ZM108.39,12.22a28.37,28.37,0,0,1,4.92.43,2.5,2.5,0,0,1-.87,4.93,23.15,23.15,0,0,0-27.22,22.8,24.19,24.19,0,0,0,.36,4,2.49,2.49,0,0,1-2,2.9,2.25,2.25,0,0,1-.44,0,2.5,2.5,0,0,1-2.46-2.07,28.12,28.12,0,0,1,27.73-33.08ZM41.2,39.62A23.32,23.32,0,0,0,38.08,37,2.5,2.5,0,0,1,41,32.91a29.88,29.88,0,0,1,3.79,3.17,28.21,28.21,0,0,1,0,39.84A29.88,29.88,0,0,1,41,79.09a2.54,2.54,0,0,1-1.43.45A2.5,2.5,0,0,1,38.08,75,23.15,23.15,0,0,0,41.2,39.62Zm14,125.23a23.14,23.14,0,0,0,21.28,2.44A2.5,2.5,0,1,1,78.32,172a28.38,28.38,0,0,1-10.14,1.88A28.19,28.19,0,0,1,40.58,151a27.63,27.63,0,0,1-.5-4.92,2.5,2.5,0,0,1,2.46-2.54A2.48,2.48,0,0,1,45.08,146a23.46,23.46,0,0,0,.41,4.05A23,23,0,0,0,55.25,164.85Zm-30.41,61.7a24.25,24.25,0,0,0-.5,4A2.49,2.49,0,0,1,21.85,233h-.1a2.5,2.5,0,0,1-2.4-2.59,28.11,28.11,0,0,1,34.06-26.53,28.11,28.11,0,0,1,4.71,1.46A2.5,2.5,0,1,1,56.24,210a23.16,23.16,0,0,0-31.4,16.58ZM89.42,281A2.5,2.5,0,0,1,87,283.14l-.33,0a2.51,2.51,0,0,1-2.16-2.8,22.23,22.23,0,0,0,.17-4.06A23.16,23.16,0,0,0,60.41,254.2a23.37,23.37,0,0,0-4,.55,2.5,2.5,0,1,1-1.1-4.88,28.42,28.42,0,0,1,4.89-.66A28.16,28.16,0,0,1,89.63,276,29.36,29.36,0,0,1,89.42,281ZM99.27,96.4a28.78,28.78,0,0,1-1.44,4.73,28.16,28.16,0,0,1-36.66,15.56,28.53,28.53,0,0,1-4.4-2.25,2.5,2.5,0,1,1,2.65-4.24,23.14,23.14,0,0,0,35-14.84,2.5,2.5,0,0,1,4.89,1Zm9.84,135.41a29.1,29.1,0,0,1-3.85,3.09,2.54,2.54,0,0,1-1.39.42,2.5,2.5,0,0,1-1.39-4.58,23.14,23.14,0,0,0,.8-38,2.5,2.5,0,1,1,3-4A28.34,28.34,0,0,1,110,192a28.17,28.17,0,0,1-.84,39.83Zm23.27-64.63a2.5,2.5,0,0,1-2,2.89,2.18,2.18,0,0,1-.44,0,2.49,2.49,0,0,1-2.45-2.07A28.12,28.12,0,0,1,155.19,135a27.41,27.41,0,0,1,4.91.44,2.5,2.5,0,1,1-.86,4.92,23.44,23.44,0,0,0-4.05-.36,23.15,23.15,0,0,0-22.81,27.22Zm54,90.62a29.46,29.46,0,0,1-4.28.32h-.65a28.18,28.18,0,0,1-27.48-28.84,28.53,28.53,0,0,1,.56-4.91,2.5,2.5,0,1,1,4.9,1,23.38,23.38,0,0,0-.46,4,23.11,23.11,0,0,0,26.66,23.45,2.5,2.5,0,1,1,.75,5ZM206.44,177a28.14,28.14,0,0,1-37.51,21.37,2.5,2.5,0,1,1,1.73-4.69,22.91,22.91,0,0,0,3.92,1.08,23.2,23.2,0,0,0,26.94-18.65,24.49,24.49,0,0,0,.37-4.05,2.49,2.49,0,0,1,2.5-2.49h0a2.51,2.51,0,0,1,2.49,2.51A28.49,28.49,0,0,1,206.44,177Zm15.27-66.69a27.06,27.06,0,0,1-1.78,4.61,2.48,2.48,0,0,1-2.24,1.4,2.5,2.5,0,0,1-2.25-3.6A23.16,23.16,0,0,0,201.06,80.3a23.59,23.59,0,0,0-4-.78,2.5,2.5,0,0,1,.53-5,29.71,29.71,0,0,1,4.85.94,28.16,28.16,0,0,1,19.27,34.86Zm14.92-78.62a2.5,2.5,0,0,1,2.89,2,23.13,23.13,0,0,0,30.67,17.9A24,24,0,0,0,273.88,50a2.5,2.5,0,0,1,2.48,4.34,28.27,28.27,0,0,1-14,3.74,28.19,28.19,0,0,1-27.79-23.42A2.51,2.51,0,0,1,236.63,31.73ZM251.17,153.9a22.32,22.32,0,0,0,2.88,2.87,2.5,2.5,0,0,1-1.61,4.42,2.42,2.42,0,0,1-1.6-.59,28.16,28.16,0,0,1-.05-43.16,27.65,27.65,0,0,1,4.05-2.83,2.5,2.5,0,0,1,2.5,4.33,23.92,23.92,0,0,0-3.34,2.32,23.18,23.18,0,0,0-2.83,32.64Zm29.61,66.41a2.49,2.49,0,0,1-3.49-.52,22.66,22.66,0,0,0-2.69-3.06,23.11,23.11,0,0,0-35.28,4,2.51,2.51,0,0,1-2.09,1.11,2.45,2.45,0,0,1-1.38-.42,2.5,2.5,0,0,1-.7-3.46,28.5,28.5,0,0,1,3.08-3.86,28.13,28.13,0,0,1,43.08,2.73A2.49,2.49,0,0,1,280.78,220.31ZM5.72,5.86A23.17,23.17,0,0,1,0,9.89V0H10.12A23.27,23.27,0,0,1,5.72,5.86ZM186.49,2.38A23.4,23.4,0,0,1,180.83,0H204.2a.5.5,0,0,0-.12.08A23.07,23.07,0,0,1,186.49,2.38Z"/>',
'rotated' => '<path d="M72.38,258.8A23.15,23.15,0,0,0,37,261.92a2.5,2.5,0,0,1-4.1-2.87,29.88,29.88,0,0,1,3.17-3.79,28.21,28.21,0,0,1,39.84,0,29.88,29.88,0,0,1,3.17,3.79,2.54,2.54,0,0,1,.45,1.43A2.5,2.5,0,0,1,75,261.92,23.32,23.32,0,0,0,72.38,258.8ZM0,284.34v5.54a23.27,23.27,0,0,1,5.86,4.4,23.17,23.17,0,0,1,4,5.72h5.49a28.29,28.29,0,0,0-5.92-9.18A28.14,28.14,0,0,0,0,284.34Zm284.78-1.81a2.5,2.5,0,0,0,.77,4.94,23.3,23.3,0,0,1,4.06-.28A23,23,0,0,1,300,289.88v-5.54a28.24,28.24,0,0,0-15.22-1.81ZM11.89,14.83a2.5,2.5,0,0,0,4.91,1,28.46,28.46,0,0,0,.53-4.91v-.55A28.15,28.15,0,0,0,15.38,0H9.89a23.08,23.08,0,0,1,2.44,10.79A23.33,23.33,0,0,1,11.89,14.83Zm63.6,82.73a29.71,29.71,0,0,0-.94,4.85,2.5,2.5,0,0,0,5,.53,23.59,23.59,0,0,1,.78-4,23.13,23.13,0,0,1,32.46-14.38,2.5,2.5,0,1,0,2.2-4.49,27.06,27.06,0,0,0-4.61-1.78A28.16,28.16,0,0,0,75.49,97.56ZM58,37.62a28.27,28.27,0,0,0-3.74-14A2.5,2.5,0,0,0,50,26.12a24,24,0,0,1,1.71,3.69,23.13,23.13,0,0,1-17.9,30.67,2.5,2.5,0,1,0,.85,4.93A28.19,28.19,0,0,0,58,37.62Zm111.57,58h0a2.49,2.49,0,0,0,2.49,2.5,24.49,24.49,0,0,1,4.05.37,23.2,23.2,0,0,1,18.65,26.94,22.91,22.91,0,0,1-1.08,3.92,2.5,2.5,0,1,0,4.69,1.73,28.31,28.31,0,0,0,1.31-4.76A28.13,28.13,0,0,0,177,93.56a28.49,28.49,0,0,0-4.92-.45A2.51,2.51,0,0,0,169.61,95.6Zm83.24,18.8a23.13,23.13,0,0,1-27.49,26.2,2.5,2.5,0,1,0-1,4.9,28.53,28.53,0,0,0,4.91.56,28.18,28.18,0,0,0,28.84-27.48v-.65a29.46,29.46,0,0,0-.32-4.28,2.5,2.5,0,1,0-5,.75ZM121.26,46a23.92,23.92,0,0,1-2.32-3.34,2.5,2.5,0,0,0-4.33,2.5,27.65,27.65,0,0,0,2.83,4.05,28.12,28.12,0,0,0,43.16-.05,2.42,2.42,0,0,0,.59-1.6A2.5,2.5,0,0,0,156.77,46a22.32,22.32,0,0,1-2.87,2.88A23.18,23.18,0,0,1,121.26,46Zm91.85-24a28.19,28.19,0,0,0,1,39.82A28.5,28.5,0,0,0,218,64.85a2.5,2.5,0,0,0,3.46-.7,2.45,2.45,0,0,0,.42-1.38,2.51,2.51,0,0,0-1.11-2.09,23.11,23.11,0,0,1-4-35.28,22.66,22.66,0,0,1,3.06-2.69,2.5,2.5,0,0,0-3-4A28.38,28.38,0,0,0,213.11,22Zm72,9.73a28,28,0,0,0-17,13.33,28.56,28.56,0,0,0-2,4.5,2.5,2.5,0,1,0,4.71,1.65,23.84,23.84,0,0,1,1.67-3.7A23.15,23.15,0,0,1,300,36.81V31.58A28,28,0,0,0,285.1,31.68ZM7.41,40.9A2.5,2.5,0,1,0,10.58,37,27.54,27.54,0,0,0,6.5,34.24,28.33,28.33,0,0,0,0,31.58v5.23A23.55,23.55,0,0,1,4.06,38.6,22.92,22.92,0,0,1,7.41,40.9Zm249.1,178.65a28,28,0,0,0-7.3,20.28,28.42,28.42,0,0,0,.66,4.89,2.5,2.5,0,1,0,4.88-1.1,23.37,23.37,0,0,1-.55-4,23.16,23.16,0,0,1,22.06-24.22,22.23,22.23,0,0,1,4.06.17,2.51,2.51,0,0,0,2.8-2.16c0-.11,0-.22,0-.33a2.5,2.5,0,0,0-2.18-2.47,29.36,29.36,0,0,0-4.94-.21A28,28,0,0,0,256.51,219.55ZM93.44,202.65a2.5,2.5,0,0,0,1.92,3,23.15,23.15,0,0,1,14.84,35,2.5,2.5,0,1,0,4.24,2.65,28.53,28.53,0,0,0,2.25-4.4,28.16,28.16,0,0,0-15.56-36.66,28.78,28.78,0,0,0-4.73-1.44A2.49,2.49,0,0,0,93.44,202.65Zm-49.5-34a28.18,28.18,0,0,0-5.41-39.46,28.34,28.34,0,0,0-4.18-2.63A2.5,2.5,0,1,0,32.07,131,23.16,23.16,0,0,1,40,165.64a23.44,23.44,0,0,1-2.74,3,2.5,2.5,0,1,0,3.4,3.66A28.51,28.51,0,0,0,43.94,168.66ZM8.17,107.45a28,28,0,0,0-3.76-14,28.42,28.42,0,0,0-2.84-4.05A2.48,2.48,0,0,0,0,88.52V95.8a.5.5,0,0,0,.08.12,23.07,23.07,0,0,1,2.3,17.59A23.4,23.4,0,0,1,0,119.17v8.16A28.26,28.26,0,0,0,8.17,107.45ZM298.05,89.07a2.51,2.51,0,0,0-.31,3.53A23.18,23.18,0,0,1,300,95.8V88.52A2.5,2.5,0,0,0,298.05,89.07Zm-6.47,38.49a23.43,23.43,0,0,1-3.69,1.72,2.5,2.5,0,0,0,1.7,4.7A28.06,28.06,0,0,0,300,127.33v-8.16A23,23,0,0,1,291.58,127.56Zm-193.11,19A23,23,0,0,1,84,156.81a22.34,22.34,0,0,1-4,.54,2.5,2.5,0,1,0,.24,5,28.14,28.14,0,0,0,22.5-13.1,27.93,27.93,0,0,0,4.36-15,28.4,28.4,0,0,0-.7-6.26,28.87,28.87,0,0,0-1.51-4.7,2.5,2.5,0,0,0-4.61,1.93,23.15,23.15,0,0,1-1.77,21.34ZM140,144.81a23.44,23.44,0,0,1,.36-4.05,2.5,2.5,0,0,0-4.92-.86,27.41,27.41,0,0,0-.44,4.91A28.12,28.12,0,0,0,168,172.54a2.49,2.49,0,0,0,2.07-2.45,2.18,2.18,0,0,0,0-.44,2.5,2.5,0,0,0-2.89-2A23.15,23.15,0,0,1,140,144.81Zm10.09,109.7a23.46,23.46,0,0,1-4.05.41,2.48,2.48,0,0,0-2.46,2.54,2.5,2.5,0,0,0,2.54,2.46,27.63,27.63,0,0,0,4.92-.5,28.11,28.11,0,0,0,22.32-33,28.4,28.4,0,0,0-1.36-4.75,2.5,2.5,0,0,0-4.67,1.79,23.16,23.16,0,0,1-17.24,31Zm38.69-60.74a2.5,2.5,0,1,0,4,2.95,23.15,23.15,0,0,1,38,.8,2.5,2.5,0,0,0,4.58-1.39,2.54,2.54,0,0,0-.42-1.39,29.1,29.1,0,0,0-3.09-3.85,28.17,28.17,0,0,0-39.83-.84A28.34,28.34,0,0,0,188.74,193.77ZM208.6,240.5a2.5,2.5,0,0,0-3.26,1.38,28.14,28.14,0,0,0,20.16,38.17,28.41,28.41,0,0,0,4.91.6,2.5,2.5,0,0,0,2.59-2.4v-.1a2.49,2.49,0,0,0-2.41-2.49,24.25,24.25,0,0,1-4-.5A23.16,23.16,0,0,1,210,243.76,2.5,2.5,0,0,0,208.6,240.5ZM106.89,280.62a23.47,23.47,0,0,1,1.21-3.88,2.5,2.5,0,1,0-4.63-1.88A28.09,28.09,0,0,0,105.41,300h6.08a20.78,20.78,0,0,1-1.4-1.94A23,23,0,0,1,106.89,280.62ZM105.89.78A28,28,0,0,0,123.63,13a28.17,28.17,0,0,0,4.9.6,2.49,2.49,0,0,0,2.59-2.4v-.1a2.49,2.49,0,0,0-2.41-2.49,23.25,23.25,0,0,1-4-.5A23,23,0,0,1,111.49,0h-6.08C105.57.26,105.72.52,105.89.78ZM47.37,216.88a2.25,2.25,0,0,0,0-.44,2.49,2.49,0,0,0-2.9-2,24.19,24.19,0,0,1-4,.36,23.15,23.15,0,0,1-22.8-27.22,2.5,2.5,0,0,0-4.93-.87A28.13,28.13,0,0,0,45.3,219.34,2.5,2.5,0,0,0,47.37,216.88Z"/>',
'rotated-inverted' => '<path d="M124.68,8.14a23.25,23.25,0,0,0,4,.5,2.49,2.49,0,0,1,2.41,2.49v.1a2.49,2.49,0,0,1-2.59,2.4,28.17,28.17,0,0,1-4.9-.6A28,28,0,0,1,105.89.78c-.17-.26-.32-.52-.48-.78h-90a28.15,28.15,0,0,1,1.95,10.34v.55a28.46,28.46,0,0,1-.53,4.91,2.5,2.5,0,0,1-4.91-1,23.33,23.33,0,0,0,.44-4A23.08,23.08,0,0,0,9.89,0H0V31.58a28.33,28.33,0,0,1,6.5,2.66A27.54,27.54,0,0,1,10.58,37,2.5,2.5,0,0,1,7.41,40.9a22.92,22.92,0,0,0-3.35-2.3A23.55,23.55,0,0,0,0,36.81V88.52a2.48,2.48,0,0,1,1.57.86,28.42,28.42,0,0,1,2.84,4.05,28,28,0,0,1,3.76,14A28.26,28.26,0,0,1,0,127.33v157a28.14,28.14,0,0,1,9.46,6.48A28.29,28.29,0,0,1,15.38,300h90a28.09,28.09,0,0,1-1.94-25.14,2.5,2.5,0,1,1,4.63,1.88,23.47,23.47,0,0,0-1.21,3.88,23,23,0,0,0,3.2,17.44,20.78,20.78,0,0,0,1.4,1.94H300V289.88a23,23,0,0,0-10.39-2.69,23.3,23.3,0,0,0-4.06.28,2.5,2.5,0,0,1-.77-4.94A28.24,28.24,0,0,1,300,284.34v-157A28.06,28.06,0,0,1,289.59,134a2.5,2.5,0,0,1-1.7-4.7,23.43,23.43,0,0,0,3.69-1.72,23,23,0,0,0,8.42-8.39V95.8a23.18,23.18,0,0,0-2.26-3.2A2.49,2.49,0,0,1,300,88.52V36.81a23.15,23.15,0,0,0-27.49,10.65,23.84,23.84,0,0,0-1.67,3.7,2.5,2.5,0,1,1-4.71-1.65,28.56,28.56,0,0,1,2-4.5A28.2,28.2,0,0,1,300,31.58V0H111.49A23,23,0,0,0,124.68,8.14ZM101.58,122a2.49,2.49,0,0,1,3.27,1.34,28.87,28.87,0,0,1,1.51,4.7,28.4,28.4,0,0,1,.7,6.26,28.2,28.2,0,0,1-22,27.42,28.22,28.22,0,0,1-4.89.66,2.5,2.5,0,1,1-.24-5,22.34,22.34,0,0,0,4-.54,23.16,23.16,0,0,0,16.25-31.57A2.49,2.49,0,0,1,101.58,122ZM37.09,172.18a2.5,2.5,0,0,1,.13-3.53,23.44,23.44,0,0,0,2.74-3A23.15,23.15,0,0,0,32.07,131a2.5,2.5,0,1,1,2.28-4.45,28.16,28.16,0,0,1,15.31,25.1,28,28,0,0,1-5.72,17,28.51,28.51,0,0,1-3.32,3.65A2.5,2.5,0,0,1,37.09,172.18ZM12.22,191.61a28.37,28.37,0,0,1,.43-4.92,2.5,2.5,0,0,1,4.93.87,23.15,23.15,0,0,0,22.8,27.22,24.19,24.19,0,0,0,4-.36,2.49,2.49,0,0,1,2.9,2,2.25,2.25,0,0,1,0,.44,2.5,2.5,0,0,1-2.07,2.46,28.12,28.12,0,0,1-33.08-27.73Zm27.4,67.19A23.32,23.32,0,0,0,37,261.92a2.5,2.5,0,0,1-4.1-2.87,29.88,29.88,0,0,1,3.17-3.79,28.21,28.21,0,0,1,39.84,0,29.88,29.88,0,0,1,3.17,3.79,2.54,2.54,0,0,1,.45,1.43A2.5,2.5,0,0,1,75,261.92a23.15,23.15,0,0,0-35.37-3.12Zm125.23-14.05a23.14,23.14,0,0,0,2.44-21.28,2.5,2.5,0,0,1,4.67-1.79,28.38,28.38,0,0,1,1.88,10.14A28.19,28.19,0,0,1,151,259.42a27.63,27.63,0,0,1-4.92.5,2.5,2.5,0,0,1-2.54-2.46,2.48,2.48,0,0,1,2.46-2.54,23.46,23.46,0,0,0,4.05-.41A23,23,0,0,0,164.85,244.75Zm61.7,30.41a24.25,24.25,0,0,0,4,.5,2.49,2.49,0,0,1,2.41,2.49v.1a2.5,2.5,0,0,1-2.59,2.4,28.11,28.11,0,0,1-26.53-34.06,28.11,28.11,0,0,1,1.46-4.71,2.5,2.5,0,1,1,4.63,1.88,23.16,23.16,0,0,0,16.58,31.4ZM281,210.58a2.5,2.5,0,0,1,2.18,2.47c0,.11,0,.22,0,.33a2.51,2.51,0,0,1-2.8,2.16,22.23,22.23,0,0,0-4.06-.17,23.16,23.16,0,0,0-22.06,24.22,23.37,23.37,0,0,0,.55,4,2.5,2.5,0,1,1-4.88,1.1,28.42,28.42,0,0,1-.66-4.89A28.16,28.16,0,0,1,276,210.37,29.36,29.36,0,0,1,281,210.58ZM96.4,200.73a28.78,28.78,0,0,1,4.73,1.44,28.16,28.16,0,0,1,15.56,36.66,28.53,28.53,0,0,1-2.25,4.4,2.5,2.5,0,1,1-4.24-2.65,23.14,23.14,0,0,0-14.84-35,2.5,2.5,0,0,1,1-4.89Zm135.41-9.84a29.1,29.1,0,0,1,3.09,3.85,2.54,2.54,0,0,1,.42,1.39,2.5,2.5,0,0,1-4.58,1.39,23.14,23.14,0,0,0-38-.8,2.5,2.5,0,1,1-4-2.95,28.34,28.34,0,0,1,3.24-3.72,28.17,28.17,0,0,1,39.83.84Zm-64.63-23.27a2.5,2.5,0,0,1,2.89,2,2.18,2.18,0,0,1,0,.44,2.49,2.49,0,0,1-2.07,2.45A28.12,28.12,0,0,1,135,144.81a27.41,27.41,0,0,1,.44-4.91,2.5,2.5,0,0,1,4.92.86,23.44,23.44,0,0,0-.36,4.05,23.15,23.15,0,0,0,27.22,22.81Zm90.62-54a29.46,29.46,0,0,1,.32,4.28v.65a28.18,28.18,0,0,1-28.84,27.48,28.53,28.53,0,0,1-4.91-.56,2.5,2.5,0,1,1,1-4.9,23.38,23.38,0,0,0,4,.46,23.11,23.11,0,0,0,23.45-26.66,2.5,2.5,0,1,1,5-.75ZM177,93.56a28.14,28.14,0,0,1,21.37,37.51,2.5,2.5,0,1,1-4.69-1.73,22.91,22.91,0,0,0,1.08-3.92,23.2,23.2,0,0,0-18.65-26.94,24.49,24.49,0,0,0-4.05-.37,2.49,2.49,0,0,1-2.49-2.5h0a2.51,2.51,0,0,1,2.51-2.49A28.49,28.49,0,0,1,177,93.56ZM110.35,78.29A27.06,27.06,0,0,1,115,80.07a2.48,2.48,0,0,1,1.4,2.24,2.5,2.5,0,0,1-3.6,2.25A23.16,23.16,0,0,0,80.3,98.94a23.59,23.59,0,0,0-.78,4,2.5,2.5,0,0,1-5-.53,29.71,29.71,0,0,1,.94-4.85,28.16,28.16,0,0,1,34.86-19.27ZM31.73,63.37a2.5,2.5,0,0,1,2-2.89,23.13,23.13,0,0,0,17.9-30.67A24,24,0,0,0,50,26.12a2.5,2.5,0,0,1,4.34-2.48,28.27,28.27,0,0,1,3.74,14A28.19,28.19,0,0,1,34.62,65.41,2.51,2.51,0,0,1,31.73,63.37ZM153.9,48.83A22.32,22.32,0,0,0,156.77,46a2.5,2.5,0,0,1,4.42,1.61,2.42,2.42,0,0,1-.59,1.6,28.16,28.16,0,0,1-43.16.05,27.65,27.65,0,0,1-2.83-4.05,2.5,2.5,0,0,1,4.33-2.5A23.92,23.92,0,0,0,121.26,46a23.18,23.18,0,0,0,32.64,2.83Zm66.41-29.61a2.49,2.49,0,0,1-.52,3.49,22.66,22.66,0,0,0-3.06,2.69,23.11,23.11,0,0,0,4,35.28,2.51,2.51,0,0,1,1.11,2.09,2.45,2.45,0,0,1-.42,1.38,2.5,2.5,0,0,1-3.46.7,28.5,28.5,0,0,1-3.86-3.08,28.13,28.13,0,0,1,2.73-43.08A2.49,2.49,0,0,1,220.31,19.22ZM5.86,294.28a23.17,23.17,0,0,1,4,5.72H0V289.88A23.27,23.27,0,0,1,5.86,294.28ZM2.38,113.51A23.4,23.4,0,0,1,0,119.17V95.8a.5.5,0,0,0,.08.12A23.07,23.07,0,0,1,2.38,113.51Z"/>',
'thumbnail' => '<path d="M30.3,19.73a5.58,5.58,0,0,0-3.82-6.91,6,6,0,0,0-1-.19A.61.61,0,0,1,25,12a.62.62,0,0,1,.67-.54,7.22,7.22,0,0,1,1.16.23,6.78,6.78,0,0,1,4.65,8.4A6.53,6.53,0,0,1,31,21.17a.59.59,0,0,1-.54.34.66.66,0,0,1-.27-.06.61.61,0,0,1-.27-.81A6.31,6.31,0,0,0,30.3,19.73ZM43.55,7.05a6.58,6.58,0,0,0,1.08-.5.6.6,0,0,0-.6-1,6.46,6.46,0,0,1-.89.41A5.59,5.59,0,0,1,36,2.55a5.91,5.91,0,0,1-.25-.94.6.6,0,0,0-1.19.2A7.19,7.19,0,0,0,34.86,3a6.81,6.81,0,0,0,6.4,4.49A6.58,6.58,0,0,0,43.55,7.05ZM27.78,36.13A7.61,7.61,0,0,0,27.89,35a.61.61,0,0,0-.6-.61h0a.6.6,0,0,0-.6.6,5.33,5.33,0,0,1-.09,1,5.58,5.58,0,0,1-6.49,4.49,4.71,4.71,0,0,1-.94-.26.62.62,0,0,0-.78.36.6.6,0,0,0,.36.77,6.79,6.79,0,0,0,1.15.32,7.07,7.07,0,0,0,1.21.11A6.8,6.8,0,0,0,27.78,36.13Zm-6,19.54h.16a6,6,0,0,0,1-.08.59.59,0,0,0,.5-.68.6.6,0,0,0-.68-.51,6.55,6.55,0,0,1-1,.07,5.58,5.58,0,0,1-5.45-5.72,6.4,6.4,0,0,1,.11-1,.6.6,0,0,0-1.18-.24,6.78,6.78,0,0,0,6.49,8.13ZM40,22.13a.6.6,0,0,0-.6-1,6.79,6.79,0,0,0-1.81,10.24,7.5,7.5,0,0,0,.85.84.56.56,0,0,0,.38.14.6.6,0,0,0,.39-1.06,5.62,5.62,0,0,1-.69-.69,5.58,5.58,0,0,1,.68-7.87A6.37,6.37,0,0,1,40,22.13ZM35.2,46.93a.61.61,0,0,0,.5-.27,5.9,5.9,0,0,1,.61-.77,5.6,5.6,0,0,1,7.9-.19,6.43,6.43,0,0,1,.64.73.6.6,0,1,0,1-.71,6.14,6.14,0,0,0-.78-.89,6.79,6.79,0,0,0-9.6.23,6.71,6.71,0,0,0-.74.93.6.6,0,0,0,.17.84A.64.64,0,0,0,35.2,46.93Zm4.28,11.16a6.71,6.71,0,0,0-1.09-.49A.6.6,0,0,0,38,58.74a5.49,5.49,0,0,1,.89.4A6,6,0,0,1,40,60h1.62A6.81,6.81,0,0,0,39.48,58.09ZM1.61,17.84A7.15,7.15,0,0,0,2,16.7.59.59,0,0,0,1.49,16a.6.6,0,0,0-.72.46,6,6,0,0,1-.28.94,5.87,5.87,0,0,1-.49.93v1.87A7,7,0,0,0,1.61,17.84ZM19.56.93a.6.6,0,0,0-.81.27,6.43,6.43,0,0,1-.52.83,5.55,5.55,0,0,1-3.69,2.15A5.55,5.55,0,0,1,10.41,3.1a6.49,6.49,0,0,1-.73-.66.59.59,0,0,0-.85,0,.6.6,0,0,0,0,.85,7.39,7.39,0,0,0,.88.8,6.75,6.75,0,0,0,4.1,1.38,6.77,6.77,0,0,0,5.41-2.69,6.47,6.47,0,0,0,.63-1A.6.6,0,0,0,19.56.93ZM15,17.2a5.53,5.53,0,0,1-2.46-3.49,5.16,5.16,0,0,1-.14-1,.6.6,0,1,0-1.2,0A6.45,6.45,0,0,0,11.36,14,6.8,6.8,0,0,0,18,19.27a7.06,7.06,0,0,0,1.51-.17,7.8,7.8,0,0,0,1.13-.36.61.61,0,0,0-.47-1.12,5.3,5.3,0,0,1-.93.3A5.57,5.57,0,0,1,15,17.2Zm.43,10a6.35,6.35,0,0,1,1,.08.6.6,0,0,0,.7-.49.59.59,0,0,0-.49-.69A6.8,6.8,0,0,0,8.74,34a.61.61,0,0,0,.6.5h.1a.59.59,0,0,0,.49-.69,5.5,5.5,0,0,1-.09-1A5.59,5.59,0,0,1,15.43,27.2ZM2.72,49.07a.61.61,0,0,0-.16.84.62.62,0,0,0,.5.27.56.56,0,0,0,.33-.1,6.93,6.93,0,0,0,.93-.75,6.73,6.73,0,0,0,2.09-4.75,6.76,6.76,0,0,0-1.88-4.85,7.52,7.52,0,0,0-.9-.78.6.6,0,1,0-.71,1,6.62,6.62,0,0,1,.74.65,5.59,5.59,0,0,1-.17,7.89A5.17,5.17,0,0,1,2.72,49.07ZM59.5,11.54a.6.6,0,0,0,.35,1.1.6.6,0,0,0,.34-.11,6.79,6.79,0,0,0,.92-10.37,7.58,7.58,0,0,0-.92-.76.6.6,0,0,0-.84.15.61.61,0,0,0,.15.84,5.1,5.1,0,0,1,.75.63,5.58,5.58,0,0,1,0,7.89A5.1,5.1,0,0,1,59.5,11.54ZM71.93,60a6.82,6.82,0,0,0-7.1-6.47,6.85,6.85,0,0,0-1.18.17.6.6,0,0,0-.46.72.61.61,0,0,0,.72.45,5.6,5.6,0,0,1,5,1.32A5.59,5.59,0,0,1,70.72,60h1.21Zm2-42.15a6.27,6.27,0,0,0,.35-1.14.59.59,0,0,0-.46-.71.6.6,0,0,0-.72.46,6,6,0,0,1-.28.94,5.59,5.59,0,0,1-7.27,3.08,6.57,6.57,0,0,1-.88-.44.59.59,0,0,0-.83.19.6.6,0,0,0,.2.83,7,7,0,0,0,1.06.54,6.85,6.85,0,0,0,2.53.49A6.78,6.78,0,0,0,73.9,17.84Zm-5.84,17.4a8.16,8.16,0,0,0,1.14-.33.6.6,0,0,0-.43-1.13,5.57,5.57,0,0,1-7.48-4.15,5.25,5.25,0,0,1-.1-1,.6.6,0,0,0-.61-.59.61.61,0,0,0-.6.61,7.87,7.87,0,0,0,.12,1.19,6.82,6.82,0,0,0,6.66,5.5A7.23,7.23,0,0,0,68.06,35.24ZM75.93,39a.6.6,0,1,0-.71,1,6.51,6.51,0,0,1,.73.65,5.59,5.59,0,0,1-.16,7.89,5.73,5.73,0,0,1-.77.61.61.61,0,0,0-.16.84.6.6,0,0,0,.5.27.58.58,0,0,0,.33-.1,6.93,6.93,0,0,0,.93-.75,6.78,6.78,0,0,0,.2-9.6A7.42,7.42,0,0,0,75.93,39ZM55.57,49.62h0a.6.6,0,0,0,.6-.58,6.12,6.12,0,0,1,.12-1,5.59,5.59,0,0,1,6.63-4.29,5.36,5.36,0,0,1,.94.29.59.59,0,0,0,.78-.33.6.6,0,0,0-.33-.79,6.69,6.69,0,0,0-1.13-.35,6.81,6.81,0,0,0-8.07,5.21A6.56,6.56,0,0,0,55,49,.6.6,0,0,0,55.57,49.62Zm1.15-30.43a.62.62,0,0,0-.33-.79,7.1,7.1,0,0,0-1.14-.35,6.72,6.72,0,0,0-4.92.82l-.19.12a6.73,6.73,0,0,0-3,4.27A6.57,6.57,0,0,0,47,24.44a.62.62,0,0,0,.58.63h0a.6.6,0,0,0,.6-.58,8,8,0,0,1,.12-1,5.6,5.6,0,0,1,2-3.17,3.9,3.9,0,0,1,.46-.34,5.56,5.56,0,0,1,5.14-.48A.61.61,0,0,0,56.72,19.19Zm12.94-16a6.91,6.91,0,0,0,.1,1.19.61.61,0,0,0,.6.49h.1A.59.59,0,0,0,71,4.18,5.5,5.5,0,0,1,71.88,0H70.46A6.75,6.75,0,0,0,69.66,3.2Z"/>',
),
'width' => '300px',
'height' => '300px',
);
}
}
return new ET_Builder_Pattern_Smiles();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Squares.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Squares
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Squares extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Squares', 'et-builder' ),
'svgContent' => array(
'default' => '<rect width="4" height="4"/>',
'default-inverted' => '<polygon points="8 8 8 0 4 0 4 4 0 4 0 8 8 8"/>',
'rotated' => '<rect y="4" width="4" height="4"/>',
'rotated-inverted' => '<polygon points="8 0 0 0 0 4 4 4 4 8 8 8 8 0"/>',
'thumbnail' => '<path d="M0,0H2V4H0ZM6,0h4V4H6Zm8,0h4V4H14Zm8,0h4V4H22Zm8,0h4V4H30Zm8,0h4V4H38Zm8,0h4V4H46Zm8,0h4V4H54Zm8,0h4V4H62Zm8,0h4V4H70ZM0,8H2v4H0ZM6,8h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70ZM0,16H2v4H0Zm6,0h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70ZM0,24H2v4H0Zm6,0h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70ZM0,32H2v4H0Zm6,0h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70ZM0,40H2v4H0Zm6,0h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70ZM0,48H2v4H0Zm6,0h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70ZM0,56H2v4H0ZM78,0h2V4H78Zm0,8h2v4H78Zm0,8h2v4H78Zm0,8h2v4H78Zm0,8h2v4H78Zm0,8h2v4H78Zm0,8h2v4H78Zm0,8h2v4H78ZM6,56h4v4H6Zm8,0h4v4H14Zm8,0h4v4H22Zm8,0h4v4H30Zm8,0h4v4H38Zm8,0h4v4H46Zm8,0h4v4H54Zm8,0h4v4H62Zm8,0h4v4H70Z"/>',
),
'width' => '8px',
'height' => '8px',
);
}
}
return new ET_Builder_Pattern_Squares();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Triangles.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Triangles
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Triangles extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Triangles', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M70,120H0L35,60ZM70,0,35,60H70ZM0,0V60H35Z"/>',
'default-inverted' => '<path d="M0,0H70L35,60ZM0,120,35,60H0Zm70,0V60H35Z"/>',
'rotated' => '<path d="M120,0V70L60,35ZM0,0,60,35V0ZM0,70H60V35Z"/>',
'rotated-inverted' => '<path d="M0,70V0L60,35Zm120,0L60,35V70Zm0-70H60V35Z"/>',
'thumbnail' => '<path d="M20,20H0L10,0ZM30,0,20,20H40ZM50,0,40,20H60ZM70,0,60,20H80ZM0,20V40H10Zm20,0L10,40H30Zm20,0L30,40H50Zm20,0L50,40H70Zm20,0L70,40H80ZM10,40,0,60H20Zm20,0L20,60H40Zm20,0L40,60H60Zm20,0L60,60H80Z"/>',
),
'width' => '70px',
'height' => '120px',
);
}
}
return new ET_Builder_Pattern_Triangles();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Zig Zag 2.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Zig_Zag_2
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Zig_Zag_2 extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Zig Zag 2', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M0,35,56,0l56,35v5L56,5,0,40Z"/>',
'default-inverted' => '<path d="M0,0H56L0,35ZM112,0H56l56,35Zm0,40L56,5,0,40Z"/>',
'rotated' => '<path d="M35,112,0,56,35,0h5L5,56l35,56Z"/>',
'rotated-inverted' => '<path d="M0,112V56l35,56ZM0,0V56L35,0ZM40,0,5,56l35,56Z"/>',
'thumbnail' => '<path d="M80,6.56V7.5L70,.94,60,7.5,50,.94,40,7.5,30,.94,20,7.5,10,.94,0,7.5V6.56L10,0,20,6.56,30,0,40,6.56,50,0,60,6.56,70,0ZM70,7.5,60,14.06,50,7.5,40,14.06,30,7.5,20,14.06,10,7.5,0,14.06V15L10,8.44,20,15,30,8.44,40,15,50,8.44,60,15,70,8.44,80,15v-.94ZM70,15,60,21.56,50,15,40,21.56,30,15,20,21.56,10,15,0,21.56v.94l10-6.56L20,22.5l10-6.56L40,22.5l10-6.56L60,22.5l10-6.56L80,22.5v-.94Zm0,7.5L60,29.06,50,22.5,40,29.06,30,22.5,20,29.06,10,22.5,0,29.06V30l10-6.56L20,30l10-6.56L40,30l10-6.56L60,30l10-6.56L80,30v-.94ZM70,30,60,36.56,50,30,40,36.56,30,30,20,36.56,10,30,0,36.56v.94l10-6.56L20,37.5l10-6.56L40,37.5l10-6.56L60,37.5l10-6.56L80,37.5v-.94Zm0,7.5L60,44.06,50,37.5,40,44.06,30,37.5,20,44.06,10,37.5,0,44.06V45l10-6.56L20,45l10-6.56L40,45l10-6.56L60,45l10-6.56L80,45v-.94ZM70,45,60,51.56,50,45,40,51.56,30,45,20,51.56,10,45,0,51.56v.94l10-6.56L20,52.5l10-6.56L40,52.5l10-6.56L60,52.5l10-6.56L80,52.5v-.94Zm0,7.5L60,59.06,50,52.5,40,59.06,30,52.5,20,59.06,10,52.5,0,59.06V60l10-6.56L20,60l10-6.56L40,60l10-6.56L60,60l10-6.56L80,60v-.94Z"/>',
),
'width' => '112px',
'height' => '40px',
);
}
}
return new ET_Builder_Pattern_Zig_Zag_2();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - Zig Zag.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_Zig_Zag
*
* @since 4.15.0
*/
class ET_Builder_Pattern_Zig_Zag extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Zig Zag', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M0,0H56L0,28ZM112,0H56l56,28Zm0,56L56,28,0,56Z"/>',
'default-inverted' => '<path d="M0,28,56,0l56,28V56L56,28,0,56Z"/>',
'rotated' => '<path d="M0,112V56l28,56ZM0,0V56L28,0ZM56,0,28,56l28,56Z"/>',
'rotated-inverted' => '<path d="M28,112,0,56,28,0H56L28,56l28,56Z"/>',
'thumbnail' => '<path d="M24.78,7.7,39.61.29,54.44,7.7,69.27.29,80,5.66V0H0V5.27l10-5Zm29.66,7.42L39.61,7.7,24.78,15.12,10,7.7,0,12.68v7.41l10-5,14.83,7.41,14.83-7.41,14.83,7.41,14.83-7.41L80,20.48V13.07L69.27,7.7Zm0,14.83L39.61,22.53,24.78,30,10,22.53,0,27.51v7.41l10-5,14.83,7.41L39.61,30l14.83,7.41L69.27,30,80,35.31V27.9L69.27,22.53Zm0,14.82L39.61,37.36,24.78,44.77,10,37.36,0,42.34v7.41l10-5,14.83,7.42,14.83-7.42,14.83,7.42,14.83-7.42L80,50.14V42.73L69.27,37.36Zm0,14.83L39.61,52.19,24.78,59.6,10,52.19,0,57.16V60H80V57.55L69.27,52.19Z"/>',
),
'width' => '112px',
'height' => '56px',
);
}
}
return new ET_Builder_Pattern_Zig_Zag();

View File

@@ -0,0 +1,53 @@
<?php
/**
* Content Retriever is home for functions which return non-ajax WordPress Content.
*
* @since 4.11.0
*
* @package Divi
* @sub-package Builder
*/
namespace Feature\ContentRetriever;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Load traits, No autoloader yet :sad_pepe:
*/
require_once __DIR__ . '/retrievers/PageContentRetriever.php';
/**
* Class ET_Builder_Content_Retriever
*/
class ET_Builder_Content_Retriever {
/**
* Import traits dependencies.
* Keep the code clean and the logic separated.
*/
use PageContentRetriever;
/**
* Holds the class instance.
*
* @var null
*/
private static $_instance = null;
/**
* Initialize ET_Builder_Content_Retriever class.
*/
public static function init() {
if ( null === self::$_instance ) {
self::$_instance = new ET_Builder_Content_Retriever();
}
return self::$_instance;
}
}
ET_Builder_Content_Retriever::init();

Some files were not shown because too many files have changed in this diff Show More