[], 'showTitle' => true, 'showCat' => true, 'showExcerpt' => true, 'showBtn' => true, 'linkTitle' => true, 'titleTag' => 'h2', 'btnLabel' => __( 'Read More', 'slider-blocks' ), 'enableOverlay' => true, 'sliderType' => 'slider', 'uniqueId' => '', 'navContainerPosition' => 'nav_inside', 'navPosition' => 'nav_cc', 'catAnimation' => '', 'titleAnimation' => '', 'exptAnimation' => '', 'btnAnimation' => '', 'sliderOptions' => [], 'showNavigation' => true, 'showPagination' => true, 'customNavIcon' => false, 'navIconSource' => 'library', 'navPrevIcon' => 'arrowLeft', 'navNextIcon' => 'arrowRight', 'customPrevSVG' => '', 'customNextSVG' => '', 'excerptLength' => 20, 'enableRemoteNav' => false, 'remotePrevSelector' => '', 'remoteNextSelector' => '', 'detachContent' => false, // New attribute for detaching content ]; $atts = wp_parse_args( $attributes, $defaults ); // Sanitize attributes $atts = array_map( 'sanitize_text_field', $atts ); $atts['queryPosts'] = isset( $attributes['queryPosts'] ) ? $attributes['queryPosts'] : []; $atts['sliderOptions'] = isset( $attributes['sliderOptions'] ) ? $attributes['sliderOptions'] : []; $atts['focusPoints'] = isset( $attributes['focusPoints'] ) ? $attributes['focusPoints'] : []; // Block classes $block_classes = [ esc_attr( $atts['uniqueId'] ), esc_attr( $atts['navContainerPosition'] ), esc_attr( $atts['navPosition'] ), ]; // Block wrapper attributes $block_props = get_block_wrapper_attributes( [ 'class' => implode( ' ', array_filter( $block_classes ) ) ] ); // Single block classes $swiper_classes = [ 'swiper-slide', $atts['sliderType'] === 'slider' ? 'slide-mode' : '' ]; if ( ! empty( $atts['detachContent'] ) ) { $swiper_classes[] = 'detach-content'; } ?>