Last active
September 18, 2024 06:22
-
-
Save wpmudev-sls/5582e249dc0cd4a7bd36732b2179708a to your computer and use it in GitHub Desktop.
[Forminator Pro] - Display group fields inline inside the PDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: [Forminator Pro] Group field display inline inside the PDF | |
* Description: Group field display inline inside the PDF. | |
* Author: Prashant @ WPMUDEV | |
* Task: SLS-6457 | |
* Author URI: https://premium.wpmudev.org | |
* License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
add_filter( | |
'forminator_pdf_basic_template_markup', | |
function ( $html, $pdf_settings, $form_id, $entry_id ) { | |
if ( 2960 !== intval( $form_id ) ) { // Please change 2960 to your form ID. | |
return $html; | |
} | |
$html = str_replace( '</b><br />', '</b> ', $html ); | |
return $html; | |
}, | |
10, | |
4 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment