Updated for AFG v3.3.5

Add in the highlighted code

index.php

function afg_enqueue_styles() {

    if(!get_option('afg_disable_css')){wp_enqueue_style('afg_css', BASE_URL . "/afg.css");}

}

function add_afg_headers() {

     if(!get_option('afg_disable_css')){echo "<style type=\"text/css\">" . get_option('afg_custom_css') . "</style>";}

}

advanced_settings.php

<?php

      if (isset($_POST['afg_advanced_save_changes']) && $_POST['afg_advanced_save_changes']) {

          update_option('afg_disable_css', isset($_POST['afg_disable_css'])? $_POST['afg_disable_css']: '');

          update_option('afg_disable_slideshow', isset($_POST['afg_disable_slideshow'])? $_POST['afg_disable_slideshow']: '');

          update_option('afg_slideshow_option', $_POST['afg_slideshow_option']);

          update_option('afg_custom_css', $_POST['afg_custom_css']);

          echo "<div class='updated'><p><strong>Settings updated successfully.</strong></p></div>";

      }

?>

         <form method='post' action='<?php echo $url ?>'>

            <?php echo afg_generate_version_line() ?>

            <div class="postbox-container" style="width:69%; margin-right:1%">

      <div id="poststuff">

        <div class="postbox" style='box-shadow:0 0 2px'>

          <h3>Advanced Settings</h3>

          <div style='margin:5px 0;padding:8px;line-height:20px'>

              <div style='width:14%;float:left'>Disable CSS</div>

              <div style='width:6%;float:left'><input type='checkbox' name='afg_disable_css' id='afg_disable_css' value='yes' <?php if (get_option('afg_disable_css')) echo 'checked=\'\'';?>></div>

              <div style='width:80%;float:left'><font size='2'>Disabling the CSS will prevent Awesome Flickr Gallery from including afg.css and the Custom CSS from below on your pages. Use this option only if you are going to copy the AFG styles into your themes style.css or custom stylesheet</font></div>

<br class='clear' />

          </div>

        </div>

      </div>

               <div id="poststuff">

                  <div class="postbox" style='box-shadow:0 0 2px'>

                     <h3>Custom CSS</h3>