[Plugin: VoucherPress] Hardcoded wp-content path
-
I see that you’ve kinda hardcoded the path to
wp-content
invoucherpress.php
like so:ABSPATH . "/wp-content/plugins/voucherpress/templates/"
Now that’s bad practice. What if someone has their wp-content directory renamed to something like
data
. The plugin will break, telling you that/wp-content/plugins/voucherpress/templates/
is not writable. Therefore I suggest you code all your paths this way:WP_PLUGIN_DIR . "/voucherpress/templates/"
This won’t break when the
wp-content
dir name has been changed. ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: VoucherPress] Hardcoded wp-content path’ is closed to new replies.