What you should do:
-
Read Where to put my code: plugin or functions.php? and apply the lessons to your theme.
Themes are for presentation only. Remove everything not related to presentation: do not touch
link
andmeta
elements in the header. That’s plugin territory. -
Remove redundant code.
add_theme_support('menus');
is not necessary, if you callregister_nav_menus()
.update_option()
should not be called on every page load. Check the existing options first, and change it only if you have to. -
add_theme_support('post-thumbnails');
is questionable, if you remove the thumbnail size. Why don’t you just change it to80x60
? Then the thumbnails will still be available after a theme switch. This could be done with the other sizes too.
should I just copy everything from this function and paste it to theme_setup?
No, keep separate tasks in separate functions or classes. Do not mix different tasks just to save some lines of code. It is easier to disable specific features with a plugin, when you follow the rule Separation of concerns. rm_add_theme_support()
does too much already, because menus are not related to image sizes.