From 5ebad545add9f7da8e4f0b7a9e3e8be70f102e89 Mon Sep 17 00:00:00 2001 From: Konrad Karpieszuk Date: Wed, 27 Jun 2018 00:05:36 +0200 Subject: [PATCH] Plugin ready --- rips_hotfix.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 rips_hotfix.php diff --git a/rips_hotfix.php b/rips_hotfix.php new file mode 100644 index 0000000..9296442 --- /dev/null +++ b/rips_hotfix.php @@ -0,0 +1,17 @@ +Ripstech blogpost for details. +Author: Konrad Karpieszuk, but code creds go to Ripstech +Version: 0.1 +*/ + +add_filter( 'wp_update_attachment_metadata', 'rips_unlink_tempfix' ); + +function rips_unlink_tempfix( $data ) { + if( isset($data['thumb']) ) { + $data['thumb'] = basename($data['thumb']); + } + + return $data; +} \ No newline at end of file