| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
class FrmEmailAction extends FrmFormAction { |
| 7 |
|
| 8 |
public function __construct() { |
| 9 |
$action_ops = array( |
| 10 |
'classes' => 'frm_icon_font frm_email_solid_icon', |
| 11 |
'active' => true, |
| 12 |
'event' => array( 'create' ), |
| 13 |
'limit' => 99, |
| 14 |
'priority' => 10, |
| 15 |
'color' => 'rgb(49, 119, 199)', |
| 16 |
); |
| 17 |
$action_ops = apply_filters( 'frm_email_control_settings', $action_ops ); |
| 18 |
|
| 19 |
parent::__construct( 'email', __( 'Send Email', 'formidable' ), $action_ops ); |
| 20 |
} |
| 21 |
|
| 22 |
/** |
| 23 |
* @return void |
| 24 |
*/ |
| 25 |
public function form( $form_action, $args = array() ) { |
| 26 |
extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract |
| 27 |
|
| 28 |
include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_email_settings.php'; |
| 29 |
} |
| 30 |
|
| 31 |
public function get_defaults() { |
| 32 |
return array( |
| 33 |
'email_to' => '[admin_email]', |
| 34 |
'cc' => '', |
| 35 |
'bcc' => '', |
| 36 |
'from' => '[sitename] <[admin_email]>', |
| 37 |
'reply_to' => '', |
| 38 |
'email_subject' => '', |
| 39 |
'email_message' => '[default-message]', |
| 40 |
'inc_user_info' => 0, |
| 41 |
'plain_text' => 0, |
| 42 |
'event' => array( 'create' ), |
| 43 |
); |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* @return string |
| 48 |
*/ |
| 49 |
protected function get_upgrade_text() { |
| 50 |
return __( 'Conditional emails', 'formidable' ); |
| 51 |
} |
| 52 |
} |
| 53 |
|