Title: Update proposal
Last modified: August 21, 2016

---

# Update proposal

 *  Resolved [Krzysztof Planeta](https://wordpress.org/support/users/chrisplaneta/)
 * (@chrisplaneta)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/update-proposal/)
 * Hi there. I’ve downloaded your plugin and noticed that the Galleria javascript
   files are loaded on every page. I’ve made a quick edit to your galleria-fs.php
   file so that they load only when actually used. My quick and dirty code look 
   like that:
 * I’ve changed functions enqueue_scripts that starts on line 652 to look like that
 *     ```
       {
           global $fsg_ver;
       	global $post;
   
               if( has_shortcode( $post->post_content, 'gallery') ) {
   
                $in_footer = !$this->options['load_in_header'];
   
           wp_enqueue_script('galleria', plugins_url('galleria-1.2.9.min.js', __FILE__), array('jquery'), '1.2.9', $in_footer);
           //wp_enqueue_script('galleria', plugins_url('galleria-1.2.9.js', __FILE__), array('jquery'), '1.2.9', $in_footer);
           wp_enqueue_script('galleria-fs', plugins_url('galleria-fs.js', __FILE__), array('galleria'), $fsg_ver, $in_footer);
           wp_enqueue_script('galleria-fs-theme', plugins_url('galleria-fs-theme.js', __FILE__), array('galleria-fs'), $fsg_ver, $in_footer);
           // register here and print conditionally
           wp_register_script('open-layers', plugins_url('OpenLayers.js', __FILE__), array('galleria-fs'), '2.12', $in_footer);
           wp_register_style('galleria-fs', plugins_url('galleria-fs.css', __FILE__), array(), $fsg_ver);
           wp_enqueue_style('galleria-fs');
       		}
         }
       ```
   
 * If it’s possible I would be grateful if you could implement this change (or use
   a better solution) in the next update. It would save me modyfying the file every
   single time.
 * Thanks!
 * [http://wordpress.org/plugins/fullscreen-galleria/](http://wordpress.org/plugins/fullscreen-galleria/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [pdamsten](https://wordpress.org/support/users/pdamsten/)
 * (@pdamsten)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/update-proposal/#post-4422314)
 * Patch in 1.3.9. It needs to test for fsg_photobox and fsg_link keywords too but
   otherwise ok. Thanks.
 *  Plugin Author [pdamsten](https://wordpress.org/support/users/pdamsten/)
 * (@pdamsten)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/update-proposal/#post-4422316)
 * Had to move this to options since it seemed to break some installations. Needs
   more testing but can be enabled from options.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Update proposal’ is closed to new replies.

 * ![](https://ps.w.org/fullscreen-galleria/assets/icon-256x256.png?rev=1003688)
 * [Fullscreen Galleria](https://wordpress.org/plugins/fullscreen-galleria/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fullscreen-galleria/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fullscreen-galleria/)
 * [Active Topics](https://wordpress.org/support/plugin/fullscreen-galleria/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fullscreen-galleria/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fullscreen-galleria/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [pdamsten](https://wordpress.org/support/users/pdamsten/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/update-proposal/#post-4422316)
 * Status: resolved