{"id":120295,"date":"2011-09-23T08:00:00","date_gmt":"2011-09-23T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/notify-on-action\/"},"modified":"2011-09-25T08:34:00","modified_gmt":"2011-09-25T08:34:00","slug":"notify-on-action","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/notify-on-action\/","title":{"rendered":"Plugin Name: Notify On Action"},"content":{"rendered":"<p>This plugin allows you to sent email notifications whenever an action is performed on your site. For example, let\u2019s you want to be notified when a user clicks a particular button on your site, or you want to notify another person when you process a request, etc This plugin can help you.<\/p>\n<p>Simply follow the steps below:<\/p>\n<pre><code>    * Create Notification Template using the form below\n    * Copy & Paste the following code in the theme\/plugin code where you want the email notification to be sent.\n\n    if (has_action(\"noa_notify_on_action\")) do_action( 'noa_notify_on_action','<Enter_Notification_Name>', null);\n<\/code><\/pre>\n<p>There are other options on how to use the plugin. See \u2018How to Use\u2019 below<\/p>\n<p>This plugin is available under the GPL license, which means that it\u2019s free. If you use it for a commercial web site, if you appreciate my efforts or if you want to encourage me to develop and maintain it, please consider making a donation using Paypal, a secured payment solution. You just need to click the donate button on the settings page and follow the instructions.<\/p>\n<h4>What about Notify On Action?<\/h4>\n<h3>How to Use it<\/h3>\n<p>Ways to use this plugin:<br \/>\n    * Send Standard Notification<br \/>\n     \u2013 Create a new Notification Type in the form below (i.e Notification Name is \u201cSaluteMyFriend\u201d)<br \/>\n    \u2013 Add this code in the Theme\/Plugin function when you want the notification to be submitted:<\/p>\n<pre> if (has_action(\"noa_notify_on_action\")){                       \n    do_action( \"noa_notify_on_action\",\"SaluteMyFriend\", $args);\n    }\n   <\/pre>\n<p>Once the do_action executes, an email notification will be send with the information on the \u201cSaluteMyFriend\u201d Notification Type<\/p>\n<pre><code>    * Send Notification with Application Specific Data\n  You can also submit arguments to be sent in your email. For example, lets say you would like your email template to include application specific information which varies depending on where the user clicks, then you can pass that argument into the do_action function.                        \n - Create a new Notification Type in the form below (i.e Notification Name is \"SaluteMyFriend\")\n- Wherever you want application specific data to be in the email, create a %xxxx% tag. (i.e In Message text box include %arg1%, %arg2%)\n<pre>\n if (has_action(\"noa_notify_on_action\")){\n    $args = array(\"arg1\" => \"Good Morning\",\n          \"arg2\"=> \"Joe Doh\"                    \n    );\n\n    do_action( \"noa_notify_on_action\",\"SaluteMyFriend\", $args);\n}\n   <\/pre>\n<p>In the Notification Type you the tags %arg1%, %arg2% to substitute the values sent. The name of the tag (i.e arg needs to match in the template and in the $args variable.<\/p>\n<p>The name of these arguments need to match between the Notification Type template and the argument sent by the application. For example, if you write in the message of your Notification type \"The price of %product% is %price%\", then your code will look like this:<\/p>\n<pre>\nif (has_action(\"noa_notify_on_action\")){\n    $args = array(\"product\" => \"Computer\",\n        \"price\"=> \"$850.99\"                             );\n\n    do_action( \"noa_notify_on_action\",\"ProductConfirmation\", $args);\n}\n<\/pre>\n<p>You can use these %args% only in the Body of the message.<\/p>\n<p>* Send Notification to Application Specific Recipients<\/h3>\n<p>If the recipient needs to be specified by the application, use the keyword \"recipients\" in the arguments array.<br \/>\n    if (has_action(\"noa_notify_on_action\")){<br \/>\n         $args = array(                                      \"recipients\" => array(\"john@gmail.com\",\"giulia@yahoo.com\"),<br \/>\n                             \"product\" => \"Computer\",<br \/>\n                             \"price\"=> \"$850.99\"<br \/>\n                            );<\/p>\n<p>                     do_action( \"noa_notify_on_action\",\"ProductConfirmation\", $args);<br \/>\n                    }<\/p>\n<p>This will send the Notification Type template to John and Giulia's emails.<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This plugin allows Admins to set up email notification on any action performed in any of functions on themes\/plugins.<\/p>\n","protected":false},"author":65,"featured_media":226356,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Plugin Name: Notify On Action - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"This plugin allows Admins to set up email notification on any action performed in any of functions on themes\/plugins."},"footnotes":""},"categories":[1],"tags":[2490,85,496,822],"class_list":["post-120295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-alerts","tag-email","tag-events","tag-notification"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/120295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=120295"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/120295\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/226356"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=120295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=120295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=120295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}