Set cors header for ajax requests

The send_headers hook is not fired during an (admin) AJAX request (because there is no “main WordPress query”, so the wp() function doesn’t run and therefore that hook doesn’t get fired either), hence if you want to send the CORS header (and any other headers), then just call header() from within your AJAX callback, like … Read more

WordPress Favicon not Working For Images/Videos/PDFs

When opening media files only the file is loaded and not the html head of your file. You can add a ‘favicon.ico’ file (‘.png’ may also work – not sure) to your root directory (‘public_html/’, ‘www/’ ‘domain.com/’ depending on server setup) and it should load even for media files as browsers are automaticly looking for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)