Skip to content

Commit bffd537

Browse files
committed
Rename filter wplf_frontend_script_credentials
1 parent f06aacb commit bffd537

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

classes/class-cpt-wplf-form.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,19 +512,19 @@ function maybe_enqueue_frontend_script() {
512512
global $post;
513513

514514
// register the script, but only enqueue it if the current post contains a form in it
515-
wp_register_script(
516-
'wplf-form-js',
517-
plugins_url( 'assets/scripts/wplf-form.js', dirname(__FILE__) ),
515+
wp_register_script(
516+
'wplf-form-js',
517+
plugins_url( 'assets/scripts/wplf-form.js', dirname(__FILE__) ),
518518
apply_filters( 'wplf_frontend_script_dependencies', array() ),
519-
WPLF_VERSION,
519+
WPLF_VERSION,
520520
true
521521
);
522522

523523
if( is_a( $post, 'WP_Post' ) && ( has_shortcode( $post->post_content, 'libre-form') || $post->post_type === 'wplf-form') ) {
524524
wp_enqueue_script( 'wplf-form-js' );
525-
wp_localize_script( 'wplf-form-js', 'ajax_object', array(
525+
wp_localize_script( 'wplf-form-js', 'ajax_object', array(
526526
'ajax_url' => admin_url( 'admin-ajax.php' ),
527-
'ajax_credentials' => apply_filters('wplf_frontend_script_credentials', 'same-origin')
527+
'ajax_credentials' => apply_filters('wplf_ajax_fetch_credentials_mode', 'same-origin')
528528
) );
529529
}
530530
}

0 commit comments

Comments
 (0)