{"id":540,"date":"2006-05-16T21:50:08","date_gmt":"2006-05-16T19:50:08","guid":{"rendered":"http:\/\/frenchfragfactory.net\/ozh\/archives\/2006\/05\/16\/plugin-debugging-hooks-and-filters-flow\/"},"modified":"2006-05-16T21:50:08","modified_gmt":"2006-05-16T19:50:08","slug":"plugin-debugging-hooks-and-filters-flow","status":"publish","type":"post","link":"https:\/\/planetozh.com\/blog\/2006\/05\/plugin-debugging-hooks-and-filters-flow\/","title":{"rendered":"Plugin Debugging : Hooks and Filters Flow"},"content":{"rendered":"<p>Basically, a plugin for WordPress creates a PHP function (called a <strong>filter<\/strong> or an <strong>action<\/strong>) which is triggered when a particular event (called a <strong>hook<\/strong>) occurs. When several filters are supposed to be triggered by the same hook, you can define their priority. <\/p>\n<p>When you&#39;re writing a plugin and you&#39;re facing unexpected behavior, it may be a priority issue : some internal function, or a function from another plugin you had forgotten about, is running <em>before<\/em> your own and processing the same bits you&#39;re trying to pass through your function. <\/p>\n<p>Wouldn&#39;t it be cool if you could easily list all filters and action for every hook, in their priority and execution order ? Would be cool. Well, it <strong>is<\/strong> cool actually : get your hands on <a href=\"http:\/\/planetozh.com\/blog\/my-projects\/wordpress-hooks-filter-flow\/\">WordPress Hooks and Filters Flow<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basically, a plugin for WordPress creates a PHP function (called a filter or an action) which is triggered when a particular event (called a hook) occurs. When several filters are supposed to be triggered by the same hook, you can define their priority. When you&#39;re writing a plugin and you&#39;re facing unexpected behavior, it may [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[2,10,85,245],"class_list":["post-540","post","type-post","status-publish","format-standard","hentry","tag-code","tag-php","tag-plugins","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=540"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/540\/revisions"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/categories?post=540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/tags?post=540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}