This wp_query will not return any posts and only seems to work with post_status inherit?

This part require('./wp-blog-header.php'); is all kinds of bad idea. And if your file is indeed in plugin folder then header isn’t even in that location.

Custom loads of WordPress core are brittle and the technique is typically only justifiable for performance reasons.

It would be better to structure your endpoint via creating actual rewrite endpoint, or making use of admin-ajax.php/admin-post.php.

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