PluginProbe
WANotifier for Forms and Actions / 2.7.5
WANotifier for Forms and Actions v2.7.5
3.1.0 3.0.4 2.7.10 2.7.11 2.7.12 2.7.13 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 3.0.0 3.0.1 3.0.2 3.0.3 trunk 0.1.0 0.1.1 1.0.0 1.0.1 1.0.2 1.0.3 All 66 releases
notifier / views / admin-triggers.php

admin-triggers.php in WANotifier for Forms and Actions 2.7.5, at views/admin-triggers.php

58 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Triggers CPT Meta Box
4 *
5 * @package WA_Notifier
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11 global $post_id;
12 ?>
13 <div class="meta-fields">
14 <div class="general-fields">
15 <div>
16 <?php
17 $main_triggers = self::get_notification_triggers();
18 foreach ($main_triggers as $key => $triggers) {
19 $dropdown_triggers[$key] = wp_list_pluck($triggers, 'label', 'id');
20 }
21 $selected_trigger = Notifier_Notification_Triggers::get_post_trigger_id($post_id);
22 ?>
23 <p class="form-field mb-3 notifier_trigger_field " data-conditions="">
24 <label for="notifier_trigger" class="form-label">Select Trigger</label>
25 <select class="form-select" style="" name="notifier_trigger" id="notifier_trigger">
26 <option value="">Select trigger</option>
27 <?php
28 foreach ($main_triggers as $key => $triggers) {
29 if(empty($triggers)){
30 continue;
31 }
32 echo '<optgroup label="'.esc_attr($key).'">';
33 foreach($triggers as $trigger){
34 $selected = selected( $selected_trigger, $trigger['id'], false);
35 echo '<option value="'.esc_attr($trigger['id']).'" title="'.esc_attr($trigger['description']).'" '.$selected.' >'.esc_attr($trigger['label']).'</option>';
36 }
37 echo '</optgroup>';
38 }
39 ?>
40 </select>
41 <span class="description">Select the trigger when you want to fire the Notification on WANotifier.com.</span>
42 </p>
43 </div>
44 <?php
45 $send_to_conditions = array (
46 array (
47 'field' => NOTIFIER_PREFIX . 'trigger',
48 'operator' => '!=',
49 'value' => ''
50 )
51 );
52 ?>
53 <div class="form-field notifier-trigger-merge-tags" data-conditions="<?php echo esc_attr ( json_encode( $send_to_conditions ) ); ?>">
54
55 </div>
56 </div>
57 </div>
58