<?php

/**
 * NAS
 * @category Functions
 * @author Krik
 */

// Downloads from NAS
if (NAS_DOWNLOAD == true) {
	add_filter('pre_option_upload_url_path', 'krik_nas_download');
}

// Uploads on NAS
if (NAS_UPLOAD == true) {
	add_filter('pre_option_upload_path', 'krik_nas_upload');
}

function krik_nas_download()
{
	return 'http://' . NAS_IP . '/uploads/' . WP_DEFAULT_THEME;
}

function krik_nas_upload()
{
	return '\\' . NAS_IP . '/web/uploads/' . WP_DEFAULT_THEME;
}
