{"id":16668,"date":"2019-04-10T11:57:23","date_gmt":"2019-04-10T11:57:23","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=16668"},"modified":"2025-09-10T16:08:14","modified_gmt":"2025-09-10T16:08:14","slug":"what-are-wordpress-hooks","status":"publish","type":"post","link":"\/tutorials\/what-are-wordpress-hooks","title":{"rendered":"What are WordPress hooks?  How to use them and practical examples"},"content":{"rendered":"<p>WordPress hooks can help you reach your business goals by expanding your website&rsquo;s capabilities. Hooks allow you to interact and modify code at specific places without modifying the WordPress core itself. They make it easy for users to modify and add various features to their WordPress plugins and themes.<\/p><p>In this tutorial, we will go over WordPress hooks and their purpose. Furthermore, we will include practical WordPress hooks examples to show you how to use them on your site.<\/p><p>\n\n\n\n\n\n\n\n<div class=\"protip\">\n                    <h2 class=\"featured-snippet title\">What Are WordPress Hooks?<\/h2>\n                    <p> WordPress hooks allow users to manipulate WordPress without modifying its core. Learning about hooks is essential for any WordPress user as it helps them edit the default settings of themes or plugins and, ultimately, create new functions.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-purpose-of-hooks\">Purpose of Hooks<\/h3><p>The primary purpose of hooks is to automatically run a function. In addition, this technique can add or modify features to WordPress without touching its core files.<\/p><p>Hooks are divided into two categories:<\/p><ul class=\"wp-block-list\">\n<li><strong>Action <\/strong>&ndash; allows users to add data or change how their websites work. An action hook will run at a specific time when the WordPress core, plugins, and themes are executing.<\/li>\n\n\n\n<li><strong>Filter<\/strong> &ndash; can change data during WordPress core, plugins, and theme execution.<\/li>\n<\/ul><p>In short, <strong>action hooks<\/strong> receive information, act according to it, and don&rsquo;t return anything to the user. Conversely, the<strong> filter hooks<\/strong> get information, modify it, and return it to the user.<\/p><p>Hooks are essential for incorporating custom code into websites. For example, you can use them to <a href=\"\/tutorials\/wordpress-javascript\">add JavaScript to WordPress<\/a>. <\/p><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> To use any of the said hooks, a user needs to write a custom function known as a <strong>Callback<\/strong> and register it with a WordPress hook for a specific action or filter.<\/p><\/div>\n\n\n\n<\/p><p>Below is an example of an action hook that connects the <strong>mytheme_script<\/strong> function with the <strong>wp_enqueue_scripts <\/strong>action.<\/p><pre class=\"wp-block-preformatted\">function mytheme_script() \n{wp_enqueue_script( 'my-custom-js', 'custom.js', false );}\nadd_action( 'wp_enqueue_scripts', 'mytheme_script' );<\/pre><h2 class=\"wp-block-heading\" id=\"h-how-to-use-wordpress-hooks\">How to Use WordPress Hooks<\/h2><p>Using hooks requires a bit of HTML and PHP knowledge. Luckily, creating action and filter hooks is relatively easy, even for <a href=\"\/tutorials\/wordpress\">WordPress beginners<\/a>.<\/p><h3 class=\"wp-block-heading\" id=\"h-creating-an-action-hook\">Creating an Action Hook<\/h3><p>To add an action hook, you must activate the <strong>add_action ()<\/strong> function in a WordPress plugin. To do so, add the following code to your <a href=\"\/tutorials\/functions-php-wordpress\">WordPress functions.php file<\/a>:<\/p><pre class=\"wp-block-preformatted\">add_action( $target_hook, $the_name_of_function_you_want_to_use, $priority, $accepted_args );<\/pre><p>Hooks use a priority scale to function properly. This scale is an automatic ordinal value based on a scale from 1 to 999. It defines the order of functions associated with that particular hook. A lower priority value means the function will run earlier, while the higher one will run later.<\/p><p>The scale will show the output sequence of the functions when using the same <strong>target_hook<\/strong>. The default value of<strong> priority_scale<\/strong> is 10. You can arrange the scale according to the number of your <strong>target_hook<\/strong>.<\/p><p><strong>$accepted_args<\/strong> is responsible for defining the number of arguments the function accepts. By default, the system will set it as <strong>1<\/strong>. Here is an example of an action hook for the Twenty Twenty-Three WordPress theme added to the end of the<strong> functions.php<\/strong> file:<\/p><pre class=\"wp-block-preformatted\">&lt;?php\nfunction hook_javascript() {\n    ?&gt;\n        &lt;script&gt;\n            alert('Hello world...');\n        &lt;\/script&gt;\n    &lt;?php\n}\nadd_action('wp_head', 'hook_javascript');\n?&gt;<\/pre><p>Note the pattern in the example above:<\/p><ul class=\"wp-block-list\">\n<li><strong>&lt;?php<\/strong> &ndash; the place where you put the hook to function.<\/li>\n\n\n\n<li><strong>function hook_javascript()<\/strong> &ndash; a function that will affect the initial value, thus showing the alert for users.<\/li>\n\n\n\n<li><strong>&lt;script&gt;<\/strong> &ndash; represents the text you want to display on the <strong>target_hook<\/strong>.<\/li>\n\n\n\n<li><strong>alert(&lsquo;Hello world&hellip;&rsquo;);<\/strong> &ndash; will display an alert for users with the &ldquo;Hello World&rdquo; phrase.<\/li>\n\n\n\n<li><strong>add_action<\/strong> &ndash; the command for creating the action hook.<\/li>\n\n\n\n<li>&lsquo;<strong>wp_head<\/strong>&lsquo; &ndash; the <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/wp_head\/\" target=\"_blank\" rel=\"noopener\">target hook<\/a> that the function will modify.<\/li>\n<\/ul><p>In practice, it looks like this:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Action-hook-example-on-a-live-WordPress-website.-It-shows-an-alert-with-a-user-specified-message.jpg\"><img decoding=\"async\" width=\"1024\" height=\"394\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Action-hook-example-on-a-live-WordPress-website.-It-shows-an-alert-with-a-user-specified-message.jpg\/public\" alt=\"Action hook example on a live WordPress website. It shows an alert with a user-specified message\" class=\"wp-image-78602\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Action-hook-example-on-a-live-WordPress-website.-It-shows-an-alert-with-a-user-specified-message.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Action-hook-example-on-a-live-WordPress-website.-It-shows-an-alert-with-a-user-specified-message.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Action-hook-example-on-a-live-WordPress-website.-It-shows-an-alert-with-a-user-specified-message.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Action-hook-example-on-a-live-WordPress-website.-It-shows-an-alert-with-a-user-specified-message.jpg\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-creating-a-filter-hook\">Creating a Filter Hook<\/h3><p>You can create a filter hook by utilizing the<strong> add_filter()<\/strong> function. The filter hook modifies, filters, or replaces a value with a new one.<\/p><p>Similar to an action hook, it filters a value with the associated filter hook functions like <strong>apply_filter<\/strong>.<\/p><p>Here is an example of a filter hook that we will add to the <strong>functions.php<\/strong> file for the Twenty Twenty-Three WordPress theme:<\/p><pre class=\"wp-block-preformatted\">add_filter( 'the_content', 'change_content' );\nfunction change_content ( $content ) {\n    $content = 'Filter hooks are amazing!';\n    return $content;\n}<\/pre><p>Let&rsquo;s analyze the code snippet in more detail:<\/p><ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/the_content\/\" target=\"_blank\" rel=\"noopener\">&lsquo;<strong>the_content<\/strong>&lsquo;<\/a> &ndash; the target hook that the function will modify.<\/li>\n\n\n\n<li>&lsquo;<strong>change_content<\/strong>&lsquo; &ndash; affects the initial value, thus changing the actual content.<\/li>\n\n\n\n<li><strong>$content = &lsquo;Filter hooks are amazing!&rsquo;; <\/strong>&ndash; replaces the content of all your posts with the written phrase.<\/li>\n\n\n\n<li><strong>return $content;<\/strong> &ndash; returns the new value at the end.<\/li>\n<\/ul><p>Now, if we open any post while using the Twenty Twenty-Three theme, we will see something like this:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Filter-hook-example-on-a-live-WordPress-website.-It-replaces-content-for-all-posts-with-a-user-specified-phrase.png\"><img decoding=\"async\" width=\"1024\" height=\"414\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Filter-hook-example-on-a-live-WordPress-website.-It-replaces-content-for-all-posts-with-a-user-specified-phrase.png\/public\" alt=\"Filter hook example on a live WordPress website. It replaces content for all posts with a user-specified phrase\" class=\"wp-image-78603\" style=\"width:838px;height:338px\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Filter-hook-example-on-a-live-WordPress-website.-It-replaces-content-for-all-posts-with-a-user-specified-phrase.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Filter-hook-example-on-a-live-WordPress-website.-It-replaces-content-for-all-posts-with-a-user-specified-phrase.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Filter-hook-example-on-a-live-WordPress-website.-It-replaces-content-for-all-posts-with-a-user-specified-phrase.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Filter-hook-example-on-a-live-WordPress-website.-It-replaces-content-for-all-posts-with-a-user-specified-phrase.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>As seen from the example, the filter function replaced the entire content with the phrase &ldquo;Filter hooks are amazing!&rdquo;.<\/p><h3 class=\"wp-block-heading\" id=\"h-unhooking-actions-and-filters\">Unhooking Actions and Filters<\/h3><p>If you want to disable a command from <strong>add_action()<\/strong> or <strong>add_filter()<\/strong> in your WordPress code, use <strong>remove_action()<\/strong> and <strong>remove_filter()<\/strong>.<\/p><p>These functions can exclude certain actions or filters. Using them allows users to modify a plugin with too many unnecessary hooks that might disrupt the site&rsquo;s optimization.<\/p><p>It&rsquo;s also possible to delete such unnecessary code lines. However, we only recommend that if you work with your own plugin or theme. This is because such practice with someone else&rsquo;s plugins or themes can throw a fatal error if you delete the incorrect lines.<\/p><p>Here is an example of the <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/remove_action\/\" target=\"_blank\" rel=\"noopener\">remove_action()<\/a> in WordPress:<\/p><pre class=\"wp-block-preformatted\">remove_action( 'wp_print_footer_scripts', 'hostinger_custom_footer_scripts');\nadd_action( 'wp_print_footer_scripts', 'hostinger_custom_footer_scripts_theme');\nfunction hostinger_custom_footer_scripts_theme()\n{\n?&gt;\n&lt;script&gt;\/\/example of output by theme&lt;\/script&gt;\n&lt;?php\n}<\/pre><p>The example above shows that the <strong>remove_action() <\/strong>deletes the default WordPress footer scripts and replaces them with Hostinger&rsquo;s custom footer scripts theme.<\/p><p>This command applies to all kinds of action hooks in WordPress. Furthermore, here is an example of <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/remove_filter\/\" target=\"_blank\" rel=\"noopener\">remove_filter()<\/a>:<\/p><pre class=\"wp-block-preformatted\">remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\nadd_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );\n}<\/pre><p>The example above shows how to deactivate <strong>wp_staticize_emoji_for_email<\/strong>, which converts emojis to static images.<\/p><p>Then it replaces them with <strong>disable_emojis_tinymce<\/strong>, which will deactivate the emoji feature in WordPress. This can help speed up your site, as emojis have to make an extra HTTP request.<\/p><p>Moreover, you can use the <strong>remove_filter() <\/strong>command to disable multiple filters in a sequence. Here is an example:<\/p><pre class=\"wp-block-preformatted\">function disable_emojis() {\nremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\nremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\nremove_action( 'wp_print_styles', 'print_emoji_styles' );\nremove_action( 'admin_print_styles', 'print_emoji_styles' );\nremove_filter( 'the_content_feed', 'wp_staticize_emoji' );\nremove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\nremove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\nadd_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );\nadd_action( 'init', 'disable_emojis' );\n}<\/pre><p>The code above aims to eliminate the emoji function in WordPress. It illustrates that there is no limit on how many <strong>remove_filter<\/strong> commands users can embed in a <strong>functions.php <\/strong>file.<\/p><h2 class=\"wp-block-heading\" id=\"h-practical-wordpress-hooks-examples\">Practical WordPress Hooks Examples<\/h2><p>There are a lot of hooks that users can use to create custom WordPress functions. Here are some of the most popular ones:<\/p><h3 class=\"wp-block-heading\" id=\"h-admin-post-thumbnail-size\">admin_post_thumbnail_size<\/h3><p>This filter hook displays a thumbnail image of your post in the Featured Image section. Three parameters connect the function: <strong>$size, $thumbnail_id, <\/strong>and<strong> $post<\/strong>.<\/p><p>The hook should look like this:<\/p><pre class=\"wp-block-preformatted\">$size = apply_filters( 'admin_post_thumbnail_size', $size, $thumbnail_id, $post );<\/pre><p>Remember that you can change the<strong> $size<\/strong> parameter as you wish. For instance, if you want to set the thumbnail size to 240 x 240 pixels, utilize this code:<\/p><pre class=\"wp-block-preformatted\">$size = apply_filters( 'admin_post_thumbnail_size', 240, $thumbnail_id, $post);<\/pre><p>It is also possible to set a custom size for the thumbnail by adding the<strong> array ()<\/strong> function. The code will look like this:<\/p><pre class=\"wp-block-preformatted\">$size = apply_filters( 'admin_post_thumbnail_size', array(240, 400), $thumbnail_id, $post);<\/pre><p>The <strong>array ()<\/strong> function above sets the thumbnail to be displayed in 240 x 400 pixels.<\/p><h3 class=\"wp-block-heading\" id=\"h-after-password-reset\">after_password_reset<\/h3><p>This action hook is activated when a user resets their password. The hook consists of two parameters,<strong> $user<\/strong> and <strong>$new_pass<\/strong>, and looks like this:<\/p><pre class=\"wp-block-preformatted\">do_action( 'after_password_reset', $user, $new_pass );<\/pre><p>For example, WordPress uses this hook with the <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/reset_password\/\" target=\"_blank\" rel=\"noopener\">reset_password()<\/a> function.<\/p><h3 class=\"wp-block-heading\" id=\"h-customize-loaded-components\">customize_loaded_components<\/h3><p>This hook is a filter to exclude some WordPress components from the core process. These functions work on core files, such as <strong>wp-activate.php<\/strong>, <strong>wp-config-sample.php<\/strong>, or <strong>wp-settings.php<\/strong>.<\/p><p>However, it is important to note that <strong>customize_loaded_components<\/strong> cannot be added to a theme since it only activates during <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/plugins_loaded\/\" target=\"_blank\" rel=\"noopener\">the plugins_loaded<\/a> phase.<\/p><p>The hook consists of two parameters: <strong>$components<\/strong> and <strong>$this, <\/strong>and looks like this:<\/p><pre class=\"wp-block-preformatted\">$components = apply_filters( 'customize_loaded_components', array( 'widgets', 'nav_menus' ), $this );<\/pre><p>The <strong>$components<\/strong> parameter is a batch of core functions to load, while <strong>$this<\/strong> refers to the object in the existing class.<\/p><p>It&rsquo;s possible to customize the<strong> array ()<\/strong> function to determine which components to exclude. The example above shows that widgets and <strong>nav_menus<\/strong> get excluded from the core process.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p>Another way to enhance your website's functionality is to <a href=\"\/tutorials\/how-to-add-php-code-to-wordpress-post-or-page\">add PHP code to your WordPress page or post<\/a>.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>WordPress hooks can benefit any website owner. They allow you to add custom functions or disable processes without changing the WordPress core files. You can even create advanced customization in a <a href=\"\/tutorials\/woocommerce-hooks\">WooCommerce store using hooks<\/a>.<\/p><p>In this tutorial, we&rsquo;ve created action and filter WordPress hooks and shown some practical examples.<\/p><p>We hope that you find this tutorial useful. If you have any questions, leave us a comment down below.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Learn More WordPress Techniques to Broaden Your Knowledge<\/h4>\n                    <p><a href=\"\/tutorials\/activate-wordpress-multisite\">WordPress Multisite<\/a><br>\n<a href=\"\/tutorials\/wordpress-text-editor\">WordPress Text Editor<\/a><br>\n<a href=\"\/tutorials\/headless-wordpress\">Headless WordPress<\/a><br>\n<a href=\"\/tutorials\/create-default-wordpress-htaccess-file\">WordPress .htaccess File<\/a><br>\n<a href=\"\/tutorials\/wordpress-architecture\">WordPress Architecture: Website Structure, Common Files, and Directories<\/a><br>\n<a href=\"\/tutorials\/wordpress-rest-api\">WordPress REST API Tutorial<\/a><br>\n<a href=\"\/tutorials\/how-to-use-xampp-wordpress\/\">How to Use XAMPP<\/a><\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-wordpress-hooks-faq\">WordPress Hooks FAQ<\/h2><p>If you are interested in learning more about WordPress hooks, here are some frequently asked questions.<\/p><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1677599998058\"><h3 class=\"schema-faq-question\">What Are the Basic Hooks for WordPress Plugins?<\/h3> <p class=\"schema-faq-answer\">The basic hooks for WordPress plugin development include action hooks and filter hooks. Action hooks allow developers to execute custom code at specific points in the WordPress core code, while filter hooks allow developers to modify the data before it is displayed on the website.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1677600022892\"><h3 class=\"schema-faq-question\">Where Do I Add Hooks in WordPress?<\/h3> <p class=\"schema-faq-answer\">Hooks in WordPress can be added in the plugin or theme&rsquo;s<strong> functions.php<\/strong> file, or in a separate plugin file. Action hooks are added using the <strong>add_action()<\/strong> function, while filter hooks are added using the <strong>add_filter()<\/strong> function.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1677600057239\"><h3 class=\"schema-faq-question\">Are WordPress Hooks Important?<\/h3> <p class=\"schema-faq-answer\">Yes, WordPress hooks are important as they allow developers to customize and extend the functionality of WordPress core, themes, and plugins without modifying the original code. They provide a structured and organized way to add custom code and modify data, making WordPress development more flexible and scalable.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>WordPress hooks can help you reach your business goals by expanding your website&rsquo;s capabilities. Hooks allow you to interact and [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/what-are-wordpress-hooks\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":199,"featured_media":81845,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"What Are WordPress Hooks + Usage Examples","rank_math_description":"WordPress hooks allows manipulating a procedure without modifying the WordPress core files. Check this article to learn more.","rank_math_focus_keyword":"wordpress hooks","footnotes":""},"categories":[22643,22637],"tags":[],"class_list":["post-16668","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/what-are-wordpress-hooks","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/hooks-wordpress","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/que-son-hooks-wordpress","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/what-are-wordpress-hooks","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/what-are-wordpress-hooks\/","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/what-are-wordpress-hooks\/","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/que-son-hooks-wordpress","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/que-son-hooks-wordpress","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/que-son-hooks-wordpress","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/what-are-wordpress-hooks","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/what-are-wordpress-hooks","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/what-are-wordpress-hooks","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/what-are-wordpress-hooks","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/16668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/199"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=16668"}],"version-history":[{"count":38,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/16668\/revisions"}],"predecessor-version":[{"id":133933,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/16668\/revisions\/133933"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media\/81845"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=16668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=16668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=16668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}