How can i get the category slug in core functions.php for use in the function wp_upload_dir()?
I have tried all the following without success
//$uploadcat = get_the_category_by_ID(2); // works but need to find how to get ID
//$subdir = '/' . $id;
//$subdir = '/' . get_query_var('cat');
//$subdir = '/' . $post->ID;
//$subdir = '/' . $cat_ID;
//$subdir = '/' . get_the_ID();
//$subdir = '/' . the_ID();
//$subdir = '/' . get_the_category(); returns array, empty?
//$subdir = '/' . the_category();