{"id":9298609,"date":"2017-07-07T13:31:41","date_gmt":"2017-07-07T13:31:41","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/code-amends\/"},"modified":"2017-07-07T13:32:14","modified_gmt":"2017-07-07T13:32:14","slug":"code-amends","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/code-amends\/","title":{"rendered":"Code amends"},"content":{"rendered":"<p>Hello,<\/p>\n<p>Just trying out the plugin and it looks good.<\/p>\n<p>I have spotted an issue with the code whereby the default location is wrong &#8211; at least on my setup.<\/p>\n<p>Replace:<\/p>\n<p>\t\/\/ prefix with default location<br \/>\n\t$default_upload_path = str_replace( ABSPATH, &#8216;\/&#8217;, WP_CONTENT_DIR );<\/p>\n<p>With:<\/p>\n<p>\t\/\/ prefix with default location<br \/>\n\t$upload_dir = wp_upload_dir();<br \/>\n\t$default_upload_path = str_replace( ABSPATH, &#8216;\/&#8217;, $upload_dir[&#8216;basedir&#8217;] );<\/p>\n<p>Cheers \ud83d\ude42<\/p>\n","protected":false},"template":"","class_list":["post-9298609","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9298609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9298609\/revisions"}],"predecessor-version":[{"id":9298610,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9298609\/revisions\/9298610"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=9298609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}