Trying to get property of non-object “ wordpress ”

It looks like the $args passed to the function is not an object for some reason. I can’t see the origin of this problem but for a quick solution, you can add $args = (object) $args; before the first time you use $args, here on line 44

Also, as commented by toscho, dropdown_menu() is not a valid function in wordpress core

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