Support » Plugin: Piwik PRO Tag Manager Integration » WP_CONTENT_DIR instead of ABSPATH

  • Resolved pimplaatsman


    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!

    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 ) );
    • This topic was modified 5 years, 1 month ago by pimplaatsman.
Viewing 1 replies (of 1 total)
  • Plugin Author Piwik PRO


    Hi pimplaatsman,

    according to your pull request we’ve updated plugin. We’ve replaced ABSPATH with WP_CONTENT_DIR & WP_CONTENT_URL to support roots/bedrock and similar WordPress forks. Thank you very much for your request and using our software.

    Best Regards
    Piotr Niewiadomski

Viewing 1 replies (of 1 total)
  • The topic ‘WP_CONTENT_DIR instead of ABSPATH’ is closed to new replies.