Get the path of the current active theme folder

To automatically determine the path of the current active theme folder, use the following code:

<?php
  drupal_get_path('theme',$GLOBALS['theme'])
?>

Note: Don't use path_to_theme(), use drupal_get_path().

Reference: https://api.drupal.org/api/drupal/includes%21theme.inc/function/path_to_theme/7