From e748810665accdb9cce865b909f1244683af59c2 Mon Sep 17 00:00:00 2001 From: Kenda <11087917+kendafi@users.noreply.github.com> Date: Wed, 8 Jan 2020 15:22:18 +0200 Subject: [PATCH] Attachment link fix $value contains the whole path as seen in the textarea. "Open link" href looked like /home/customer/public/wp-content/uploads/filename.jpg. Defined variable $home_path was not used anywhere. It contains the /home/customer/public/ part. We replace that with a slash in links and now links to uploaded files seem to work fine. --- classes/class-cpt-wplf-submission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/class-cpt-wplf-submission.php b/classes/class-cpt-wplf-submission.php index 0c41fe6..8db6e17 100644 --- a/classes/class-cpt-wplf-submission.php +++ b/classes/class-cpt-wplf-submission.php @@ -278,7 +278,7 @@ public function metabox_submission() { } if ( $value_is_url ) { $link_text = __( 'Open Link', 'wp-libre-form' ); - $possible_link = '' . $link_text . ''; + $possible_link = '' . $link_text . ''; } ?>