Version Description
- Fix: double class issue.
- Add: remove gloogle plus from button options.
Download this release
Release Info
Developer | DavidoffNeal |
Plugin | Simple Share Buttons Adder |
Version | 7.5.19 |
Comparing to | |
See all releases |
Code changes from version 7.5.18 to 7.5.19
- css/ssba.css +1 -1
- instance.php +1 -1
- php/class-admin-bits.php +0 -5
- php/class-admin-panel.php +0 -47
- php/class-buttons.php +3 -100
- php/class-database.php +5 -9
- php/class-styles.php +2 -12
- readme.txt +6 -1
- simple-share-buttons-adder.php +1 -1
- templates/classic-tab.php +0 -9
- templates/plus-tab.php +3 -23
- templates/share-bar-tab.php +2 -22
css/ssba.css
CHANGED
@@ -54,6 +54,6 @@
|
|
54 |
width: 100%;
|
55 |
}
|
56 |
|
57 |
-
|
58 |
display: block;
|
59 |
}
|
54 |
width: 100%;
|
55 |
}
|
56 |
|
57 |
+
.ssbp-each-share, #ssba-bar-2 li .ssbp-each-share {
|
58 |
display: block;
|
59 |
}
|
instance.php
CHANGED
@@ -9,7 +9,7 @@ namespace SimpleShareButtonsAdder;
|
|
9 |
|
10 |
define( 'SSBA_FILE', __FILE__ );
|
11 |
define( 'SSBA_ROOT', dirname( __FILE__ ) );
|
12 |
-
define( 'SSBA_VERSION', '7.5.
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
9 |
|
10 |
define( 'SSBA_FILE', __FILE__ );
|
11 |
define( 'SSBA_ROOT', dirname( __FILE__ ) );
|
12 |
+
define( 'SSBA_VERSION', '7.5.19' );
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
php/class-admin-bits.php
CHANGED
@@ -300,8 +300,6 @@ class Admin_Bits {
|
|
300 |
'ssba_pinterest_featured' => ( isset( $ssba_post['ssba_pinterest_featured'] ) ? $ssba_post['ssba_pinterest_featured'] : 'N' ),
|
301 |
'ssba_content_priority' => ( isset( $ssba_post['ssba_content_priority'] ) ? $ssba_post['ssba_content_priority'] : 'N' ),
|
302 |
'ssba_plus_additional_css' => $ssba_post['ssba_plus_additional_css'],
|
303 |
-
'ssba_plus_custom_styles' => $ssba_post['ssba_plus_custom_styles'],
|
304 |
-
'ssba_plus_custom_styles_enabled' => $ssba_post['ssba_plus_custom_styles_enabled'],
|
305 |
'ssba_plus_email_message' => stripslashes_deep( $ssba_post['ssba_plus_email_message'] ),
|
306 |
'ssba_plus_twitter_text' => stripslashes_deep( $ssba_post['ssba_plus_twitter_text'] ),
|
307 |
'ssba_plus_buffer_text' => stripslashes_deep( $ssba_post['ssba_plus_buffer_text'] ),
|
@@ -318,8 +316,6 @@ class Admin_Bits {
|
|
318 |
'ssba_plus_default_pinterest' => ( isset( $ssba_post['ssba_plus_default_pinterest'] ) ? $ssba_post['ssba_plus_default_pinterest'] : 'N' ),
|
319 |
'ssba_plus_pinterest_featured' => ( isset( $ssba_post['ssba_plus_pinterest_featured'] ) ? $ssba_post['ssba_plus_pinterest_featured'] : 'N' ),
|
320 |
'ssba_bar_additional_css' => $ssba_post['ssba_bar_additional_css'],
|
321 |
-
'ssba_bar_custom_styles' => $ssba_post['ssba_bar_custom_styles'],
|
322 |
-
'ssba_bar_custom_styles_enabled' => $ssba_post['ssba_bar_custom_styles_enabled'],
|
323 |
'ssba_bar_email_message' => stripslashes_deep( $ssba_post['ssba_bar_email_message'] ),
|
324 |
'ssba_bar_twitter_text' => stripslashes_deep( $ssba_post['ssba_bar_twitter_text'] ),
|
325 |
'ssba_bar_buffer_text' => stripslashes_deep( $ssba_post['ssba_bar_buffer_text'] ),
|
@@ -386,7 +382,6 @@ class Admin_Bits {
|
|
386 |
'ssba_bar_mobile' => isset( $ssba_post['ssba_bar_mobile'] ) ? $ssba_post['ssba_bar_mobile'] : 'N',
|
387 |
'ssba_mobile_breakpoint' => $ssba_post['ssba_mobile_breakpoint'],
|
388 |
'ssba_custom_facebook' => $ssba_post['ssba_custom_facebook'],
|
389 |
-
'ssba_custom_google' => $ssba_post['ssba_custom_google'],
|
390 |
'ssba_custom_twitter' => $ssba_post['ssba_custom_twitter'],
|
391 |
'ssba_custom_linkedin' => $ssba_post['ssba_custom_linkedin'],
|
392 |
'ssba_custom_flattr' => $ssba_post['ssba_custom_flattr'],
|
300 |
'ssba_pinterest_featured' => ( isset( $ssba_post['ssba_pinterest_featured'] ) ? $ssba_post['ssba_pinterest_featured'] : 'N' ),
|
301 |
'ssba_content_priority' => ( isset( $ssba_post['ssba_content_priority'] ) ? $ssba_post['ssba_content_priority'] : 'N' ),
|
302 |
'ssba_plus_additional_css' => $ssba_post['ssba_plus_additional_css'],
|
|
|
|
|
303 |
'ssba_plus_email_message' => stripslashes_deep( $ssba_post['ssba_plus_email_message'] ),
|
304 |
'ssba_plus_twitter_text' => stripslashes_deep( $ssba_post['ssba_plus_twitter_text'] ),
|
305 |
'ssba_plus_buffer_text' => stripslashes_deep( $ssba_post['ssba_plus_buffer_text'] ),
|
316 |
'ssba_plus_default_pinterest' => ( isset( $ssba_post['ssba_plus_default_pinterest'] ) ? $ssba_post['ssba_plus_default_pinterest'] : 'N' ),
|
317 |
'ssba_plus_pinterest_featured' => ( isset( $ssba_post['ssba_plus_pinterest_featured'] ) ? $ssba_post['ssba_plus_pinterest_featured'] : 'N' ),
|
318 |
'ssba_bar_additional_css' => $ssba_post['ssba_bar_additional_css'],
|
|
|
|
|
319 |
'ssba_bar_email_message' => stripslashes_deep( $ssba_post['ssba_bar_email_message'] ),
|
320 |
'ssba_bar_twitter_text' => stripslashes_deep( $ssba_post['ssba_bar_twitter_text'] ),
|
321 |
'ssba_bar_buffer_text' => stripslashes_deep( $ssba_post['ssba_bar_buffer_text'] ),
|
382 |
'ssba_bar_mobile' => isset( $ssba_post['ssba_bar_mobile'] ) ? $ssba_post['ssba_bar_mobile'] : 'N',
|
383 |
'ssba_mobile_breakpoint' => $ssba_post['ssba_mobile_breakpoint'],
|
384 |
'ssba_custom_facebook' => $ssba_post['ssba_custom_facebook'],
|
|
|
385 |
'ssba_custom_twitter' => $ssba_post['ssba_custom_twitter'],
|
386 |
'ssba_custom_linkedin' => $ssba_post['ssba_custom_linkedin'],
|
387 |
'ssba_custom_flattr' => $ssba_post['ssba_custom_flattr'],
|
php/class-admin-panel.php
CHANGED
@@ -1158,28 +1158,6 @@ class Admin_Panel {
|
|
1158 |
'checked' => isset( $arr_settings['ssba_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_custom_styles_enabled'] ? 'checked' : null,
|
1159 |
);
|
1160 |
|
1161 |
-
// Enable custom css for plus.
|
1162 |
-
$opts41p = array(
|
1163 |
-
'form_group' => false,
|
1164 |
-
'type' => 'checkbox',
|
1165 |
-
'name' => 'ssba_plus_custom_styles_enabled',
|
1166 |
-
'label' => 'Enable Custom CSS',
|
1167 |
-
'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
|
1168 |
-
'value' => 'Y',
|
1169 |
-
'checked' => isset( $arr_settings['ssba_plus_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_plus_custom_styles_enabled'] ? 'checked' : null,
|
1170 |
-
);
|
1171 |
-
|
1172 |
-
// Enable custom css for share bar.
|
1173 |
-
$opts41s = array(
|
1174 |
-
'form_group' => false,
|
1175 |
-
'type' => 'checkbox',
|
1176 |
-
'name' => 'ssba_bar_custom_styles_enabled',
|
1177 |
-
'label' => 'Enable Custom CSS',
|
1178 |
-
'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
|
1179 |
-
'value' => 'Y',
|
1180 |
-
'checked' => isset( $arr_settings['ssba_bar_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_bar_custom_styles_enabled'] ? 'checked' : null,
|
1181 |
-
);
|
1182 |
-
|
1183 |
// Custom css.
|
1184 |
$opts42 = array(
|
1185 |
'form_group' => false,
|
@@ -1192,30 +1170,6 @@ class Admin_Panel {
|
|
1192 |
'value' => isset( $arr_settings['ssba_custom_styles'] ) ? $arr_settings['ssba_custom_styles'] : '',
|
1193 |
);
|
1194 |
|
1195 |
-
// Custom css for plus.
|
1196 |
-
$opts42p = array(
|
1197 |
-
'form_group' => false,
|
1198 |
-
'type' => 'textarea',
|
1199 |
-
'rows' => '15',
|
1200 |
-
'class' => 'code-font',
|
1201 |
-
'name' => 'ssba_plus_custom_styles',
|
1202 |
-
'label' => 'Custom CSS',
|
1203 |
-
'tooltip' => 'Enter in your own custom CSS for your share buttons',
|
1204 |
-
'value' => isset( $arr_settings['ssba_plus_custom_styles'] ) ? $arr_settings['ssba_plus_custom_styles'] : '',
|
1205 |
-
);
|
1206 |
-
|
1207 |
-
// Custom css for share bar.
|
1208 |
-
$opts42s = array(
|
1209 |
-
'form_group' => false,
|
1210 |
-
'type' => 'textarea',
|
1211 |
-
'rows' => '15',
|
1212 |
-
'class' => 'code-font',
|
1213 |
-
'name' => 'ssba_bar_custom_styles',
|
1214 |
-
'label' => 'Custom CSS',
|
1215 |
-
'tooltip' => 'Enter in your own custom CSS for your share buttons',
|
1216 |
-
'value' => isset( $arr_settings['ssba_bar_custom_styles'] ) ? $arr_settings['ssba_bar_custom_styles'] : '',
|
1217 |
-
);
|
1218 |
-
|
1219 |
// Switch to new buttons.
|
1220 |
$opts43 = array(
|
1221 |
'form_group' => false,
|
@@ -1657,7 +1611,6 @@ class Admin_Panel {
|
|
1657 |
public function get_custom_button_key( $arr_settings ) {
|
1658 |
$custom_array = array(
|
1659 |
'facebook' => isset( $arr_settings['ssba_custom_facebook'] ) ? $arr_settings['ssba_custom_facebook'] : '',
|
1660 |
-
'google' => isset( $arr_settings['ssba_custom_google'] ) ? $arr_settings['ssba_custom_google'] : '',
|
1661 |
'twitter' => isset( $arr_settings['ssba_custom_twitter'] ) ? $arr_settings['ssba_custom_twitter'] : '',
|
1662 |
'linkedin' => isset( $arr_settings['ssba_custom_linkedin'] ) ? $arr_settings['ssba_custom_linkedin'] : '',
|
1663 |
'flattr' => isset( $arr_settings['ssba_custom_flattr'] ) ? $arr_settings['ssba_custom_flattr'] : '',
|
1158 |
'checked' => isset( $arr_settings['ssba_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_custom_styles_enabled'] ? 'checked' : null,
|
1159 |
);
|
1160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
// Custom css.
|
1162 |
$opts42 = array(
|
1163 |
'form_group' => false,
|
1170 |
'value' => isset( $arr_settings['ssba_custom_styles'] ) ? $arr_settings['ssba_custom_styles'] : '',
|
1171 |
);
|
1172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1173 |
// Switch to new buttons.
|
1174 |
$opts43 = array(
|
1175 |
'form_group' => false,
|
1611 |
public function get_custom_button_key( $arr_settings ) {
|
1612 |
$custom_array = array(
|
1613 |
'facebook' => isset( $arr_settings['ssba_custom_facebook'] ) ? $arr_settings['ssba_custom_facebook'] : '',
|
|
|
1614 |
'twitter' => isset( $arr_settings['ssba_custom_twitter'] ) ? $arr_settings['ssba_custom_twitter'] : '',
|
1615 |
'linkedin' => isset( $arr_settings['ssba_custom_linkedin'] ) ? $arr_settings['ssba_custom_linkedin'] : '',
|
1616 |
'flattr' => isset( $arr_settings['ssba_custom_flattr'] ) ? $arr_settings['ssba_custom_flattr'] : '',
|
php/class-buttons.php
CHANGED
@@ -196,7 +196,7 @@ class Buttons {
|
|
196 |
$wrap_id = 'Y' !== $arr_settings['ssba_new_buttons'] ? 'ssba-classic-2' : 'ssba-modern-2';
|
197 |
|
198 |
// Ssba div.
|
199 |
-
$html_share_buttons = '<!-- Simple Share Buttons Adder (' . esc_html( SSBA_VERSION ) . ') simplesharebuttons.com --><div class="' . esc_attr( $wrap_id ) . '
|
200 |
|
201 |
// Center if set so.
|
202 |
$html_share_buttons .= '<div style="text-align:' . esc_attr( $alignment ) . '">';
|
@@ -800,67 +800,7 @@ class Buttons {
|
|
800 |
* @return string
|
801 |
*/
|
802 |
public function ssba_google( $arr_settings, $url_current_page, $str_page_title, $boo_show_share_count ) {
|
803 |
-
|
804 |
-
$network = 'Google+';
|
805 |
-
$target =
|
806 |
-
( 'Y' === $arr_settings['ssba_plus_share_new_window']
|
807 |
-
&& 'Y' === $arr_settings['ssba_new_buttons']
|
808 |
-
&& ! isset( $arr_settings['bar_call']
|
809 |
-
) )
|
810 |
-
||
|
811 |
-
( 'Y' === $arr_settings['ssba_share_new_window']
|
812 |
-
&& 'Y' !== $arr_settings['ssba_new_buttons']
|
813 |
-
&& ! isset( $arr_settings['bar_call']
|
814 |
-
) )
|
815 |
-
||
|
816 |
-
( 'Y' === $arr_settings['ssba_bar_share_new_window'] && isset( $arr_settings['bar_call']
|
817 |
-
) ) ? ' target="_blank" ' : '';
|
818 |
-
$plus_class = 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ? ' ssbp-google ssbp-btn' : '';
|
819 |
-
$count_class = 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ? ' ssbp-each-share' : ' ssba_sharecount';
|
820 |
-
$html_share_buttons = '';
|
821 |
-
|
822 |
-
// Add li if plus.
|
823 |
-
if ( 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ) {
|
824 |
-
$html_share_buttons .= '<li class="ssbp-li--google">';
|
825 |
-
}
|
826 |
-
|
827 |
-
// Google share link.
|
828 |
-
$html_share_buttons .= '<a data-site="" class="ssba_google_share' . esc_attr( $plus_class ) . '" href="https://plus.google.com/share?url=' . esc_attr( $url_current_page ) . '" ' . esc_attr( $target . $nofollow ) . '>';
|
829 |
-
|
830 |
-
// If image set is not custom.
|
831 |
-
if ( 'custom' !== $arr_settings['ssba_image_set'] && 'Y' !== $arr_settings['ssba_new_buttons'] && ! isset( $arr_settings['bar_call'] ) ) {
|
832 |
-
// Show ssba image.
|
833 |
-
$html_share_buttons .= '<img src="' . esc_attr( plugins_url() ) . '/simple-share-buttons-adder/buttons/' . esc_attr( $arr_settings['ssba_image_set'] ) . '/google.png" style="width: ' . esc_html( $arr_settings['ssba_size'] ) . 'px;" title="Google+" class="ssba ssba-img" alt="Share on Google+" />';
|
834 |
-
} elseif ( 'Y' !== $arr_settings['ssba_new_buttons'] && ! isset( $arr_settings['bar_call'] ) ) { // If using custom images.
|
835 |
-
// Show custom image.
|
836 |
-
$html_share_buttons .= '<img src="' . esc_url( $arr_settings['ssba_custom_google'] ) . '" style="width: ' . esc_html( $arr_settings['ssba_size'] ) . 'px;" title="Share on Google+" class="ssba ssba-img" alt="Google+" />';
|
837 |
-
}
|
838 |
-
|
839 |
-
// Close href.
|
840 |
-
$html_share_buttons .= '<div title="' . $network . '" class="ssbp-text">' . $network . '</div>';
|
841 |
-
|
842 |
-
// Close href.
|
843 |
-
$html_share_buttons .= '</a>';
|
844 |
-
|
845 |
-
// If show share count is set to Y.
|
846 |
-
if ( ( ( 'Y' === $arr_settings['ssba_show_share_count'] && 'Y' !== $arr_settings['ssba_new_buttons'] )
|
847 |
-
||
|
848 |
-
( 'Y' === $arr_settings['ssba_plus_show_share_count'] && 'Y' === $arr_settings['ssba_new_buttons'] )
|
849 |
-
||
|
850 |
-
( 'Y' === $arr_settings['ssba_bar_show_share_count'] && isset( $arr_settings['bar_call'] )
|
851 |
-
)
|
852 |
-
&& $boo_show_share_count
|
853 |
-
) ) {
|
854 |
-
$html_share_buttons .= '<span class="' . esc_attr( $count_class ) . '">' . esc_html( $this->get_google_share_count( $url_current_page ) ) . '</span>';
|
855 |
-
}
|
856 |
-
|
857 |
-
// Add closing li if plus.
|
858 |
-
if ( 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ) {
|
859 |
-
$html_share_buttons .= '</li>';
|
860 |
-
}
|
861 |
-
|
862 |
-
// Return share buttons.
|
863 |
-
return $html_share_buttons;
|
864 |
}
|
865 |
|
866 |
/**
|
@@ -871,44 +811,7 @@ class Buttons {
|
|
871 |
* @return string
|
872 |
*/
|
873 |
public function get_google_share_count( $url_current_page ) {
|
874 |
-
|
875 |
-
'method' => 'POST',
|
876 |
-
'headers' => array(
|
877 |
-
// Setup content type to JSON.
|
878 |
-
'Content-Type' => 'application/json',
|
879 |
-
),
|
880 |
-
// Setup POST options to Google API.
|
881 |
-
'body' => wp_json_encode( array(
|
882 |
-
'method' => 'pos.plusones.get',
|
883 |
-
'id' => 'p',
|
884 |
-
'method' => 'pos.plusones.get',
|
885 |
-
'jsonrpc' => '2.0',
|
886 |
-
'key' => 'p',
|
887 |
-
'apiVersion' => 'v1',
|
888 |
-
'params' => array(
|
889 |
-
'nolog' => true,
|
890 |
-
'id' => $url_current_page,
|
891 |
-
'source' => 'widget',
|
892 |
-
'userId' => '@viewer',
|
893 |
-
'groupId' => '@self',
|
894 |
-
),
|
895 |
-
) ),
|
896 |
-
// Disable checking SSL sertificates.
|
897 |
-
'sslverify' => false,
|
898 |
-
);
|
899 |
-
|
900 |
-
// Retrieves JSON with HTTP POST method for current URL.
|
901 |
-
$json_string = wp_remote_post( 'https://clients6.google.com/rpc', $args );
|
902 |
-
|
903 |
-
if ( is_wp_error( $json_string ) ) {
|
904 |
-
// Return zero if response is error.
|
905 |
-
return '0';
|
906 |
-
} else {
|
907 |
-
$json = json_decode( $json_string['body'], true );
|
908 |
-
|
909 |
-
// Return count of Google +1 for requsted URL.
|
910 |
-
return $this->ssba_format_number( intval( $json['result']['metadata']['globalCounts']['count'] ) );
|
911 |
-
}
|
912 |
}
|
913 |
|
914 |
/**
|
196 |
$wrap_id = 'Y' !== $arr_settings['ssba_new_buttons'] ? 'ssba-classic-2' : 'ssba-modern-2';
|
197 |
|
198 |
// Ssba div.
|
199 |
+
$html_share_buttons = '<!-- Simple Share Buttons Adder (' . esc_html( SSBA_VERSION ) . ') simplesharebuttons.com --><div class="' . esc_attr( $wrap_id ) . ' ssba ssbp-wrap' . esc_attr( ' ' . $arr_settings['ssba_plus_align'] ) . ' ssbp--theme-' . esc_attr( $arr_settings['ssba_plus_button_style'] ) . '">';
|
200 |
|
201 |
// Center if set so.
|
202 |
$html_share_buttons .= '<div style="text-align:' . esc_attr( $alignment ) . '">';
|
800 |
* @return string
|
801 |
*/
|
802 |
public function ssba_google( $arr_settings, $url_current_page, $str_page_title, $boo_show_share_count ) {
|
803 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
}
|
805 |
|
806 |
/**
|
811 |
* @return string
|
812 |
*/
|
813 |
public function get_google_share_count( $url_current_page ) {
|
814 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
815 |
}
|
816 |
|
817 |
/**
|
php/class-database.php
CHANGED
@@ -143,9 +143,9 @@ class Database {
|
|
143 |
'ssba_plus_font_weight' => '',
|
144 |
|
145 |
// Include.
|
146 |
-
'ssba_selected_buttons' => 'facebook,
|
147 |
-
'ssba_selected_bar_buttons' => 'facebook,
|
148 |
-
'ssba_selected_plus_buttons' => 'facebook,
|
149 |
'ssba_plus_button_style' => 1,
|
150 |
'ssba_bar_style' => 1,
|
151 |
'ssba_new_buttons' => '',
|
@@ -173,7 +173,6 @@ class Database {
|
|
173 |
|
174 |
// Custom images.
|
175 |
'ssba_custom_email' => '',
|
176 |
-
'ssba_custom_google' => '',
|
177 |
'ssba_custom_facebook' => '',
|
178 |
'ssba_custom_twitter' => '',
|
179 |
'ssba_custom_diggit' => '',
|
@@ -282,8 +281,8 @@ class Database {
|
|
282 |
'ssba_plus_font_color' => '',
|
283 |
'ssba_plus_font_size' => '12',
|
284 |
'ssba_plus_font_weight' => '',
|
285 |
-
'ssba_selected_bar_buttons' => 'facebook,
|
286 |
-
'ssba_selected_plus_buttons' => 'facebook,
|
287 |
'ssba_plus_button_style' => 1,
|
288 |
'ssba_bar_style' => 1,
|
289 |
'ssba_new_buttons' => '',
|
@@ -451,9 +450,6 @@ class Database {
|
|
451 |
'flattr' => array(
|
452 |
'full_name' => esc_html__( 'Flattr', 'simple-share-buttons-adder' ),
|
453 |
),
|
454 |
-
'google' => array(
|
455 |
-
'full_name' => esc_html__( 'Google+', 'simple-share-buttons-adder' ),
|
456 |
-
),
|
457 |
'linkedin' => array(
|
458 |
'full_name' => esc_html__( 'LinkedIn', 'simple-share-buttons-adder' ),
|
459 |
),
|
143 |
'ssba_plus_font_weight' => '',
|
144 |
|
145 |
// Include.
|
146 |
+
'ssba_selected_buttons' => 'facebook,pinterest,twitter,linkedin',
|
147 |
+
'ssba_selected_bar_buttons' => 'facebook,pinterest,twitter,linkedin',
|
148 |
+
'ssba_selected_plus_buttons' => 'facebook,pinterest,twitter,linkedin',
|
149 |
'ssba_plus_button_style' => 1,
|
150 |
'ssba_bar_style' => 1,
|
151 |
'ssba_new_buttons' => '',
|
173 |
|
174 |
// Custom images.
|
175 |
'ssba_custom_email' => '',
|
|
|
176 |
'ssba_custom_facebook' => '',
|
177 |
'ssba_custom_twitter' => '',
|
178 |
'ssba_custom_diggit' => '',
|
281 |
'ssba_plus_font_color' => '',
|
282 |
'ssba_plus_font_size' => '12',
|
283 |
'ssba_plus_font_weight' => '',
|
284 |
+
'ssba_selected_bar_buttons' => 'facebook,pinterest,twitter,linkedin',
|
285 |
+
'ssba_selected_plus_buttons' => 'facebook,pinterest,twitter,linkedin',
|
286 |
'ssba_plus_button_style' => 1,
|
287 |
'ssba_bar_style' => 1,
|
288 |
'ssba_new_buttons' => '',
|
450 |
'flattr' => array(
|
451 |
'full_name' => esc_html__( 'Flattr', 'simple-share-buttons-adder' ),
|
452 |
),
|
|
|
|
|
|
|
453 |
'linkedin' => array(
|
454 |
'full_name' => esc_html__( 'LinkedIn', 'simple-share-buttons-adder' ),
|
455 |
),
|
php/class-styles.php
CHANGED
@@ -281,7 +281,7 @@ class Styles {
|
|
281 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
|
282 |
}
|
283 |
|
284 |
-
if ( 'Y' === $arr_settings['ssba_new_buttons']
|
285 |
// Plus styles.
|
286 |
$plus_height = '' !== $arr_settings['ssba_plus_height'] ? 'height: ' . $arr_settings['ssba_plus_height'] . 'px!important;' : 'height: 48px!important;';
|
287 |
$plus_width = '' !== $arr_settings['ssba_plus_width'] ? 'width: ' . $arr_settings['ssba_plus_width'] . 'px!important;' : 'width: 48px!important;';
|
@@ -339,17 +339,12 @@ class Styles {
|
|
339 |
$html_ssba_style .= $arr_settings['ssba_plus_additional_css'];
|
340 |
}
|
341 |
|
342 |
-
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
|
343 |
-
} elseif ( 'Y' === $arr_settings['ssba_new_buttons'] ) {
|
344 |
-
// Use custom styles.
|
345 |
-
$html_ssba_style = $arr_settings['ssba_plus_custom_styles'];
|
346 |
-
|
347 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
|
348 |
}
|
349 |
|
350 |
// If sharebar custom css is enabled use it.
|
351 |
// Check if custom styles haven't been set.
|
352 |
-
if ( 'Y' !== $arr_settings['ssba_bar_custom_styles_enabled']
|
353 |
// Share bar styles.
|
354 |
$bar_height = '' !== $arr_settings['ssba_bar_height'] ? 'height: ' . $arr_settings['ssba_bar_height'] . 'px!important;' : 'height: 48px!important;';
|
355 |
$bar_width = '' !== $arr_settings['ssba_bar_width'] ? 'width: ' . $arr_settings['ssba_bar_width'] . 'px!important;' : 'width: 48px!important;';
|
@@ -399,11 +394,6 @@ class Styles {
|
|
399 |
}
|
400 |
|
401 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_bar_ssba_style ); // WPCS: XSS ok.
|
402 |
-
} elseif ( 'Y' === $arr_settings['ssba_bar_enabled'] ) {
|
403 |
-
// Use custom styles.
|
404 |
-
$html_ssba_bar_style = $arr_settings['ssba_bar_custom_styles'];
|
405 |
-
|
406 |
-
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_bar_style ); // WPCS: XSS ok.
|
407 |
}
|
408 |
}
|
409 |
}
|
281 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
|
282 |
}
|
283 |
|
284 |
+
if ( 'Y' === $arr_settings['ssba_new_buttons'] ) {
|
285 |
// Plus styles.
|
286 |
$plus_height = '' !== $arr_settings['ssba_plus_height'] ? 'height: ' . $arr_settings['ssba_plus_height'] . 'px!important;' : 'height: 48px!important;';
|
287 |
$plus_width = '' !== $arr_settings['ssba_plus_width'] ? 'width: ' . $arr_settings['ssba_plus_width'] . 'px!important;' : 'width: 48px!important;';
|
339 |
$html_ssba_style .= $arr_settings['ssba_plus_additional_css'];
|
340 |
}
|
341 |
|
|
|
|
|
|
|
|
|
|
|
342 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
|
343 |
}
|
344 |
|
345 |
// If sharebar custom css is enabled use it.
|
346 |
// Check if custom styles haven't been set.
|
347 |
+
if ( 'Y' !== $arr_settings['ssba_bar_custom_styles_enabled'] ) {
|
348 |
// Share bar styles.
|
349 |
$bar_height = '' !== $arr_settings['ssba_bar_height'] ? 'height: ' . $arr_settings['ssba_bar_height'] . 'px!important;' : 'height: 48px!important;';
|
350 |
$bar_width = '' !== $arr_settings['ssba_bar_width'] ? 'width: ' . $arr_settings['ssba_bar_width'] . 'px!important;' : 'width: 48px!important;';
|
394 |
}
|
395 |
|
396 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_bar_ssba_style ); // WPCS: XSS ok.
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
}
|
399 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: sharethis, scottstorebloom, surlyrightclick, DavidoffNeal
|
|
3 |
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.0.2
|
6 |
-
Stable tag: 7.5.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
@@ -66,10 +66,15 @@ Please visit the <a href="https://wordpress.org/support/plugin/simple-share-butt
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
69 |
= 7.5.18 =
|
70 |
* Fix: Make sure all custom/advanced css fields work properly and separately.
|
71 |
* Add: Style to avoid decoration to the buttons.
|
72 |
* Fix: Major conflict with classic and modern buttons if no networks selected.
|
|
|
73 |
|
74 |
= 7.4.18 =
|
75 |
* Fix: Mobile disable option for Share Bar.
|
3 |
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.0.2
|
6 |
+
Stable tag: 7.5.19
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 7.5.19 =
|
70 |
+
* Fix: double class issue.
|
71 |
+
* Add: remove gloogle plus from button options.
|
72 |
+
|
73 |
= 7.5.18 =
|
74 |
* Fix: Make sure all custom/advanced css fields work properly and separately.
|
75 |
* Add: Style to avoid decoration to the buttons.
|
76 |
* Fix: Major conflict with classic and modern buttons if no networks selected.
|
77 |
+
* Add: change wrapper id to a class.
|
78 |
|
79 |
= 7.4.18 =
|
80 |
* Fix: Mobile disable option for Share Bar.
|
simple-share-buttons-adder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Simple Share Buttons Adder
|
4 |
* Plugin URI: https://simplesharebuttons.com
|
5 |
* Description: A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
6 |
-
* Version: 7.5.
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|
3 |
* Plugin Name: Simple Share Buttons Adder
|
4 |
* Plugin URI: https://simplesharebuttons.com
|
5 |
* Description: A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
6 |
+
* Version: 7.5.19
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|
templates/classic-tab.php
CHANGED
@@ -213,15 +213,6 @@
|
|
213 |
echo $this->forms->ssbp_input( $opts21 ); // WPCS: XSS ok.
|
214 |
?>
|
215 |
|
216 |
-
<p>
|
217 |
-
<strong>
|
218 |
-
<?php echo esc_html( 'newsharecounts.com Counts for Twitter', 'simple-share-buttons-adder' ); ?>
|
219 |
-
</strong>
|
220 |
-
<br>
|
221 |
-
<?php echo esc_html__( 'You shall need to follow the instructions here before enabling this feature', 'simple-share-buttons-adder' ); ?> - <a target="_blank" href="http://newsharecounts.com/">newsharecounts.com</a>
|
222 |
-
<?php echo $this->forms->ssbp_input( $opts22 ); // WPCS: XSS ok. ?>
|
223 |
-
</p>
|
224 |
-
|
225 |
<h3>sharedcount.com</h3>
|
226 |
<p>
|
227 |
<?php echo esc_html__( 'Only necessary if you are experiencing issues with Facebook share counts.', 'simple-share-buttons-adder' ); ?> <a href="https://admin.sharedcount.com/admin/signup.php" target="_blank"><?php echo esc_html__( 'Signup for your free account here', 'simple-share-buttons-adder' ); ?></a>.
|
213 |
echo $this->forms->ssbp_input( $opts21 ); // WPCS: XSS ok.
|
214 |
?>
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
<h3>sharedcount.com</h3>
|
217 |
<p>
|
218 |
<?php echo esc_html__( 'Only necessary if you are experiencing issues with Facebook share counts.', 'simple-share-buttons-adder' ); ?> <a href="https://admin.sharedcount.com/admin/signup.php" target="_blank"><?php echo esc_html__( 'Signup for your free account here', 'simple-share-buttons-adder' ); ?></a>.
|
templates/plus-tab.php
CHANGED
@@ -71,6 +71,7 @@
|
|
71 |
</div>
|
72 |
|
73 |
<ul class="ssbp-list">
|
|
|
74 |
<?php foreach ( $arr_plus_buttons as $buttons ) :
|
75 |
$button = strtolower( str_replace( ' ', '_', str_replace( '+', '', $buttons['full_name'] ) ) ); ?>
|
76 |
|
@@ -90,6 +91,7 @@
|
|
90 |
<?php endif; ?>
|
91 |
</li>
|
92 |
<?php endforeach; ?>
|
|
|
93 |
</ul>
|
94 |
</div>
|
95 |
</div>
|
@@ -174,15 +176,6 @@
|
|
174 |
echo $this->forms->ssbp_input( $opts19p ); // WPCS: XSS ok.
|
175 |
echo $this->forms->ssbp_input( $opts20p ); // WPCS: XSS ok.
|
176 |
?>
|
177 |
-
|
178 |
-
<p>
|
179 |
-
<strong>
|
180 |
-
<?php echo esc_html( 'newsharecounts.com Counts for Twitter', 'simple-share-buttons-adder' ); ?>
|
181 |
-
</strong>
|
182 |
-
<br>
|
183 |
-
<?php echo esc_html__( 'You shall need to follow the instructions here before enabling this feature', 'simple-share-buttons-adder' ); ?> - <a target="_blank" href="http://newsharecounts.com/">newsharecounts.com</a>
|
184 |
-
<?php echo $this->forms->ssbp_input( $opts22p ); // WPCS: XSS ok. ?>
|
185 |
-
</p>
|
186 |
</div>
|
187 |
<div class="col-md-6">
|
188 |
<?php echo $this->forms->ssbp_input( $opts24p ); // WPCS: XSS ok. ?>
|
@@ -280,20 +273,7 @@
|
|
280 |
</div>
|
281 |
|
282 |
<div class="col-sm-12">
|
283 |
-
<?php echo $this->forms->ssbp_input( $opts40p ); // WPCS: XSS ok
|
284 |
-
</div>
|
285 |
-
|
286 |
-
<div class="col-md-12">
|
287 |
-
<blockquote>
|
288 |
-
<p><?php echo esc_html__( 'If you want to take over control of your share buttons\' CSS entirely, turn on the switch below and enter your custom CSS.', 'simple-share-buttons-adder' ); ?> <strong><?php echo esc_html__( 'ALL of Simple Share Buttons Adder\'s CSS will be disabled', 'simple-share-buttons-adder' ); ?></strong>.</p>
|
289 |
-
</blockquote>
|
290 |
-
</div>
|
291 |
-
|
292 |
-
<div class="col-sm-12">
|
293 |
-
<?php
|
294 |
-
echo $this->forms->ssbp_input( $opts41p ); // WPCS: XSS ok.
|
295 |
-
echo $this->forms->ssbp_input( $opts42p ); // WPCS: XSS ok.
|
296 |
-
?>
|
297 |
</div>
|
298 |
</div>
|
299 |
</div>
|
71 |
</div>
|
72 |
|
73 |
<ul class="ssbp-list">
|
74 |
+
<?php if ( is_array( $arr_plus_buttons ) ) : ?>
|
75 |
<?php foreach ( $arr_plus_buttons as $buttons ) :
|
76 |
$button = strtolower( str_replace( ' ', '_', str_replace( '+', '', $buttons['full_name'] ) ) ); ?>
|
77 |
|
91 |
<?php endif; ?>
|
92 |
</li>
|
93 |
<?php endforeach; ?>
|
94 |
+
<?php endif; ?>
|
95 |
</ul>
|
96 |
</div>
|
97 |
</div>
|
176 |
echo $this->forms->ssbp_input( $opts19p ); // WPCS: XSS ok.
|
177 |
echo $this->forms->ssbp_input( $opts20p ); // WPCS: XSS ok.
|
178 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
</div>
|
180 |
<div class="col-md-6">
|
181 |
<?php echo $this->forms->ssbp_input( $opts24p ); // WPCS: XSS ok. ?>
|
273 |
</div>
|
274 |
|
275 |
<div class="col-sm-12">
|
276 |
+
<?php echo $this->forms->ssbp_input( $opts40p ); // WPCS: XSS ok. ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
</div>
|
278 |
</div>
|
279 |
</div>
|
templates/share-bar-tab.php
CHANGED
@@ -59,6 +59,7 @@
|
|
59 |
<div id="ssba-preview-2" class="<?php echo esc_attr( $arr_settings['ssba_bar_position'] ); ?> ssbp-wrap ssbp--theme-<?php echo esc_attr( $arr_settings['ssba_bar_style'] ); ?>">
|
60 |
<div class="ssbp-container">
|
61 |
<ul class="ssbp-list">
|
|
|
62 |
<?php foreach ( $arr_bar_buttons as $buttons ) :
|
63 |
$button = strtolower( str_replace( ' ', '_', str_replace( '+', '', $buttons['full_name'] ) ) ); ?>
|
64 |
<li style="margin: <?php echo esc_attr( $arr_settings['ssba_bar_margin'] ); ?>px 0;" class="ssbp-li--<?php echo esc_attr( $button );
|
@@ -74,6 +75,7 @@
|
|
74 |
<span class="<?php echo 'Y' !== $arr_settings['ssba_bar_show_share_count'] ? esc_attr( 'ssba-hide-button' ) : ''; ?> ssbp-each-share">1.8k</span>
|
75 |
</li>
|
76 |
<?php endforeach; ?>
|
|
|
77 |
</ul>
|
78 |
</div>
|
79 |
</div>
|
@@ -148,15 +150,6 @@
|
|
148 |
echo $this->forms->ssbp_input( $opts20s ); // WPCS: XSS ok.
|
149 |
?>
|
150 |
|
151 |
-
<p>
|
152 |
-
<strong>
|
153 |
-
<?php echo esc_html( 'newsharecounts.com Counts for Twitter', 'simple-share-buttons-adder' ); ?>
|
154 |
-
</strong>
|
155 |
-
<br>
|
156 |
-
<?php echo esc_html__( 'You shall need to follow the instructions here before enabling this feature', 'simple-share-buttons-adder' ); ?> - <a target="_blank" href="http://newsharecounts.com/">newsharecounts.com</a>
|
157 |
-
<?php echo $this->forms->ssbp_input( $opts22 ); // WPCS: XSS ok. ?>
|
158 |
-
</p>
|
159 |
-
|
160 |
<h3>sharedcount.com</h3>
|
161 |
<p>
|
162 |
<?php echo esc_html__( 'Only necessary if you are experiencing issues with Facebook share counts.', 'simple-share-buttons-adder' ); ?> <a href="https://admin.sharedcount.com/admin/signup.php" target="_blank"><?php echo esc_html__( 'Signup for your free account here', 'simple-share-buttons-adder' ); ?></a>.
|
@@ -253,19 +246,6 @@
|
|
253 |
<div class="col-sm-12">
|
254 |
<?php echo $this->forms->ssbp_input( $opts40s ); // WPCS: XSS ok.?>
|
255 |
</div>
|
256 |
-
|
257 |
-
<div class="col-md-12">
|
258 |
-
<blockquote>
|
259 |
-
<p><?php echo esc_html__( 'If you want to take over control of your share buttons\' CSS entirely, turn on the switch below and enter your custom CSS.', 'simple-share-buttons-adder' ); ?> <strong><?php echo esc_html__( 'ALL of Simple Share Buttons Adder\'s CSS will be disabled', 'simple-share-buttons-adder' ); ?></strong>.</p>
|
260 |
-
</blockquote>
|
261 |
-
</div>
|
262 |
-
|
263 |
-
<div class="col-sm-12">
|
264 |
-
<?php
|
265 |
-
echo $this->forms->ssbp_input( $opts41s ); // WPCS: XSS ok.
|
266 |
-
echo $this->forms->ssbp_input( $opts42s ); // WPCS: XSS ok.
|
267 |
-
?>
|
268 |
-
</div>
|
269 |
</div>
|
270 |
</div>
|
271 |
</div>
|
59 |
<div id="ssba-preview-2" class="<?php echo esc_attr( $arr_settings['ssba_bar_position'] ); ?> ssbp-wrap ssbp--theme-<?php echo esc_attr( $arr_settings['ssba_bar_style'] ); ?>">
|
60 |
<div class="ssbp-container">
|
61 |
<ul class="ssbp-list">
|
62 |
+
<?php if ( is_array( $arr_bar_buttons ) ) : ?>
|
63 |
<?php foreach ( $arr_bar_buttons as $buttons ) :
|
64 |
$button = strtolower( str_replace( ' ', '_', str_replace( '+', '', $buttons['full_name'] ) ) ); ?>
|
65 |
<li style="margin: <?php echo esc_attr( $arr_settings['ssba_bar_margin'] ); ?>px 0;" class="ssbp-li--<?php echo esc_attr( $button );
|
75 |
<span class="<?php echo 'Y' !== $arr_settings['ssba_bar_show_share_count'] ? esc_attr( 'ssba-hide-button' ) : ''; ?> ssbp-each-share">1.8k</span>
|
76 |
</li>
|
77 |
<?php endforeach; ?>
|
78 |
+
<?php endif; ?>
|
79 |
</ul>
|
80 |
</div>
|
81 |
</div>
|
150 |
echo $this->forms->ssbp_input( $opts20s ); // WPCS: XSS ok.
|
151 |
?>
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
<h3>sharedcount.com</h3>
|
154 |
<p>
|
155 |
<?php echo esc_html__( 'Only necessary if you are experiencing issues with Facebook share counts.', 'simple-share-buttons-adder' ); ?> <a href="https://admin.sharedcount.com/admin/signup.php" target="_blank"><?php echo esc_html__( 'Signup for your free account here', 'simple-share-buttons-adder' ); ?></a>.
|
246 |
<div class="col-sm-12">
|
247 |
<?php echo $this->forms->ssbp_input( $opts40s ); // WPCS: XSS ok.?>
|
248 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
</div>
|
250 |
</div>
|
251 |
</div>
|