Skip to content

Commit 73438f0

Browse files
author
hsehszroc
committed
ADDED: custom bullet render content filter.
REMOVED: jquery dependency (wasn't used anyway).
1 parent 44d27ab commit 73438f0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tws-block-slider-carousel.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function tws_bfsc_init() {
127127
wp_register_script(
128128
'tws-slider-carousel-script',
129129
plugins_url( 'build/slider.js', __FILE__ ),
130-
array( 'jquery', 'tws-slick-script' ),
130+
array( 'tws-slick-script' ),
131131
'1.0.0',
132132
true
133133
);
@@ -146,12 +146,21 @@ function tws_bfsc_init() {
146146
)
147147
);
148148

149+
/**
150+
* WPHOOK: Filter -> slider bullet render callback content.
151+
*
152+
* @param string[] $bullets The bullets' content.
153+
* @var string[]
154+
*/
155+
$bullets = apply_filters( 'hzfex_slider_carousel_bullet_content', array() );
156+
149157
wp_localize_script(
150158
'tws-slider-carousel-script',
151159
'twsSliderCarousel',
152160
array(
153161
'containers' => tws_bfsc_get_elements(),
154162
'arrows' => $arrows,
163+
'bullets' => $bullets,
155164
)
156165
);
157166

0 commit comments

Comments
 (0)