{"id":43902,"date":"2011-08-15T15:03:26","date_gmt":"2011-08-15T15:03:26","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/advanced-hooks-api\/"},"modified":"2012-12-18T20:45:59","modified_gmt":"2012-12-18T20:45:59","slug":"advanced-hooks-api","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/advanced-hooks-api\/","author":910727,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.7","stable_tag":"trunk","tested":"3.5.2","requires":"3.2.1","requires_php":"","requires_plugins":"","header_name":"Advanced Hooks API","header_author":"Andrey \"Rarst\" Savchenko","header_description":"","assets_banners_color":"","last_updated":"2012-12-18 20:45:59","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/advanced-hooks-api\/","header_author_uri":"http:\/\/www.rarst.net\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1157,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.4","0.4.1","0.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4073],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-43902","plugin","type-plugin","status-closed","hentry","plugin_tags-hooks","plugin_committers-rarst"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/advanced-hooks-api.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WordPress only operates with callbacks for actions and filters. That means that you always need to use callback, either:<\/p>\n <ul>\n<li>provided by core (limited)<\/li>\n<li>closures (messy)<\/li>\n<li>coded by yourself (this - a lot)<\/li>\n<\/ul>\n <p>This plugins offers number of custom <code>add_*<\/code> functions to hook more elaborate events:<\/p>\n <ul>\n<li><code>add_action_with_args()<\/code> - hook callback <strong>and<\/strong> arguments to run it with<\/li>\n<li><code>add_filter_return()<\/code> - override filter with arbitrary value<\/li>\n<li><code>add_filter_prepend()<\/code> and <code>add_filter_append()<\/code> - hook suffix\/prefix values for filtered string and arrays<\/li>\n<li><code>add_filter_replace()<\/code> - edit substrings or array values in filter<\/li>\n<li><code>add_action_once()<\/code> and <code>add_filter_once()<\/code> - hook callback to only fire once<\/li>\n<li><code>add_method()<\/code> - quickly add class methods to hooks of same name<\/li>\n<\/ul>\n <p>Both implementation and set of functions are experimental.<\/p>\n <p><a href=\"https:\/\/bitbucket.org\/Rarst\/advanced-hooks-api\/\">Development repository and issue tracker<\/a>.<\/p>\n\n<!--section=changelog-->\n<h4>0.7<\/h4>\n <ul>\n<li><em>(enhancement)<\/em> implemented <code>add_action_once()<\/code> and <code>add_filter_once()<\/code>, props Eric Mann<\/li>\n<\/ul>\n <h4>0.6<\/h4>\n <ul>\n<li><em>(enhancement)<\/em> changed license to MIT<\/li>\n<li><em>(enhancement)<\/em> cleaned up coding style<\/li>\n<li><em>(enhancement)<\/em> moved handler class to separate file<\/li>\n<li><em>(enhancement)<\/em> implemented removing of handler from hooks<\/li>\n<li><strong>(breaking change)<\/strong> changed signatures to make priority optional<\/li>\n<\/ul>\n <h4>0.5<\/h4>\n <ul>\n<li><em>(enhancement)<\/em> new add_method() function<\/li>\n<li><em>(enhancement)<\/em> more return points for better logic and compatibility<\/li>\n<\/ul>\n <h4>0.4.1<\/h4>\n <ul>\n<li><em>(bugfix)<\/em> action() method expected argument passed (to be compatible with filters), changed to func_get_arg()<\/li>\n<\/ul>\n <h4>0.4<\/h4>\n <ul>\n<li>Initial public repository release.<\/li>\n<\/ul>","raw_excerpt":"Set of (experimental) wrappers that allow to hook more elaborate events without coding intermediary functions.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/43902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=43902"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/rarst"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=43902"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=43902"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=43902"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=43902"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=43902"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=43902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}