Skip to content

Commit f792ccd

Browse files
author
shin
committed
Merge branch 'develop'
2 parents 084179d + fe6c96a commit f792ccd

14 files changed

Lines changed: 154 additions & 39 deletions

framework/admin/assets/css/style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2030,7 +2030,8 @@ Copyright (c) 2015 Daniel Eden
20302030
background-color: #f1f1f1;
20312031
padding: 7px; }
20322032
.tm-pb-option-container .wp-picker-container .wp-picker-holder {
2033-
position: absolute; }
2033+
position: absolute;
2034+
z-index: 1; }
20342035
.tm-pb-option-container .wp-picker-container.wp-picker-active .wp-picker-input-wrap {
20352036
margin-top: 5px; }
20362037
.tm-pb-option-container .wp-picker-container .wp-picker-input-wrap {

framework/admin/assets/scss/_option-container.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
padding: 7px;
8282
& .wp-picker-holder{
8383
position: absolute;
84+
z-index: 1;
8485
}
8586
&.wp-picker-active{
8687
.wp-picker-input-wrap{

framework/assets/css/style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,6 +2002,19 @@
20022002
#tm_builder_outer_content .tm_pb_slider .tm_pb_more_button {
20032003
margin: 10px; }
20042004

2005+
#tm_builder_outer_content .tm_pb_slider.tm_pb_slider_full_height {
2006+
height: 100vh; }
2007+
#tm_builder_outer_content .tm_pb_slider.tm_pb_slider_full_height .tm_pb_slides,
2008+
#tm_builder_outer_content .tm_pb_slider.tm_pb_slider_full_height .tm_pb_slide {
2009+
height: 100%; }
2010+
#tm_builder_outer_content .tm_pb_slider.tm_pb_slider_full_height .tm_pb_container {
2011+
display: flex;
2012+
justify-content: center;
2013+
align-items: center; }
2014+
#tm_builder_outer_content .tm_pb_slider.tm_pb_slider_full_height .tm_pb_container .tm_pb_container_inner {
2015+
width: 100%;
2016+
position: relative; }
2017+
20052018
#tm_builder_outer_content .tm_pb_slider .tm_pb_slide:first-child {
20062019
display: list-item; }
20072020

@@ -2199,6 +2212,8 @@
21992212
padding: 16% 8%;
22002213
width: auto;
22012214
margin: auto; }
2215+
#tm_builder_outer_content .tm_pb_slide_description.tm_pb_heading_image .tm_pb_slide_title {
2216+
color: transparent !important; }
22022217
#tm_builder_outer_content .tm_pb_slide_description .tm_pb_slide_title {
22032218
font-weight: 300;
22042219
font-size: 46px;

framework/assets/scss/modules/_slider.scss

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,34 @@
5050
.tm_pb_more_button {
5151
margin: 10px;
5252
}
53+
54+
&.tm_pb_slider_full_height {
55+
height: 100vh;
56+
57+
.tm_pb_slides,
58+
.tm_pb_slide {
59+
height: 100%;
60+
}
61+
62+
.tm_pb_container {
63+
display: flex;
64+
justify-content: center;
65+
align-items: center;
66+
.tm_pb_container_inner {
67+
width: 100%;
68+
position: relative;
69+
}
70+
71+
.tm_pb_slide_image {
72+
73+
}
74+
75+
.tm_pb_slide_description {
76+
//padding: 0;
77+
//float: none;
78+
}
79+
}
80+
}
5381
}
5482
.tm_pb_slider .tm_pb_slide:first-child {
5583
display: list-item;
@@ -277,6 +305,12 @@
277305
}
278306

279307
.tm_pb_slide_description {
308+
&.tm_pb_heading_image {
309+
.tm_pb_slide_title {
310+
color: transparent !important;
311+
}
312+
}
313+
280314
.tm_pb_slide_title {
281315
font-weight: 300;
282316
font-size: 46px;
@@ -440,4 +474,4 @@
440474
.tm_pb_slider .mejs-offscreen {
441475
display: none;
442476
}
443-
}
477+
}

framework/functions.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function tm_pb_media_breakpoints() {
1818
function tm_pb_media_breakpoint_values() {
1919
return apply_filters( 'tm_pb_media_breakpoint_values', array(
2020
'phone' => 'max_width_767',
21-
'tablet' => '768_980',
21+
'tablet' => '768_991',
2222
'laptop' => '992_1440',
2323
'desktop' => 'min_width_1441',
2424
) );
@@ -1392,6 +1392,7 @@ function _tm_pb_sanitize_code_module_content_regex( $matches ) {
13921392
}
13931393

13941394
function tm_pb_builder_post_content_capability_check( $content) {
1395+
13951396
if ( ! current_user_can( 'unfiltered_html' ) ) {
13961397
$content = preg_replace_callback('/\[tm_pb_code .*\](.*)\[\/tm-pb_code\]/mis', '_tm_pb_sanitize_code_module_content_regex', $content );
13971398
$content = preg_replace_callback('/\[tm_pb_fullwidth_code .*\](.*)\[\/tm-pb_fullwidth_code\]/mis', '_tm_pb_sanitize_code_module_content_regex', $content );
@@ -4935,21 +4936,22 @@ function tm_pb_generate_responsive_css( $values_array, $css_selector, $css_prope
49354936

49364937
if ( 'desktop' !== $device ) {
49374938
switch ( $device ) {
4938-
case 'tablet':
4939-
$current_media_query = 'max_width_991';
4940-
break;
4941-
49424939
case 'laptop':
49434940
$current_media_query = '992_1440';
49444941
break;
49454942

4943+
case 'tablet':
4944+
$current_media_query = 'max_width_991';
4945+
break;
4946+
49464947
default:
49474948
$current_media_query = 'max_width_767';
49484949
break;
49494950
}
49504951

49514952
$style['media_query'] = TM_Builder_Element::get_media_query( $current_media_query );
49524953
}
4954+
49534955
TM_Builder_Element::set_style( $function_name, $style );
49544956
}
49554957
}
@@ -5232,3 +5234,4 @@ function get_map_style_json( $map_style ){
52325234

52335235
return '';
52345236
}
5237+

framework/includes/class-builder-element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3478,7 +3478,7 @@ static function set_media_queries() {
34783478
'992_1440' => '@media only screen and ( min-width: 992px ) and ( max-width: 1440px )',
34793479
'min_width_991' => '@media only screen and ( min-width: 991px )',
34803480
'max_width_991' => '@media only screen and ( max-width: 991px )',
3481-
'768_980' => '@media only screen and ( min-width: 768px ) and ( max-width: 980px )',
3481+
'768_991' => '@media only screen and ( min-width: 768px ) and ( max-width: 991px )',
34823482
'max_width_767' => '@media only screen and ( max-width: 767px )',
34833483
'min_width_1441' => '@media only screen and ( min-width: 1441px )',
34843484
//'max_width_479' => '@media only screen and ( max-width: 479px )',

framework/includes/modules/class-builder-module-blog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public function set_styles() {
423423
$queries = array(
424424
'desktop' => 'min_width_1441',
425425
'laptop' => '992_1440',
426-
'tablet' => '768_980',
426+
'tablet' => '768_991',
427427
'phone' => 'max_width_767',
428428
);
429429

framework/includes/modules/class-builder-module-contact-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function init() {
3434
'title' => array(
3535
'label' => esc_html__( 'Title', 'tm_builder' ),
3636
'css' => array(
37-
'main' => "{$this->main_css_element} h1",
37+
'main' => "{$this->main_css_element} h2",
3838
),
3939
),
4040
'form_field' => array(

framework/includes/modules/class-builder-module-slider-item.php

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,18 @@ function init() {
3535
'bg_overlay_color',
3636
'text_overlay_color',
3737
'text_border_radius',
38+
'use_heading_bg_image',
39+
'heading_bg_image',
3840
);
3941

4042
$this->fields_defaults = array(
41-
'button_link' => array( '#' ),
42-
'background_position' => array( 'default' ),
43-
'background_size' => array( 'default' ),
44-
'background_color' => array( '#ffffff', 'only_default_setting' ),
45-
'alignment' => array( 'center' ),
46-
'allow_player_pause' => array( 'off' ),
43+
'button_link' => array( '#' ),
44+
'background_position' => array( 'default' ),
45+
'background_size' => array( 'default' ),
46+
'background_color' => array( '#ffffff', 'only_default_setting' ),
47+
'alignment' => array( 'center' ),
48+
'allow_player_pause' => array( 'off' ),
49+
'use_heading_bg_image' => array( 'off' ),
4750
);
4851

4952
$this->advanced_setting_title_text = esc_html__( 'New Slide', 'tm_builder' );
@@ -244,6 +247,28 @@ function get_fields() {
244247
'depends_show_if' => 'on',
245248
'description' => esc_html__( 'Use the color picker to choose a color for the text overlay.', 'tm_builder' ),
246249
),
250+
'use_heading_bg_image' => array(
251+
'label' => esc_html__( 'Use heading background image', 'tm_builder' ),
252+
'type' => 'yes_no_button',
253+
'option_category' => 'configuration',
254+
'options' => array(
255+
'off' => esc_html__( 'No', 'tm_builder' ),
256+
'on' => esc_html__( 'yes', 'tm_builder' ),
257+
),
258+
'affects' => array(
259+
'#tm_pb_heading_bg_image',
260+
),
261+
'description' => esc_html__( 'When enabled, a background color is added behind the slider text to make it more readable atop background images.', 'tm_builder' ),
262+
),
263+
'heading_bg_image' => array(
264+
'label' => esc_html__( 'Heading background Image', 'tm_builder' ),
265+
'type' => 'upload',
266+
'option_category' => 'basic_option',
267+
'upload_button_text' => esc_attr__( 'Upload an image', 'tm_builder' ),
268+
'choose_text' => esc_attr__( 'Choose a Heading Background Image', 'tm_builder' ),
269+
'update_text' => esc_attr__( 'Set As Heading Background', 'tm_builder' ),
270+
'description' => esc_html__( 'If defined, this image will be used as the background for this module. To remove a Heading background image, simply delete the URL from the settings field.', 'tm_builder' ),
271+
),
247272
'alignment' => array(
248273
'label' => esc_html__( 'Slide Image Vertical Alignment', 'tm_builder' ),
249274
'type' => 'select',
@@ -380,6 +405,8 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
380405
'use_text_overlay',
381406
'text_overlay_color',
382407
'text_border_radius',
408+
'use_heading_bg_image',
409+
'heading_bg_image',
383410
)
384411
);
385412

@@ -515,7 +542,8 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
515542
) );
516543
}
517544

518-
if ( 'on' === $this->_var( 'use_text_overlay' ) && '' !== $this->_var( 'text_overlay_color' ) ) { TM_Builder_Element::set_style( $function_name, array(
545+
if ( 'on' === $this->_var( 'use_text_overlay' ) && '' !== $this->_var( 'text_overlay_color' ) ) {
546+
TM_Builder_Element::set_style( $function_name, array(
519547
'selector' => '%%order_class%%.tm_pb_slide .tm_pb_slide_description_inner',
520548
'declaration' => sprintf(
521549
'background-color: %1$s;',
@@ -553,6 +581,20 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
553581
) );
554582
}
555583

584+
if ( 'on' === $this->_var( 'use_heading_bg_image' ) && '' !== $this->_var( 'heading_bg_image' ) ) {
585+
TM_Builder_Element::set_style( $function_name, array(
586+
'selector' => '%%order_class%%.tm_pb_slide .tm_pb_slide_title',
587+
'declaration' => sprintf(
588+
'background: url( %1$s ) center;
589+
-webkit-background-clip: text;
590+
-moz-background-clip: text;
591+
background-clip: text;',
592+
esc_url( $this->_var( 'heading_bg_image' ) )
593+
),
594+
) );
595+
}
596+
597+
556598
$style = '' !== $style ? " style='{$style}'" : '';
557599
$this->_var( 'style', $style );
558600

@@ -648,18 +690,19 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
648690
%8$s
649691
%12$s
650692
<div class="tm_pb_container clearfix">
651-
%5$s
652-
<div class="tm_pb_slide_description">
653-
<div class="tm_pb_slide_description_inner">
654-
%1$s
655-
<div class="tm_pb_slide_content%9$s">%2$s</div>
656-
%3$s
657-
</div>
658-
</div> <!-- .tm_pb_slide_description -->
693+
<div class="tm_pb_container_inner">
694+
%5$s
695+
<div class="tm_pb_slide_description%13$s">
696+
<div class="tm_pb_slide_description_inner">
697+
%1$s
698+
<div class="tm_pb_slide_content%9$s">%2$s</div>
699+
%3$s
700+
</div>
701+
</div> <!-- .tm_pb_slide_description -->
702+
</div>
659703
</div> <!-- .tm_pb_container -->
660704
%7$s
661-
</div> <!-- .tm_pb_slide -->
662-
',
705+
</div> <!-- .tm_pb_slide -->',
663706
$this->_var( 'heading' ),
664707
$this->shortcode_content,
665708
$this->_var( 'button' ) . $this->_var( 'button_2' ),
@@ -672,7 +715,8 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
672715
( 'on' === $tm_pb_slider_hide_mobile['hide_content_on_mobile'] ? esc_attr( " {$hide_on_mobile_class}" ) : '' ),
673716
$data_dot_nav_custom_color,
674717
$data_arrows_custom_color,
675-
'on' === $this->_var( 'use_bg_overlay' ) ? '<div class="tm_pb_slide_overlay_container"></div>' : ''
718+
'on' === $this->_var( 'use_bg_overlay' ) ? '<div class="tm_pb_slide_overlay_container"></div>' : '',
719+
'on' === $this->_var( 'use_heading_bg_image' ) ? ' tm_pb_heading_image' : ''
676720
);
677721

678722
return $output;

framework/includes/modules/class-builder-module-slider.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function init() {
1111
$this->whitelisted_fields = array(
1212
'show_arrows',
1313
'show_pagination',
14+
'fullheight',
1415
'auto',
1516
'auto_speed',
1617
'auto_ignore_hover',
@@ -38,6 +39,7 @@ function init() {
3839
$this->fields_defaults = array(
3940
'show_arrows' => array( 'on' ),
4041
'show_pagination' => array( 'on' ),
42+
'fullheight' => array( 'off' ),
4143
'auto' => array( 'off' ),
4244
'auto_speed' => array( '7000' ),
4345
'auto_ignore_hover' => array( 'off' ),
@@ -127,6 +129,17 @@ function get_fields() {
127129
),
128130
'description' => esc_html__( 'This setting will turn on and off the circle buttons at the bottom of the slider.', 'tm_builder' ),
129131
),
132+
'fullheight' => array(
133+
'label' => esc_html__( 'Slider fullheight', 'tm_builder' ),
134+
'type' => 'yes_no_button',
135+
'option_category' => 'configuration',
136+
'default' => 'off',
137+
'options' => array(
138+
'on' => esc_html__( 'Yes', 'tm_builder' ),
139+
'off' => esc_html__( 'No', 'tm_builder' ),
140+
),
141+
'description' => esc_html__( 'This setting will turn on and off slider fullheight.', 'tm_builder' ),
142+
),
130143
'auto' => array(
131144
'label' => esc_html__( 'Automatic Animation', 'tm_builder' ),
132145
'type' => 'yes_no_button',
@@ -348,6 +361,7 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
348361
array(
349362
'show_arrows',
350363
'show_pagination',
364+
'fullheight',
351365
'parallax',
352366
'parallax_method',
353367
'auto',
@@ -371,7 +385,7 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
371385
)
372386
);
373387

374-
global $tm_pb_slider_has_video, $tm_pb_slider_parallax, $tm_pb_slider_parallax_method, $tm_pb_slider_hide_mobile, $tm_pb_slider_custom_icon;
388+
global $tm_pb_slider_has_video, $tm_pb_slider_parallax, $tm_pb_slider_parallax_method, $tm_pb_slider_hide_mobile, $tm_pb_slider_custom_icon, $tm_pb_slider_full_height;
375389

376390
$this->shortcode_content;
377391

@@ -442,6 +456,7 @@ function shortcode_callback( $atts, $content = null, $function_name ) {
442456

443457
$classes = array(
444458
( 'off' === $fullwidth ? ' tm_pb_slider_fullwidth_off' : '' ),
459+
( 'on' === $this->_var( 'fullheight' ) ? ' tm_pb_slider_full_height' : '' ),
445460
( 'off' === $this->_var( 'show_arrows' ) ? ' tm_pb_slider_no_arrows' : '' ),
446461
( 'off' === $this->_var( 'show_pagination' ) ? ' tm_pb_slider_no_pagination' : '' ),
447462
( 'on' === $this->_var( 'parallax' ) ? ' tm_pb_slider_parallax' : '' ),

0 commit comments

Comments
 (0)