Zbynek Nedoma
Forum Replies Created
-
Yes, I completely understand. Thank you again.
- This reply was modified 2 years, 10 months ago by Zbynek Nedoma.
Oh ok, I thought that the settings will be still same until somebody changes the filter. Then he needs to know what he is doing and how to change htaccess file and Nginx configuration correctly.
But it is your plugin and you know what is best for it :). Thank you or your time.
By the way, the plugin is awesome
@mateuszgbiorczyk That is why I was asking, if you can add a filter there, which I can overide.
With my setup /uploads-webpc can be in /uploads folder.
If you change
$output_path = str_replace( realpath( $uploads_root ) ?: '', '', realpath( $path ) ?: '' );
to something like this
$output_path = apply_filters( 'webpc_output_path', str_replace( realpath( $uploads_root ) ?: '', '', realpath( $path ) ?: '' ), $uploads_root, $path);
I can then write my filter, that will look like this and it is working fine.
add_filter('webpc_output_path', function ($output_path, $uploads_root, $path) { if (strpos($output_path,'/themes/') !== false) { $output_path = str_replace('/srv/www/test.com/current/web/app/', '', $output_path); } return $output_path; }, 10, 3);
Hi,
thank you for the quick answer. Yes I read it, but you have there a noteNote that the /uploads-webpc directory must be at the same nesting level as the /uploads, /plugins and /themes directories.
But my setup is not following that. My /uploads-webpc directory is in /uploads directory.
I am not sure, how
webpc_dir_path
can help me with that.Sorry if I don’t understand something correctly ??
- This reply was modified 2 years, 10 months ago by Zbynek Nedoma.
- This reply was modified 2 years, 10 months ago by Zbynek Nedoma.
- This reply was modified 2 years, 10 months ago by Zbynek Nedoma.