Change LinksAlpha buttons to behave like any other button
-
Please change the LinksAlpha button implementation and let the site administrator decide if she wants to use it!
I provide a patched version of the plugin on Github where this is already done: https://github.com/bjoerne2/social-sharing-toolkit. With this version the checkboxes for the LinksAlpha are enabled and the buttons are only displayed if they are activated.
It can be downloaded as a ZIP file.
There are only small changes compared to the original. Here is the patch:
--- a/wp-content/plugins/social-sharing-toolkit/social_sharing_toolkit.php +++ b/wp-content/plugins/social-sharing-toolkit/social_sharing_toolkit.php @@ -470,9 +470,6 @@ class MR_Social_Sharing_Toolkit { <label for="mr_social_sharing_' . $button_type . $button . '"><input type="checkbox" name="mr_so if (isset($this -> options['mr_social_sharing_' . $button_type . 'buttons'][$button]['enable']) && $this -> options['mr_social_s } - if ($button == 'linksalpha') { - echo ' checked="checked" disabled="disabled"'; - } echo ' value="1" />' . $buttons[$button]['title'] . '</label> <img class="right" src="' . plugins_url('/images/move.png', __FILE__) . '" title="' . __('Change if (is_array($buttons[$button]['types']) && $buttons[$button]['types'][0] != '') { @@ -697,7 +694,6 @@ class MR_Social_Sharing_Toolkit { if ($url == '') { $url = 'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } - $count_bookmarks = 0; $bookmarks = ' <div class="mr_social_sharing_wrapper"> <!-- Social Sharing Toolkit v2.2 -->'; @@ -707,15 +703,8 @@ class MR_Social_Sharing_Toolkit { $text = (array_key_exists('text', $this -> options['mr_social_sharing_' . $type . 'buttons'][$button])) ? stripslashes($this -> $icon = (array_key_exists('icon', $this -> options['mr_social_sharing_' . $type . 'buttons'][$button])) ? $this -> options['mr_s $bookmarks .= $this -> get_bookmark_button($button, $url, $title, $this -> options['mr_social_sharing_' . $type . 'buttons'][$bu - $count_bookmarks++; } } - if ($count_bookmarks) { - $button = 'linksalpha'; - $type = (array_key_exists('icon', $this -> options['mr_social_sharing_' . $type . 'buttons'][$button])) ? $this -> options['mr_social_sh - $la_button = $this -> get_bookmark_button($button, $url, $title, $type, $this -> options['mr_social_sharing_display'], '', '', $media, $ - $bookmarks .= $la_button; - } $bookmarks .= '</div>'; $bookmarks = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $bookmarks); $this -> count++;
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Change LinksAlpha buttons to behave like any other button’ is closed to new replies.