HEX
Server: Apache
System: Linux eisbus 6.8.12-9-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-9 (2025-03-16T19:18Z) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/wordpress/wp-content/plugins/contact-form-lite/inc/ecf-frontend.php
<?php

function ecf_enqueue_on_the_fly(){ 
	global $post;

	if( function_exists('has_shortcode') )
	{
		if( has_shortcode( $post->post_content, 'easy-contactform')) {
			wp_enqueue_script( 'ecf-ladda-spin' );
			wp_enqueue_script( 'ecf-notify' );
			wp_enqueue_script( 'ecf-ladda-js' );
			
			global $is_IE;
			if ( $is_IE ) {
				wp_enqueue_script( 'ecf-placeholder' );
				}
			}
		}
		else
		{
			if( emg_old_has_shortcode('easy-contactform')) {
				wp_enqueue_script( 'ecf-ladda-spin' );
				wp_enqueue_script( 'ecf-notify' );
				wp_enqueue_script( 'ecf-ladda-js' );
				
				global $is_IE;
				if ( $is_IE ) {
					wp_enqueue_script( 'ecf-placeholder' );
					}
				}
			}						

				
}

add_action( 'wp_enqueue_scripts', 'ecf_enqueue_on_the_fly');

?>