Hi,
There should be no major differences between Windows / Linux, aside from the usual path discrepancies (Linux using forward slashes in the path, while Windows uses back slashes). What exactly in the v5 documentation for gfpdf_tmp_location appears outdated?
Thread Starter
cwolff
(@cwolff)
Thanks Jake,
The code in our Model_Install.php is different than that in the documentation.
/* See https://gravitypdf.com/documentation/v5/gfpdf_tmp_location/ for more details about this filter */
$this->data->template_tmp_location = apply_filters( 'gfpdf_tmp_location', $this->data->template_location . 'tmp/', $working_folder, $upload_dir_url ); /* encouraged to move this to a directory not accessible via the web */
Maybe I am not understanding. Do I need to add the filter code from the documentation to my functions.php?
Thank you for this plugin, by the way, we use it extensively.
Yes, it’s supposed to be different. Model_Install.php
is where the filter gfpdf_tmp_location
gets called. The examples in our documentation is how you can manipulate/replace the tmp location path.
Usually you would add a modified version of the example code in a child theme’s functions.php file (but it can go elsewhere, like custom plugins or mu-plugins).
Here’s a great read for non-developers about what WordPress Actions / Filters / Hooks are, and how to use them: https://docs.presscustomizr.com/article/26-wordpress-actions-filters-and-hooks-a-guide-for-non-developers