Plugin Directory

Changeset 3404124


Ignore:
Timestamp:
11/27/2025 01:10:31 PM (4 months ago)
Author:
pyrobd
Message:

Release 1.1.11

Location:
fluentforms-pdf
Files:
678 added
10 edited

Legend:

Unmodified
Added
Removed
  • fluentforms-pdf/trunk/Classes/Controller/AvailableOptions.php

    r3023486 r3404124  
    102102            [
    103103                'key' => 'paper_size',
    104                 'label' => __('Paper size', 'fluentform-pdf'),
     104                'label' => __('Paper size', 'fluentforms-pdf'),
    105105                'component' => 'dropdown',
    106106                'tab' => 'tab2',
    107                 'tips' => __('select a pdf paper size', 'fluentform-pdf'),
     107                'tips' => __('select a pdf paper size', 'fluentforms-pdf'),
    108108                'options' => self::getPaperSizes()
    109109            ],
    110110            [
    111111                'key' => 'orientation',
    112                 'label' => __('Orientation', 'fluentform-pdf'),
     112                'label' => __('Orientation', 'fluentforms-pdf'),
    113113                'tab' => 'tab2',
    114114                'component' => 'dropdown',
     
    117117            [
    118118                'key' => 'font',
    119                 'label' => __('Font family', 'fluentform-pdf'),
     119                'label' => __('Font family', 'fluentforms-pdf'),
    120120                'component' => 'dropdown',
    121121                'tab' => 'tab2',
     
    124124            [
    125125                'key' => 'font_size',
    126                 'label' => __('Font size', 'fluentform-pdf'),
     126                'label' => __('Font size', 'fluentforms-pdf'),
    127127                'tab' => 'tab2',
    128128                'component' => 'number'
     
    130130            [
    131131                'key' => 'font_color',
    132                 'label' => __('Font color', 'fluentform-pdf'),
    133                 'tab' => 'tab2',
    134                 'tips' => __('The font color will use in the PDF.', 'fluentform-pdf'),
     132                'label' => __('Font color', 'fluentforms-pdf'),
     133                'tab' => 'tab2',
     134                'tips' => __('The font color will use in the PDF.', 'fluentforms-pdf'),
    135135                'component' => 'color_picker'
    136136            ],
    137137            [
    138138                'key' => 'accent_color',
    139                 'label' => __('Accent color', 'fluentform-pdf'),
    140                 'tab' => 'tab2',
    141                 'tips' => __('The accent color is used for the page, section titles and the border.', 'fluentform-pdf'),
     139                'label' => __('Accent color', 'fluentforms-pdf'),
     140                'tab' => 'tab2',
     141                'tips' => __('The accent color is used for the page, section titles and the border.', 'fluentforms-pdf'),
    142142                'component' => 'color_picker'
    143143            ],
    144144            [
    145145                'key' => 'entry_view',
    146                 'label' => __('Entry view', 'fluentform-pdf'),
     146                'label' => __('Entry view', 'fluentforms-pdf'),
    147147                'tab' => 'tab2',
    148148                'component' => 'radio_choice',
    149149                'options' => [
    150                     'I' => __('View', 'fluentform-pdf'),
    151                     'D' => __('Download', 'fluentform-pdf')
     150                    'I' => __('View', 'fluentforms-pdf'),
     151                    'D' => __('Download', 'fluentforms-pdf')
    152152                ]
    153153            ],
    154154            [
    155155                'key' => 'empty_fields',
    156                 'label' => __('Show empty fields', 'fluentform-pdf'),
     156                'label' => __('Show empty fields', 'fluentforms-pdf'),
    157157                'tab' => 'tab2',
    158158                'component' => 'radio_choice',
    159159                'options' => [
    160                     'yes' => __('Yes', 'fluentform-pdf'),
    161                     'no' => __('No', 'fluentform-pdf')
     160                    'yes' => __('Yes', 'fluentforms-pdf'),
     161                    'no' => __('No', 'fluentforms-pdf')
    162162                ]
    163163            ],
    164164            [
    165165                'key' => 'reverse_text',
    166                 'label' => __('Reverse text', 'fluentform-pdf'),
    167                 'tab' => 'tab2',
    168                 'tips' => __('Script like Arabic and Hebrew are written right to left.', 'fluentform-pdf'),
     166                'label' => __('Reverse text', 'fluentforms-pdf'),
     167                'tab' => 'tab2',
     168                'tips' => __('Script like Arabic and Hebrew are written right to left.', 'fluentforms-pdf'),
    169169                'component' => 'radio_choice',
    170170                'options' => [
    171                     'yes' => __('Yes', 'fluentform-pdf'),
    172                     'no' => __('No', 'fluentform-pdf')
     171                    'yes' => __('Yes', 'fluentforms-pdf'),
     172                    'no' => __('No', 'fluentforms-pdf')
    173173                ]
    174174            ]
  • fluentforms-pdf/trunk/Classes/Controller/FontManager.php

    r3023486 r3404124  
    33namespace FluentFormPdf\Classes\Controller;
    44
     5if (!defined('ABSPATH')) {
     6    exit; // Exit if accessed directly.
     7}
    58class FontManager
    69{
     
    5861        $res_code = wp_remote_retrieve_response_code( $res );
    5962        if ( $res_code !== 200 ) {
    60            return new \WP_Error('failed', __('Core Font API Response Failed', 'fluentform-pdf'));
     63           return new \WP_Error('failed', __('Core Font API Response Failed', 'fluentforms-pdf'));
    6164        }
    6265        return true;
  • fluentforms-pdf/trunk/Classes/Controller/GlobalPdfManager.php

    r3353753 r3404124  
    5050        add_action('admin_notices', function () {
    5151            if (!get_option($this->optionKey) && Acl::hasAnyFormPermission())
    52                 echo fluentform_sanitize_html('<div class="notice notice-warning"><p>' . __('Fluent Forms PDF require to download fonts. Please ', 'fluentform-pdf') . '<a href="' . admin_url('admin.php?page=fluent_forms_add_ons&sub_page=fluentform_pdf') . '">' . __('click here', 'fluentform-pdf') . '</a>' . __(' to download and configure the settings', 'fluentform-pdf') . '</p></div>');
     52                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() escapes output
     53                echo fluentform_sanitize_html('<div class="notice notice-warning"><p>' . esc_html__('Fluent Forms PDF require to download fonts. Please ', 'fluentforms-pdf') . '<a href="' . admin_url('admin.php?page=fluent_forms_add_ons&sub_page=fluentform_pdf') . '">' . esc_html__('click here', 'fluentforms-pdf') . '</a>' . esc_html__(' to download and configure the settings', 'fluentforms-pdf') . '</p></div>');
    5354        });
    5455
     
    100101        $setting["pdf_settings"] = [
    101102            "hash" => "pdf_settings",
    102             "title" => __("PDF Settings", 'fluentform-pdf')
     103            "title" => __("PDF Settings", 'fluentforms-pdf')
    103104        ];
    104105
     
    109110    {
    110111        $settingsMenus['pdf'] = [
    111             'title' => __('PDF Feeds', 'fluentform-pdf'),
     112            'title' => __('PDF Feeds', 'fluentforms-pdf'),
    112113            'slug' => 'pdf-feeds',
    113114            'hash' => 'pdf',
     
    132133            'downloadFonts' => 'downloadFonts'
    133134        ];
    134 
    135         $route = sanitize_text_field($_REQUEST['route']);
    136 
    137135        Acl::verify('fluentform_forms_manager');
    138 
    139         if (isset($maps[$route])) {
     136        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified in Acl::verify
     137        $route = isset($_REQUEST['route']) ? sanitize_text_field(wp_unslash($_REQUEST['route'])) : '';
     138
     139        if ($route && isset($maps[$route])) {
    140140            $this->{$maps[$route]}();
    141141        }
     
    174174    public function saveGlobalSettings()
    175175    {
    176         $settings = wp_unslash($_REQUEST['settings']);
     176        // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified in previous function
     177        $settings = isset($_REQUEST['settings']) ? wp_unslash($_REQUEST['settings']) : [];
    177178
    178179        $sanitizerMap = [
     
    190191        update_option($this->optionKey, $settings);
    191192        wp_send_json_success([
    192             'message' => __('Settings successfully updated', 'fluentform-pdf')
     193            'message' => __('Settings successfully updated', 'fluentforms-pdf')
    193194        ], 200);
    194195    }
     
    196197    public function getFeedsAjax()
    197198    {
    198         $formId = intval($_REQUEST['form_id']);
     199        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     200        $formId = isset($_REQUEST['form_id']) ? intval($_REQUEST['form_id']) : 0;
     201
     202        if (!$formId) {
     203            wp_send_json_error([
     204                'message' => __('Sorry! No form found!', 'fluentforms-pdf')
     205            ], 423);
     206        }
    199207
    200208        $form = wpFluent()->table('fluentform_forms')
     
    213221    public function getFeedListAjax()
    214222    {
    215         $formId = intval($_REQUEST['form_id']);
     223        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     224        $formId = isset($_REQUEST['form_id']) ? intval($_REQUEST['form_id']): 0;
     225        if (!$formId) {
     226            wp_send_json_error([
     227                'message' => __('Sorry! No form found!', 'fluentforms-pdf')
     228            ], 423);
     229        }
    216230
    217231        $feeds = $this->getFeeds($formId);
     
    233247    public function createFeedAjax()
    234248    {
    235         $templateName = sanitize_text_field($_REQUEST['template']);
    236         $formId = intval($_REQUEST['form_id']);
     249        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     250        $templateName = sanitize_text_field(isset($_REQUEST['template']) ? wp_unslash($_REQUEST['template']) : '');
     251        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     252        $formId =  isset($_REQUEST['form_id']) ? intval($_REQUEST['form_id']) : 0;
     253
     254        if (!$formId) {
     255            wp_send_json_error([
     256                'message' => __('Sorry! No form found!', 'fluentforms-pdf')
     257            ], 423);
     258        }
    237259
    238260        $form = wpFluent()->table('fluentform_forms')
     
    244266        if (!isset($templates[$templateName]) || !$formId) {
    245267            wp_send_json_error([
    246                 'message' => __('Sorry! No template found!', 'fluentform-pdf')
     268                'message' => __('Sorry! No template found!', 'fluentforms-pdf')
    247269            ], 423);
    248270        }
     
    253275        if (!class_exists($class)) {
    254276            wp_send_json_error([
    255                 'message' => __('Sorry! No template Class found!', 'fluentform-pdf')
     277                'message' => __('Sorry! No template Class found!', 'fluentforms-pdf')
    256278            ], 423);
    257279        }
     
    276298        $insertId = wpFluent()->table('fluentform_form_meta')
    277299            ->insertGetId([
    278                 'meta_key' => '_pdf_feeds',
     300                'meta_key' => '_pdf_feeds', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- This class uses custom meta table (fluentform_form_meta)
    279301                'form_id' => $formId,
    280302                'value' => wp_json_encode($data)
     
    283305        wp_send_json_success([
    284306            'feed_id' => $insertId,
    285             'message' => __('Feed has been created, edit the feed now')
     307            'message' => esc_html__('Feed has been created, edit the feed now', 'fluentforms-pdf')
    286308        ], 200);
    287309    }
     
    305327    public function getFeedAjax()
    306328    {
    307         $formId = intval($_REQUEST['form_id']);
     329        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     330        $formId = isset($_REQUEST['form_id']) ? intval($_REQUEST['form_id']) : 0;
     331        if (!$formId) {
     332            wp_send_json_error([
     333                'message' => __('Sorry! No form found!', 'fluentforms-pdf')
     334            ], 423);
     335        }
    308336
    309337        $form = wpFluent()->table('fluentform_forms')
     
    311339            ->first();
    312340
    313         $feedId = intval($_REQUEST['feed_id']);
     341        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     342        $feedId = isset($_REQUEST['feed_id']) ? intval($_REQUEST['feed_id']) : 0;
     343        if (!$feedId) {
     344            wp_send_json_error([
     345                'message' => __('Sorry! No feed found!', 'fluentforms-pdf')
     346            ], 423);
     347        }
    314348
    315349        $feed = wpFluent()->table('fluentform_form_meta')
     
    328362        if (!isset($templates[$templateName]) || !$formId) {
    329363            wp_send_json_error([
    330                 'message' => __('Sorry! No template found!', 'fluentform-pdf')
     364                'message' => __('Sorry! No template found!', 'fluentforms-pdf')
    331365            ], 423);
    332366        }
     
    337371        if (!class_exists($class)) {
    338372            wp_send_json_error([
    339                 'message' => __('Sorry! No template Class found!', 'fluentform-pdf')
     373                'message' => __('Sorry! No template Class found!', 'fluentforms-pdf')
    340374            ], 423);
    341375        }
     
    346380        $globalFields['watermark_image'] = [
    347381            'key' => 'watermark_image',
    348             'label' => __('Watermark Image', 'fluentform-pdf'),
     382            'label' => __('Watermark Image', 'fluentforms-pdf'),
    349383            'component' => 'image_widget'
    350384        ];
     
    352386        $globalFields['watermark_text'] = [
    353387            'key' => 'watermark_text',
    354             'label' => __('Watermark Text', 'fluentform-pdf'),
     388            'label' => __('Watermark Text', 'fluentforms-pdf'),
    355389            'component' => 'text',
    356             'placeholder' => __('Watermark text', 'fluentform-pdf')
     390            'placeholder' => __('Watermark text', 'fluentforms-pdf')
    357391        ];
    358392
    359393        $globalFields['watermark_opacity'] = [
    360394            'key' => 'watermark_opacity',
    361             'label' => __('Watermark Opacity', 'fluentform-pdf'),
     395            'label' => __('Watermark Opacity', 'fluentforms-pdf'),
    362396            'component' => 'number',
    363             'inline_tip' => __('Value should be between 1 to 100', 'fluentform-pdf')
     397            'inline_tip' => __('Value should be between 1 to 100', 'fluentforms-pdf')
    364398        ];
    365399        $globalFields['watermark_img_behind'] = [
    366400            'key' => 'watermark_img_behind',
    367             'label' => __('Watermark Position', 'fluentform-pdf'),
     401            'label' => __('Watermark Position', 'fluentforms-pdf'),
    368402            'component' => 'checkbox-single',
    369             'inline_tip' => __('Set as background', 'fluentform-pdf')
     403            'inline_tip' => __('Set as background', 'fluentforms-pdf')
    370404        ];
    371405
     
    374408            'label' => 'PDF Password',
    375409            'component' => 'text',
    376             'inline_tip' => __('If you want to set password please enter password otherwise leave it empty', 'fluentform-pdf')
     410            'inline_tip' => __('If you want to set password please enter password otherwise leave it empty', 'fluentforms-pdf')
    377411        ];
    378412
     
    381415        $settingsFields[] = [
    382416            'key' => 'allow_download',
    383             'label' => __('Allow Download', 'fluentform-pdf'),
    384             'tips' => __('Allow this feed to be downloaded on form submission. Only logged in users will be able to download.', 'fluentform-pdf'),
     417            'label' => __('Allow Download', 'fluentforms-pdf'),
     418            'tips' => __('Allow this feed to be downloaded on form submission. Only logged in users will be able to download.', 'fluentforms-pdf'),
    385419            'component' => 'radio_choice',
    386420            'options' => [
    387                 true => __('Yes', 'fluentform-pdf'),
    388                 false => __('No', 'fluentform-pdf')
     421                true => __('Yes', 'fluentforms-pdf'),
     422                false => __('No', 'fluentforms-pdf')
    389423            ]
    390424        ];
     
    392426        $settingsFields[] = [
    393427            'key' => 'shortcode',
    394             'label' => __('Shortcode', 'fluentform-pdf'),
    395             'tips' => __('Use this shortcode on submission message to generate PDF link.', 'fluentform-pdf'),
     428            'label' => __('Shortcode', 'fluentforms-pdf'),
     429            'tips' => __('Use this shortcode on submission message to generate PDF link.', 'fluentforms-pdf'),
    396430            'component' => 'text',
    397431            'readonly' => true
     
    409443    public function saveFeedAjax()
    410444    {
    411         $formId = intval($_REQUEST['form_id']);
     445        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     446        $formId = isset($_REQUEST['form_id']) ? intval($_REQUEST['form_id']) : 0;
     447        if (!$formId) {
     448            wp_send_json_error([
     449                'message' => __('Sorry! No form found!', 'fluentforms-pdf')
     450            ], 423);
     451        }
    412452
    413453        $form = wpFluent()->table('fluentform_forms')
     
    415455            ->first();
    416456
    417         $feedId = intval($_REQUEST['feed_id']);
    418         $feed = wp_unslash($_REQUEST['feed']);
     457        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     458        $feedId = isset($_REQUEST['feed_id']) ? intval($_REQUEST['feed_id']) : 0;
     459        // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified previously
     460        $feed = isset($_REQUEST['feed']) ? wp_unslash($_REQUEST['feed']) : [];
    419461
    420462        if (empty($feed['name'])) {
    421463            wp_send_json_error([
    422                 'message' => __('Feed name is required', 'fluentform-pdf')
     464                'message' => __('Feed name is required', 'fluentforms-pdf')
    423465            ], 423);
    424466        }
     
    449491
    450492        wp_send_json_success([
    451             'message' => __('Settings successfully updated', 'fluentform-pdf')
     493            'message' => __('Settings successfully updated', 'fluentforms-pdf')
    452494        ], 200);
    453495
     
    456498    public function deleteFeedAjax()
    457499    {
    458         $feedId = intval($_REQUEST['feed_id']);
     500        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     501        $feedId = isset($_REQUEST['feed_id']) ? intval($_REQUEST['feed_id']) : 0;
     502        if (!$feedId) {
     503            wp_send_json_error([
     504                'message' => __('Sorry! No feed found!', 'fluentforms-pdf')
     505            ], 423);
     506        }
    459507        wpFluent()->table('fluentform_form_meta')
    460508            ->where('id', $feedId)
     
    463511
    464512        wp_send_json_success([
    465             'message' => __('Feed successfully deleted', 'fluentform-pdf')
     513            'message' => __('Feed successfully deleted', 'fluentforms-pdf')
    466514        ], 200);
    467515
     
    517565            [
    518566                'key' => 'paper_size',
    519                 'label' => __('Paper size', 'fluentform-pdf'),
     567                'label' => __('Paper size', 'fluentforms-pdf'),
    520568                'component' => 'dropdown',
    521                 'tips' => __('All available templates are shown here, select a default template', 'fluentform-pdf'),
     569                'tips' => __('All available templates are shown here, select a default template', 'fluentforms-pdf'),
    522570                'options' => AvailableOptions::getPaperSizes()
    523571            ],
    524572            [
    525573                'key' => 'orientation',
    526                 'label' => __('Orientation', 'fluentform-pdf'),
     574                'label' => __('Orientation', 'fluentforms-pdf'),
    527575                'component' => 'dropdown',
    528576                'options' => AvailableOptions::getOrientations()
     
    530578            [
    531579                'key' => 'font_family',
    532                 'label' => __('Font Family', 'fluentform-pdf'),
     580                'label' => __('Font Family', 'fluentforms-pdf'),
    533581                'component' => 'dropdown-group',
    534                 'placeholder' => __('Select Font', 'fluentform-pdf'),
     582                'placeholder' => __('Select Font', 'fluentforms-pdf'),
    535583                'options' => AvailableOptions::getInstalledFonts()
    536584            ],
    537585            [
    538586                'key' => 'font_size',
    539                 'label' => __('Font size', 'fluentform-pdf'),
     587                'label' => __('Font size', 'fluentforms-pdf'),
    540588                'component' => 'number'
    541589            ],
    542590            [
    543591                'key' => 'font_color',
    544                 'label' => __('Font color', 'fluentform-pdf'),
     592                'label' => __('Font color', 'fluentforms-pdf'),
    545593                'component' => 'color_picker'
    546594            ],
    547595            [
    548596                'key' => 'heading_color',
    549                 'label' => __('Heading color', 'fluentform-pdf'),
    550                 'tips' => __('Select Heading Color', 'fluentform-pdf'),
     597                'label' => __('Heading color', 'fluentforms-pdf'),
     598                'tips' => __('Select Heading Color', 'fluentforms-pdf'),
    551599                'component' => 'color_picker'
    552600            ],
    553601            [
    554602                'key' => 'accent_color',
    555                 'label' => __('Accent color', 'fluentform-pdf'),
    556                 'tips' => __('The accent color is used for the borders, breaks etc.', 'fluentform-pdf'),
     603                'label' => __('Accent color', 'fluentforms-pdf'),
     604                'tips' => __('The accent color is used for the borders, breaks etc.', 'fluentforms-pdf'),
    557605                'component' => 'color_picker'
    558606            ],
    559607            [
    560608                'key' => 'language_direction',
    561                 'label' => __('Language Direction', 'fluentform-pdf'),
    562                 'tips' => __('Script like Arabic and Hebrew are written right to left. For Arabic/Hebrew please select RTL', 'fluentform-pdf'),
     609                'label' => __('Language Direction', 'fluentforms-pdf'),
     610                'tips' => __('Script like Arabic and Hebrew are written right to left. For Arabic/Hebrew please select RTL', 'fluentforms-pdf'),
    563611                'component' => 'radio_choice',
    564612                'options' => [
    565                     'ltr' => __('LTR', 'fluentform-pdf'),
    566                     'rtl' => __('RTL', 'fluentform-pdf')
     613                    'ltr' => __('LTR', 'fluentforms-pdf'),
     614                    'rtl' => __('RTL', 'fluentforms-pdf')
    567615                ]
    568616            ]
     
    572620    public function pushPdfButtons($widgets, $data, $submission)
    573621    {
    574         $formId = $submission->form->id;
     622        $formId = $submission->form_id;
     623        if (!$formId) {
     624            return $widgets;
     625        }
     626       
     627        if (
     628            isset($submission->type) &&
     629            (
     630                $submission->type === 'step_data'||
     631                $submission->type === 'saved_state_data'
     632            )
     633        ) {
     634            return $widgets;
     635        }
     636       
     637        if (!isset($submission->serial_number)) {
     638            return $widgets;
     639        }
     640       
    575641        $feeds = $this->getFeeds($formId);
    576642        if (!$feeds) {
     
    578644        }
    579645        $widgetData = [
    580             'title' => __('PDF Downloads', 'fluentform-pdf'),
     646            'title' => __('PDF Downloads', 'fluentforms-pdf'),
    581647            'type' => 'html_content'
    582648        ];
     
    615681    public function getPdf()
    616682    {
    617         $feedId = intval($_REQUEST['id']);
    618         $submissionId = intval($_REQUEST['submission_id']);
     683        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     684        $feedId = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
     685        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     686        $submissionId = isset($_REQUEST['submission_id']) ? intval($_REQUEST['submission_id']) : 0;
     687        if (!$feedId || !$submissionId) {
     688            die(esc_html__('Sorry! No feed found', 'fluentforms-pdf'));
     689        }
    619690        $feed = wpFluent()->table('fluentform_form_meta')
    620691            ->where('id', $feedId)
     
    635706
    636707        if (!isset($templates[$templateName])) {
    637             die(__('Sorry! No template found', 'fluentform-pdf'));
     708            die(esc_html__('Sorry! No template found', 'fluentforms-pdf'));
    638709        }
    639710
     
    642713        $class = $template['class'];
    643714        if (!class_exists($class)) {
    644             die(__('Sorry! No template class found', 'fluentform-pdf'));
     715            die(esc_html__('Sorry! No template class found', 'fluentforms-pdf'));
    645716        }
    646717
     
    740811            if (is_wp_error($res)) {
    741812                wp_send_json_error([
    742                     'message' => __('Font Download failed. Please reload and try again', 'fluentform-pdf')
     813                    'message' => __('Font Download failed. Please reload and try again', 'fluentforms-pdf')
    743814                ], 423);
    744815            }
     
    760831            'mbstring' => [
    761832                'status' => $mbString,
    762                 'label' => ($mbString) ? __('MBString is enabled', 'fluentform-pdf') : __('The PHP Extension MB String could not be detected. Contact your web hosting provider to fix.', 'fluentform-pdf')
     833                'label' => ($mbString) ? __('MBString is enabled', 'fluentforms-pdf') : __('The PHP Extension MB String could not be detected. Contact your web hosting provider to fix.', 'fluentforms-pdf')
    763834            ],
    764835            'mb_regex_encoding' => [
    765836                'status' => $mbRegex,
    766                 'label' => ($mbRegex) ? __('MBString Regex is enabled', 'fluentform-pdf') : __('The PHP Extension MB String does not have MB Regex enabled. Contact your web hosting provider to fix.', 'fluentform-pdf')
     837                'label' => ($mbRegex) ? __('MBString Regex is enabled', 'fluentforms-pdf') : __('The PHP Extension MB String does not have MB Regex enabled. Contact your web hosting provider to fix.', 'fluentforms-pdf')
    767838            ],
    768839            'gd' => [
    769840                'status' => $gd,
    770                 'label' => ($gd) ? __('GD Library is enabled', 'fluentform-pdf') : __('The PHP Extension GD Image Library could not be detected. Contact your web hosting provider to fix.', 'fluentform-pdf')
     841                'label' => ($gd) ? __('GD Library is enabled', 'fluentforms-pdf') : __('The PHP Extension GD Image Library could not be detected. Contact your web hosting provider to fix.', 'fluentforms-pdf')
    771842            ],
    772843            'dom' => [
    773844                'status' => $dom,
    774                 'label' => ($dom) ? __('PHP Dom is enabled', 'fluentform-pdf') : __('The PHP DOM Extension was not found. Contact your web hosting provider to fix.', 'fluentform-pdf')
     845                'label' => ($dom) ? __('PHP Dom is enabled', 'fluentforms-pdf') : __('The PHP DOM Extension was not found. Contact your web hosting provider to fix.', 'fluentforms-pdf')
    775846            ],
    776847            'libXml' => [
    777848                'status' => $libXml,
    778                 'label' => ($libXml) ? __('LibXml is OK', 'fluentform-pdf') : __('The PHP Extension libxml could not be detected. Contact your web hosting provider to fix', 'fluentform-pdf')
     849                'label' => ($libXml) ? __('LibXml is OK', 'fluentforms-pdf') : __('The PHP Extension libxml could not be detected. Contact your web hosting provider to fix', 'fluentforms-pdf')
    779850            ]
    780851        ];
     
    813884                        if ($file->isReadable() && $file->getMTime() < $max_file_age) {
    814885                            if (!$file->isDir()) {
    815                                 unlink($file);
     886                                wp_delete_file($file);
    816887                            }
    817888                        }
     
    842913       
    843914        $shortCodes[] = [
    844             'title' => __('PDF', 'fluentform-pdf'),
     915            'title' => __('PDF', 'fluentforms-pdf'),
    845916            'shortcodes' => $feedShortCodes
    846917        ];
     
    885956
    886957        if (!is_user_logged_in()) {
    887             $message = __('Sorry! You have to login first.', 'fluentform-pdf');
     958            $message = __('Sorry! You have to login first.', 'fluentforms-pdf');
    888959           
    889960            wp_send_json_error([
     
    895966
    896967        if (!$hasPermission) {
    897             $submissionId = intval($_REQUEST['submission_id']);
    898 
    899             $submission = wpFluent()->table('fluentform_submissions')
    900                                     ->where('id', $submissionId)
    901                                     ->where('user_id', get_current_user_id())
    902                                     ->first();
     968            // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified previously
     969            $submissionId = isset($_REQUEST['submission_id']) ? intval($_REQUEST['submission_id']) : 0;
     970            $submission = null;
     971            if ($submissionId) {
     972                $submission = wpFluent()->table('fluentform_submissions')
     973                    ->where('id', $submissionId)
     974                    ->where('user_id', get_current_user_id())
     975                    ->first();
     976            }
    903977
    904978            if (!$submission) {
    905                 $message = __("You don't have permission to download the PDF.", 'fluentform-pdf');
     979                $message = __("You don't have permission to download the PDF.", 'fluentforms-pdf');
    906980               
    907981                wp_send_json_error([
     
    9351009    public function downloadPublic()
    9361010    {
    937         $feedId = intval(Protector::decrypt(base64_decode($_REQUEST['id'])));
    938         $submissionId = intval(Protector::decrypt(base64_decode($_REQUEST['submission_id'])));
     1011        // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified previously
     1012        $feedId = isset($_REQUEST['id']) ? intval(Protector::decrypt(base64_decode($_REQUEST['id']))) : 0;
     1013        // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified previously
     1014        $submissionId = isset($_REQUEST['submission_id']) ? intval(Protector::decrypt(base64_decode($_REQUEST['submission_id']))) : 0;
    9391015
    9401016        $_REQUEST['id'] = $feedId;
  • fluentforms-pdf/trunk/Classes/Report/ReportPdfGenerator.php

    r3353753 r3404124  
    152152            } catch (\Exception $e) {
    153153                // Log error but continue with other components
    154                 error_log("PDF Report component '{$component}' failed: " . $e->getMessage());
     154                if (defined('WP_DEBUG') && WP_DEBUG) {
     155                    // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- Debug logging only when WP_DEBUG is enabled
     156                    error_log("PDF Report component '{$component}' failed: " . $e->getMessage());
     157                }
    155158            }
    156159        }
     
    191194
    192195        // Format dates for display
     196        // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- not performing any date operations
    193197        $startDateFormatted = date('M j, Y', strtotime($startDate));
     198        // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- not performing any date operations
    194199        $endDateFormatted = date('M j, Y', strtotime($endDate));
    195200
     
    791796
    792797        // Set document properties
     798        // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- not performing any date operations
    793799        $fileName = apply_filters('fluentform/report_pdf_filename', 'fluent-forms-report-' . date('Y-m-d'), $startDate, $endDate);
    794800        $title = apply_filters('fluentform/report_pdf_title', 'Fluent Forms Comprehensive Report');
     
    900906            if (in_array($downloadableFont['name'], $essentialFonts)) {
    901907                $result = $fontManager->download($downloadableFont['name']);
    902                 if (is_wp_error($result)) {
     908                if (is_wp_error($result) && defined('WP_DEBUG') && WP_DEBUG) {
    903909                    // Log error but continue - font substitution should handle this
     910                    // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- Debug logging only when WP_DEBUG is enabled
    904911                    error_log('FluentForms PDF: Failed to download font ' . $downloadableFont['name'] . ': ' . $result->get_error_message());
    905912                }
  • fluentforms-pdf/trunk/Classes/Templates/GeneralTemplate.php

    r3239135 r3404124  
    3636            [
    3737                'key'       => 'header',
    38                 'label'     => __('Header Content', 'fluentform-pdf'),
    39                 'tips'      => __('Write your header content which will be shown every page of the PDF', 'fluentform-pdf'),
     38                'label'     => __('Header Content', 'fluentforms-pdf'),
     39                'tips'      => __('Write your header content which will be shown every page of the PDF', 'fluentforms-pdf'),
    4040                'component' => 'wp-editor'
    4141            ],
    4242            [
    4343                'key'        => 'body',
    44                 'label'      => __('PDF Body Content', 'fluentform-pdf'),
    45                 'tips'       => __('Write your Body content for actual PDF body', 'fluentform-pdf'),
     44                'label'      => __('PDF Body Content', 'fluentforms-pdf'),
     45                'tips'       => __('Write your Body content for actual PDF body', 'fluentforms-pdf'),
    4646                'component'  => 'wp-editor',
    4747                'inline_tip' => defined('FLUENTFORMPRO') ?
    48                     sprintf(__('You can use Conditional Content in PDF body, for details please check this %s. ',
    49                         'fluentform-pdf'),
    50                         '<a target="_blank" href="https://wpmanageninja.com/docs/fluent-form/advanced-features-functionalities-in-wp-fluent-form/conditional-shortcodes-in-email-notifications-form-confirmation/">Documentation</a>') : __('Conditional PDF Body Content is supported in Fluent Forms Pro Version',
    51                         'fluentform-pdf'),
    52 
     48                    sprintf('%1$s %2$s.',
     49                        __('You can use Conditional Content in PDF body, for details please check this', 'fluentforms-pdf'),
     50                        '<a target="_blank" href="https://wpmanageninja.com/docs/fluent-form/advanced-features-functionalities-in-wp-fluent-form/conditional-shortcodes-in-email-notifications-form-confirmation/">Documentation</a>'
     51                    )
     52                    : __('Conditional PDF Body Content is supported in Fluent Forms Pro Version', 'fluentforms-pdf'),
    5353            ],
    5454            [
    5555                'key'        => 'footer',
    56                 'label'      => __('Footer Content', 'fluentform-pdf'),
    57                 'tips'       => __('Write your Footer content which will be shown every page of the PDF', 'fluentform-pdf'),
     56                'label'      => __('Footer Content', 'fluentforms-pdf'),
     57                'tips'       => __('Write your Footer content which will be shown every page of the PDF', 'fluentforms-pdf'),
    5858                'component'  => 'wp-editor',
    59                 'inline_tip' => __('Write your Footer content which will be shown every page of the PDF', 'fluentform-pdf'),
     59                'inline_tip' => __('Write your Footer content which will be shown every page of the PDF', 'fluentforms-pdf'),
    6060
    6161            ]
  • fluentforms-pdf/trunk/Classes/Templates/InvoiceTemplate.php

    r3239135 r3404124  
    3636            [
    3737                'key' => 'logo',
    38                 'label' => __('Business Logo', 'fluentform-pdf'),
    39                 'tips' => __('Your Business Logo which will be shown in the invoice header', 'fluentform-pdf'),
     38                'label' => __('Business Logo', 'fluentforms-pdf'),
     39                'tips' => __('Your Business Logo which will be shown in the invoice header', 'fluentforms-pdf'),
    4040                'component' => 'image_widget'
    4141            ],
    4242            [
    4343                'key' => 'customer_name',
    44                 'label' => __('Customer Name', 'fluentform-pdf'),
    45                 'tips' => __('Please select the customer name field from the smartcode dropdown', 'fluentform-pdf'),
     44                'label' => __('Customer Name', 'fluentforms-pdf'),
     45                'tips' => __('Please select the customer name field from the smartcode dropdown', 'fluentforms-pdf'),
    4646                'component' => 'value_text'
    4747            ],
    4848            [
    4949                'key' => 'customer_email',
    50                 'label' => __('Customer Email', 'fluentform-pdf'),
    51                 'tips' => __('Please select the customer email field from the smartcode dropdown', 'fluentform-pdf'),
     50                'label' => __('Customer Email', 'fluentforms-pdf'),
     51                'tips' => __('Please select the customer email field from the smartcode dropdown', 'fluentforms-pdf'),
    5252                'component' => 'value_text'
    5353            ],
    5454            [
    5555                'key' => 'customer_address',
    56                 'label' => __('Customer Address', 'fluentform-pdf'),
    57                 'tips' => __('Please select the customer address field from the smartcode dropdown', 'fluentform-pdf'),
     56                'label' => __('Customer Address', 'fluentforms-pdf'),
     57                'tips' => __('Please select the customer address field from the smartcode dropdown', 'fluentforms-pdf'),
    5858                'component' => 'value_text'
    5959            ],
    6060            [
    6161                'key' => 'invoice_prefix',
    62                 'label' => __('Invoice Prefix', 'fluentform-pdf'),
    63                 'tips' => __('Add your invoice prefix which will be prepended with the invoice number', 'fluentform-pdf'),
     62                'label' => __('Invoice Prefix', 'fluentforms-pdf'),
     63                'tips' => __('Add your invoice prefix which will be prepended with the invoice number', 'fluentforms-pdf'),
    6464                'component' => 'value_text'
    6565            ],
    6666            [
    6767                'key' => 'invoice_upper_text',
    68                 'label' => __('Invoice Body Text', 'fluentform-pdf'),
    69                 'tips' => __('Write Invoice body text. This will show before the invoice items', 'fluentform-pdf'),
     68                'label' => __('Invoice Body Text', 'fluentforms-pdf'),
     69                'tips' => __('Write Invoice body text. This will show before the invoice items', 'fluentforms-pdf'),
    7070                'component' => 'wp-editor'
    7171            ],
    7272            [
    7373                'key' => 'invoice_thanks',
    74                 'label' => __('Invoice Footer Text', 'fluentform-pdf'),
    75                 'tips' => __('Write Invoice Footer Text. This will show at the end of the invoice', 'fluentform-pdf'),
     74                'label' => __('Invoice Footer Text', 'fluentforms-pdf'),
     75                'tips' => __('Write Invoice Footer Text. This will show at the end of the invoice', 'fluentforms-pdf'),
    7676                'component' => 'value_textarea'
    7777            ]
     
    155155                    <?php if($paymentSettings): ?>
    156156                    <div class="business_address">
    157                         <div class="business_name"><?php echo fluentform_sanitize_html(Arr::get($paymentSettings, 'business_name')); ?></div>
    158                         <div class="business_address"><?php echo fluentform_sanitize_html(Arr::get($paymentSettings, 'business_address')); ?></div>
     157                        <div class="business_name"><?php echo fluentform_sanitize_html(Arr::get($paymentSettings, 'business_name')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags?></div>
     158                        <div class="business_address"><?php echo fluentform_sanitize_html(Arr::get($paymentSettings, 'business_address')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></div>
    159159                    </div>
    160160                    <?php endif; ?>
     
    163163                <td style="width: 40%" class="customer_row">
    164164                    <?php if(Arr::get($settings, 'invoice_prefix')): ?>
    165                         <h2 style="padding-bottom: 30px" class="invoice_title"><?php _e('RECEIPT:', 'fluentform-pdf');?> <?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_prefix')).'-'.$submission->serial_number; ?></h2>
     165                        <h2 style="padding-bottom: 30px" class="invoice_title"><?php esc_html_e('RECEIPT:', 'fluentforms-pdf');?> <?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_prefix')).'-' . esc_html($submission->serial_number); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></h2>
    166166                        <br/>
    167167                    <?php endif; ?>
    168168
    169169                    <div  class="heading_items">
    170                         <div class="order_number"><b><?php _e('Order Number:', 'fluentform-pdf'); ?></b> <?php echo fluentform_sanitize_html($submission->id); ?></div>
    171                         <div class="payment_date"><b><?php _e('Payment Date:', 'fluentform-pdf'); ?></b> <?php echo fluentform_sanitize_html(date(get_option( 'date_format' ), strtotime($submission->created_at))); ?></div>
     170                        <div class="order_number"><b><?php esc_html_e('Order Number:', 'fluentforms-pdf'); ?></b> <?php echo fluentform_sanitize_html($submission->id); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></div>
     171                        <div class="payment_date"><b><?php esc_html_e('Payment Date:', 'fluentforms-pdf'); ?></b> <?php echo fluentform_sanitize_html(date(get_option( 'date_format' ), strtotime($submission->created_at))); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date, WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></div>
    172172                        <br />
    173173                        <div class="customer_details">
    174174                            <?php if(Arr::get($settings, 'customer_name') || Arr::get($settings, 'customer_address') || Arr::get($settings, 'customer_email')): ?>
    175                                 <p style="font-weight: bold; margin-bottom:10px;" class="customer_heading"><?php _e('Customer Details', 'fluentform-pdf'); ?></p>
    176                                 <p class="customer_name"><?php echo fluentform_sanitize_html(Arr::get($settings, 'customer_name')); ?></p>
    177                                 <p class="customer_address"><?php echo fluentform_sanitize_html(Arr::get($settings, 'customer_address')); ?></p>
    178                                 <p class="customer_email"><?php echo fluentform_sanitize_html(Arr::get($settings, 'customer_email')); ?></p>
     175                                <p style="font-weight: bold; margin-bottom:10px;" class="customer_heading"><?php esc_html_e('Customer Details', 'fluentforms-pdf'); ?></p>
     176                                <p class="customer_name"><?php echo fluentform_sanitize_html(Arr::get($settings, 'customer_name')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></p>
     177                                <p class="customer_address"><?php echo fluentform_sanitize_html(Arr::get($settings, 'customer_address')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></p>
     178                                <p class="customer_email"><?php echo fluentform_sanitize_html(Arr::get($settings, 'customer_email')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></p>
    179179                            <?php endif; ?>
    180180                        </div>
     
    184184        </table>
    185185        <hr />
    186         <div class="receipt_upper_text"><?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_upper_text')); ?></div>
    187 
    188         <div class="invoice_lines"><?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_lines')); ?></div>
     186        <div class="receipt_upper_text"><?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_upper_text')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></div>
     187
     188        <div class="invoice_lines"><?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_lines')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?></div>
    189189       
    190190        <?php if (strpos(Arr::get($settings, 'payment_summary'), 'class="ffp_payment_info_table"') !== false): ?>
    191191            <div class="invoice_summary">
    192                 <h3><?php _e('Payment Details', 'fluentform-pdf');?></h3>
    193                 <?php echo fluentform_sanitize_html(Arr::get($settings, 'payment_summary')); ?>
     192                <h3><?php esc_html_e('Payment Details', 'fluentforms-pdf');?></h3>
     193                <?php echo fluentform_sanitize_html(Arr::get($settings, 'payment_summary')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?>
    194194            </div>
    195195        <?php endif;?>
    196196
    197197        <div class="invoice_thanks">
    198             <?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_thanks')); ?>
     198            <?php echo fluentform_sanitize_html(Arr::get($settings, 'invoice_thanks')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fluentform_sanitize_html() removes XSS vectors and uses wp_kses() with allowed tags ?>
    199199        </div>
    200200        <style>
  • fluentforms-pdf/trunk/Classes/Templates/TemplateManager.php

    r3353753 r3404124  
    167167                $pdfGenerator->SetWatermarkImage($appearance['watermark_image'], $alpha, $watermarkImageSize, $watermarkImagePosition);
    168168
    169                 if( Arr::isTrue($appearance, 'watermark_img_behind' )){
     169                if (Arr::isTrue($appearance, 'watermark_img_behind' )){
    170170                    $pdfGenerator->watermarkImgBehind = true;
    171171                }
     
    208208        ?>
    209209        .ff_pdf_wrapper, p, li, td, th {
    210         color: <?php echo $mainColor; ?>;
    211         font-size: <?php echo $fontSize; ?>px;
     210        color: <?php echo esc_attr($mainColor); ?>;
     211        font-size: <?php echo esc_attr($fontSize); ?>px;
    212212        }
    213213
     
    215215        empty-cells: show;
    216216        border-collapse: collapse;
    217         border: 1px solid <?php echo $secondaryColor; ?>;
     217        border: 1px solid <?php echo esc_attr($secondaryColor); ?>;
    218218        width: 100%;
    219         color: <?php echo $mainColor; ?>;
     219        color: <?php echo esc_attr($mainColor); ?>;
    220220        }
    221221        hr {
    222         color: <?php echo $secondaryColor; ?>;
    223         background-color: <?php echo $secondaryColor; ?>;
     222        color: <?php echo esc_attr($secondaryColor); ?>;
     223        background-color: <?php echo esc_attr($secondaryColor); ?>;
    224224        }
    225225        h1, h2, h3, h4, h5, h6 {
    226         color: <?php echo $headingColor; ?>;
     226        color: <?php echo esc_attr($headingColor); ?>;
    227227        }
    228228        .ff_all_data th {
    229         border-bottom: 1px solid <?php echo $secondaryColor; ?>;
    230         border-top: 1px solid <?php echo $secondaryColor; ?>;
     229        border-bottom: 1px solid <?php echo esc_attr($secondaryColor); ?>;
     230        border-top: 1px solid <?php echo esc_attr($secondaryColor); ?>;
    231231        padding-bottom: 10px !important;
    232232        }
     
    238238
    239239        .ff_all_data tr td, .ff_all_data tr th {
    240         border: 1px solid <?php echo $secondaryColor; ?>;
     240        border: 1px solid <?php echo esc_attr($secondaryColor); ?>;
    241241        text-align: left;
    242242        }
     
    279279            'Use fluentform/pdf_generator_css instead of fluentform_pdf_generator_css.'
    280280        );
    281         return apply_filters('fluentform/pdf_generator_css', $css, $appearance);
     281        return apply_filters('fluentform/pdf_generator_css', $pdfGeneratorCss, $appearance);
    282282    }
    283283
  • fluentforms-pdf/trunk/assets/views/admin_screen.php

    r3353753 r3404124  
    33<?php if(count($downloadableFiles)): ?>
    44<div  class="font_downloader_wrapper text-center">
    5     <img class="mb-3" src="<?= FLUENTFORM_PDF_URL . 'assets/images/pdf-img.png'; ?>" alt="">
    6     <h3 class="mb-2"><?php echo __('Fonts are required for PDF Generation', 'fluentform-pdf') ?></h3>
    7     <p class="mb-4"><?php echo __('This module requires to download fonts for PDF generation. Please click on the below button and it will download the required font files. This is one time job', 'fluentform-pdf') ?></p>
     5    <img class="mb-3" src="<?php echo esc_url(FLUENTFORM_PDF_URL . 'assets/images/pdf-img.png'); ?>" alt="">
     6    <h3 class="mb-2"><?php echo esc_html__('Fonts are required for PDF Generation', 'fluentforms-pdf') ?></h3>
     7    <p class="mb-4"><?php echo esc_html__('This module requires to download fonts for PDF generation. Please click on the below button and it will download the required font files. This is one time job', 'fluentforms-pdf') ?></p>
    88    <button id="ff_download_fonts" class="el-button el-button--primary">
    99        <span class="ff_download_fonts_bar"></span>
    10         <span class="ff_download_fonts_text"><?php echo __('Install Fonts', 'fluentform-pdf') ?></span>
     10        <span class="ff_download_fonts_text"><?php echo esc_html__('Install Fonts', 'fluentforms-pdf') ?></span>
    1111    </button>
    1212    <div class="ff_download_loading mt-3"></div>
     
    1616
    1717<div class="ff_pdf_system_status">
    18     <h3 class="mb-3"><?php echo __('Fluent Forms PDF Module is now active', 'fluentform-pdf') ?> <?php if(!$statuses['status']): ?><span style="color: red;"><?php echo __('But Few Server Extensions are missing', 'fluentform-pdf') ?></span><?php endif; ?></h3>
     18    <h3 class="mb-3"><?php echo esc_html__('Fluent Forms PDF Module is now active', 'fluentforms-pdf') ?> <?php if(!$statuses['status']): ?><span style="color: red;"><?php echo esc_html__('But Few Server Extensions are missing', 'fluentforms-pdf') ?></span><?php endif; ?></h3>
    1919    <ul>
    2020        <?php foreach ($statuses['extensions'] as $status): ?>
     
    2222            <?php if($status['status']): ?><span class="dashicons dashicons-yes"></span>
    2323            <?php else: ?><span class="dashicons dashicons-no-alt"></span><?php endif; ?>
    24             <?php echo $status['label']; ?>
     24            <?php echo esc_html($status['label']); ?>
    2525        </li>
    2626        <?php endforeach; ?>
     
    2828
    2929    <?php if($statuses['status']): ?>
    30     <p><?php echo __('All Looks good! You can now use Fluent Forms PDF Addon.', 'fluentform-pdf') ?> <a href="<?php echo $globalSettingsUrl; ?>"><?php echo __('Click Here', 'fluentform-pdf') ?></a> <?php echo __(' to check your global PDF feed settings', 'fluentform-pdf') ?></p>
     30    <p><?php echo esc_html__('All Looks good! You can now use Fluent Forms PDF Addon.', 'fluentforms-pdf') ?> <a href="<?php echo esc_url($globalSettingsUrl); ?>"><?php echo esc_html__('Click Here', 'fluentforms-pdf') ?></a> <?php echo esc_html__(' to check your global PDF feed settings', 'fluentforms-pdf') ?></p>
    3131    <?php endif; ?>
    3232</div>
  • fluentforms-pdf/trunk/fluentforms-pdf.php

    r3353753 r3404124  
    66 * Author: WPManageNinja LLC
    77 * Author URI:  https://wpmanageninja.com
    8  * Version: 1.1.10
    9  * Text Domain: fluentform-pdf
     8 * Version: 1.1.11
     9 * Text Domain: fluentforms-pdf
    1010 * Domain Path: /assets/languages
     11 * License: GPLv2 or later
    1112 */
    1213
     
    3031
    3132defined('ABSPATH') or die;
    32 define('FLUENTFORM_PDF_VERSION', '1.1.10');
     33define('FLUENTFORM_PDF_VERSION', '1.1.11');
    3334define('FLUENTFORM_PDF_PATH', plugin_dir_path(__FILE__));
    3435define('FLUENTFORM_PDF_URL', plugin_dir_url(__FILE__));
     
    8283            $class = 'notice notice-error';
    8384
    84             $install_url_text = __('Click Here to Install the Plugin', 'fluentform-pdf');
     85            $install_url_text = __('Click Here to Install the Plugin', 'fluentforms-pdf');
    8586
    8687            if ($pluginInfo->action == 'activate') {
    87                 $install_url_text = __('Click Here to Activate the Plugin', 'fluentform-pdf');
     88                $install_url_text = __('Click Here to Activate the Plugin', 'fluentforms-pdf');
    8889            }
    8990
    90             $message = __('FluentForm pdf Add-On Requires Fluent Forms Plugin, ', 'fluentform-pdf');
     91            $message = __('FluentForm pdf Add-On Requires Fluent Forms Plugin, ', 'fluentforms-pdf');
    9192            $message .= '<b><a href="' .$pluginInfo->url . '">' . $install_url_text . '</a></b>';
    9293
     
    125126
    126127add_action('plugins_loaded', function () {
    127 
    128     load_plugin_textdomain(
    129         'fluentform-pdf', false, basename(dirname(__FILE__)) . 'assets/languages'
    130     );
    131 
    132128    (new FluentFormPdf())->boot();
    133129});
  • fluentforms-pdf/trunk/readme.txt

    r3353753 r3404124  
    1 === PDF Generator For Fluent Forms - The Contact Form Plugin ===
     1=== Fluent Forms PDF Generator ===
    22Contributors: techjewel,adreastrian,heera,wpmanageninja,hasanuzzamanshamim
    33Tags: PDF, Form To PDF, attachment, fluent forms
    44Requires at least: 5.0
    5 Tested up to: 6.7.1
     5Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.1.10
     7Stable tag: 1.1.11
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4343== Changelog ==
    4444
    45 = 1.1.10 - Sep 1, 2024 =
     45= 1.1.11 - Nov 27, 2025 =
     46- Fix plugin check reported issues
     47
     48= 1.1.10 - Sep 1, 2025 =
    4649- Updated MPDF library
    4750- Add support for Fluent Forms Report Download
Note: See TracChangeset for help on using the changeset viewer.