Enable CORS in wordpress

Headers manipulation should be done before template output starts. In WordPress it is typically done in template_redirect hook, which is right before template load but after core has fully loaded.

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