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/module
File: SliderItem.php
'color' => self::$_->array_get( $this->advanced_fields, 'text.css.main', '%%order_class%%' ),
[500] Fix | Delete
);
[501] Fix | Delete
[502] Fix | Delete
$fields['dot_nav_custom_color'] = array( 'background-color' => et_pb_slider_options()->get_dots_selector() );
[503] Fix | Delete
$fields['arrows_custom_color'] = array( 'all' => et_pb_slider_options()->get_arrows_selector() );
[504] Fix | Delete
[505] Fix | Delete
return $fields;
[506] Fix | Delete
}
[507] Fix | Delete
[508] Fix | Delete
static function get_video_embed( $args = array(), $conditonal_args = array(), $current_page = array() ) {
[509] Fix | Delete
global $wp_embed;
[510] Fix | Delete
[511] Fix | Delete
$video_url = esc_url( $args['video_url'] );
[512] Fix | Delete
[513] Fix | Delete
// Bail early if video URL is empty.
[514] Fix | Delete
if ( empty( $video_url ) ) {
[515] Fix | Delete
return '';
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
$autoembed = $wp_embed->autoembed( $video_url );
[519] Fix | Delete
$is_local_video = has_shortcode( $autoembed, 'video' );
[520] Fix | Delete
$video_embed = '';
[521] Fix | Delete
[522] Fix | Delete
if ( $is_local_video ) {
[523] Fix | Delete
$video_embed = wp_video_shortcode( array( 'src' => $video_url ) );
[524] Fix | Delete
} else {
[525] Fix | Delete
$video_embed = et_builder_get_oembed( $video_url );
[526] Fix | Delete
[527] Fix | Delete
$video_embed = preg_replace( '/<embed /','<embed wmode="transparent" ', $video_embed );
[528] Fix | Delete
[529] Fix | Delete
$video_embed = preg_replace( '/<\/object>/','<param name="wmode" value="transparent" /></object>', $video_embed );
[530] Fix | Delete
}
[531] Fix | Delete
[532] Fix | Delete
return $video_embed;
[533] Fix | Delete
}
[534] Fix | Delete
[535] Fix | Delete
function maybe_inherit_values() {
[536] Fix | Delete
// Inheriting slider attribute
[537] Fix | Delete
global $et_pb_slider;
[538] Fix | Delete
[539] Fix | Delete
// Check if current slide item version is made before Divi v3.2 (UI Improvement release). v3.2 changed default
[540] Fix | Delete
// background color for slide item for usability and inheritance mechanism requires custom treatment on FE and VB
[541] Fix | Delete
$is_prior_v32 = version_compare( self::$_->array_get( $this->props, '_builder_version', '3.0.47' ), '3.2', '<' );
[542] Fix | Delete
[543] Fix | Delete
// Attribute inheritance should be done on front-end / published page only.
[544] Fix | Delete
// Don't run attribute inheritance in VB and Backend to avoid attribute inheritance accidentally being saved on VB / BB
[545] Fix | Delete
if ( ! empty( $et_pb_slider ) && ! is_admin() && ! et_fb_is_enabled() ) {
[546] Fix | Delete
$view_modes = array( '', '__hover', '_phone', '_tablet' );
[547] Fix | Delete
foreach ( $et_pb_slider as $slider_attr => $slider_attr_value ) {
[548] Fix | Delete
$maybe_next_slider_attr = false;
[549] Fix | Delete
foreach( $view_modes as $mode ) {
[550] Fix | Delete
$current_view_bc_enable_attr = 'background_enable_color' . $mode;
[551] Fix | Delete
if( $slider_attr === $current_view_bc_enable_attr) {
[552] Fix | Delete
// Do not inherit the background color off from the parent slider
[553] Fix | Delete
$this->props[ $current_view_bc_enable_attr ] = isset( $this->props[ $current_view_bc_enable_attr ] ) && 'off' === $this->props[ $current_view_bc_enable_attr ] ? 'off' : 'on';
[554] Fix | Delete
$maybe_next_slider_attr = true;
[555] Fix | Delete
}
[556] Fix | Delete
}
[557] Fix | Delete
if( $maybe_next_slider_attr ) {
[558] Fix | Delete
continue;
[559] Fix | Delete
}
[560] Fix | Delete
[561] Fix | Delete
// Get default value
[562] Fix | Delete
$default = isset( $this->fields_unprocessed[ $slider_attr ][ 'default' ] ) ? $this->fields_unprocessed[ $slider_attr ][ 'default' ] : '';
[563] Fix | Delete
[564] Fix | Delete
// Slide item isn't empty nor default
[565] Fix | Delete
if ( ! in_array( self::$_->array_get( $this->props, $slider_attr, '' ), array( '', $default ) ) ) {
[566] Fix | Delete
continue;
[567] Fix | Delete
}
[568] Fix | Delete
[569] Fix | Delete
// Slider value is equal to empty or slide item's default
[570] Fix | Delete
if ( in_array( $slider_attr_value, array( '', $default ) ) ) {
[571] Fix | Delete
continue;
[572] Fix | Delete
}
[573] Fix | Delete
[574] Fix | Delete
// Overwrite slider item's empty / default value
[575] Fix | Delete
$this->props[ $slider_attr ] = $slider_attr_value;
[576] Fix | Delete
}
[577] Fix | Delete
}
[578] Fix | Delete
[579] Fix | Delete
// In VB, inheritance is done in VB side. However in migrating changing default that is affected by inheritance, the value
[580] Fix | Delete
// needs to be modified before being set to avoid sudden color change when _builder_version is bumped when settings modal
[581] Fix | Delete
// is opened. This making prior saved value changed but it is the safest option considering old Divi doesn't trim background_color
[582] Fix | Delete
if ( ! empty( $et_pb_slider ) && ( is_admin() || et_core_is_fb_enabled() ) && $is_prior_v32 ) {
[583] Fix | Delete
$slider_background_color = self::$_->array_get( $et_pb_slider, 'background_color', '' );
[584] Fix | Delete
$is_slide_background_color_empty = in_array( $this->props['background_color'], array( '', '#ffffff', et_builder_accent_color() ) );
[585] Fix | Delete
$is_slider_background_color_filled = '' !== $slider_background_color;
[586] Fix | Delete
[587] Fix | Delete
if ( $is_slide_background_color_empty && $is_slider_background_color_filled ) {
[588] Fix | Delete
$this->props['background_color'] = '';
[589] Fix | Delete
}
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
// For background, text overlay, arrow, and dot colors, we have to consider about the
[593] Fix | Delete
// responsive settings status to inherit the value. If it's disabled on slider item, we
[594] Fix | Delete
// have to use the value from slider instead.
[595] Fix | Delete
if ( ! empty( $et_pb_slider ) ) {
[596] Fix | Delete
// Background Overlay Color.
[597] Fix | Delete
$is_bg_overlay_color_slider_responsive = et_pb_responsive_options()->is_responsive_enabled( $et_pb_slider, 'bg_overlay_color_slider' );
[598] Fix | Delete
$is_bg_overlay_color_responsive = et_pb_responsive_options()->is_responsive_enabled( $this->props, 'bg_overlay_color' );
[599] Fix | Delete
[600] Fix | Delete
if ( ! $is_bg_overlay_color_responsive && $is_bg_overlay_color_slider_responsive ) {
[601] Fix | Delete
$this->props['bg_overlay_color_tablet'] = ! empty( $et_pb_slider['bg_overlay_color_tablet'] ) ? $et_pb_slider['bg_overlay_color_tablet'] : $this->props['bg_overlay_color_tablet'];
[602] Fix | Delete
$this->props['bg_overlay_color_phone'] = ! empty( $et_pb_slider['bg_overlay_color_phone'] ) ? $et_pb_slider['bg_overlay_color_phone'] : $this->props['bg_overlay_color_phone'];
[603] Fix | Delete
$this->props['bg_overlay_color_last_edited'] = ! empty( $et_pb_slider['bg_overlay_color_slider_last_edited'] ) ? $et_pb_slider['bg_overlay_color_slider_last_edited'] : $this->props['bg_overlay_color_last_edited'];
[604] Fix | Delete
}
[605] Fix | Delete
[606] Fix | Delete
// Text Overlay Color.
[607] Fix | Delete
$is_text_overlay_color_slider_responsive = et_pb_responsive_options()->is_responsive_enabled( $et_pb_slider, 'text_overlay_color_slider' );
[608] Fix | Delete
$is_text_overlay_color_responsive = et_pb_responsive_options()->is_responsive_enabled( $this->props, 'text_overlay_color' );
[609] Fix | Delete
[610] Fix | Delete
if ( ! $is_text_overlay_color_responsive && $is_text_overlay_color_slider_responsive ) {
[611] Fix | Delete
$this->props['text_overlay_color_tablet'] = ! empty( $et_pb_slider['text_overlay_color_tablet'] ) ? $et_pb_slider['text_overlay_color_tablet'] : $this->props['text_overlay_color_tablet'];
[612] Fix | Delete
$this->props['text_overlay_color_phone'] = ! empty( $et_pb_slider['text_overlay_color_phone'] ) ? $et_pb_slider['text_overlay_color_phone'] : $this->props['text_overlay_color_phone'];
[613] Fix | Delete
$this->props['text_overlay_color_last_edited'] = ! empty( $et_pb_slider['text_overlay_color_slider_last_edited'] ) ? $et_pb_slider['text_overlay_color_slider_last_edited'] : $this->props['text_overlay_color_last_edited'];
[614] Fix | Delete
}
[615] Fix | Delete
[616] Fix | Delete
// Text Border Radius.
[617] Fix | Delete
$is_text_border_radius_slider_responsive = et_pb_responsive_options()->is_responsive_enabled( $et_pb_slider, 'text_border_radius_slider' );
[618] Fix | Delete
$is_text_border_radius_responsive = et_pb_responsive_options()->is_responsive_enabled( $this->props, 'text_border_radius' );
[619] Fix | Delete
[620] Fix | Delete
if ( ! $is_text_border_radius_responsive && $is_text_border_radius_slider_responsive ) {
[621] Fix | Delete
$this->props['text_border_radius_tablet'] = ! empty( $et_pb_slider['text_border_radius_tablet'] ) ? $et_pb_slider['text_border_radius_tablet'] : $this->props['text_border_radius_tablet'];
[622] Fix | Delete
$this->props['text_border_radius_phone'] = ! empty( $et_pb_slider['text_border_radius_phone'] ) ? $et_pb_slider['text_border_radius_phone'] : $this->props['text_border_radius_phone'];
[623] Fix | Delete
$this->props['text_border_radius_last_edited'] = ! empty( $et_pb_slider['text_border_radius_slider_last_edited'] ) ? $et_pb_slider['text_border_radius_slider_last_edited'] : $this->props['text_border_radius_last_edited'];
[624] Fix | Delete
}
[625] Fix | Delete
[626] Fix | Delete
// Arrow Custom Color.
[627] Fix | Delete
$is_arrows_custom_color_slider_responsive = et_pb_responsive_options()->is_responsive_enabled( $et_pb_slider, 'arrows_custom_color_slider' );
[628] Fix | Delete
$is_arrows_custom_color_responsive = et_pb_responsive_options()->is_responsive_enabled( $this->props, 'arrows_custom_color' );
[629] Fix | Delete
[630] Fix | Delete
if ( ! $is_arrows_custom_color_responsive && $is_arrows_custom_color_slider_responsive ) {
[631] Fix | Delete
$this->props['arrows_custom_color_tablet'] = ! empty( $et_pb_slider['arrows_custom_color_tablet'] ) ? $et_pb_slider['arrows_custom_color_tablet'] : $this->props['arrows_custom_color_tablet'];
[632] Fix | Delete
$this->props['arrows_custom_color_phone'] = ! empty( $et_pb_slider['arrows_custom_color_phone'] ) ? $et_pb_slider['arrows_custom_color_phone'] : $this->props['arrows_custom_color_phone'];
[633] Fix | Delete
$this->props['arrows_custom_color_last_edited'] = ! empty( $et_pb_slider['arrows_custom_color_slider_last_edited'] ) ? $et_pb_slider['arrows_custom_color_slider_last_edited'] : $this->props['arrows_custom_color_last_edited'];
[634] Fix | Delete
}
[635] Fix | Delete
[636] Fix | Delete
// Dot Navigation Color.
[637] Fix | Delete
$is_dot_nav_custom_color_slider_responsive = et_pb_responsive_options()->is_responsive_enabled( $et_pb_slider, 'dot_nav_custom_color_slider' );
[638] Fix | Delete
$is_dot_nav_custom_color_responsive = et_pb_responsive_options()->is_responsive_enabled( $this->props, 'dot_nav_custom_color' );
[639] Fix | Delete
[640] Fix | Delete
if ( ! $is_dot_nav_custom_color_responsive && $is_dot_nav_custom_color_slider_responsive ) {
[641] Fix | Delete
$this->props['dot_nav_custom_color_tablet'] = ! empty( $et_pb_slider['dot_nav_custom_color_tablet'] ) ? $et_pb_slider['dot_nav_custom_color_tablet'] : $this->props['dot_nav_custom_color_tablet'];
[642] Fix | Delete
$this->props['dot_nav_custom_color_phone'] = ! empty( $et_pb_slider['dot_nav_custom_color_phone'] ) ? $et_pb_slider['dot_nav_custom_color_phone'] : $this->props['dot_nav_custom_color_phone'];
[643] Fix | Delete
$this->props['dot_nav_custom_color_last_edited'] = ! empty( $et_pb_slider['dot_nav_custom_color_slider_last_edited'] ) ? $et_pb_slider['dot_nav_custom_color_slider_last_edited'] : $this->props['dot_nav_custom_color_last_edited'];
[644] Fix | Delete
}
[645] Fix | Delete
}
[646] Fix | Delete
}
[647] Fix | Delete
[648] Fix | Delete
function render( $attrs, $content = null, $render_slug ) {
[649] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[650] Fix | Delete
$alignment = $this->props['alignment'];
[651] Fix | Delete
// Allowing full html for backwards compatibility.
[652] Fix | Delete
$heading = $this->_esc_attr( 'heading', 'full' );
[653] Fix | Delete
$button_text = $this->_esc_attr( 'button_text', 'limited' );
[654] Fix | Delete
$button_link = $this->props['button_link'];
[655] Fix | Delete
$url_new_window = $this->props['url_new_window'];
[656] Fix | Delete
$image = $this->props['image'];
[657] Fix | Delete
$image_alt = $this->props['image_alt'];
[658] Fix | Delete
$video_url = $this->props['video_url'];
[659] Fix | Delete
$button_custom = $this->props['custom_button'];
[660] Fix | Delete
$button_rel = $this->props['button_rel'];
[661] Fix | Delete
$use_bg_overlay = $this->props['use_bg_overlay'];
[662] Fix | Delete
$use_text_overlay = $this->props['use_text_overlay'];
[663] Fix | Delete
$header_level = $this->props['header_level'];
[664] Fix | Delete
$video_background = $this->video_background();
[665] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[666] Fix | Delete
$background_color = $this->props['background_color'];
[667] Fix | Delete
$bg_overlay_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'bg_overlay_color' );
[668] Fix | Delete
$text_overlay_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'text_overlay_color' );
[669] Fix | Delete
$text_border_radius_values = et_pb_responsive_options()->get_property_values( $this->props, 'text_border_radius' );
[670] Fix | Delete
[671] Fix | Delete
$custom_icon_values = et_pb_responsive_options()->get_property_values( $this->props, 'button_icon' );
[672] Fix | Delete
$custom_icon = isset( $custom_icon_values['desktop'] ) ? $custom_icon_values['desktop'] : '';
[673] Fix | Delete
$custom_icon_tablet = isset( $custom_icon_values['tablet'] ) ? $custom_icon_values['tablet'] : '';
[674] Fix | Delete
$custom_icon_phone = isset( $custom_icon_values['phone'] ) ? $custom_icon_values['phone'] : '';
[675] Fix | Delete
[676] Fix | Delete
global $et_pb_slider, $et_pb_slider_has_video, $et_pb_slider_parallax, $et_pb_slider_parallax_method, $et_pb_slider_show_mobile, $et_pb_slider_custom_icon, $et_pb_slider_custom_icon_tablet, $et_pb_slider_custom_icon_phone, $et_pb_slider_item_num, $et_pb_slider_button_rel;
[677] Fix | Delete
[678] Fix | Delete
$et_pb_slider_item_num++;
[679] Fix | Delete
[680] Fix | Delete
$hide_on_mobile_class = self::HIDE_ON_MOBILE;
[681] Fix | Delete
[682] Fix | Delete
$is_text_overlay_applied = 'on' === $use_text_overlay;
[683] Fix | Delete
[684] Fix | Delete
$custom_slide_icon = 'on' === $button_custom && '' !== $custom_icon ? $custom_icon : $et_pb_slider_custom_icon;
[685] Fix | Delete
$custom_slide_icon_tablet = 'on' === $button_custom && '' !== $custom_icon_tablet ? $custom_icon_tablet : $et_pb_slider_custom_icon_tablet;
[686] Fix | Delete
$custom_slide_icon_phone = 'on' === $button_custom && '' !== $custom_icon_phone ? $custom_icon_phone : $et_pb_slider_custom_icon_phone;
[687] Fix | Delete
[688] Fix | Delete
if ( '' !== $heading ) {
[689] Fix | Delete
if ( '#' !== $button_link ) {
[690] Fix | Delete
$heading = sprintf( '<a href="%1$s">%2$s</a>',
[691] Fix | Delete
esc_url( $button_link ),
[692] Fix | Delete
et_core_esc_previously( $heading )
[693] Fix | Delete
);
[694] Fix | Delete
}
[695] Fix | Delete
[696] Fix | Delete
$heading = sprintf(
[697] Fix | Delete
'<%1$s class="et_pb_slide_title">%2$s</%1$s>',
[698] Fix | Delete
et_pb_process_header_level( $header_level, 'h2' ),
[699] Fix | Delete
et_core_esc_previously( $heading )
[700] Fix | Delete
);
[701] Fix | Delete
}
[702] Fix | Delete
[703] Fix | Delete
// Overwrite button rel with pricin tables' button_rel if needed
[704] Fix | Delete
if ( in_array( $button_rel, array( '', 'off|off|off|off|off' ) ) && '' !== $et_pb_slider_button_rel ) {
[705] Fix | Delete
$button_rel = $et_pb_slider_button_rel;
[706] Fix | Delete
}
[707] Fix | Delete
[708] Fix | Delete
// render button
[709] Fix | Delete
$button_classname = array( 'et_pb_more_button' );
[710] Fix | Delete
[711] Fix | Delete
if ( 'on' !== $et_pb_slider_show_mobile['show_cta_on_mobile'] ) {
[712] Fix | Delete
$button_classname[] = $hide_on_mobile_class;
[713] Fix | Delete
}
[714] Fix | Delete
[715] Fix | Delete
$button = $this->render_button( array(
[716] Fix | Delete
'button_classname' => $button_classname,
[717] Fix | Delete
'button_custom' => '' !== $custom_slide_icon || '' !== $custom_slide_icon_tablet || '' !== $custom_slide_icon_phone ? 'on' : 'off',
[718] Fix | Delete
'button_rel' => $button_rel,
[719] Fix | Delete
'button_text' => $button_text,
[720] Fix | Delete
'button_text_escaped' => true,
[721] Fix | Delete
'button_url' => $button_link,
[722] Fix | Delete
'url_new_window' => $url_new_window,
[723] Fix | Delete
'custom_icon' => $custom_slide_icon,
[724] Fix | Delete
'custom_icon_tablet' => $custom_slide_icon_tablet,
[725] Fix | Delete
'custom_icon_phone' => $custom_slide_icon_phone,
[726] Fix | Delete
'display_button' => true,
[727] Fix | Delete
'multi_view_data' => $multi_view->render_attrs( array(
[728] Fix | Delete
'content' => '{{button_text}}',
[729] Fix | Delete
'visibility' => array(
[730] Fix | Delete
'button_text' => '__not_empty',
[731] Fix | Delete
),
[732] Fix | Delete
) ),
[733] Fix | Delete
) );
[734] Fix | Delete
[735] Fix | Delete
if ( 'on' === $use_bg_overlay ) {
[736] Fix | Delete
// Background Overlay Color.
[737] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $bg_overlay_color_values, '%%order_class%%.et_pb_slide .et_pb_slide_overlay_container', 'background-color', $render_slug, '', 'color' );
[738] Fix | Delete
}
[739] Fix | Delete
[740] Fix | Delete
if ( ! empty( $background_color ) && 'off' !== $this->props['background_enable_color'] ) {
[741] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[742] Fix | Delete
'selector' => '%%order_class%%',
[743] Fix | Delete
'declaration' => sprintf(
[744] Fix | Delete
'background-color: %1$s;',
[745] Fix | Delete
esc_html( $background_color )
[746] Fix | Delete
),
[747] Fix | Delete
) );
[748] Fix | Delete
}
[749] Fix | Delete
[750] Fix | Delete
if ( $is_text_overlay_applied ) {
[751] Fix | Delete
// Text Overlay Color.
[752] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $text_overlay_color_values, '%%order_class%%.et_pb_slide .et_pb_text_overlay_wrapper', 'background-color', $render_slug, '', 'color' );
[753] Fix | Delete
}
[754] Fix | Delete
[755] Fix | Delete
// Text Border Radius.
[756] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $text_border_radius_values, '%%order_class%%.et_pb_slider_with_text_overlay .et_pb_text_overlay_wrapper', 'border-radius', $render_slug );
[757] Fix | Delete
[758] Fix | Delete
$image = '';
[759] Fix | Delete
[760] Fix | Delete
if ( $multi_view->has_value( 'image' ) ) {
[761] Fix | Delete
$image_html = $multi_view->render_element( array(
[762] Fix | Delete
'tag' => 'img',
[763] Fix | Delete
'attrs' => array(
[764] Fix | Delete
'src' => '{{image}}',
[765] Fix | Delete
'alt' => esc_attr( $image_alt ),
[766] Fix | Delete
),
[767] Fix | Delete
'required' => 'image',
[768] Fix | Delete
) );
[769] Fix | Delete
[770] Fix | Delete
$image = $multi_view->render_element( array(
[771] Fix | Delete
'tag' => 'div',
[772] Fix | Delete
'content' => $image_html,
[773] Fix | Delete
'attrs' => array(
[774] Fix | Delete
'class' => 'et_pb_slide_image',
[775] Fix | Delete
),
[776] Fix | Delete
'required' => 'image',
[777] Fix | Delete
) );
[778] Fix | Delete
}
[779] Fix | Delete
[780] Fix | Delete
if ( $multi_view->has_value( 'video_url' ) ) {
[781] Fix | Delete
$image = $multi_view->render_element( array(
[782] Fix | Delete
'tag' => 'div',
[783] Fix | Delete
'content' => '{{video_url}}',
[784] Fix | Delete
'attrs' => array(
[785] Fix | Delete
'class' => 'et_pb_slide_video',
[786] Fix | Delete
)
[787] Fix | Delete
) );
[788] Fix | Delete
}
[789] Fix | Delete
[790] Fix | Delete
// Images: Add CSS Filters and Mix Blend Mode rules (if set)
[791] Fix | Delete
if ( array_key_exists( 'image', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['image'] ) ) {
[792] Fix | Delete
$this->add_classname( $this->generate_css_filters(
[793] Fix | Delete
$render_slug,
[794] Fix | Delete
'child_',
[795] Fix | Delete
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
[796] Fix | Delete
) );
[797] Fix | Delete
}
[798] Fix | Delete
[799] Fix | Delete
// Background layout class names.
[800] Fix | Delete
$background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $this->props );
[801] Fix | Delete
$this->add_classname( $background_layout_class_names );
[802] Fix | Delete
[803] Fix | Delete
// Module classnames
[804] Fix | Delete
if ( $multi_view->has_value( 'image' ) || $multi_view->has_value( 'video_url' ) ) {
[805] Fix | Delete
$this->add_classname( 'et_pb_slide_with_image' );
[806] Fix | Delete
}
[807] Fix | Delete
[808] Fix | Delete
if ( $multi_view->has_value( 'video_url' ) ) {
[809] Fix | Delete
$this->add_classname( 'et_pb_slide_with_video' );
[810] Fix | Delete
}
[811] Fix | Delete
[812] Fix | Delete
if ( 'bottom' !== $alignment ) {
[813] Fix | Delete
$this->add_classname( "et_pb_media_alignment_{$alignment}" );
[814] Fix | Delete
}
[815] Fix | Delete
[816] Fix | Delete
if ( 'on' === $use_bg_overlay ) {
[817] Fix | Delete
$this->add_classname( 'et_pb_slider_with_overlay' );
[818] Fix | Delete
}
[819] Fix | Delete
[820] Fix | Delete
if ( 'on' === $use_text_overlay ) {
[821] Fix | Delete
$this->add_classname( 'et_pb_slider_with_text_overlay' );
[822] Fix | Delete
}
[823] Fix | Delete
[824] Fix | Delete
if ( 1 === $et_pb_slider_item_num ) {
[825] Fix | Delete
$this->add_classname( 'et-pb-active-slide' );
[826] Fix | Delete
}
[827] Fix | Delete
[828] Fix | Delete
$parent_class = self::$_->array_get( $et_pb_slider, 'order_class', 'et_pb_slider' );
[829] Fix | Delete
$order_class = self::get_module_order_class( $render_slug );
[830] Fix | Delete
$prefix = sprintf( '.%1$s[data-active-slide="%2$s"]', $parent_class, $order_class );
[831] Fix | Delete
[832] Fix | Delete
$this->generate_responsive_hover_style( 'arrows_custom_color', et_pb_slider_options()->get_arrows_selector( $prefix ), 'color' );
[833] Fix | Delete
$this->generate_responsive_hover_style( 'dot_nav_custom_color', et_pb_slider_options()->get_dots_selector( $prefix ), 'background-color' );
[834] Fix | Delete
[835] Fix | Delete
// Remove automatically added classnames
[836] Fix | Delete
$this->remove_classname( array(
[837] Fix | Delete
'et_pb_module',
[838] Fix | Delete
) );
[839] Fix | Delete
[840] Fix | Delete
$heading = $multi_view->has_value( 'heading' ) ? '{{heading}}' : '';
[841] Fix | Delete
[842] Fix | Delete
if ( $heading ) {
[843] Fix | Delete
if ( $button_link && '#' !== $button_link ) {
[844] Fix | Delete
$heading = $multi_view->render_element( array(
[845] Fix | Delete
'tag' => 'a',
[846] Fix | Delete
'content' => $heading,
[847] Fix | Delete
'attrs' => array(
[848] Fix | Delete
'href' => esc_url( $button_link ),
[849] Fix | Delete
),
[850] Fix | Delete
) );
[851] Fix | Delete
}
[852] Fix | Delete
[853] Fix | Delete
$heading = $multi_view->render_element( array(
[854] Fix | Delete
'tag' => et_pb_process_header_level( $header_level, 'h2' ),
[855] Fix | Delete
'content' => $heading,
[856] Fix | Delete
'attrs' => array(
[857] Fix | Delete
'class' => 'et_pb_slide_title',
[858] Fix | Delete
),
[859] Fix | Delete
) );
[860] Fix | Delete
}
[861] Fix | Delete
[862] Fix | Delete
$slide_content_class = array('et_pb_slide_content');
[863] Fix | Delete
[864] Fix | Delete
if ( 'on' !== $et_pb_slider_show_mobile['show_content_on_mobile'] ) {
[865] Fix | Delete
$slide_content_class[] = $hide_on_mobile_class;
[866] Fix | Delete
}
[867] Fix | Delete
[868] Fix | Delete
$content = $multi_view->render_element( array(
[869] Fix | Delete
'tag' => 'div',
[870] Fix | Delete
'content' => '{{content}}',
[871] Fix | Delete
'attrs' => array(
[872] Fix | Delete
'class' => implode( ' ', $slide_content_class ),
[873] Fix | Delete
),
[874] Fix | Delete
) );
[875] Fix | Delete
[876] Fix | Delete
$slide_content = sprintf(
[877] Fix | Delete
'%1$s%2$s',
[878] Fix | Delete
et_core_esc_previously( $heading ),
[879] Fix | Delete
et_core_esc_previously( $content )
[880] Fix | Delete
);
[881] Fix | Delete
[882] Fix | Delete
//apply text overlay wrapper
[883] Fix | Delete
if ( $is_text_overlay_applied ) {
[884] Fix | Delete
$slide_content = sprintf(
[885] Fix | Delete
'<div class="et_pb_text_overlay_wrapper">
[886] Fix | Delete
%1$s
[887] Fix | Delete
</div>',
[888] Fix | Delete
$slide_content
[889] Fix | Delete
);
[890] Fix | Delete
}
[891] Fix | Delete
[892] Fix | Delete
// Background layout data attributes.
[893] Fix | Delete
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
[894] Fix | Delete
[895] Fix | Delete
$multi_view_classes = $multi_view->render_attrs( array(
[896] Fix | Delete
'classes' => array(
[897] Fix | Delete
'et_pb_slide_with_image' => array(
[898] Fix | Delete
'image' => '__not_empty',
[899] Fix | Delete
),
[900] Fix | Delete
'et_pb_slide_with_video' => array(
[901] Fix | Delete
'video_url' => '__not_empty',
[902] Fix | Delete
),
[903] Fix | Delete
),
[904] Fix | Delete
) );
[905] Fix | Delete
[906] Fix | Delete
$output = sprintf(
[907] Fix | Delete
'<div class="%4$s"%7$s%8$s%10$s data-slide-id="%11$s"%12$s>
[908] Fix | Delete
%6$s
[909] Fix | Delete
%9$s
[910] Fix | Delete
<div class="et_pb_container clearfix">
[911] Fix | Delete
<div class="et_pb_slider_container_inner">
[912] Fix | Delete
%3$s
[913] Fix | Delete
<div class="et_pb_slide_description">
[914] Fix | Delete
%1$s
[915] Fix | Delete
%2$s
[916] Fix | Delete
</div> <!-- .et_pb_slide_description -->
[917] Fix | Delete
</div>
[918] Fix | Delete
</div> <!-- .et_pb_container -->
[919] Fix | Delete
%5$s
[920] Fix | Delete
</div> <!-- .et_pb_slide -->
[921] Fix | Delete
',
[922] Fix | Delete
$slide_content,
[923] Fix | Delete
$button,
[924] Fix | Delete
$image,
[925] Fix | Delete
$this->module_classname( $render_slug ),
[926] Fix | Delete
$video_background, // #5
[927] Fix | Delete
$parallax_image_background,
[928] Fix | Delete
'',
[929] Fix | Delete
'',
[930] Fix | Delete
'on' === $use_bg_overlay ? '<div class="et_pb_slide_overlay_container"></div>' : '',
[931] Fix | Delete
et_core_esc_previously( $data_background_layout ), // #10
[932] Fix | Delete
self::get_module_order_class( $render_slug ),
[933] Fix | Delete
$multi_view_classes
[934] Fix | Delete
);
[935] Fix | Delete
[936] Fix | Delete
return $output;
[937] Fix | Delete
}
[938] Fix | Delete
[939] Fix | Delete
/**
[940] Fix | Delete
* Filter multi view value.
[941] Fix | Delete
*
[942] Fix | Delete
* @since 3.27.1
[943] Fix | Delete
*
[944] Fix | Delete
* @see ET_Builder_Module_Helper_MultiViewOptions::filter_value
[945] Fix | Delete
*
[946] Fix | Delete
* @param mixed $raw_value Props raw value.
[947] Fix | Delete
* @param array $args {
[948] Fix | Delete
* Context data.
[949] Fix | Delete
*
[950] Fix | Delete
* @type string $context Context param: content, attrs, visibility, classes.
[951] Fix | Delete
* @type string $name Module options props name.
[952] Fix | Delete
* @type string $mode Current data mode: desktop, hover, tablet, phone.
[953] Fix | Delete
* @type string $attr_key Attribute key for attrs context data. Example: src, class, etc.
[954] Fix | Delete
* @type string $attr_sub_key Attribute sub key that availabe when passing attrs value as array such as styes. Example: padding-top, margin-botton, etc.
[955] Fix | Delete
* }
[956] Fix | Delete
* @param ET_Builder_Module_Helper_MultiViewOptions $multi_view Multiview object instance.
[957] Fix | Delete
*
[958] Fix | Delete
* @return mixed
[959] Fix | Delete
*/
[960] Fix | Delete
public function multi_view_filter_value( $raw_value, $args, $multi_view ) {
[961] Fix | Delete
$name = isset( $args['name'] ) ? $args['name'] : '';
[962] Fix | Delete
$mode = isset( $args['mode'] ) ? $args['mode'] : '';
[963] Fix | Delete
$context = isset( $args['context'] ) ? $args['context'] : '';
[964] Fix | Delete
[965] Fix | Delete
if ( 'heading' === $name ) {
[966] Fix | Delete
$raw_value = $this->_esc_attr( $multi_view->get_name_by_mode( $name, $mode ), 'full' );
[967] Fix | Delete
} else if ( 'button_text' === $name && 'content' === $context ) {
[968] Fix | Delete
$raw_value = $this->_esc_attr( $multi_view->get_name_by_mode( $name, $mode ), 'limited' );
[969] Fix | Delete
} else if ( 'image' === $name && 'classes' === $context ) {
[970] Fix | Delete
$raw_value = $raw_value ? $raw_value : $multi_view->get_inherit_value( 'video_url', $mode );
[971] Fix | Delete
} else if ( 'video_url' === $name ) {
[972] Fix | Delete
$raw_value = self::get_video_embed( array(
[973] Fix | Delete
'video_url' => esc_url( $raw_value ),
[974] Fix | Delete
) );
[975] Fix | Delete
}
[976] Fix | Delete
[977] Fix | Delete
return $raw_value;
[978] Fix | Delete
}
[979] Fix | Delete
}
[980] Fix | Delete
[981] Fix | Delete
new ET_Builder_Module_Slider_Item;
[982] Fix | Delete
[983] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function