MP_EmailSettings::set_fields_email()

Fields of Tab “Email and PDF”.


Return Return

(array) Email settings fields.

  • 'allow_email'
    (array) Allow Email Report
  • 'email'
    (array) From Email Address
  • 'bcc_email'
    (array) BCC Email
  • 'textemail'
    (array) Email text
  • 'textemail_table'
    (array) Email Table with results based on inputs
  • 'primary_email_color'
    (array) Primary email color
  • 'email_logo'
    (array) Logo or Header Image (jpeg or png)
  • 'send_mail_to_admin'
    (array) Send Email to Admin
  • 'allow_resend_email'
    (array) Allow Resend Email to User
  • 'first_email'
    (array) After what time(days) to send the first repeated email?
  • 'first_email_subject'
    (array) First email Subject
  • 'first_email_text'
    (array) First email Text
  • 'second_email'
    (array) After what time(days) to send the second repeated email?
  • 'second_email_subject'
    (array) Second email Subject
  • 'second_email_text'
    (array) Second email text
  • 'admin_mail'
    (array) Admin Mail


Top ↑

Source Source

File: mortgage-platform/Inc/Base/Settings/MP_EmailSettings.php

	public function set_fields_email() {
		$fields_email = array(
			array(
				'id'       => 'allow_email',
				'title'    => __( 'Allow Email Report', 'mortgage_platform' ),
				'callback' => array( $this, 'checkbox' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'allow_email',
					'placeholder' => '',
					'default'     => '',
					'description' => __( 'Choose whether to allow Email Reports to users or not', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'email',
				'title'    => __( 'From Email Address', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'email',
					'placeholder' => __( 'Email ', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the From Address for the email sent to the user. Make sure that your server will allow the email you choose as the from address.', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'bcc_email',
				'title'    => __( 'BCC Email', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'bcc_email',
					'placeholder' => __( 'BCC email ', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the email to receive a hidden copy (BCC - Blind Carbon Copy) of the user generated report', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'textemail',
				'title'    => __( 'Email Text	', 'mortgage_platform' ),
				'callback' => array( $this, 'textarea' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'textemail',
					'placeholder' => __( 'Email Text', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the email text', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'textemail_table',
				'title'    => __( 'Email Table with results based on inputs', 'mortgage_platform' ),
				'callback' => array( $this, 'checkbox' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'textemail_table',
					'placeholder' => '',
					'default'     => '',
					'description' => __( 'Choose whether to allow Email Table with results based on inputsto users or not ', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'primary_email_color',
				'title'    => __( 'Primary email color', 'mortgage_platform' ),
				'callback' => array( $this, 'color' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'primary_email_color',
					'placeholder' => '',
					'default'     => '',
					'description' => __( 'Set the primary email color', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'email_logo',
				'title'    => __( 'Logo or Header Image (jpeg or png)', 'mortgage_platform' ),
				'callback' => array( $this, 'upload' ),
				'args'     => array(
					'option_name'   => MortgagePlatform::$prefix . 'email',
					'label_for'     => 'email_logo',
					'attachment_id' => 'attachment_id',
					'placeholder'   => '',
					'default'       => '',
					'description'   => '',
				),
			),
			array(
				'id'       => 'send_mail_to_admin',
				'title'    => __( 'Send Email to Admin', 'mortgage_platform' ),
				'callback' => array( $this, 'checkbox' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'send_mail_to_admin',
					'placeholder' => '',
					'default'     => '',
					'description' => '',
				),
			),
			array(
				'id'       => 'allow_resend_email',
				'title'    => __( 'Allow Resend Email to User', 'mortgage_platform' ),
				'callback' => array( $this, 'checkbox' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'allow_resend_email',
					'placeholder' => '',
					'default'     => '',
					'description' => __( 'Use cron job services to start the schedule send emails. Add work to be done every hour. It is necessary to register a link to the page in the execution command ', 'mortgage_platform' )  . get_site_url() . '/wp-cron.php' . __( ' You may use cron of your provider or services e.g. <a href="https://cron-job.org">www.cron-job.org</a> , <a href="https://www.easycron.com">www.easycron.com</a> etc.', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'first_email',
				'title'    => __( 'After what time(days) to send the first repeated email?', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'first_email',
					'placeholder' => __( '3', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Default 3 days', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'first_email_subject',
				'title'    => __( 'First email Subject	', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'first_email_subject',
					'placeholder' => __( 'First email Subject	', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the first email subject', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'first_email_text',
				'title'    => __( 'First email Text	', 'mortgage_platform' ),
				'callback' => array( $this, 'textarea' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'first_email_text',
					'placeholder' => __( 'First email Text	', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the first email text', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'second_email',
				'title'    => __( 'After what time(days) to send the second repeated email?', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'second_email',
					'placeholder' => __( '5', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Default 5 days', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'second_email_subject',
				'title'    => __( 'Second email Subject	', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'second_email_subject',
					'placeholder' => __( 'Second email Subject	', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the second email subject', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'second_email_text',
				'title'    => __( 'Second email Text	', 'mortgage_platform' ),
				'callback' => array( $this, 'textarea' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'second_email_text',
					'placeholder' => __( 'Second email Text	', 'mortgage_platform' ),
					'default'     => '',
					'description' => __( 'Set the second email text', 'mortgage_platform' ),
				),
			),
			array(
				'id'       => 'admin_mail',
				'title'    => __( 'Admin Mail', 'mortgage_platform' ),
				'callback' => array( $this, 'input' ),
				'args'     => array(
					'option_name' => MortgagePlatform::$prefix . 'email',
					'label_for'   => 'admin_mail',
					'placeholder' => '',
					'default'     => '',
					'description' => __( 'if this field is empty mail will be send to mail of admin Website', 'mortgage_platform' ),
				),
			),

		);

		return $fields_email;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.