WP_CONTENT_DIR instead of ABSPATH
-
Hi Guys,
We are working with a trellis/roots WordPress setup, Using ABSPATH would not return the correct directory so I suggest you could use WP_CONTENT_DIR instead.
I’ve made the following changes to the plugin to make it work (should work correct on normal instals, but better test it ?? ). Please let me know if this is an acceptable request, we would like to get the pulgin updates in the future.
Thank You!Regard,
Pim Plaatsman// Replaced in SECTION.PHP And BODY.PHP
ABSPATH . $this->get_dir() WP_CONTENT_DIR . $this->get_dir()
// changed the $dir by removing “/wp” in SECTION.PHP:454 –
public function get_dir() { $dir = '/cache'; if ( is_multisite() ) { $site = (array)get_site(); $dir .= '/' . $site['site_id'] . '/' . $site['blog_id']; } $dir .= '/scripts'; return trailingslashit( apply_filters( static::class . '\Dir', $dir ) ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_CONTENT_DIR instead of ABSPATH’ is closed to new replies.