gravity-pdf
gravity-pdf copied to clipboard
Process Background Image merge tag
Description
This PR should solve the issue #1406.
- I have added
$form
and$entry
to View_PDF'sload_core_template_styles
method. This will enable us to useprocess_tags
. - Added an
if
statement that checks if the background-image value contains an merge tag before proceeding.
#1406
Testing instructions
- Setup a Core PDF on the form
- In the Background Image setting insert a URL to an image in the media library
- Add a merge tag to the image URL
- View the PDF and append URL with ?html=1
- View the page source and see the merge tag was not correctly converted to the associated value
Screenshots
Checklist:
- [x] I've tested the code.
- [x] My code is easy to read, follow, and understand
- [x] My code follows the accessibility standards.
- [ ] My code has proper inline documentation / docblocks.
Additional Comments
Codecov Report
Merging #1407 (dee8bfa) into development (55049ad) will decrease coverage by
0.95%
. The diff coverage is100.00%
.
:exclamation: Current head dee8bfa differs from pull request most recent head 9d5879f. Consider uploading reports for the commit 9d5879f to get more accurate results
@@ Coverage Diff @@
## development #1407 +/- ##
=================================================
- Coverage 78.29% 77.34% -0.96%
+ Complexity 2901 2900 -1
=================================================
Files 243 243
Lines 10118 10108 -10
Branches 370 370
=================================================
- Hits 7922 7818 -104
- Misses 2188 2282 +94
Partials 8 8
Impacted Files | Coverage Δ | |
---|---|---|
src/View/View_PDF.php | 79.87% <100.00%> (+0.12%) |
:arrow_up: |
src/View/html/PDF/core_template_styles.php | 98.00% <100.00%> (ø) |
|
src/Helper/Fields/Field_Form.php | 0.00% <0.00%> (-89.37%) |
:arrow_down: |
src/Helper/Fields/Field_Option.php | 41.86% <0.00%> (-58.14%) |
:arrow_down: |
src/Helper/Fields/Field_Product.php | 64.00% <0.00%> (-36.00%) |
:arrow_down: |
src/Helper/Fields/Field_Total.php | 60.86% <0.00%> (-30.44%) |
:arrow_down: |
src/Helper/Fields/Field_Quantity.php | 71.42% <0.00%> (-28.58%) |
:arrow_down: |
src/Helper/Fields/Field_Shipping.php | 65.38% <0.00%> (-26.93%) |
:arrow_down: |
src/Helper/Helper_Field_Container_Gf25.php | 84.00% <0.00%> (-6.00%) |
:arrow_down: |
src/Helper/Fields/Field_Quiz.php | 88.88% <0.00%> (-2.78%) |
:arrow_down: |
... and 2 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Hi @jakejackson1 , this pr is now ready for review. Thank you.
Thanks for the feedback @jakejackson1, added this on my today's list.
I have applied the requested changes @jakejackson1 , kindly review this pr please.