MP_PDFSettings::set_fields_pdf()
Fields of Tab “Email and PDF”.
Return Return
(array) PDF settings fields.
- 'allow_pdf'
(array) Include PDF - 'pdf_title'
(array) PDF Header Large Text - 'ltr_to_rtl'
(array) LTR or RTL - 'fonts_pdf'
(array) PDF Font to use (Helvetica, Dejavu sans, Aefurat, Aealarabiya, Courier, Times) - 'fonts_pdf_size'
(array) PDF Font size to use (6px, 7px, 8px, 9px, 10px, 11px, 12px, 13px, 14px, 15px, 16px)
Source Source
File: mortgage-platform/Inc/Base/Settings/MP_PDFSettings.php
public function set_fields_pdf() {
$fields_email = array(
array(
'id' => 'allow_pdf',
'title' => __( 'Include PDF', 'mortgage_platform' ),
'callback' => array( $this, 'checkbox' ),
'args' => array(
'option_name' => MortgagePlatform::$prefix . 'pdf',
'label_for' => 'allow_pdf',
'placeholder' => '',
'default' => '',
'description' => __( 'Include PDF with calculation as attachment to mail', 'mortgage_platform' ),
),
),
array(
'id' => 'pdf_title',
'title' => __( 'PDF Header Large Text ', 'mortgage_platform' ),
'callback' => array( $this, 'input' ),
'args' => array(
'option_name' => MortgagePlatform::$prefix . 'pdf',
'label_for' => 'pdf_title',
'placeholder' => __( ' Amortization Calculator Results', 'mortgage_platform' ),
'default' => '',
'description' => __( 'Large Text at the top of the PDF', 'mortgage_platform' ),
),
),
array(
'id' => 'ltr_to_rtl',
'title' => __( 'LTR or RTL', 'mortgage_platform' ),
'callback' => array( $this, 'select' ),
'args' => array(
'option_name' => MortgagePlatform::$prefix . 'pdf',
'label_for' => 'ltr_to_rtl',
'placeholder' => '',
'default' => '',
'description' => __( 'Choose LTR (Left To Right) or RTL (Right To Left) language. If you don\'t know what this means, keep it LTR.', 'mortgage_platform' ),
'options' => array(
'rtl_to_ltr' => __( 'ltr', 'mortgage_platform' ),
'ltr_to_rtl' => __( 'rtl', 'mortgage_platform' ),
),
),
),
array(
'id' => 'fonts_pdf',
'title' => __( 'PDF Font to use ', 'mortgage_platform' ),
'callback' => array( $this, 'select' ),
'args' => array(
'option_name' => MortgagePlatform::$prefix . 'pdf',
'label_for' => 'fonts_pdf',
'placeholder' => '',
'default' => '',
'description' => __( 'Choose the font to use. Helvetica is going to be the smallest but does not support many RTL languages.', 'mortgage_platform' ),
'options' => array(
'helvetica' => __( 'Helvetica - Default, smaller generated PDF file', 'mortgage_platform' ),
'dejavusans' => __( 'Dejavu sans - Persian / English', 'mortgage_platform' ),
'aefurat' => __( 'Aefurat - Arabic / English', 'mortgage_platform' ),
'aealarabiya' => __( 'Aealarabiya - Arabic / English', 'mortgage_platform' ),
'courier' => __( 'Courier', 'mortgage_platform' ),
'times' => __( 'Times', 'mortgage_platform' ),
),
),
),
array(
'id' => 'fonts_pdf_size',
'title' => __( 'PDF Font size to use ', 'mortgage_platform' ),
'callback' => array( $this, 'select' ),
'args' => array(
'option_name' => MortgagePlatform::$prefix . 'pdf',
'label_for' => 'fonts_pdf_size',
'placeholder' => '',
'default' => __( '8px', 'mortgage_platform' ),
'description' => __( 'Choose the font size to use. Default 8px.', 'mortgage_platform' ),
'options' => array(
'6' => '6 px',
'7' => '7 px',
'8' => '8 px',
'9' => '9 px',
'10' => '10 px',
'11' => '11 px',
'12' => '12 px',
'13' => '13 px',
'14' => '14 px',
'15' => '15 px',
'16' => '16 px',
),
),
),
);
return $fields_email;
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |