Version Description
Download this release
Release Info
Developer | DavidoffNeal |
Plugin | Simple Share Buttons Adder |
Version | 7.6.19 |
Comparing to | |
See all releases |
Code changes from version 7.5.19 to 7.6.19
- css/admin-theme.css +9 -1
- css/ssba.css +7 -0
- css/style.css +7 -0
- instance.php +1 -1
- php/class-admin-bits.php +12 -0
- php/class-admin-panel.php +38 -5
- php/class-buttons.php +41 -5
- php/class-database.php +6 -0
- readme.txt +11 -3
- simple-share-buttons-adder.php +1 -1
- templates/classic-tab.php +1 -13
- templates/plus-tab.php +1 -6
- templates/share-bar-tab.php +1 -13
css/admin-theme.css
CHANGED
@@ -119,7 +119,8 @@
|
|
119 |
display: inline-block;
|
120 |
padding: 0px;
|
121 |
font-size: 0;
|
122 |
-
color: #272727
|
|
|
123 |
}
|
124 |
.ssbp-wrap.ssbp--centred {
|
125 |
display: block;
|
@@ -596,3 +597,10 @@
|
|
596 |
#ssba-preview-2 .ssbp-list li:first-of-type {
|
597 |
margin-top: 0!important;
|
598 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
display: inline-block;
|
120 |
padding: 0px;
|
121 |
font-size: 0;
|
122 |
+
color: #272727;
|
123 |
+
z-index: 0!important;
|
124 |
}
|
125 |
.ssbp-wrap.ssbp--centred {
|
126 |
display: block;
|
597 |
#ssba-preview-2 .ssbp-list li:first-of-type {
|
598 |
margin-top: 0!important;
|
599 |
}
|
600 |
+
|
601 |
+
.right li .ssbp-each-share {
|
602 |
+
left: unset;
|
603 |
+
right: 100%;
|
604 |
+
margin-right: -12px;
|
605 |
+
margin-left: 0;
|
606 |
+
}
|
css/ssba.css
CHANGED
@@ -57,3 +57,10 @@
|
|
57 |
.ssbp-each-share, #ssba-bar-2 li .ssbp-each-share {
|
58 |
display: block;
|
59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
.ssbp-each-share, #ssba-bar-2 li .ssbp-each-share {
|
58 |
display: block;
|
59 |
}
|
60 |
+
|
61 |
+
.right li .ssbp-each-share {
|
62 |
+
left: unset;
|
63 |
+
right: 100%;
|
64 |
+
margin-right: -12px;
|
65 |
+
margin-left: 0;
|
66 |
+
}
|
css/style.css
CHANGED
@@ -270,3 +270,10 @@
|
|
270 |
.ssbp-list li img {
|
271 |
box-sizing: unset;
|
272 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
.ssbp-list li img {
|
271 |
box-sizing: unset;
|
272 |
}
|
273 |
+
|
274 |
+
.right li .ssbp-each-share {
|
275 |
+
left: unset;
|
276 |
+
right: 100%;
|
277 |
+
margin-right: -12px;
|
278 |
+
margin-left: 0;
|
279 |
+
}
|
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.
|
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.6.19' );
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
php/class-admin-bits.php
CHANGED
@@ -141,6 +141,15 @@ class Admin_Bits {
|
|
141 |
) )
|
142 |
) );
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
// Admin styles.
|
145 |
wp_enqueue_style( "{$this->plugin->assets_prefix}-readable" );
|
146 |
wp_enqueue_style( "{$this->plugin->assets_prefix}-colorpicker" );
|
@@ -260,6 +269,9 @@ class Admin_Bits {
|
|
260 |
$arr_options = array(
|
261 |
'ssba_image_set' => $ssba_post['ssba_image_set'],
|
262 |
'ssba_size' => $ssba_post['ssba_size'],
|
|
|
|
|
|
|
263 |
'ssba_pages' => ( isset( $ssba_post['ssba_pages'] ) ? $ssba_post['ssba_pages'] : 'N' ),
|
264 |
'ssba_posts' => ( isset( $ssba_post['ssba_posts'] ) ? $ssba_post['ssba_posts'] : 'N' ),
|
265 |
'ssba_cats_archs' => ( isset( $ssba_post['ssba_cats_archs'] ) ? $ssba_post['ssba_cats_archs'] : 'N' ),
|
141 |
) )
|
142 |
) );
|
143 |
|
144 |
+
// Get sbba settings.
|
145 |
+
$arr_settings = $this->class_ssba->get_ssba_settings();
|
146 |
+
|
147 |
+
$custom_css = ! empty( $arr_settings['ssba_additional_css'] ) ? $arr_settings['ssba_additional_css'] : '';
|
148 |
+
$custom_css .= ! empty( $arr_settings['ssba_plus_additional_css'] ) ? $arr_settings['ssba_plus_additional_css'] : '';
|
149 |
+
$custom_css .= ! empty( $arr_settings['ssba_bar_additional_css'] ) ? $arr_settings['ssba_bar_additional_css'] : '';
|
150 |
+
|
151 |
+
wp_add_inline_style( "{$this->plugin->assets_prefix}-admin-theme", $custom_css );
|
152 |
+
|
153 |
// Admin styles.
|
154 |
wp_enqueue_style( "{$this->plugin->assets_prefix}-readable" );
|
155 |
wp_enqueue_style( "{$this->plugin->assets_prefix}-colorpicker" );
|
269 |
$arr_options = array(
|
270 |
'ssba_image_set' => $ssba_post['ssba_image_set'],
|
271 |
'ssba_size' => $ssba_post['ssba_size'],
|
272 |
+
'ssba_omit_pages' => ( isset( $ssba_post['ssba_omit_pages'] ) ? $ssba_post['ssba_omit_pages'] : '' ),
|
273 |
+
'ssba_omit_pages_plus' => ( isset( $ssba_post['ssba_omit_pages_plus'] ) ? $ssba_post['ssba_omit_pages_plus'] : '' ),
|
274 |
+
'ssba_omit_pages_bar' => ( isset( $ssba_post['ssba_omit_pages_bar'] ) ? $ssba_post['ssba_omit_pages_bar'] : '' ),
|
275 |
'ssba_pages' => ( isset( $ssba_post['ssba_pages'] ) ? $ssba_post['ssba_pages'] : 'N' ),
|
276 |
'ssba_posts' => ( isset( $ssba_post['ssba_posts'] ) ? $ssba_post['ssba_posts'] : 'N' ),
|
277 |
'ssba_cats_archs' => ( isset( $ssba_post['ssba_cats_archs'] ) ? $ssba_post['ssba_cats_archs'] : 'N' ),
|
php/class-admin-panel.php
CHANGED
@@ -986,7 +986,7 @@ class Admin_Panel {
|
|
986 |
$opts36 = array(
|
987 |
'form_group' => false,
|
988 |
'type' => 'text',
|
989 |
-
'placeholder' => '
|
990 |
'name' => 'ssba_flattr_url',
|
991 |
'label' => 'Flattr URL',
|
992 |
'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
|
@@ -997,7 +997,7 @@ class Admin_Panel {
|
|
997 |
$opts36p = array(
|
998 |
'form_group' => false,
|
999 |
'type' => 'text',
|
1000 |
-
'placeholder' => '
|
1001 |
'name' => 'ssba_plus_flattr_url',
|
1002 |
'label' => 'Flattr URL',
|
1003 |
'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
|
@@ -1008,7 +1008,7 @@ class Admin_Panel {
|
|
1008 |
$opts36s = array(
|
1009 |
'form_group' => false,
|
1010 |
'type' => 'text',
|
1011 |
-
'placeholder' => '
|
1012 |
'name' => 'ssba_bar_flattr_url',
|
1013 |
'label' => 'Flattr URL',
|
1014 |
'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
|
@@ -1479,6 +1479,39 @@ class Admin_Panel {
|
|
1479 |
'value' => isset( $arr_settings['ssba_mobile_breakpoint'] ) ? $arr_settings['ssba_mobile_breakpoint'] : '',
|
1480 |
);
|
1481 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1482 |
// Notices.
|
1483 |
$notice = get_option( 'ssba_dismiss_notice' );
|
1484 |
|
@@ -1594,7 +1627,7 @@ class Admin_Panel {
|
|
1594 |
$disabled = 'Y' !== $arr_settings['accepted_sharethis_terms'] && 'facebook_save' === $str_selected ? 'style="background-color:#eaeaea;"' : null;
|
1595 |
|
1596 |
// Add a list item for each selected option.
|
1597 |
-
$html_selected_list .= '<li class="ssbp-option-item" id="' . esc_attr( $str_selected ) . '"><a title="' . esc_attr( $arr_buttons[ $str_selected ]['full_name'] ) . '"
|
1598 |
}
|
1599 |
}
|
1600 |
}
|
@@ -1660,7 +1693,7 @@ class Admin_Panel {
|
|
1660 |
$html_available_list .= ''; // Do nothing.
|
1661 |
} else {
|
1662 |
// Add a list item for each available option.
|
1663 |
-
$html_available_list .= '<li class="ssbp-option-item" id="' . esc_attr( $str_available ) . '"><a title="' . esc_attr( $arr_buttons[ $str_available ]['full_name'] ) . '"
|
1664 |
}
|
1665 |
}
|
1666 |
}
|
986 |
$opts36 = array(
|
987 |
'form_group' => false,
|
988 |
'type' => 'text',
|
989 |
+
'placeholder' => 'flattr.com/@username',
|
990 |
'name' => 'ssba_flattr_url',
|
991 |
'label' => 'Flattr URL',
|
992 |
'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
|
997 |
$opts36p = array(
|
998 |
'form_group' => false,
|
999 |
'type' => 'text',
|
1000 |
+
'placeholder' => 'flattr.com/@username',
|
1001 |
'name' => 'ssba_plus_flattr_url',
|
1002 |
'label' => 'Flattr URL',
|
1003 |
'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
|
1008 |
$opts36s = array(
|
1009 |
'form_group' => false,
|
1010 |
'type' => 'text',
|
1011 |
+
'placeholder' => 'flattr.com/@username',
|
1012 |
'name' => 'ssba_bar_flattr_url',
|
1013 |
'label' => 'Flattr URL',
|
1014 |
'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
|
1479 |
'value' => isset( $arr_settings['ssba_mobile_breakpoint'] ) ? $arr_settings['ssba_mobile_breakpoint'] : '',
|
1480 |
);
|
1481 |
|
1482 |
+
// Sharedcount api key.
|
1483 |
+
$page_omit = array(
|
1484 |
+
'form_group' => false,
|
1485 |
+
'type' => 'text',
|
1486 |
+
'placeholder' => 'Enter page titles separated by commas...',
|
1487 |
+
'name' => 'ssba_omit_pages',
|
1488 |
+
'label' => 'Hide On These Pages',
|
1489 |
+
'tooltip' => 'Add one or more page titles separated by commas of pages you wish to hide these buttons on.',
|
1490 |
+
'value' => isset( $arr_settings['ssba_omit_pages'] ) ? $arr_settings['ssba_omit_pages'] : '',
|
1491 |
+
);
|
1492 |
+
|
1493 |
+
// Sharedcount api key.
|
1494 |
+
$page_omit_plus = array(
|
1495 |
+
'form_group' => false,
|
1496 |
+
'type' => 'text',
|
1497 |
+
'placeholder' => 'Enter page titles separated by commas...',
|
1498 |
+
'name' => 'ssba_omit_pages_plus',
|
1499 |
+
'label' => 'Hide On These Pages',
|
1500 |
+
'tooltip' => 'Add one or more page titles separated by commas of pages you wish to hide these buttons on.',
|
1501 |
+
'value' => isset( $arr_settings['ssba_omit_pages_plus'] ) ? $arr_settings['ssba_omit_pages_plus'] : '',
|
1502 |
+
);
|
1503 |
+
|
1504 |
+
// Sharedcount api key.
|
1505 |
+
$page_omit_bar = array(
|
1506 |
+
'form_group' => false,
|
1507 |
+
'type' => 'text',
|
1508 |
+
'placeholder' => 'Enter page titles separated by commas...',
|
1509 |
+
'name' => 'ssba_omit_pages_bar',
|
1510 |
+
'label' => 'Hide On These Pages',
|
1511 |
+
'tooltip' => 'Add one or more page titles separated by commas of pages you wish to hide these buttons on.',
|
1512 |
+
'value' => isset( $arr_settings['ssba_omit_pages_bar'] ) ? $arr_settings['ssba_omit_pages_bar'] : '',
|
1513 |
+
);
|
1514 |
+
|
1515 |
// Notices.
|
1516 |
$notice = get_option( 'ssba_dismiss_notice' );
|
1517 |
|
1627 |
$disabled = 'Y' !== $arr_settings['accepted_sharethis_terms'] && 'facebook_save' === $str_selected ? 'style="background-color:#eaeaea;"' : null;
|
1628 |
|
1629 |
// Add a list item for each selected option.
|
1630 |
+
$html_selected_list .= '<li class="ssbp-option-item" id="' . esc_attr( $str_selected ) . '"><a title="' . esc_attr( $arr_buttons[ $str_selected ]['full_name'] ) . '" class="ssbp-btn ssbp-' . esc_attr( $str_selected ) . '" ' . esc_attr( $disabled ) . '></a></li>';
|
1631 |
}
|
1632 |
}
|
1633 |
}
|
1693 |
$html_available_list .= ''; // Do nothing.
|
1694 |
} else {
|
1695 |
// Add a list item for each available option.
|
1696 |
+
$html_available_list .= '<li class="ssbp-option-item" id="' . esc_attr( $str_available ) . '"><a title="' . esc_attr( $arr_buttons[ $str_available ]['full_name'] ) . '" class="ssbp-btn ssbp-' . esc_attr( $str_available ) . '" ' . esc_attr( $disabled ) . '></a></li>';
|
1697 |
}
|
1698 |
}
|
1699 |
}
|
php/class-buttons.php
CHANGED
@@ -154,6 +154,16 @@ class Buttons {
|
|
154 |
// Get sbba settings.
|
155 |
$arr_settings = $this->class_ssba->get_ssba_settings();
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
// Placement on pages/posts/categories/archives/homepage.
|
158 |
if (
|
159 |
( ! is_home() && ! is_front_page() && is_page() && ( 'Y' !== $arr_settings['ssba_new_buttons'] && 'Y' === $arr_settings['ssba_pages'] || ( 'Y' === $arr_settings['ssba_new_buttons'] && 'Y' === $arr_settings['ssba_plus_pages'] ) ) )
|
@@ -284,8 +294,11 @@ class Buttons {
|
|
284 |
|
285 |
// Get sbba settings.
|
286 |
$arr_settings = $this->class_ssba->get_ssba_settings();
|
|
|
|
|
|
|
287 |
|
288 |
-
if ( ( 'Y' !== $arr_settings['ssba_bar_desktop'] && ! wp_is_mobile() ) || ( 'Y' !== $arr_settings['ssba_bar_mobile'] && wp_is_mobile() ) || 'Y' !== $arr_settings['ssba_bar_enabled'] ) {
|
289 |
return;
|
290 |
}
|
291 |
|
@@ -585,7 +598,7 @@ class Buttons {
|
|
585 |
$boo_show_share_count = true;
|
586 |
|
587 |
// If show counters once option is selected.
|
588 |
-
if ( 'Y' === $arr_settings['ssba_bar_count_once'] ) {
|
589 |
// If not a page or post.
|
590 |
if ( ! is_page() && ! is_single() ) {
|
591 |
// Let show flag to false.
|
@@ -667,9 +680,9 @@ class Buttons {
|
|
667 |
// If sharedcount.com is enabled.
|
668 |
if ( ( ( 'Y' === $arr_settings['sharedcount_enabled'] && 'Y' !== $arr_settings['ssba_new_buttons'] )
|
669 |
||
|
670 |
-
( 'Y' === $arr_settings['plus_sharedcount_enabled'] && 'Y' === $arr_settings['ssba_new_buttons'] )
|
671 |
||
|
672 |
-
( 'Y' === $arr_settings['bar_sharedcount_enabled'] && isset( $arr_settings['bar_call'] )
|
673 |
)
|
674 |
) ) {
|
675 |
|
@@ -762,6 +775,14 @@ class Buttons {
|
|
762 |
$html_share_buttons .= '<li class="ssbp-li--twitter">';
|
763 |
}
|
764 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
765 |
// Twitter share link.
|
766 |
$html_share_buttons .= '<a data-site="" class="ssba_twitter_share' . esc_attr( $plus_class ) . '" href="http://twitter.com/share?url=' . esc_attr( $url_current_page ) . '&text=' . esc_attr( $twitter_share_text ) . '" ' . esc_attr( $target . $nofollow ) . '>';
|
767 |
|
@@ -1310,6 +1331,10 @@ class Buttons {
|
|
1310 |
$html_share_buttons .= '<li class="ssbp-li--email">';
|
1311 |
}
|
1312 |
|
|
|
|
|
|
|
|
|
1313 |
// Email share link.
|
1314 |
$html_share_buttons .= '<a data-site="email" class="ssba_email_share' . esc_attr( $plus_class ) . '" href="' . esc_url( $url ) . '">';
|
1315 |
|
@@ -1367,6 +1392,7 @@ class Buttons {
|
|
1367 |
$plus_class = 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ? ' ssbp-flattr ssbp-btn' : '';
|
1368 |
$count_class = 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ? ' ssbp-each-share' : ' ssba_sharecount';
|
1369 |
$html_share_buttons = '';
|
|
|
1370 |
|
1371 |
// Add li if plus.
|
1372 |
if ( 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ) {
|
@@ -1379,8 +1405,18 @@ class Buttons {
|
|
1379 |
$url_current_page = $arr_settings['ssba_flattr_url'];
|
1380 |
}
|
1381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1382 |
// Flattr share link.
|
1383 |
-
$html_share_buttons .= '<a data-site="flattr" class="ssba_flattr_share' . esc_attr( $plus_class ) . '" href="https://flattr.com/submit/auto?user_id=' . esc_attr( $
|
1384 |
|
1385 |
// If image set is not custom.
|
1386 |
if ( 'custom' !== $arr_settings['ssba_image_set'] && 'Y' !== $arr_settings['ssba_new_buttons'] && ! isset( $arr_settings['bar_call'] ) ) {
|
154 |
// Get sbba settings.
|
155 |
$arr_settings = $this->class_ssba->get_ssba_settings();
|
156 |
|
157 |
+
$page_title = $post->post_title;
|
158 |
+
$plus_omit_pages = ! empty( $arr_settings['ssba_omit_pages_plus'] ) ? explode( ',', $arr_settings['ssba_omit_pages_plus'] ) : '';
|
159 |
+
$plus_omitted = is_array( $plus_omit_pages ) ? in_array( $page_title, array_map( 'trim', $plus_omit_pages ), true ) : false;
|
160 |
+
$omit_pages = ! empty( $arr_settings['ssba_omit_pages'] ) ? explode( ',', $arr_settings['ssba_omit_pages'] ) : '';
|
161 |
+
$omitted = is_array( $omit_pages ) ? in_array( $page_title, array_map( 'trim', $omit_pages ), true ) : false;
|
162 |
+
|
163 |
+
if ( ( 'Y' === $arr_settings['ssba_new_buttons'] && $plus_omitted ) || ( 'Y' !== $arr_settings['ssba_new_buttons'] && $omitted ) ) {
|
164 |
+
return $content;
|
165 |
+
}
|
166 |
+
|
167 |
// Placement on pages/posts/categories/archives/homepage.
|
168 |
if (
|
169 |
( ! is_home() && ! is_front_page() && is_page() && ( 'Y' !== $arr_settings['ssba_new_buttons'] && 'Y' === $arr_settings['ssba_pages'] || ( 'Y' === $arr_settings['ssba_new_buttons'] && 'Y' === $arr_settings['ssba_plus_pages'] ) ) )
|
294 |
|
295 |
// Get sbba settings.
|
296 |
$arr_settings = $this->class_ssba->get_ssba_settings();
|
297 |
+
$page_title = $post->post_title;
|
298 |
+
$omit_pages = ! empty( $arr_settings['ssba_omit_pages_bar'] ) ? explode( ',', $arr_settings['ssba_omit_pages_bar'] ) : '';
|
299 |
+
$omitted = is_array( $omit_pages ) ? in_array( $page_title, array_map( 'trim', $omit_pages ), true ) : false;
|
300 |
|
301 |
+
if ( ( 'Y' !== $arr_settings['ssba_bar_desktop'] && ! wp_is_mobile() ) || ( 'Y' !== $arr_settings['ssba_bar_mobile'] && wp_is_mobile() ) || 'Y' !== $arr_settings['ssba_bar_enabled'] || $omitted ) {
|
302 |
return;
|
303 |
}
|
304 |
|
598 |
$boo_show_share_count = true;
|
599 |
|
600 |
// If show counters once option is selected.
|
601 |
+
if ( isset( $arr_settings['ssba_bar_count_once'] ) && 'Y' === $arr_settings['ssba_bar_count_once'] ) {
|
602 |
// If not a page or post.
|
603 |
if ( ! is_page() && ! is_single() ) {
|
604 |
// Let show flag to false.
|
680 |
// If sharedcount.com is enabled.
|
681 |
if ( ( ( 'Y' === $arr_settings['sharedcount_enabled'] && 'Y' !== $arr_settings['ssba_new_buttons'] )
|
682 |
||
|
683 |
+
( isset( $arr_settings['plus_sharedcount_enabled'] ) && 'Y' === $arr_settings['plus_sharedcount_enabled'] && 'Y' === $arr_settings['ssba_new_buttons'] )
|
684 |
||
|
685 |
+
( isset( $arr_settings['bar_sharedcount_enabled'] ) && 'Y' === $arr_settings['bar_sharedcount_enabled'] && isset( $arr_settings['bar_call'] )
|
686 |
)
|
687 |
) ) {
|
688 |
|
775 |
$html_share_buttons .= '<li class="ssbp-li--twitter">';
|
776 |
}
|
777 |
|
778 |
+
if ( 'Y' === $arr_settings['ssba_new_buttons'] && ! empty( $arr_settings['ssba_plus_twitter_text'] ) ) {
|
779 |
+
$twitter_share_text = rawurlencode( html_entity_decode( $str_page_title . ' ' . $arr_settings['ssba_plus_twitter_text'], ENT_COMPAT, 'UTF-8' ) );
|
780 |
+
}
|
781 |
+
|
782 |
+
if ( isset( $arr_settings['bar_call'] ) && ! empty( $arr_settings['ssba_bar_twitter_text'] ) ) {
|
783 |
+
$twitter_share_text = rawurlencode( html_entity_decode( $str_page_title . ' ' . $arr_settings['ssba_bar_twitter_text'], ENT_COMPAT, 'UTF-8' ) );
|
784 |
+
}
|
785 |
+
|
786 |
// Twitter share link.
|
787 |
$html_share_buttons .= '<a data-site="" class="ssba_twitter_share' . esc_attr( $plus_class ) . '" href="http://twitter.com/share?url=' . esc_attr( $url_current_page ) . '&text=' . esc_attr( $twitter_share_text ) . '" ' . esc_attr( $target . $nofollow ) . '>';
|
788 |
|
1331 |
$html_share_buttons .= '<li class="ssbp-li--email">';
|
1332 |
}
|
1333 |
|
1334 |
+
$url = 'Y' === $arr_settings['ssba_new_buttons'] ? 'mailto:?subject=' . $email_title . '&body=' . $arr_settings['ssba_plus_email_message'] . ' ' . $url_current_page : $url;
|
1335 |
+
$url = isset( $arr_settings['bar_call'] ) ? 'mailto:?subject=' . $email_title . '&body=' . $arr_settings['ssba_bar_email_message'] . ' ' . $url_current_page : $url;
|
1336 |
+
|
1337 |
+
|
1338 |
// Email share link.
|
1339 |
$html_share_buttons .= '<a data-site="email" class="ssba_email_share' . esc_attr( $plus_class ) . '" href="' . esc_url( $url ) . '">';
|
1340 |
|
1392 |
$plus_class = 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ? ' ssbp-flattr ssbp-btn' : '';
|
1393 |
$count_class = 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ? ' ssbp-each-share' : ' ssba_sharecount';
|
1394 |
$html_share_buttons = '';
|
1395 |
+
$userid = !empty( $arr_settings['ssba_flattr_user_id'] ) ? $arr_settings['ssba_flattr_user_id'] : '';
|
1396 |
|
1397 |
// Add li if plus.
|
1398 |
if ( 'Y' === $arr_settings['ssba_new_buttons'] || isset( $arr_settings['bar_call'] ) ) {
|
1405 |
$url_current_page = $arr_settings['ssba_flattr_url'];
|
1406 |
}
|
1407 |
|
1408 |
+
if ( 'Y' === $arr_settings['ssba_new_buttons'] ) {
|
1409 |
+
$userid = !empty( $arr_settings['ssba_plus_flattr_user_id'] ) ? $arr_settings['ssba_plus_flattr_user_id'] : $userid;
|
1410 |
+
$url_current_page = !empty( $arr_settings['ssba_plus_flattr_url'] ) ? $arr_settings['ssba_plus_flattr_url'] : $url_current_page;
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
if ( isset( $arr_settings['bar_call'] ) ) {
|
1414 |
+
$userid = !empty( $arr_settings['ssba_bar_flattr_user_id'] ) ? $arr_settings['ssba_bar_flattr_user_id'] : $userid;
|
1415 |
+
$url_current_page = !empty( $arr_settings['ssba_bar_flattr_url'] ) ? $arr_settings['ssba_bar_flattr_url'] : $url_current_page;
|
1416 |
+
}
|
1417 |
+
|
1418 |
// Flattr share link.
|
1419 |
+
$html_share_buttons .= '<a data-site="flattr" class="ssba_flattr_share' . esc_attr( $plus_class ) . '" href="https://flattr.com/submit/auto?user_id=' . esc_attr( $userid ) . '&title=' . esc_attr( $str_page_title ) . '&url=' . esc_attr( $url_current_page ) . '" ' . esc_attr( $target . $nofollow ) . '>';
|
1420 |
|
1421 |
// If image set is not custom.
|
1422 |
if ( 'custom' !== $arr_settings['ssba_image_set'] && 'Y' !== $arr_settings['ssba_new_buttons'] && ! isset( $arr_settings['bar_call'] ) ) {
|
php/class-database.php
CHANGED
@@ -54,6 +54,9 @@ class Database {
|
|
54 |
public function get_setting_array( $return_array = false ) {
|
55 |
// Array ready with defaults.
|
56 |
$ssba_settings = array(
|
|
|
|
|
|
|
57 |
'ssba_image_set' => 'somacro',
|
58 |
'ssba_size' => '35',
|
59 |
'ssba_pages' => '',
|
@@ -504,6 +507,9 @@ class Database {
|
|
504 |
delete_option( 'ssba_plus_cats_archs' );
|
505 |
delete_option( 'ssba_plus_homepage' );
|
506 |
delete_option( 'ssba_plus_excerpts' );
|
|
|
|
|
|
|
507 |
delete_option( 'ssba_bar_enabled' );
|
508 |
delete_option( 'ssba_bar_pages' );
|
509 |
delete_option( 'ssba_bar_posts' );
|
54 |
public function get_setting_array( $return_array = false ) {
|
55 |
// Array ready with defaults.
|
56 |
$ssba_settings = array(
|
57 |
+
'ssba_omit_pages' => '',
|
58 |
+
'ssba_omit_pages_plus' => '',
|
59 |
+
'ssba_omit_pages_bar' => '',
|
60 |
'ssba_image_set' => 'somacro',
|
61 |
'ssba_size' => '35',
|
62 |
'ssba_pages' => '',
|
507 |
delete_option( 'ssba_plus_cats_archs' );
|
508 |
delete_option( 'ssba_plus_homepage' );
|
509 |
delete_option( 'ssba_plus_excerpts' );
|
510 |
+
delete_option( 'ssba_omit_pages');
|
511 |
+
delete_option( 'ssba_omit_pages_bar');
|
512 |
+
delete_option( 'ssba_omit_pages_plus');
|
513 |
delete_option( 'ssba_bar_enabled' );
|
514 |
delete_option( 'ssba_bar_pages' );
|
515 |
delete_option( 'ssba_bar_posts' );
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Simple Share Buttons Adder ===
|
2 |
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.
|
6 |
-
Stable tag: 7.
|
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,6 +66,14 @@ Please visit the <a href="https://wordpress.org/support/plugin/simple-share-butt
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
= 7.5.19 =
|
70 |
* Fix: double class issue.
|
71 |
* Add: remove gloogle plus from button options.
|
1 |
=== Simple Share Buttons Adder ===
|
2 |
Contributors: sharethis, scottstorebloom, surlyrightclick, DavidoffNeal
|
3 |
+
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk, flattr
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 5.2.2
|
6 |
+
Stable tag: 7.6.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.6.20 =
|
70 |
+
* Add: remove sharecount.com opions.
|
71 |
+
* Add: Add page omit by title options for all buttons.
|
72 |
+
* Fix: Flattr button.
|
73 |
+
* Fix: Email custom text.
|
74 |
+
* Fix: Twitter custom text.
|
75 |
+
* Fix: Verify 5+ compatibility with gutenberg.
|
76 |
+
|
77 |
= 7.5.19 =
|
78 |
* Fix: double class issue.
|
79 |
* Add: remove gloogle plus from button options.
|
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.
|
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.6.19
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|
templates/classic-tab.php
CHANGED
@@ -73,6 +73,7 @@
|
|
73 |
<?php
|
74 |
echo $this->forms->ssbp_checkboxes( $opts1 ); // WPCS: XSS ok.
|
75 |
echo $this->forms->ssbp_input( $opts2 ); // WPCS: XSS ok.
|
|
|
76 |
|
77 |
$line_height = 'below' === $arr_settings['ssba_text_placement'] || 'above' === $arr_settings['ssba_text_placement'] ? 'inherit' : ( (int) $arr_settings['ssba_size'] + (int) $arr_settings['ssba_padding'] + 3 ) . 'px';
|
78 |
$image_line_height = $arr_settings['ssba_size'] . 'px';
|
@@ -212,19 +213,6 @@
|
|
212 |
echo $this->forms->ssbp_input( $opts20 ); // WPCS: XSS ok.
|
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>.
|
219 |
-
</p>
|
220 |
-
|
221 |
-
<?php echo $this->forms->ssbp_input( $opts23 ); // WPCS: XSS ok. ?>
|
222 |
-
</div>
|
223 |
-
<div class="col-md-6">
|
224 |
-
<?php echo $this->forms->ssbp_input( $opts24 ); // WPCS: XSS ok. ?>
|
225 |
-
</div>
|
226 |
-
<div class="col-md-6">
|
227 |
-
<?php echo $this->forms->ssbp_input( $opts25 ); // WPCS: XSS ok. ?>
|
228 |
</div>
|
229 |
</div>
|
230 |
</div>
|
73 |
<?php
|
74 |
echo $this->forms->ssbp_checkboxes( $opts1 ); // WPCS: XSS ok.
|
75 |
echo $this->forms->ssbp_input( $opts2 ); // WPCS: XSS ok.
|
76 |
+
echo $this->forms->ssbp_input( $page_omit ); // WPCS: XSS ok.
|
77 |
|
78 |
$line_height = 'below' === $arr_settings['ssba_text_placement'] || 'above' === $arr_settings['ssba_text_placement'] ? 'inherit' : ( (int) $arr_settings['ssba_size'] + (int) $arr_settings['ssba_padding'] + 3 ) . 'px';
|
79 |
$image_line_height = $arr_settings['ssba_size'] . 'px';
|
213 |
echo $this->forms->ssbp_input( $opts20 ); // WPCS: XSS ok.
|
214 |
echo $this->forms->ssbp_input( $opts21 ); // WPCS: XSS ok.
|
215 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
</div>
|
217 |
</div>
|
218 |
</div>
|
templates/plus-tab.php
CHANGED
@@ -59,6 +59,7 @@
|
|
59 |
<?php
|
60 |
echo $this->forms->ssbp_checkboxes( $opts48 ); // WPCS: XSS ok.
|
61 |
echo $this->forms->ssbp_input( $opts49 ); // WPCS: XSS ok.
|
|
|
62 |
?>
|
63 |
|
64 |
<h3 id="ssba-preview-title-2"><?php echo esc_html__( 'Preview - the order of your preview will update when you save.', 'simple-share-buttons-adder' ); ?></h3>
|
@@ -177,12 +178,6 @@
|
|
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. ?>
|
182 |
-
</div>
|
183 |
-
<div class="col-md-6">
|
184 |
-
<?php echo $this->forms->ssbp_input( $opts25p ); // WPCS: XSS ok. ?>
|
185 |
-
</div>
|
186 |
</div>
|
187 |
</div>
|
188 |
</div>
|
59 |
<?php
|
60 |
echo $this->forms->ssbp_checkboxes( $opts48 ); // WPCS: XSS ok.
|
61 |
echo $this->forms->ssbp_input( $opts49 ); // WPCS: XSS ok.
|
62 |
+
echo $this->forms->ssbp_input( $page_omit_plus ); // WPCS: XSS ok.
|
63 |
?>
|
64 |
|
65 |
<h3 id="ssba-preview-title-2"><?php echo esc_html__( 'Preview - the order of your preview will update when you save.', 'simple-share-buttons-adder' ); ?></h3>
|
178 |
echo $this->forms->ssbp_input( $opts20p ); // WPCS: XSS ok.
|
179 |
?>
|
180 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
</div>
|
182 |
</div>
|
183 |
</div>
|
templates/share-bar-tab.php
CHANGED
@@ -82,6 +82,7 @@
|
|
82 |
<?php
|
83 |
echo $this->forms->ssbp_checkboxes( $opts45 ); // WPCS: XSS ok.
|
84 |
echo $this->forms->ssbp_checkboxes( $share_bar_display ); // WPCS: XSS ok.
|
|
|
85 |
?>
|
86 |
<div class="accor-wrap">
|
87 |
<div class="accor-tab">
|
@@ -149,19 +150,6 @@
|
|
149 |
echo $this->forms->ssbp_input( $opts19s ); // WPCS: XSS ok.
|
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>.
|
156 |
-
</p>
|
157 |
-
|
158 |
-
<?php echo $this->forms->ssbp_input( $opts23b ); // WPCS: XSS ok. ?>
|
159 |
-
</div>
|
160 |
-
<div class="col-md-6">
|
161 |
-
<?php echo $this->forms->ssbp_input( $opts24b ); // WPCS: XSS ok. ?>
|
162 |
-
</div>
|
163 |
-
<div class="col-md-6">
|
164 |
-
<?php echo $this->forms->ssbp_input( $opts25b ); // WPCS: XSS ok. ?>
|
165 |
</div>
|
166 |
</div>
|
167 |
</div>
|
82 |
<?php
|
83 |
echo $this->forms->ssbp_checkboxes( $opts45 ); // WPCS: XSS ok.
|
84 |
echo $this->forms->ssbp_checkboxes( $share_bar_display ); // WPCS: XSS ok.
|
85 |
+
echo $this->forms->ssbp_input( $page_omit_bar ); // WPCS: XSS ok.
|
86 |
?>
|
87 |
<div class="accor-wrap">
|
88 |
<div class="accor-tab">
|
150 |
echo $this->forms->ssbp_input( $opts19s ); // WPCS: XSS ok.
|
151 |
echo $this->forms->ssbp_input( $opts20s ); // WPCS: XSS ok.
|
152 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
</div>
|
154 |
</div>
|
155 |
</div>
|