Support » Plugin: Nginx Helper » Suggestion to centralize functional_asset_path

  • Resolved bobbydonovan

    (@bobbydonovan)


    Hello, thanks for this great plugin.

    I struggled for a short while to trace a lack of log data for sites within a Multisite install. Finally I tracked this back to the functional_asset_path() function using wp_upload_dir(). Hence a log file must be present in all blogs.dir/<blog_id>/files/nginx_helper/ for each sub-site to write to a log.

    As this function is also used to retrieve the map.conf on sub-sites, this could also potentially be preventing proper cache clear on anything except the main site also.

    Hence I modified 2 functions on my end for a smoother operation.

    function functional_asset_path(){
    	$dir = ABSPATH . 'wp-content/uploads';
    	$path = $dir.'/nginx-helper/';
    	return $path;
    }
    
    function functional_asset_url(){
    	$dir = network_home_url() . '/wp-content/uploads';
    	$url = $dir.'/nginx-helper/';
    	return $url;
    }

    http://wordpress.org/extend/plugins/nginx-helper/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Suggestion to centralize functional_asset_path’ is closed to new replies.