Title: [Plugin: Flattr] Don&#039;t load API_SCRIPT when using static buttons
Last modified: August 20, 2016

---

# [Plugin: Flattr] Don't load API_SCRIPT when using static buttons

 *  [zhenech](https://wordpress.org/support/users/zhenech/)
 * (@zhenech)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-flattr-dont-load-api_script-when-using-static-buttons/)
 * Heya,
 * when using static buttons, there is no need to load the javascript from api.flattr.
   com at all. The following trivial patch solves the issue:
 *     ```
       --- flattr5.php.orig    2011-11-06 11:18:39.000000000 +0100
       +++ flattr5.php 2011-11-06 11:21:55.000000000 +0100
       @@ -46,7 +46,9 @@
                            }
                        }
   
       -               wp_enqueue_script('flattrscript', ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 'https://' : 'http://' ) . self::API_SCRIPT, array(), '0.6', true);
       +               if (get_option('flattr_button_style') == 'js') {
       +                       wp_enqueue_script('flattrscript', ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 'https://' : 'http://' ) . self::API_SCRIPT, array(), '0.6', true);
       +               }
               }
   
               function overrideShareThis() {
       ```
   
 * [http://wordpress.org/extend/plugins/flattr/](http://wordpress.org/extend/plugins/flattr/)

The topic ‘[Plugin: Flattr] Don't load API_SCRIPT when using static buttons’ is 
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/flattr_fafafa.svg)
 * [Flattr](https://wordpress.org/plugins/flattr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flattr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flattr/)
 * [Active Topics](https://wordpress.org/support/plugin/flattr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flattr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flattr/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [zhenech](https://wordpress.org/support/users/zhenech/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-flattr-dont-load-api_script-when-using-static-buttons/)
 * Status: not resolved