Inside a WordPress plugin i am trying to check whether shutdown hook exists or not using has_action()
function.I am trying to alert a message based on the checking.The problem is when the has_action()
function is not executed due to cache then the code does not show any alert message.
<script type="text/javascript">
var flag=<?php echo has_action('shutdown');?>;
if (typeof flag !== 'undefined' || flag !== false || flag === 1) {
alert('shutdown hook exists');
}
else {
alert('no shutdown hooks');
}
</script>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744788631a4593779.html
评论列表(0条)