{"id":17498,"date":"2018-03-11T18:13:43","date_gmt":"2018-03-11T17:13:43","guid":{"rendered":"https:\/\/it.wordpress.org\/support\/topic\/action-hook-in-plugin\/"},"modified":"2018-03-11T18:14:38","modified_gmt":"2018-03-11T17:14:38","slug":"action-hook-in-plugin","status":"publish","type":"topic","link":"https:\/\/it.wordpress.org\/support\/topic\/action-hook-in-plugin\/","title":{"rendered":"action hook in plugin"},"content":{"rendered":"<p>Buonasera, sto cercando di capire come funziona un action hook, in particolare all&#8217;interno di un plugin di wordpress. Nello specifico il plugin che sto &#8216;studiando&#8217; \u00e8 Newsletter e nel file principale del plugin \u00e8 riportato un add_action con hook pari proprio a &#8216;newsletter&#8217;. Ad esso \u00e8 associata una funzione che gestisce l&#8217;invio della newsletter. Ci\u00f2 che non riesco a realizzare \u00e8 che cercando in tutti i file del plugin non c&#8217;\u00e8 nessun corrispondente do_action. Quello che vorrei chiedere \u00e8: non \u00e8 necessario associare un do_action ad un add_action? Come verrebbe quindi invocata la funzione suddetta, cio\u00e8 come fa wordpress a sapere quando si ha l&#8217;evento che la richiama?<\/p>\n","protected":false},"template":"","class_list":["post-17498","topic","type-topic","status-publish","hentry","topic-tag-action-hook"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17498\/revisions"}],"predecessor-version":[{"id":17499,"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17498\/revisions\/17499"}],"wp:attachment":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}