• Resolved Alexander Guskov

    (@forcesail)


    Hello,

    Contact-form-7 offer ability to manage the loading CSS/JS only where contact form presented, but “Multi Step for Contact Form 7” plugin unfortunately ignore this functionality. So, As result, for example, my site use CF7 on only 10 pages from 120 and Multi Steps on only 2 pages , but it’s js/css loads everywhere.

    If you would change lines
    add_action( ‘wp_enqueue_scripts’, cf7mls_frontend_scripts_callback ) );
    add_action( ‘wp_enqueue_scripts’, ‘cf7mls_css_to_wp_head’ );
    to
    add_action( ‘wpcf7_enqueue_scripts’, cf7mls_frontend_scripts_callback ) );
    add_action( ‘wpcf7_enqueue_scripts’, ‘cf7mls_css_to_wp_head’ );

    in file inc/frontend/init.php it resolved the problem, but not completely because not all forms use multisteps. It world be better for site performance if plugin enqueued scripts and styles when it loads, say, in cf7mls_multistep_shortcode_callback().

    Since WordPress 3.3 plugin can enqueued scripts and styles everywhere and if in_footer=false it happens immediately.

    Please!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @forcesail ,

    Thanks for coming today!

    Please let me check with the dev and I will feed you back as soon as possible.

    Kind regards,
    Alina

    Plugin Support mialewp

    (@mialewp)

    Hello Alexander Guskov,

    Thanks for your patience.

    We would like to inform that we will change action??wp_enqueue_scripts to wpcf7_enqueue_scripts ?in the next version.

    If you have any further questions, feel free to contact us.

    Thank you so much for your efforts.

    Happy new year!

    Best regards,

    Mia

    • This reply was modified 1 year, 2 months ago by mialewp.
    Thread Starter Alexander Guskov

    (@forcesail)

    Thank you, Mialewp.

    But actually if you enqueued scripts and styles from cf7mls_multistep_shortcode_callback() it would event better for performance.

    Many thanks for all.

    Plugin Support mialewp

    (@mialewp)

    Hello?Alexander Guskov,

    Thanks for your response.

    Yes, it will be updated in the next version. ??

    Have a great day!

    Best regards,

    Mia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Performance: Loads CSS/JS whenever needs or not’ is closed to new replies.