Title: About hooks
Last modified: August 22, 2016

---

# About hooks

 *  Resolved [Palani Rajagopal](https://wordpress.org/support/users/rajagopalpalani/)
 * (@rajagopalpalani)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/about-hooks/)
 * write a hook to add code, which will delete the existing content in any page 
   after 20 seconds, when refreshing the page, same content to be displayed and 
   delete process should be continue.
 * Recently i faced one interview for wordpress developer. I am not able to understand
   this question. Can anyone please explain above question?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/about-hooks/#post-5176272)
 * The hook would have to add a javascript code block to the page. Javascroipt is
   required since the issue is about the browser display (in this case time), this
   can’t be done from the server.
 *  [tormorten](https://wordpress.org/support/users/tormorten/)
 * (@tormorten)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/about-hooks/#post-5176291)
 * Basically they’re asking you to create a little piece of code that displays content
   for 20 seconds, and then it should be removed. Also they want it done via a hook.
 * For example:
 *     ```
       add_action( 'wp_footer', 'remove_content_timer' );
       function remove_content_timer() {
       	?>
       	<script type="text/javascript">
   
       	setTimeout(function() {
       		// run the necessary javascript to remove the content
       	}, 20000); // run function after 20000ms
   
       	</script>
       	<?php
       }
       ```
   
 *  Thread Starter [Palani Rajagopal](https://wordpress.org/support/users/rajagopalpalani/)
 * (@rajagopalpalani)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/about-hooks/#post-5176499)
 * Tormorten
 * Superb. Thank you so much

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘About hooks’ is closed to new replies.

## Tags

 * [delete](https://wordpress.org/support/topic-tag/delete/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 3 participants
 * Last reply from: [Palani Rajagopal](https://wordpress.org/support/users/rajagopalpalani/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/about-hooks/#post-5176499)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
