Greetings,
I’m attempting to invoke a JavaScript function that exists within a .js file from a custom plugin shortcode function.
Below is the code snippet from my-custom-hooks.php:
‘5:00 PM’,
‘input_timezone’ => ‘CST’
), $attr);
//wp_enqueue_script( ‘my-custom-hooks’ );
return “get_client_time( ‘”. $input_arr[‘input_time’] .”‘, ‘”. $input_arr[‘input_timezone’] .”‘ );”;
}
add_shortcode(‘get_client_timezonetime’, ‘wpb_hook_get_client_timezonetime’);
//=================================================
// Security: Abort if this file is called directly
//=================================================
if ( !defined(‘ABSPATH’) ) {
die;
}
?>