Members::get_settings_fields()

Returns the available settings fields for the submodule.

Description

See also

Return

(array) Associative array of <code>$field_slug => $field_args</code> pairs.

Source

File: src/modules/access-controls/members.php

	public function get_settings_fields() {
		$settings_fields = parent::get_settings_fields();

		$domain = wp_parse_url( home_url( '/' ), PHP_URL_HOST );
		if ( ! $domain ) {
			// Fall back to a random domain.
			$domain = 'yourwebsite.com';
		}

		$settings_fields['invitation_from_name'] = array(
			'section'              => 'invitation_email',
			'type'                 => 'templatetagtext',
			'label'                => __( 'From Name', 'torro-forms' ),
			'input_classes'        => array( 'regular-text' ),
			'default'              => '{sitetitle}',
			'template_tag_handler' => $this->template_tag_handler,
		);

		$settings_fields['invitation_from_email'] = array(
			'section'              => 'invitation_email',
			'type'                 => 'templatetagemail',
			'label'                => __( 'From Email', 'torro-forms' ),
			/* translators: %s: email address */
			'description'          => sprintf( __( 'This email address should contain the same domain like your website (e.g. %s).', 'torro-forms' ), 'email@' . $domain ),
			'input_classes'        => array( 'regular-text' ),
			'default'              => '{adminemail}',
			'template_tag_handler' => $this->template_tag_handler_email_only,
		);

		$settings_fields['invitation_subject'] = array(
			'section'              => 'invitation_email',
			'type'                 => 'templatetagtext',
			'label'                => __( 'Subject', 'torro-forms' ),
			'input_classes'        => array( 'regular-text' ),
			'default'              => $this->get_default_invitation_subject(),
			'template_tag_handler' => $this->template_tag_handler,
		);

		$settings_fields['invitation_message'] = array(
			'section'              => 'invitation_email',
			'type'                 => 'templatetagwysiwyg',
			'label'                => __( 'Message', 'torro-forms' ),
			'rows'                 => 12,
			'media_buttons'        => true,
			'wpautop'              => true,
			'default'              => $this->get_default_invitation_message(),
			'template_tag_handler' => $this->template_tag_handler,
		);

		$settings_fields['reinvitation_from_name'] = array(
			'section'              => 'reinvitation_email',
			'type'                 => 'templatetagtext',
			'label'                => __( 'From Name', 'torro-forms' ),
			'input_classes'        => array( 'regular-text' ),
			'default'              => '{sitetitle}',
			'template_tag_handler' => $this->template_tag_handler,
		);

		$settings_fields['reinvitation_from_email'] = array(
			'section'              => 'reinvitation_email',
			'type'                 => 'templatetagemail',
			'label'                => __( 'From Email', 'torro-forms' ),
			/* translators: %s: email address */
			'description'          => sprintf( __( 'This email address should contain the same domain like your website (e.g. %s).', 'torro-forms' ), 'email@' . $domain ),
			'input_classes'        => array( 'regular-text' ),
			'default'              => '{adminemail}',
			'template_tag_handler' => $this->template_tag_handler_email_only,
		);

		$settings_fields['reinvitation_subject'] = array(
			'section'              => 'reinvitation_email',
			'type'                 => 'templatetagtext',
			'label'                => __( 'Subject', 'torro-forms' ),
			'input_classes'        => array( 'regular-text' ),
			'default'              => $this->get_default_reinvitation_subject(),
			'template_tag_handler' => $this->template_tag_handler,
		);

		$settings_fields['reinvitation_message'] = array(
			'section'              => 'reinvitation_email',
			'type'                 => 'templatetagwysiwyg',
			'label'                => __( 'Message', 'torro-forms' ),
			'rows'                 => 12,
			'media_buttons'        => true,
			'wpautop'              => true,
			'default'              => $this->get_default_reinvitation_message(),
			'template_tag_handler' => $this->template_tag_handler,
		);

		return $settings_fields;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.