Commit 2296c1ee authored by godog's avatar godog Committed by lechuck

display the static flattr image instead of js

rationale: since we've disabled the flattr js loading (and it was broken
anyway) the flattr counter is no longer there.

this also affects people who previously selected the default 'js' option, so
instead of diplaying nothing display the static flattr badge.

the important bit is that we don't touch users options this way: if we
want to add the counter/js back it is sufficient to revert our changes to the
plugin.
parent 3216430d
......@@ -283,7 +283,7 @@ class Flattr
add_option('flattr_top', false);
add_option('flattr_compact', false);
add_option('flattr_popout_enabled', true);
add_option('flattr_button_style', "js");
add_option('flattr_button_style', 'image');
add_option('flattrss_custom_image_url', get_bloginfo('wpurl') . '/wp-content/plugins/flattr/img/flattr-badge-large.png');
add_option('user_based_flattr_buttons', false);
add_option('user_based_flattr_buttons_since_time', time());
......@@ -535,6 +535,7 @@ class Flattr
$retval = '<a href="'. esc_attr($this->getAutosubmitUrl($buttonData)) .'" title="Flattr" target="_blank">Flattr this!</a>';
break;
case "image":
case "js":
$retval = '<a href="'. esc_attr($this->getAutosubmitUrl($buttonData)) .'" title="Flattr" target="_blank">'. Flattr::getStaticImageButton($type) .'</a>';
break;
case "image-white":
......@@ -633,6 +634,7 @@ class Flattr
$retval = '<a href="'. static_flattr_url($post).'" title="Flattr" target="_blank">Flattr this!</a>';
break;
case "image":
case "js":
$retval = '<a href="'. static_flattr_url($post).'" title="Flattr" target="_blank">'. Flattr::getStaticImageButton($type) .'</a>';
break;
case "image-white":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment