Hello @skalanter ,
Thank you very much for your explanations and support but that’s not what I was asking and I think I misspoke.
Here is my function. It simply writes in a text file all the urls related to a page but also to a file (css, js, img) not found. For example, if the page exists but the code calls for an image not found, I get the url of the missing image from the text file.
add_action('get_header', function(){
if(is_404()){
write_404($_SERVER['REQUEST_URI']);
}
});
function write_404($location){
$logs .="IP: "._get_ip()." | url : $location";
writelogs($logs, "errors404"); // function that writes to the errors404.txt file
}
This file regularly contains a large number of lines concerning a file named “common.css.map” whose url is: plugins/ocean-extra/includes/freemius/assets/css/admin/common.css.map
I was wondering why the theme (or wordpress) was calling this compiled css file when it doesn’t exist? And why it is going to look for it in the ocean-extra directories?