updated plugin GP Premium
version 2.4.0
This commit is contained in:
@ -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
@ -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', '' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user