Completed
Push — master ( 709374...172c6c )
by Stephanie
03:07 queued 10s
created

FrmEmailAction::get_upgrade_text()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
	public function form( $form_action, $args = array() ) {
23
		extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract
24
25
		include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_email_settings.php';
26
	}
27
28
	public function get_defaults() {
29
		return array(
30
			'email_to'      => '[admin_email]',
31
			'cc'            => '',
32
			'bcc'           => '',
33
			'from'          => '[sitename] <[admin_email]>',
34
			'reply_to'      => '',
35
			'email_subject' => '',
36
			'email_message' => '[default-message]',
37
			'inc_user_info' => 0,
38
			'plain_text'    => 0,
39
			'event'         => array( 'create' ),
40
		);
41
	}
42
43
	protected function get_upgrade_text() {
44
		return __( 'Conditional emails', 'formidable' );
45
	}
46
}
47