Support

Account

Home Forums General Issues Issues with wp-content directory outside core directory Reply To: Issues with wp-content directory outside core directory

  • I just managed to figure this one out, I too use the same method with sub modules.

    The function you replace in the acf.php passes __FILE__ so will always return the folder of the advanced-custom-fields plugin folder. If you are using a subsequent plugin (in my case acf-repeater), which loads js/css with the same file name – it will result in the js loading twice.

    You need to pass the $file argument into the plugin_dir_url function like so:

    function helpers_get_dir( $file )
    {
        return plugin_dir_url($file);
            
    }

    Hope this helps!