Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder
File: autoload.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Register autoloader.
[2] Fix | Delete
*
[3] Fix | Delete
* @package Divi
[4] Fix | Delete
* @subpackage Builder
[5] Fix | Delete
* @since 4.6.2
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Autoloader for module helpers and structure elements.
[10] Fix | Delete
*
[11] Fix | Delete
* @param string $class The class name.
[12] Fix | Delete
*/
[13] Fix | Delete
function _et_pb_autoload( $class ) {
[14] Fix | Delete
switch ( $class ) {
[15] Fix | Delete
case 'ET_Builder_Section':
[16] Fix | Delete
case 'ET_Builder_Row':
[17] Fix | Delete
case 'ET_Builder_Row_Inner':
[18] Fix | Delete
case 'ET_Builder_Column':
[19] Fix | Delete
require_once 'main-structure-elements.php';
[20] Fix | Delete
break;
[21] Fix | Delete
case 'ET_Builder_Module_Helper_Multi_Value':
[22] Fix | Delete
require_once 'module/helpers/MultiValue.php';
[23] Fix | Delete
break;
[24] Fix | Delete
case 'ET_Builder_Module_Helper_Overflow':
[25] Fix | Delete
require_once 'module/helpers/Overflow.php';
[26] Fix | Delete
break;
[27] Fix | Delete
case 'ET_Builder_Module_Helper_Alignment':
[28] Fix | Delete
require_once 'module/helpers/Alignment.php';
[29] Fix | Delete
break;
[30] Fix | Delete
case 'ET_Builder_Module_Helper_Sizing':
[31] Fix | Delete
require_once 'module/helpers/Sizing.php';
[32] Fix | Delete
break;
[33] Fix | Delete
case 'ET_Builder_Module_Helper_Height':
[34] Fix | Delete
require_once 'module/helpers/Height.php';
[35] Fix | Delete
break;
[36] Fix | Delete
case 'ET_Builder_Module_Hover_Options':
[37] Fix | Delete
require_once 'module/helpers/HoverOptions.php';
[38] Fix | Delete
break;
[39] Fix | Delete
case 'ET_Builder_Module_Sticky_Options':
[40] Fix | Delete
require_once 'module/helpers/StickyOptions.php';
[41] Fix | Delete
break;
[42] Fix | Delete
case 'ET_Builder_Module_Helper_Max_Height':
[43] Fix | Delete
require_once 'module/helpers/MaxHeight.php';
[44] Fix | Delete
break;
[45] Fix | Delete
case 'ET_Builder_Module_Helper_Max_Width':
[46] Fix | Delete
require_once 'module/helpers/MaxWidth.php';
[47] Fix | Delete
break;
[48] Fix | Delete
case 'ET_Builder_Module_Helper_Min_Height':
[49] Fix | Delete
require_once 'module/helpers/MinHeight.php';
[50] Fix | Delete
break;
[51] Fix | Delete
case 'ET_Builder_Module_Helper_ResponsiveOptions':
[52] Fix | Delete
require_once 'module/helpers/ResponsiveOptions.php';
[53] Fix | Delete
break;
[54] Fix | Delete
case 'ET_Builder_Module_Helper_Slider':
[55] Fix | Delete
require_once 'module/helpers/Slider.php';
[56] Fix | Delete
break;
[57] Fix | Delete
case 'ET_Builder_Module_Transition_Options':
[58] Fix | Delete
require_once 'module/helpers/TransitionOptions.php';
[59] Fix | Delete
break;
[60] Fix | Delete
case 'ET_Builder_Module_Helper_Width':
[61] Fix | Delete
require_once 'module/helpers/Width.php';
[62] Fix | Delete
break;
[63] Fix | Delete
case 'ET_Builder_Module_Helper_Motion':
[64] Fix | Delete
require_once 'module/helpers/motion/Motion.php';
[65] Fix | Delete
break;
[66] Fix | Delete
case 'ET_Builder_Module_Helper_Motion_Sanitizer':
[67] Fix | Delete
require_once 'module/helpers/motion/Sanitizer.php';
[68] Fix | Delete
break;
[69] Fix | Delete
case 'ET_Builder_Module_Helper_Motion_Opacity':
[70] Fix | Delete
require_once 'module/helpers/motion/Opacity.php';
[71] Fix | Delete
break;
[72] Fix | Delete
case 'ET_Builder_Module_Helper_Motion_Translate':
[73] Fix | Delete
require_once 'module/helpers/motion/Translate.php';
[74] Fix | Delete
break;
[75] Fix | Delete
case 'ET_Builder_Module_Helper_Motion_Scale':
[76] Fix | Delete
require_once 'module/helpers/motion/Scale.php';
[77] Fix | Delete
break;
[78] Fix | Delete
case 'ET_Builder_Module_Helper_Motion_Rotate':
[79] Fix | Delete
require_once 'module/helpers/motion/Rotate.php';
[80] Fix | Delete
break;
[81] Fix | Delete
case 'ET_Builder_Module_Helper_Motion_Blur':
[82] Fix | Delete
require_once 'module/helpers/motion/Blur.php';
[83] Fix | Delete
break;
[84] Fix | Delete
case 'ET_Builder_Module_Field_Base':
[85] Fix | Delete
require_once 'module/field/Base.php';
[86] Fix | Delete
break;
[87] Fix | Delete
case 'ET_Builder_Module_Fields_Factory':
[88] Fix | Delete
require_once 'module/field/Factory.php';
[89] Fix | Delete
break;
[90] Fix | Delete
case 'ET_Builder_Module_Helper_Overlay':
[91] Fix | Delete
require_once 'module/helpers/Overlay.php';
[92] Fix | Delete
break;
[93] Fix | Delete
case 'ET_Builder_Module_Helper_MultiViewOptions':
[94] Fix | Delete
require_once 'module/helpers/MultiViewOptions.php';
[95] Fix | Delete
break;
[96] Fix | Delete
case 'ET_Builder_Module_Helper_OptionTemplate':
[97] Fix | Delete
require_once 'module/helpers/OptionTemplate.php';
[98] Fix | Delete
break;
[99] Fix | Delete
case 'ET_Builder_Module_Helper_Style_Processor':
[100] Fix | Delete
require_once 'module/helpers/StyleProcessor.php';
[101] Fix | Delete
break;
[102] Fix | Delete
case 'ET_Builder_Module_Helper_Font':
[103] Fix | Delete
require_once 'module/helpers/Font.php';
[104] Fix | Delete
break;
[105] Fix | Delete
case 'ET_Builder_Module_Helper_Background':
[106] Fix | Delete
require_once 'module/helpers/Background.php';
[107] Fix | Delete
break;
[108] Fix | Delete
case 'ET_Builder_Module_Helper_BackgroundLayout':
[109] Fix | Delete
require_once 'module/helpers/BackgroundLayout.php';
[110] Fix | Delete
break;
[111] Fix | Delete
case 'ET_Builder_Module_Helper_Woocommerce_Modules':
[112] Fix | Delete
if ( et_is_woocommerce_plugin_active() ) {
[113] Fix | Delete
require_once 'module/helpers/WooCommerceModules.php';
[114] Fix | Delete
}
[115] Fix | Delete
break;
[116] Fix | Delete
case 'ET_Builder_I18n':
[117] Fix | Delete
require_once 'feature/I18n.php';
[118] Fix | Delete
break;
[119] Fix | Delete
case 'ET_Builder_Module_Helper_Media':
[120] Fix | Delete
require_once 'module/helpers/class-et-builder-module-helper-media.php';
[121] Fix | Delete
break;
[122] Fix | Delete
}
[123] Fix | Delete
}
[124] Fix | Delete
[125] Fix | Delete
spl_autoload_register( '_et_pb_autoload' );
[126] Fix | Delete
[127] Fix | Delete
/**
[128] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Multi_Value`.
[129] Fix | Delete
*
[130] Fix | Delete
* @return ET_Builder_Module_Helper_Multi_Value
[131] Fix | Delete
*/
[132] Fix | Delete
function et_pb_multi_value() {
[133] Fix | Delete
return ET_Builder_Module_Helper_Multi_Value::instance();
[134] Fix | Delete
}
[135] Fix | Delete
[136] Fix | Delete
/**
[137] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Overflow`.
[138] Fix | Delete
*
[139] Fix | Delete
* @return ET_Builder_Module_Helper_Overflow
[140] Fix | Delete
*/
[141] Fix | Delete
function et_pb_overflow() {
[142] Fix | Delete
return ET_Builder_Module_Helper_Overflow::get();
[143] Fix | Delete
}
[144] Fix | Delete
[145] Fix | Delete
/**
[146] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Alignment`.
[147] Fix | Delete
*
[148] Fix | Delete
* @param string $prefix The prefix string that may be added to field name.
[149] Fix | Delete
*
[150] Fix | Delete
* @return ET_Builder_Module_Helper_Alignment
[151] Fix | Delete
*/
[152] Fix | Delete
function et_pb_alignment_options( $prefix = '' ) {
[153] Fix | Delete
return new ET_Builder_Module_Helper_Alignment( $prefix );
[154] Fix | Delete
}
[155] Fix | Delete
[156] Fix | Delete
/**
[157] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Height`.
[158] Fix | Delete
*
[159] Fix | Delete
* @param string $prefix The prefix string that may be added to field name.
[160] Fix | Delete
*
[161] Fix | Delete
* @return ET_Builder_Module_Helper_Height
[162] Fix | Delete
*/
[163] Fix | Delete
function et_pb_height_options( $prefix = '' ) {
[164] Fix | Delete
return new ET_Builder_Module_Helper_Height( $prefix );
[165] Fix | Delete
}
[166] Fix | Delete
[167] Fix | Delete
/**
[168] Fix | Delete
* Get an instance of `ET_Builder_Module_Hover_Options`.
[169] Fix | Delete
*
[170] Fix | Delete
* @return ET_Builder_Module_Hover_Options
[171] Fix | Delete
*/
[172] Fix | Delete
function et_pb_hover_options() {
[173] Fix | Delete
return ET_Builder_Module_Hover_Options::get();
[174] Fix | Delete
}
[175] Fix | Delete
[176] Fix | Delete
/**
[177] Fix | Delete
* Get sticky option instance.
[178] Fix | Delete
*
[179] Fix | Delete
* @since 4.6.0
[180] Fix | Delete
*
[181] Fix | Delete
* @return ET_Builder_Module_Sticky_Options
[182] Fix | Delete
*/
[183] Fix | Delete
function et_pb_sticky_options() {
[184] Fix | Delete
return ET_Builder_Module_Sticky_Options::get();
[185] Fix | Delete
}
[186] Fix | Delete
[187] Fix | Delete
/**
[188] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Max_Height`.
[189] Fix | Delete
*
[190] Fix | Delete
* @param string $prefix The prefix string that may be added to field name.
[191] Fix | Delete
*
[192] Fix | Delete
* @return ET_Builder_Module_Helper_Max_Height
[193] Fix | Delete
*/
[194] Fix | Delete
function et_pb_max_height_options( $prefix = '' ) {
[195] Fix | Delete
return new ET_Builder_Module_Helper_Max_Height( $prefix );
[196] Fix | Delete
}
[197] Fix | Delete
[198] Fix | Delete
/**
[199] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Max_Width`.
[200] Fix | Delete
*
[201] Fix | Delete
* @param string $prefix The prefix string that may be added to field name.
[202] Fix | Delete
*
[203] Fix | Delete
* @return ET_Builder_Module_Helper_Max_Width
[204] Fix | Delete
*/
[205] Fix | Delete
function et_pb_max_width_options( $prefix = '' ) {
[206] Fix | Delete
return new ET_Builder_Module_Helper_Max_Width( $prefix );
[207] Fix | Delete
}
[208] Fix | Delete
[209] Fix | Delete
/**
[210] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Min_Height`.
[211] Fix | Delete
*
[212] Fix | Delete
* @param string $prefix The prefix string that may be added to field name.
[213] Fix | Delete
*
[214] Fix | Delete
* @return ET_Builder_Module_Helper_Min_Height
[215] Fix | Delete
*/
[216] Fix | Delete
function et_pb_min_height_options( $prefix = '' ) {
[217] Fix | Delete
return new ET_Builder_Module_Helper_Min_Height( $prefix );
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
/**
[221] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_ResponsiveOptions`.
[222] Fix | Delete
*
[223] Fix | Delete
* @return ET_Builder_Module_Helper_ResponsiveOptions
[224] Fix | Delete
*/
[225] Fix | Delete
function et_pb_responsive_options() {
[226] Fix | Delete
return ET_Builder_Module_Helper_ResponsiveOptions::instance();
[227] Fix | Delete
}
[228] Fix | Delete
[229] Fix | Delete
/**
[230] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Slider`.
[231] Fix | Delete
*
[232] Fix | Delete
* @return ET_Builder_Module_Helper_Slider
[233] Fix | Delete
*/
[234] Fix | Delete
function et_pb_slider_options() {
[235] Fix | Delete
return new ET_Builder_Module_Helper_Slider();
[236] Fix | Delete
}
[237] Fix | Delete
[238] Fix | Delete
/**
[239] Fix | Delete
* Get an instance of `ET_Builder_Module_Transition_Options`.
[240] Fix | Delete
*
[241] Fix | Delete
* @return ET_Builder_Module_Transition_Options
[242] Fix | Delete
*/
[243] Fix | Delete
function et_pb_transition_options() {
[244] Fix | Delete
return ET_Builder_Module_Transition_Options::get();
[245] Fix | Delete
}
[246] Fix | Delete
[247] Fix | Delete
/**
[248] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Width`.
[249] Fix | Delete
*
[250] Fix | Delete
* @param string $prefix The prefix string that may be added to field name.
[251] Fix | Delete
*
[252] Fix | Delete
* @return ET_Builder_Module_Helper_Width
[253] Fix | Delete
*/
[254] Fix | Delete
function et_pb_width_options( $prefix = '' ) {
[255] Fix | Delete
return new ET_Builder_Module_Helper_Width( $prefix );
[256] Fix | Delete
}
[257] Fix | Delete
[258] Fix | Delete
/**
[259] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Font`.
[260] Fix | Delete
*
[261] Fix | Delete
* @return ET_Builder_Module_Helper_Font
[262] Fix | Delete
*/
[263] Fix | Delete
function et_pb_font_options() {
[264] Fix | Delete
return ET_Builder_Module_Helper_Font::instance();
[265] Fix | Delete
}
[266] Fix | Delete
[267] Fix | Delete
/**
[268] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_BackgroundLayout`.
[269] Fix | Delete
*
[270] Fix | Delete
* @return ET_Builder_Module_Helper_BackgroundLayout
[271] Fix | Delete
*/
[272] Fix | Delete
function et_pb_background_layout_options() {
[273] Fix | Delete
return ET_Builder_Module_Helper_BackgroundLayout::instance();
[274] Fix | Delete
}
[275] Fix | Delete
[276] Fix | Delete
/**
[277] Fix | Delete
* Get helper instance
[278] Fix | Delete
*
[279] Fix | Delete
* @since 4.6.0
[280] Fix | Delete
*
[281] Fix | Delete
* @param string $helper_name Helper name.
[282] Fix | Delete
*
[283] Fix | Delete
* @return object
[284] Fix | Delete
*/
[285] Fix | Delete
function et_builder_get_helper( $helper_name ) {
[286] Fix | Delete
switch ( $helper_name ) {
[287] Fix | Delete
case 'sticky':
[288] Fix | Delete
$helper = et_pb_sticky_options();
[289] Fix | Delete
break;
[290] Fix | Delete
[291] Fix | Delete
case 'hover':
[292] Fix | Delete
$helper = et_pb_hover_options();
[293] Fix | Delete
break;
[294] Fix | Delete
[295] Fix | Delete
case 'responsive':
[296] Fix | Delete
$helper = et_pb_responsive_options();
[297] Fix | Delete
break;
[298] Fix | Delete
[299] Fix | Delete
default:
[300] Fix | Delete
$helper = false;
[301] Fix | Delete
break;
[302] Fix | Delete
}
[303] Fix | Delete
[304] Fix | Delete
return $helper;
[305] Fix | Delete
}
[306] Fix | Delete
[307] Fix | Delete
/**
[308] Fix | Delete
* Class ET_Builder_Module_Helper_MultiViewOptions wrapper
[309] Fix | Delete
*
[310] Fix | Delete
* @since 3.27.1
[311] Fix | Delete
*
[312] Fix | Delete
* @param ET_Builder_Element|bool $module Module object.
[313] Fix | Delete
* @param array $custom_props Defined custom props data.
[314] Fix | Delete
* @param array $conditional_values Defined options conditional values.
[315] Fix | Delete
* @param array $default_values Defined options default values.
[316] Fix | Delete
*
[317] Fix | Delete
* @return ET_Builder_Module_Helper_MultiViewOptions
[318] Fix | Delete
*/
[319] Fix | Delete
function et_pb_multi_view_options( $module = false, $custom_props = array(), $conditional_values = array(), $default_values = array() ) {
[320] Fix | Delete
return new ET_Builder_Module_Helper_MultiViewOptions( $module, $custom_props, $conditional_values, $default_values );
[321] Fix | Delete
}
[322] Fix | Delete
[323] Fix | Delete
if ( et_is_woocommerce_plugin_active() ) {
[324] Fix | Delete
add_filter(
[325] Fix | Delete
'et_builder_get_woo_default_columns',
[326] Fix | Delete
array(
[327] Fix | Delete
'ET_Builder_Module_Helper_Woocommerce_Modules',
[328] Fix | Delete
'get_columns_posts_default_value',
[329] Fix | Delete
)
[330] Fix | Delete
);
[331] Fix | Delete
}
[332] Fix | Delete
[333] Fix | Delete
/**
[334] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_OptionTemplate`.
[335] Fix | Delete
*
[336] Fix | Delete
* @return ET_Builder_Module_Helper_OptionTemplate
[337] Fix | Delete
*/
[338] Fix | Delete
function et_pb_option_template() {
[339] Fix | Delete
return ET_Builder_Module_Helper_OptionTemplate::instance();
[340] Fix | Delete
}
[341] Fix | Delete
[342] Fix | Delete
/**
[343] Fix | Delete
* Get an instance of `ET_Builder_Module_Helper_Background`.
[344] Fix | Delete
*
[345] Fix | Delete
* @return ET_Builder_Module_Helper_Background
[346] Fix | Delete
*
[347] Fix | Delete
* @since 4.3.3
[348] Fix | Delete
*/
[349] Fix | Delete
function et_pb_background_options() {
[350] Fix | Delete
return ET_Builder_Module_Helper_Background::instance();
[351] Fix | Delete
}
[352] Fix | Delete
[353] Fix | Delete
/**
[354] Fix | Delete
* Class ET_Builder_Module_Helper_Media wrapper
[355] Fix | Delete
*
[356] Fix | Delete
* @since 4.6.4
[357] Fix | Delete
*
[358] Fix | Delete
* @return ET_Builder_Module_Helper_Media
[359] Fix | Delete
*/
[360] Fix | Delete
function et_pb_media_options() {
[361] Fix | Delete
return ET_Builder_Module_Helper_Media::instance();
[362] Fix | Delete
}
[363] Fix | Delete
[364] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function