| 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 |
notifier_wp_select( |
| 18 |
array( |
| 19 |
'id' => NOTIFIER_PREFIX . 'trigger', |
| 20 |
'value' => get_post_meta( $post_id, NOTIFIER_PREFIX . 'trigger', true), |
| 21 |
'label' => 'Select Trigger', |
| 22 |
'description' => 'Select the trigger when you want to fire a Natification from WANotifier.com.', |
| 23 |
'options' => Notifier_Notification_Triggers::get_notification_triggers_dropdown() |
| 24 |
) |
| 25 |
); |
| 26 |
?> |
| 27 |
</div> |
| 28 |
<?php |
| 29 |
$send_to_conditions = array ( |
| 30 |
array ( |
| 31 |
'field' => NOTIFIER_PREFIX . 'trigger', |
| 32 |
'operator' => '!=', |
| 33 |
'value' => '' |
| 34 |
) |
| 35 |
); |
| 36 |
?> |
| 37 |
<div class="form-field notifier-trigger-merge-tags" data-conditions="<?php echo esc_attr ( json_encode( $send_to_conditions ) ); ?>"> |
| 38 |
|
| 39 |
</div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
|