init hook wordpress
<?php
add_action('init', 'process_post');
function process_post()
{
?>
<script>alert('it works');</script> <!-- page load time called -->
<?php
}
?>
kinjal suryavanshi