Function.php Fatal error: Call to undefined function add_action()

Solution:

I’ve copied this functions.php code to a test environment and can’t produce the same error (the only thing is a missing opening php tag at the start.

As a slightly separate note, I would add your sidebar registrations into their own function with the ‘widgets_init’ hook. Something like

add_action('widgets_init','register_my_sidebars');