Where to place PHP code that inserts (or doesn’t insert) menu item?

Use wp_get_nav_menu_items to iterate through the menu items, modifying the one that you want to in the loop. See the example code here for more information.

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