Hooks Generator


Use this tool to create custom Hooks with add_filter() and add_action() functions.


  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.


If you are still learning how to use this tool, check out the following examples:

Actions of filters.
Which filter/action you want to hook into?Hook Information
The name of the function to be called.
The order in which the function associated with this particular hook is executed.
The # of arguments the function accepts.
The names of the arguments listed in the callback function.
Custom code in the function.
  Save Snippet
function address_mobile_address_bar() {
	$color = "#008509";
	//this is for Chrome, Firefox OS, Opera and Vivaldi
	echo '<meta name="theme-color" content="'.$color.'">';
	//Windows Phone **
	echo '<meta name="msapplication-navbutton-color" content="'.$color.'">';
	// iOS Safari
	echo '<meta name="apple-mobile-web-app-capable" content="yes">';
	echo '<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">';
add_action( 'wp_head', 'address_mobile_address_bar' );