• Hello,

    Contact-form-7 offer ability to manage the loading CSS/JS only where contact form presented, but “Redirection for Contact Form 7” plugin unfortunately destroys this functionality.

    If you would change line
    add_action( ‘wp_enqueue_scripts’, array( $this, ‘front_end_scripts’ ) );
    to
    add_action( ‘wpcf7_enqueue_scripts’, array( $this, ‘front_end_scripts’ ) );

    in method add_actions() of class WPCF7r_Form_Helper it resolved the problem, but not completely. It world be better for site performance if plugin enqueued scripts and styles when it loads from Contact-form-7 and added strategy=defer.

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

    Please!

  • The topic ‘Loads CSS/JS whenever needs’ is closed to new replies.