Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder
File: main-structure-elements.php
$gutter_width = $this->props['gutter_width'];
[2000] Fix | Delete
$gutter_width_hover = $this->get_hover_value( 'gutter_width' );
[2001] Fix | Delete
$make_equal = $this->props['make_equal'];
[2002] Fix | Delete
$custom_padding = $this->props['custom_padding'];
[2003] Fix | Delete
$padding_mobile = $this->props['padding_mobile'];
[2004] Fix | Delete
$custom_padding_tablet = $this->props['custom_padding_tablet'];
[2005] Fix | Delete
$custom_padding_phone = $this->props['custom_padding_phone'];
[2006] Fix | Delete
$custom_padding_last_edited = $this->props['custom_padding_last_edited'];
[2007] Fix | Delete
$column_padding_mobile = $this->props['column_padding_mobile'];
[2008] Fix | Delete
$global_module = $this->props['global_module'];
[2009] Fix | Delete
$use_custom_gutter = $this->props['use_custom_gutter'];
[2010] Fix | Delete
[2011] Fix | Delete
$hover = et_pb_hover_options();
[2012] Fix | Delete
[2013] Fix | Delete
global $et_pb_all_column_settings_inner, $et_pb_rendering_column_content, $et_pb_rendering_column_content_row;
[2014] Fix | Delete
[2015] Fix | Delete
$et_pb_all_column_settings_inner = ! isset( $et_pb_all_column_settings_inner ) ? array() : $et_pb_all_column_settings_inner;
[2016] Fix | Delete
[2017] Fix | Delete
$et_pb_all_column_settings_backup = $et_pb_all_column_settings_inner;
[2018] Fix | Delete
[2019] Fix | Delete
$keep_column_padding_mobile = $column_padding_mobile;
[2020] Fix | Delete
[2021] Fix | Delete
if ( '' !== $global_module ) {
[2022] Fix | Delete
$global_content = et_pb_load_global_module( $global_module, $function_name );
[2023] Fix | Delete
[2024] Fix | Delete
if ( '' !== $global_content ) {
[2025] Fix | Delete
return do_shortcode( et_pb_fix_shortcodes( wpautop( $global_content ) ) );
[2026] Fix | Delete
}
[2027] Fix | Delete
}
[2028] Fix | Delete
[2029] Fix | Delete
$custom_padding_responsive_active = et_pb_get_responsive_status( $custom_padding_last_edited );
[2030] Fix | Delete
[2031] Fix | Delete
$padding_mobile_values = $custom_padding_responsive_active ? array(
[2032] Fix | Delete
'tablet' => explode( '|', $custom_padding_tablet ),
[2033] Fix | Delete
'phone' => explode( '|', $custom_padding_phone ),
[2034] Fix | Delete
) : array(
[2035] Fix | Delete
'tablet' => false,
[2036] Fix | Delete
'phone' => false,
[2037] Fix | Delete
);
[2038] Fix | Delete
[2039] Fix | Delete
$et_pb_columns_inner_counter = 0;
[2040] Fix | Delete
[2041] Fix | Delete
$padding_values = explode( '|', $custom_padding );
[2042] Fix | Delete
[2043] Fix | Delete
if ( ! empty( $padding_values ) ) {
[2044] Fix | Delete
// old version of Rows support only top and bottom padding, so we need to handle it along with the full padding in the recent version
[2045] Fix | Delete
if ( 2 === count( $padding_values ) ) {
[2046] Fix | Delete
$padding_settings = array(
[2047] Fix | Delete
'top' => isset( $padding_values[0] ) ? $padding_values[0] : '',
[2048] Fix | Delete
'bottom' => isset( $padding_values[1] ) ? $padding_values[1] : '',
[2049] Fix | Delete
);
[2050] Fix | Delete
} else {
[2051] Fix | Delete
$padding_settings = array(
[2052] Fix | Delete
'top' => isset( $padding_values[0] ) ? $padding_values[0] : '',
[2053] Fix | Delete
'right' => isset( $padding_values[1] ) ? $padding_values[1] : '',
[2054] Fix | Delete
'bottom' => isset( $padding_values[2] ) ? $padding_values[2] : '',
[2055] Fix | Delete
'left' => isset( $padding_values[3] ) ? $padding_values[3] : '',
[2056] Fix | Delete
);
[2057] Fix | Delete
}
[2058] Fix | Delete
[2059] Fix | Delete
foreach( $padding_settings as $padding_side => $value ) {
[2060] Fix | Delete
if ( '' !== $value ) {
[2061] Fix | Delete
$element_style = array(
[2062] Fix | Delete
'selector' => '.et_pb_column %%order_class%%',
[2063] Fix | Delete
'declaration' => sprintf(
[2064] Fix | Delete
'padding-%1$s: %2$s;',
[2065] Fix | Delete
esc_html( $padding_side ),
[2066] Fix | Delete
esc_html( $value )
[2067] Fix | Delete
),
[2068] Fix | Delete
);
[2069] Fix | Delete
[2070] Fix | Delete
// Backward compatibility. Keep Padding on Mobile is deprecated in favour of responsive inputs mechanism for custom padding
[2071] Fix | Delete
// To ensure that it is compatibility with previous version of Divi, this option is now only used as last resort if no
[2072] Fix | Delete
// responsive padding value is found, and padding_mobile value is saved (which is set to off by default)
[2073] Fix | Delete
if ( in_array( $padding_mobile, array( 'on', 'off' ) ) && 'on' !== $padding_mobile && ! $custom_padding_responsive_active ) {
[2074] Fix | Delete
$element_style['media_query'] = ET_Builder_Element::get_media_query( 'min_width_981' );
[2075] Fix | Delete
}
[2076] Fix | Delete
[2077] Fix | Delete
ET_Builder_Element::set_style( $function_name, $element_style );
[2078] Fix | Delete
}
[2079] Fix | Delete
}
[2080] Fix | Delete
}
[2081] Fix | Delete
[2082] Fix | Delete
if ( ! empty( $padding_mobile_values['tablet'] ) || ! empty( $padding_values['phone'] ) ) {
[2083] Fix | Delete
$padding_mobile_values_processed = array();
[2084] Fix | Delete
[2085] Fix | Delete
foreach( array( 'tablet', 'phone' ) as $device ) {
[2086] Fix | Delete
if ( empty( $padding_mobile_values[$device] ) ) {
[2087] Fix | Delete
continue;
[2088] Fix | Delete
}
[2089] Fix | Delete
[2090] Fix | Delete
$padding_mobile_values_processed[ $device ] = array(
[2091] Fix | Delete
'padding-top' => isset( $padding_mobile_values[$device][0] ) ? $padding_mobile_values[$device][0] : '',
[2092] Fix | Delete
'padding-right' => isset( $padding_mobile_values[$device][1] ) ? $padding_mobile_values[$device][1] : '',
[2093] Fix | Delete
'padding-bottom' => isset( $padding_mobile_values[$device][2] ) ? $padding_mobile_values[$device][2] : '',
[2094] Fix | Delete
'padding-left' => isset( $padding_mobile_values[$device][3] ) ? $padding_mobile_values[$device][3] : '',
[2095] Fix | Delete
);
[2096] Fix | Delete
}
[2097] Fix | Delete
[2098] Fix | Delete
if ( ! empty( $padding_mobile_values_processed ) ) {
[2099] Fix | Delete
et_pb_generate_responsive_css( $padding_mobile_values_processed, '.et_pb_column %%order_class%%', '', $function_name, ' !important; ' );
[2100] Fix | Delete
}
[2101] Fix | Delete
}
[2102] Fix | Delete
[2103] Fix | Delete
$internal_columns_settings_array = array(
[2104] Fix | Delete
'keep_column_padding_mobile' => $keep_column_padding_mobile,
[2105] Fix | Delete
'et_pb_columns_inner_counter' => $et_pb_columns_inner_counter,
[2106] Fix | Delete
'et_pb_columns_counter' => 0,
[2107] Fix | Delete
);
[2108] Fix | Delete
[2109] Fix | Delete
$current_row_position = $et_pb_rendering_column_content ? 'internal_row' : 'regular_row';
[2110] Fix | Delete
[2111] Fix | Delete
$et_pb_all_column_settings_inner[ $current_row_position ] = $internal_columns_settings_array;
[2112] Fix | Delete
[2113] Fix | Delete
if ( 'on' === $make_equal ) {
[2114] Fix | Delete
$this->add_classname( 'et_pb_equal_columns' );
[2115] Fix | Delete
}
[2116] Fix | Delete
[2117] Fix | Delete
$gutter_hover_data = '';
[2118] Fix | Delete
[2119] Fix | Delete
if ( 'on' === $use_custom_gutter && '' !== $gutter_width ) {
[2120] Fix | Delete
$gutter_width = '0' === $gutter_width ? '1' : $gutter_width; // set the gutter to 1 if 0 entered by user
[2121] Fix | Delete
$this->add_classname( 'et_pb_gutters' . $gutter_width );
[2122] Fix | Delete
[2123] Fix | Delete
if ( et_builder_is_hover_enabled( 'gutter_width', $this->props ) && ! empty( $gutter_width_hover ) && $gutter_width !== $gutter_width_hover ) {
[2124] Fix | Delete
$this->add_classname( 'et_pb_gutter_hover' );
[2125] Fix | Delete
[2126] Fix | Delete
$gutter_hover_data = sprintf(
[2127] Fix | Delete
' data-original_gutter="%1$s" data-hover_gutter="%2$s"',
[2128] Fix | Delete
esc_attr($gutter_width),
[2129] Fix | Delete
esc_attr($gutter_width_hover)
[2130] Fix | Delete
);
[2131] Fix | Delete
}
[2132] Fix | Delete
}
[2133] Fix | Delete
[2134] Fix | Delete
$parallax_image = $this->get_parallax_image_background();
[2135] Fix | Delete
$background_video = $this->video_background();
[2136] Fix | Delete
[2137] Fix | Delete
// CSS Filters
[2138] Fix | Delete
$this->add_classname( $this->generate_css_filters( $function_name ) );
[2139] Fix | Delete
[2140] Fix | Delete
// Remove automatically added classnames
[2141] Fix | Delete
$this->remove_classname( 'et_pb_module' );
[2142] Fix | Delete
[2143] Fix | Delete
if ( self::contains( $content, array( 'et_pb_menu', 'et_pb_fullwidth_menu' ) ) ) {
[2144] Fix | Delete
$this->add_classname( 'et_pb_row--with-menu' );
[2145] Fix | Delete
}
[2146] Fix | Delete
[2147] Fix | Delete
// Save module classes into variable BEFORE processing the content with `do_shortcode()`
[2148] Fix | Delete
// Otherwise order classes messed up with internal rows if exist
[2149] Fix | Delete
$module_classes = $this->module_classname( $function_name );
[2150] Fix | Delete
[2151] Fix | Delete
// Inner content shortcode parsing has to be done after all classname addition/removal
[2152] Fix | Delete
$inner_content = do_shortcode( et_pb_fix_shortcodes( $content ) );
[2153] Fix | Delete
$content_dependent_classname = '' === trim( $inner_content ) ? ' et_pb_row_empty' : '';
[2154] Fix | Delete
[2155] Fix | Delete
// reset the global column settings to make sure they are not affected by internal content
[2156] Fix | Delete
$et_pb_all_column_settings_inner = $et_pb_all_column_settings_backup;
[2157] Fix | Delete
[2158] Fix | Delete
$output = sprintf(
[2159] Fix | Delete
'<div%4$s class="%2$s%7$s"%8$s>
[2160] Fix | Delete
%1$s
[2161] Fix | Delete
%5$s
[2162] Fix | Delete
%6$s
[2163] Fix | Delete
</div> <!-- .%3$s -->',
[2164] Fix | Delete
$inner_content,
[2165] Fix | Delete
$module_classes,
[2166] Fix | Delete
esc_html( $function_name ),
[2167] Fix | Delete
$this->module_id(),
[2168] Fix | Delete
$parallax_image,
[2169] Fix | Delete
$background_video,
[2170] Fix | Delete
$content_dependent_classname,
[2171] Fix | Delete
et_core_esc_previously( $gutter_hover_data )
[2172] Fix | Delete
);
[2173] Fix | Delete
[2174] Fix | Delete
return $output;
[2175] Fix | Delete
}
[2176] Fix | Delete
}
[2177] Fix | Delete
new ET_Builder_Row_Inner;
[2178] Fix | Delete
[2179] Fix | Delete
class ET_Builder_Column extends ET_Builder_Structure_Element {
[2180] Fix | Delete
function init() {
[2181] Fix | Delete
$this->name = esc_html__( 'Column', 'et_builder' );
[2182] Fix | Delete
$this->plural = esc_html__( 'Columns', 'et_builder' );
[2183] Fix | Delete
$this->slug = 'et_pb_column';
[2184] Fix | Delete
$this->additional_shortcode_slugs = array( 'et_pb_column_inner' );
[2185] Fix | Delete
$this->child_title_var = 'admin_label';
[2186] Fix | Delete
$this->advanced_setting_title_text = esc_html__( 'Column', 'et_builder' );
[2187] Fix | Delete
$this->vb_support = 'on';
[2188] Fix | Delete
$this->type = 'child';
[2189] Fix | Delete
[2190] Fix | Delete
$this->advanced_fields = array(
[2191] Fix | Delete
'max_width' => false,
[2192] Fix | Delete
'fonts' => false,
[2193] Fix | Delete
'text' => false,
[2194] Fix | Delete
'margin_padding' => array(
[2195] Fix | Delete
'use_margin' => false,
[2196] Fix | Delete
),
[2197] Fix | Delete
'z_index' => array(
[2198] Fix | Delete
'default' => '2',
[2199] Fix | Delete
'important' => true,
[2200] Fix | Delete
),
[2201] Fix | Delete
'position_fields'=> array(
[2202] Fix | Delete
'default' => 'relative',
[2203] Fix | Delete
),
[2204] Fix | Delete
);
[2205] Fix | Delete
[2206] Fix | Delete
$this->settings_modal_toggles = array(
[2207] Fix | Delete
'general' => array(
[2208] Fix | Delete
'toggles' => array(
[2209] Fix | Delete
'admin_label' => array(
[2210] Fix | Delete
'title' => et_builder_i18n( 'Admin Label' ),
[2211] Fix | Delete
'priority' => 99,
[2212] Fix | Delete
),
[2213] Fix | Delete
),
[2214] Fix | Delete
),
[2215] Fix | Delete
);
[2216] Fix | Delete
[2217] Fix | Delete
$this->help_videos = array(
[2218] Fix | Delete
array(
[2219] Fix | Delete
'id' => 'R9ds7bEaHE8',
[2220] Fix | Delete
'name' => esc_html__( 'An introduction to the Column module', 'et_builder' ),
[2221] Fix | Delete
),
[2222] Fix | Delete
);
[2223] Fix | Delete
}
[2224] Fix | Delete
[2225] Fix | Delete
function get_fields() {
[2226] Fix | Delete
$fields = array(
[2227] Fix | Delete
'type' => array(
[2228] Fix | Delete
'default_on_front' => '4_4',
[2229] Fix | Delete
'type' => 'skip',
[2230] Fix | Delete
),
[2231] Fix | Delete
'specialty_columns' => array(
[2232] Fix | Delete
'type' => 'skip',
[2233] Fix | Delete
),
[2234] Fix | Delete
'saved_specialty_column_type' => array(
[2235] Fix | Delete
'type' => 'skip',
[2236] Fix | Delete
),
[2237] Fix | Delete
'module_id' => array(
[2238] Fix | Delete
'label' => esc_html__( 'CSS ID', 'et_builder' ),
[2239] Fix | Delete
'description' => esc_html__( "Assign a unique CSS ID to the element which can be used to assign custom CSS styles from within your child theme or from within Divi's custom CSS inputs.", 'et_builder' ),
[2240] Fix | Delete
'type' => 'text',
[2241] Fix | Delete
'option_category' => 'configuration',
[2242] Fix | Delete
'tab_slug' => 'custom_css',
[2243] Fix | Delete
'toggle_slug' => 'classes',
[2244] Fix | Delete
'option_class' => 'et_pb_custom_css_regular',
[2245] Fix | Delete
),
[2246] Fix | Delete
'module_class' => array(
[2247] Fix | Delete
'label' => esc_html__( 'CSS Class', 'et_builder' ),
[2248] Fix | Delete
'description' => esc_html__( "Assign any number of CSS Classes to the element, separated by spaces, which can be used to assign custom CSS styles from within your child theme or from within Divi's custom CSS inputs.", 'et_builder' ),
[2249] Fix | Delete
'type' => 'text',
[2250] Fix | Delete
'option_category' => 'configuration',
[2251] Fix | Delete
'tab_slug' => 'custom_css',
[2252] Fix | Delete
'toggle_slug' => 'classes',
[2253] Fix | Delete
'option_class' => 'et_pb_custom_css_regular',
[2254] Fix | Delete
),
[2255] Fix | Delete
'admin_label' => array(
[2256] Fix | Delete
'label' => et_builder_i18n( 'Admin Label' ),
[2257] Fix | Delete
'type' => 'text',
[2258] Fix | Delete
'option_category' => 'configuration',
[2259] Fix | Delete
'description' => esc_html__( 'This will change the label of the module in the builder for easy identification.', 'et_builder' ),
[2260] Fix | Delete
'toggle_slug' => 'admin_label',
[2261] Fix | Delete
),
[2262] Fix | Delete
);
[2263] Fix | Delete
[2264] Fix | Delete
return $fields;
[2265] Fix | Delete
}
[2266] Fix | Delete
[2267] Fix | Delete
function render( $atts, $content = null, $function_name ) {
[2268] Fix | Delete
$type = $this->props['type'];
[2269] Fix | Delete
$specialty_columns = $this->props['specialty_columns'];
[2270] Fix | Delete
$saved_specialty_column_type = $this->props['saved_specialty_column_type'];
[2271] Fix | Delete
$custom_css_class = '';
[2272] Fix | Delete
[2273] Fix | Delete
global $et_pb_all_column_settings,
[2274] Fix | Delete
$et_pb_all_column_settings_inner,
[2275] Fix | Delete
$et_specialty_column_type,
[2276] Fix | Delete
$et_pb_rendering_column_content,
[2277] Fix | Delete
$et_pb_rendering_column_content_row,
[2278] Fix | Delete
$et_pb_rendering_specialty_section,
[2279] Fix | Delete
$et_pb_column_completion;
[2280] Fix | Delete
[2281] Fix | Delete
$is_specialty_column = 'et_pb_column_inner' !== $function_name && $et_pb_rendering_specialty_section;
[2282] Fix | Delete
$gobal_column_settings_holder = 'et_pb_column_inner' === $function_name ? $et_pb_all_column_settings_inner : $et_pb_all_column_settings;
[2283] Fix | Delete
$current_row_position = $et_pb_rendering_column_content_row ? 'internal_row' : 'regular_row';
[2284] Fix | Delete
$array_index = self::$_->array_get( $gobal_column_settings_holder, "{$current_row_position}.et_pb_columns_counter", 0 );
[2285] Fix | Delete
$keep_column_padding_mobile = self::$_->array_get( $gobal_column_settings_holder, "{$current_row_position}.keep_column_padding_mobile", 'on' );
[2286] Fix | Delete
[2287] Fix | Delete
if ( $is_specialty_column ) {
[2288] Fix | Delete
$et_specialty_column_type = $type;
[2289] Fix | Delete
$backgrounds_array = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_backgrounds", array() );
[2290] Fix | Delete
$background_gradient = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_backgrounds_gradient.[{$array_index}]", '' );
[2291] Fix | Delete
$background_video = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_backgrounds_video.[{$array_index}]", '' );
[2292] Fix | Delete
$paddings_array = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_paddings", array() );
[2293] Fix | Delete
$paddings_mobile_array = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_paddings_mobile", array() );
[2294] Fix | Delete
$column_css_array = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_css", array() );
[2295] Fix | Delete
$column_parallax = self::$_->array_get( $et_pb_all_column_settings, "{$current_row_position}.et_pb_column_parallax", '' );
[2296] Fix | Delete
[2297] Fix | Delete
$background_color = isset( $backgrounds_array[$array_index]['color'] ) ? $backgrounds_array[$array_index]['color'] : '';
[2298] Fix | Delete
$background_img = isset( $backgrounds_array[$array_index]['image'] ) ? $backgrounds_array[$array_index]['image'] : '';
[2299] Fix | Delete
$background_size = isset( $backgrounds_array[$array_index]['image_size'] ) ? $backgrounds_array[$array_index]['image_size'] : '';
[2300] Fix | Delete
$background_position = isset( $backgrounds_array[$array_index]['image_position'] ) ? $backgrounds_array[$array_index]['image_position'] : '';
[2301] Fix | Delete
$background_repeat = isset( $backgrounds_array[$array_index]['image_repeat'] ) ? $backgrounds_array[$array_index]['image_repeat'] : '';
[2302] Fix | Delete
$background_blend = isset( $backgrounds_array[$array_index]['image_blend'] ) ? $backgrounds_array[$array_index]['image_blend'] : '';
[2303] Fix | Delete
$background_gradient_overlays_image = isset( $background_gradient['overlays_image'] ) ? $background_gradient['overlays_image'] : '';
[2304] Fix | Delete
$background_color_hover = isset( $backgrounds_array[ $array_index ] ) ? self::$_->array_get( $backgrounds_array[ $array_index ], "color_hover" ) : '';
[2305] Fix | Delete
$background_color_hover_enabled = isset( $backgrounds_array[ $array_index ] ) ? self::$_->array_get( $backgrounds_array[ $array_index ], "color_hover_enabled" ) : '';
[2306] Fix | Delete
[2307] Fix | Delete
$padding_values = isset( $paddings_array[$array_index] ) ? $paddings_array[$array_index] : array();
[2308] Fix | Delete
$padding_mobile_values = isset( $paddings_mobile_array[$array_index] ) ? $paddings_mobile_array[$array_index] : array();
[2309] Fix | Delete
$padding_last_edited = isset( $padding_mobile_values['last_edited'] ) ? $padding_mobile_values['last_edited'] : 'off|desktop';
[2310] Fix | Delete
$padding_responsive_active = et_pb_get_responsive_status( $padding_last_edited );
[2311] Fix | Delete
$parallax_method = isset( $column_parallax[$array_index][0] ) && 'on' === $column_parallax[$array_index][0] ? $column_parallax[$array_index][1] : '';
[2312] Fix | Delete
$custom_css_class = isset( $column_css_array['css_class'][$array_index] ) ? ' ' . $column_css_array['css_class'][$array_index] : '';
[2313] Fix | Delete
$custom_css_id = isset( $column_css_array['css_id'][$array_index] ) ? $column_css_array['css_id'][$array_index] : '';
[2314] Fix | Delete
$custom_css_before = isset( $column_css_array['custom_css_before'][$array_index] ) ? $column_css_array['custom_css_before'][$array_index] : '';
[2315] Fix | Delete
$custom_css_main = isset( $column_css_array['custom_css_main'][$array_index] ) ? $column_css_array['custom_css_main'][$array_index] : '';
[2316] Fix | Delete
$custom_css_after = isset( $column_css_array['custom_css_after'][$array_index] ) ? $column_css_array['custom_css_after'][$array_index] : '';
[2317] Fix | Delete
[2318] Fix | Delete
$custom_css_before_hover = self::$_->array_get( $column_css_array, "custom_css_before_hover.[$array_index]", '' );
[2319] Fix | Delete
$custom_css_main_hover = self::$_->array_get( $column_css_array, "custom_css_main_hover.[$array_index]", '' );
[2320] Fix | Delete
$custom_css_after_hover = self::$_->array_get( $column_css_array, "custom_css_after_hover.[$array_index]", '' );
[2321] Fix | Delete
} else {
[2322] Fix | Delete
$custom_css_id = self::$_->array_get( $this->props, 'module_id', '' );
[2323] Fix | Delete
$parallax_method = self::$_->array_get( $this->props, 'parallax_method', '' );
[2324] Fix | Delete
}
[2325] Fix | Delete
[2326] Fix | Delete
// et_pb_columns_counter should be updated for all columns to calculate the last column correctly.
[2327] Fix | Delete
if ( isset( $gobal_column_settings_holder[ $current_row_position ] ) ) {
[2328] Fix | Delete
if ( 'et_pb_column_inner' === $function_name ) {
[2329] Fix | Delete
$et_pb_all_column_settings_inner[ $current_row_position ]['et_pb_columns_counter']++;
[2330] Fix | Delete
} else {
[2331] Fix | Delete
$et_pb_all_column_settings[ $current_row_position ]['et_pb_columns_counter']++;
[2332] Fix | Delete
}
[2333] Fix | Delete
}
[2334] Fix | Delete
[2335] Fix | Delete
// Get column type value in array
[2336] Fix | Delete
$column_type = explode( '_', $type );
[2337] Fix | Delete
[2338] Fix | Delete
// Just in case for some reason column shortcode has no `type` attribute and causes unexpected $column_type values
[2339] Fix | Delete
if ( isset( $column_type[0] ) && isset( $column_type[1] ) ) {
[2340] Fix | Delete
// Get column progress.
[2341] Fix | Delete
$column_progress = intval( $column_type[0] ) / intval( $column_type[1] );
[2342] Fix | Delete
[2343] Fix | Delete
if ( 0 === $array_index ) {
[2344] Fix | Delete
$et_pb_column_completion = $column_progress;
[2345] Fix | Delete
} else {
[2346] Fix | Delete
$et_pb_column_completion = $et_pb_column_completion + $column_progress;
[2347] Fix | Delete
}
[2348] Fix | Delete
}
[2349] Fix | Delete
[2350] Fix | Delete
// Last column is when sum of column type value equals to 1. Compare value as a string, comparing integers returns inconsistent results.
[2351] Fix | Delete
$is_last_column = '1' === strval( $et_pb_column_completion );
[2352] Fix | Delete
[2353] Fix | Delete
// Still need to manually output this for Specialty columns.
[2354] Fix | Delete
if ( $is_specialty_column ) {
[2355] Fix | Delete
$background_images = array();
[2356] Fix | Delete
[2357] Fix | Delete
if ( '' !== $background_gradient && 'on' === $background_gradient['active'] ) {
[2358] Fix | Delete
$has_background_gradient = true;
[2359] Fix | Delete
[2360] Fix | Delete
$default_gradient = apply_filters( 'et_pb_default_gradient', array(
[2361] Fix | Delete
'type' => ET_Global_Settings::get_value( 'all_background_gradient_type' ),
[2362] Fix | Delete
'direction' => ET_Global_Settings::get_value( 'all_background_gradient_direction' ),
[2363] Fix | Delete
'radial_direction' => ET_Global_Settings::get_value( 'all_background_gradient_direction_radial' ),
[2364] Fix | Delete
'color_start' => ET_Global_Settings::get_value( 'all_background_gradient_start' ),
[2365] Fix | Delete
'color_end' => ET_Global_Settings::get_value( 'all_background_gradient_end' ),
[2366] Fix | Delete
'start_position' => ET_Global_Settings::get_value( 'all_background_gradient_start_position' ),
[2367] Fix | Delete
'end_position' => ET_Global_Settings::get_value( 'all_background_gradient_end_position' ),
[2368] Fix | Delete
) );
[2369] Fix | Delete
[2370] Fix | Delete
$background_gradient = wp_parse_args( array_filter( $background_gradient ), $default_gradient );
[2371] Fix | Delete
[2372] Fix | Delete
$direction = $background_gradient['type'] === 'linear' ? $background_gradient['direction'] : "circle at {$background_gradient['radial_direction']}";
[2373] Fix | Delete
$start_gradient_position = et_sanitize_input_unit( $background_gradient['start_position'], false, '%' );
[2374] Fix | Delete
$end_gradient_position = et_sanitize_input_unit( $background_gradient['end_position'], false, '%');
[2375] Fix | Delete
$background_images[] = "{$background_gradient['type']}-gradient(
[2376] Fix | Delete
{$direction},
[2377] Fix | Delete
{$background_gradient['color_start']} ${start_gradient_position},
[2378] Fix | Delete
{$background_gradient['color_end']} ${end_gradient_position}
[2379] Fix | Delete
)";
[2380] Fix | Delete
}
[2381] Fix | Delete
[2382] Fix | Delete
if ( '' !== $background_img && 'on' !== $parallax_method ) {
[2383] Fix | Delete
$has_background_image = true;
[2384] Fix | Delete
[2385] Fix | Delete
$background_images[] = sprintf(
[2386] Fix | Delete
'url(%s)',
[2387] Fix | Delete
esc_attr( $background_img )
[2388] Fix | Delete
);
[2389] Fix | Delete
[2390] Fix | Delete
if ( '' !== $background_size ) {
[2391] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2392] Fix | Delete
'selector' => '%%order_class%%',
[2393] Fix | Delete
'declaration' => sprintf(
[2394] Fix | Delete
'background-size:%s;',
[2395] Fix | Delete
esc_attr( $background_size )
[2396] Fix | Delete
),
[2397] Fix | Delete
) );
[2398] Fix | Delete
}
[2399] Fix | Delete
[2400] Fix | Delete
if ( '' !== $background_position ) {
[2401] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2402] Fix | Delete
'selector' => '%%order_class%%',
[2403] Fix | Delete
'declaration' => sprintf(
[2404] Fix | Delete
'background-position:%s;',
[2405] Fix | Delete
esc_attr( str_replace( '_', ' ', $background_position ) )
[2406] Fix | Delete
),
[2407] Fix | Delete
) );
[2408] Fix | Delete
}
[2409] Fix | Delete
[2410] Fix | Delete
if ( '' !== $background_repeat ) {
[2411] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2412] Fix | Delete
'selector' => '%%order_class%%',
[2413] Fix | Delete
'declaration' => sprintf(
[2414] Fix | Delete
'background-repeat:%s;',
[2415] Fix | Delete
esc_attr( $background_repeat )
[2416] Fix | Delete
),
[2417] Fix | Delete
) );
[2418] Fix | Delete
}
[2419] Fix | Delete
[2420] Fix | Delete
if ( '' !== $background_blend ) {
[2421] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2422] Fix | Delete
'selector' => '%%order_class%%',
[2423] Fix | Delete
'declaration' => sprintf(
[2424] Fix | Delete
'background-blend-mode:%s;',
[2425] Fix | Delete
esc_attr( $background_blend )
[2426] Fix | Delete
),
[2427] Fix | Delete
) );
[2428] Fix | Delete
}
[2429] Fix | Delete
}
[2430] Fix | Delete
[2431] Fix | Delete
if ( ! empty( $background_images ) ) {
[2432] Fix | Delete
if ( 'on' !== $background_gradient_overlays_image ) {
[2433] Fix | Delete
// The browsers stack the images in the opposite order to what you'd expect.
[2434] Fix | Delete
$background_images = array_reverse( $background_images );
[2435] Fix | Delete
}
[2436] Fix | Delete
[2437] Fix | Delete
$backgorund_images_declaration = sprintf(
[2438] Fix | Delete
'background-image: %1$s;',
[2439] Fix | Delete
esc_html( implode( ', ', $background_images ) )
[2440] Fix | Delete
);
[2441] Fix | Delete
[2442] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2443] Fix | Delete
'selector' => '%%order_class%%',
[2444] Fix | Delete
'declaration' => esc_attr( $backgorund_images_declaration ),
[2445] Fix | Delete
) );
[2446] Fix | Delete
}
[2447] Fix | Delete
[2448] Fix | Delete
if ( '' !== $background_color && 'rgba(0,0,0,0)' !== $background_color && ! isset( $has_background_gradient, $has_background_image ) ) {
[2449] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2450] Fix | Delete
'selector' => '%%order_class%%',
[2451] Fix | Delete
'declaration' => sprintf(
[2452] Fix | Delete
'background-color:%s;',
[2453] Fix | Delete
esc_attr( $background_color )
[2454] Fix | Delete
),
[2455] Fix | Delete
) );
[2456] Fix | Delete
[2457] Fix | Delete
if ( $background_color_hover && $background_color_hover_enabled ) {
[2458] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2459] Fix | Delete
'selector' => '%%order_class%%:hover',
[2460] Fix | Delete
'declaration' => sprintf(
[2461] Fix | Delete
'background-color:%s;',
[2462] Fix | Delete
esc_attr( $background_color_hover )
[2463] Fix | Delete
),
[2464] Fix | Delete
) );
[2465] Fix | Delete
}
[2466] Fix | Delete
} else if ( isset( $has_background_gradient, $has_background_image ) ) {
[2467] Fix | Delete
// Force background-color: initial
[2468] Fix | Delete
ET_Builder_Element::set_style( $function_name, array(
[2469] Fix | Delete
'selector' => '%%order_class%%',
[2470] Fix | Delete
'declaration' => 'background-color: initial;'
[2471] Fix | Delete
) );
[2472] Fix | Delete
}
[2473] Fix | Delete
[2474] Fix | Delete
if ( ! empty( $padding_values ) ) {
[2475] Fix | Delete
$padding_hover_enabled = self::$_->array_get( $padding_values, 'padding-hover-enabled', false );
[2476] Fix | Delete
unset( $padding_values['padding-hover-enabled'] );
[2477] Fix | Delete
[2478] Fix | Delete
foreach( $padding_values as $position => $value ) {
[2479] Fix | Delete
if ( in_array( $position, array('padding-top', 'padding-right', 'padding-bottom', 'padding-left' ) ) && !empty( $value ) ) {
[2480] Fix | Delete
$element_style = array(
[2481] Fix | Delete
'selector' => '%%order_class%%',
[2482] Fix | Delete
'declaration' => sprintf(
[2483] Fix | Delete
'%1$s:%2$s;',
[2484] Fix | Delete
esc_html( $position ),
[2485] Fix | Delete
esc_html( et_builder_process_range_value( $value ) )
[2486] Fix | Delete
),
[2487] Fix | Delete
);
[2488] Fix | Delete
[2489] Fix | Delete
// Backward compatibility. Keep Padding on Mobile is deprecated in favour of responsive inputs mechanism for custom padding
[2490] Fix | Delete
// To ensure that it is compatibility with previous version of Divi, this option is now only used as last resort if no
[2491] Fix | Delete
// responsive padding value is found, and padding_mobile value is saved (which is set to off by default)
[2492] Fix | Delete
if ( in_array( $keep_column_padding_mobile, array( 'on', 'off' ) ) && 'on' !== $keep_column_padding_mobile && ! $padding_responsive_active ) {
[2493] Fix | Delete
$element_style['media_query'] = ET_Builder_Element::get_media_query( 'min_width_981' );
[2494] Fix | Delete
}
[2495] Fix | Delete
[2496] Fix | Delete
ET_Builder_Element::set_style( $function_name, $element_style );
[2497] Fix | Delete
}
[2498] Fix | Delete
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function