0, 'slider_id' => 0, // Legacy Divi module compatibility (pre-1.0.11). 'autoplay' => null, 'loop' => null, 'nav' => null, 'dots' => null, 'desktop' => null, 'tablet' => null, 'mobile' => null, 'desktop_slides' => null, 'tablet_slides' => null, 'mobile_slides' => null, 'gap' => null, 'navigation' => null, 'pagination' => null, ), $atts, 'developersd_logo_slider' ); $slider_id = absint( $atts['id'] ); if ( ! $slider_id && ! empty( $atts['slider_id'] ) ) { $slider_id = absint( $atts['slider_id'] ); } if ( ! $slider_id ) { return ''; } $overrides = array(); if ( null !== $atts['autoplay'] ) { $overrides['autoplay'] = DeveloperSD_LS_Security::sanitize_bool( $atts['autoplay'] ); } if ( null !== $atts['loop'] ) { $overrides['loop'] = DeveloperSD_LS_Security::sanitize_bool( $atts['loop'] ); } if ( null !== $atts['nav'] ) { $overrides['nav_show'] = DeveloperSD_LS_Security::sanitize_bool( $atts['nav'] ); } if ( null !== $atts['dots'] ) { $overrides['dots_show'] = DeveloperSD_LS_Security::sanitize_bool( $atts['dots'] ); } if ( null !== $atts['desktop'] ) { $overrides['slides_desktop'] = max( 1, absint( $atts['desktop'] ) ); } if ( null !== $atts['tablet'] ) { $overrides['slides_tablet'] = max( 1, absint( $atts['tablet'] ) ); } if ( null !== $atts['mobile'] ) { $overrides['slides_mobile'] = max( 1, absint( $atts['mobile'] ) ); } // Legacy Divi module attributes used different names. Keep old pages // working after the Divi module moved to its own non-conflicting slug. foreach ( array( 'desktop_slides' => 'slides_desktop', 'tablet_slides' => 'slides_tablet', 'mobile_slides' => 'slides_mobile', 'gap' => 'gap', ) as $legacy_key => $setting_key ) { if ( null !== $atts[ $legacy_key ] && '' !== $atts[ $legacy_key ] ) { $overrides[ $setting_key ] = absint( $atts[ $legacy_key ] ); } } foreach ( array( 'navigation' => 'nav_show', 'pagination' => 'dots_show' ) as $legacy_key => $setting_key ) { if ( null !== $atts[ $legacy_key ] && 'default' !== $atts[ $legacy_key ] && '' !== $atts[ $legacy_key ] ) { $overrides[ $setting_key ] = in_array( $atts[ $legacy_key ], array( 'on', 'yes', '1', 'true' ), true ); } } return DeveloperSD_LS_Frontend::escape_slider_html( DeveloperSD_LS_Frontend::render( $slider_id, $overrides ) ); } } new DeveloperSD_LS_Shortcode();