Detect the activated theme from plugin code

You can use wp_get_theme to get current theme object.

$current_theme = wp_get_theme();

And it will return WP_Theme object.

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