updated plugin GP Premium version 2.4.0

This commit is contained in:
2024-02-08 12:31:36 +00:00
committed by Gitium
parent c93ddc8e7a
commit ce653dd56c
59 changed files with 214 additions and 103 deletions

View File

@ -706,8 +706,8 @@ if (window.Element && !Element.prototype.closest) {
}));
/* GP */
var gpscroll = new SmoothScroll( smooth.elements.join(), {
speed: smooth.duration,
var gpscroll = new SmoothScroll( gpSmoothScroll.elements.join(), {
speed: gpSmoothScroll.duration,
offset: function( anchor, toggle ) {
var body = document.body,
nav = document.querySelector( '#site-navigation' ),
@ -736,6 +736,8 @@ var gpscroll = new SmoothScroll( smooth.elements.join(), {
}
}
return offset;
return gpSmoothScroll.offset
? gpSmoothScroll.offset
: offset;
}
} );

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@ function generate_smooth_scroll_scripts() {
wp_localize_script(
'generate-smooth-scroll',
'smooth',
'gpSmoothScroll',
array(
'elements' => apply_filters(
'generate_smooth_scroll_elements',
@ -45,6 +45,7 @@ function generate_smooth_scroll_scripts() {
)
),
'duration' => apply_filters( 'generate_smooth_scroll_duration', 800 ),
'offset' => apply_filters( 'generate_smooth_scroll_offset', '' ),
)
);
}