Version Description
- New option to hide a floating bar until scrolled past a header region
- New option to hide a floating bar when scrolled to a footer region
- New "Center docked" option for the horizontal floating bar
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.7.28 |
Comparing to | |
See all releases |
Code changes from version 1.7.27 to 1.7.28
- README.txt +10 -2
- add-to-any.php +34 -2
- addtoany.admin.php +82 -16
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: buttons, share, icons, social media, share buttons, sharing, share button,
|
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.0
|
6 |
Requires PHP: 5.2
|
7 |
-
Stable tag: 1.7.
|
8 |
|
9 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
10 |
|
@@ -345,6 +345,11 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
345 |
|
346 |
== Changelog ==
|
347 |
|
|
|
|
|
|
|
|
|
|
|
348 |
= 1.7.27 =
|
349 |
* New "Attach to content" option for the vertical floating bar
|
350 |
* Add Mix
|
@@ -969,8 +974,11 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
969 |
|
970 |
== Upgrade Notice ==
|
971 |
|
|
|
|
|
|
|
972 |
= 1.7.27 =
|
973 |
-
|
974 |
|
975 |
= 1.7.23 =
|
976 |
If you have CSS code customizations referencing the universal button (`.addtoany_share_save`) or the standard share buttons container (`.addtoany_share_save_container`), those class names have been deprecated and will be removed in a future plugin update. The new class names are `.addtoany_share` and `.addtoany_content` respectively. Please update your custom CSS if you are referencing the deprecated class names.
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.0
|
6 |
Requires PHP: 5.2
|
7 |
+
Stable tag: 1.7.28
|
8 |
|
9 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
10 |
|
345 |
|
346 |
== Changelog ==
|
347 |
|
348 |
+
= 1.7.28 =
|
349 |
+
* New option to hide a floating bar until scrolled past a header region
|
350 |
+
* New option to hide a floating bar when scrolled to a footer region
|
351 |
+
* New "Center docked" option for the horizontal floating bar
|
352 |
+
|
353 |
= 1.7.27 =
|
354 |
* New "Attach to content" option for the vertical floating bar
|
355 |
* Add Mix
|
974 |
|
975 |
== Upgrade Notice ==
|
976 |
|
977 |
+
= 1.7.28 =
|
978 |
+
New floating options! Hide a bar until the page is scrolled past a header. Hide a bar where it would overlap a footer. Center your floating horizontal bar, too.
|
979 |
+
|
980 |
= 1.7.27 =
|
981 |
+
New "Attach to content" option for the floating vertical bar!
|
982 |
|
983 |
= 1.7.23 =
|
984 |
If you have CSS code customizations referencing the universal button (`.addtoany_share_save`) or the standard share buttons container (`.addtoany_share_save_container`), those class names have been deprecated and will be removed in a future plugin update. The new class names are `.addtoany_share` and `.addtoany_content` respectively. Please update your custom CSS if you are referencing the deprecated class names.
|
add-to-any.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: AddToAny Share Buttons
|
4 |
Plugin URI: https://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more.
|
6 |
-
Version: 1.7.
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
@@ -117,6 +117,7 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = array() ) {
|
|
117 |
$kit_data_media = empty( $linkmedia ) ? '' : ' data-a2a-media="' . $linkmedia . '"';
|
118 |
$kit_data_title = empty( $linkname ) || $use_current_page ? '' : ' data-a2a-title="' . $linkname . '"';
|
119 |
$kit_data_url = empty( $linkurl ) || $use_current_page ? '' : ' data-a2a-url="' . $linkurl . '"';
|
|
|
120 |
$kit_style = '';
|
121 |
|
122 |
// Add additional classNames to .a2a_kit
|
@@ -152,7 +153,7 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = array() ) {
|
|
152 |
|
153 |
if ( ! isset( $args['html_container_open'] ) ) {
|
154 |
$args['html_container_open'] = '<div class="a2a_kit' . $icon_size_classname . $kit_additional_classes . '"'
|
155 |
-
. $kit_data_url . $kit_data_title . $kit_data_media . $kit_style . '>';
|
156 |
$args['is_kit'] = true;
|
157 |
}
|
158 |
if ( ! isset( $args['html_container_close'] ) )
|
@@ -673,6 +674,21 @@ function ADDTOANY_SHARE_SAVE_FLOATING( $args = array() ) {
|
|
673 |
$offset = ( isset( $options['floating_vertical_offset'] ) ) ? $options['floating_vertical_offset'] . 'px' : '0px';
|
674 |
// Icon size
|
675 |
$vertical_args['icon_size'] = ( isset( $options['floating_vertical_icon_size'] ) ) ? $options['floating_vertical_icon_size'] : '32';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
|
677 |
// Add a2a_vertical_style className to Kit classes
|
678 |
$vertical_args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_vertical_style' );
|
@@ -704,6 +720,20 @@ function ADDTOANY_SHARE_SAVE_FLOATING( $args = array() ) {
|
|
704 |
$offset = ( isset( $options['floating_horizontal_offset'] ) ) ? $options['floating_horizontal_offset'] . 'px' : '0px';
|
705 |
// Icon size
|
706 |
$horizontal_args['icon_size'] = ( isset( $options['floating_horizontal_icon_size'] ) ) ? $options['floating_horizontal_icon_size'] : '32';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
|
708 |
// Add a2a_default_style className to Kit classes
|
709 |
$horizontal_args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_default_style' );
|
@@ -713,6 +743,8 @@ function ADDTOANY_SHARE_SAVE_FLOATING( $args = array() ) {
|
|
713 |
$horizontal_args['kit_style'] = 'bottom:' . $offset . ';left:' . $position . ';';
|
714 |
} elseif ( 'right_docked' === $horizontal_type ) {
|
715 |
$horizontal_args['kit_style'] = 'bottom:' . $offset . ';right:' . $position . ';';
|
|
|
|
|
716 |
}
|
717 |
// Background color
|
718 |
if ( ! empty( $options['floating_horizontal_bg'] ) && 'custom' === $options['floating_horizontal_bg'] ) {
|
3 |
Plugin Name: AddToAny Share Buttons
|
4 |
Plugin URI: https://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more.
|
6 |
+
Version: 1.7.28
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
117 |
$kit_data_media = empty( $linkmedia ) ? '' : ' data-a2a-media="' . $linkmedia . '"';
|
118 |
$kit_data_title = empty( $linkname ) || $use_current_page ? '' : ' data-a2a-title="' . $linkname . '"';
|
119 |
$kit_data_url = empty( $linkurl ) || $use_current_page ? '' : ' data-a2a-url="' . $linkurl . '"';
|
120 |
+
$kit_data_scroll_show = empty( $scroll_show ) ? '' : ' data-a2a-scroll-show="' . $scroll_show . '"';
|
121 |
$kit_style = '';
|
122 |
|
123 |
// Add additional classNames to .a2a_kit
|
153 |
|
154 |
if ( ! isset( $args['html_container_open'] ) ) {
|
155 |
$args['html_container_open'] = '<div class="a2a_kit' . $icon_size_classname . $kit_additional_classes . '"'
|
156 |
+
. $kit_data_url . $kit_data_title . $kit_data_media . $kit_data_scroll_show . $kit_style . '>';
|
157 |
$args['is_kit'] = true;
|
158 |
}
|
159 |
if ( ! isset( $args['html_container_close'] ) )
|
674 |
$offset = ( isset( $options['floating_vertical_offset'] ) ) ? $options['floating_vertical_offset'] . 'px' : '0px';
|
675 |
// Icon size
|
676 |
$vertical_args['icon_size'] = ( isset( $options['floating_vertical_icon_size'] ) ) ? $options['floating_vertical_icon_size'] : '32';
|
677 |
+
|
678 |
+
// Show on scroll value from the top
|
679 |
+
$vertical_scroll_show_top = isset( $options['floating_vertical_scroll_top'] ) && '1' == $options['floating_vertical_scroll_top']
|
680 |
+
&& isset( $options['floating_vertical_scroll_top_pixels'] )
|
681 |
+
&& is_numeric( $options['floating_vertical_scroll_top_pixels'] ) ? $options['floating_vertical_scroll_top_pixels'] : '';
|
682 |
+
// Show on scroll value from the bottom
|
683 |
+
$vertical_scroll_show_bottom = isset( $options['floating_vertical_scroll_bottom'] ) && '1' == $options['floating_vertical_scroll_top']
|
684 |
+
&& isset( $options['floating_vertical_scroll_bottom_pixels'] )
|
685 |
+
&& is_numeric( $options['floating_vertical_scroll_bottom_pixels'] ) ? $options['floating_vertical_scroll_bottom_pixels'] : '';
|
686 |
+
// Merge values as required
|
687 |
+
if ( ! empty( $vertical_scroll_show_bottom ) ) {
|
688 |
+
$vertical_args['scroll_show'] = empty( $vertical_scroll_show_top ) ? '0,' . $vertical_scroll_show_bottom : $vertical_scroll_show_top . ',' . $vertical_scroll_show_bottom;
|
689 |
+
} elseif ( ! empty( $vertical_scroll_show_top ) ) {
|
690 |
+
$vertical_args['scroll_show'] = $vertical_scroll_show_top;
|
691 |
+
}
|
692 |
|
693 |
// Add a2a_vertical_style className to Kit classes
|
694 |
$vertical_args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_vertical_style' );
|
720 |
$offset = ( isset( $options['floating_horizontal_offset'] ) ) ? $options['floating_horizontal_offset'] . 'px' : '0px';
|
721 |
// Icon size
|
722 |
$horizontal_args['icon_size'] = ( isset( $options['floating_horizontal_icon_size'] ) ) ? $options['floating_horizontal_icon_size'] : '32';
|
723 |
+
// Show on scroll value from the top
|
724 |
+
$horizontal_scroll_show_top = isset( $options['floating_horizontal_scroll_top'] ) && '1' == $options['floating_horizontal_scroll_top']
|
725 |
+
&& isset( $options['floating_horizontal_scroll_top_pixels'] )
|
726 |
+
&& is_numeric( $options['floating_horizontal_scroll_top_pixels'] ) ? $options['floating_horizontal_scroll_top_pixels'] : '';
|
727 |
+
// Show on scroll value from the bottom
|
728 |
+
$horizontal_scroll_show_bottom = isset( $options['floating_horizontal_scroll_bottom'] ) && '1' == $options['floating_horizontal_scroll_top']
|
729 |
+
&& isset( $options['floating_horizontal_scroll_bottom_pixels'] )
|
730 |
+
&& is_numeric( $options['floating_horizontal_scroll_bottom_pixels'] ) ? $options['floating_horizontal_scroll_bottom_pixels'] : '';
|
731 |
+
// Merge values as required
|
732 |
+
if ( ! empty( $horizontal_scroll_show_bottom ) ) {
|
733 |
+
$horizontal_args['scroll_show'] = empty( $horizontal_scroll_show_top ) ? '0,' . $horizontal_scroll_show_bottom : $horizontal_scroll_show_top . ',' . $horizontal_scroll_show_bottom;
|
734 |
+
} elseif ( ! empty( $horizontal_scroll_show_top ) ) {
|
735 |
+
$horizontal_args['scroll_show'] = $horizontal_scroll_show_top;
|
736 |
+
}
|
737 |
|
738 |
// Add a2a_default_style className to Kit classes
|
739 |
$horizontal_args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_default_style' );
|
743 |
$horizontal_args['kit_style'] = 'bottom:' . $offset . ';left:' . $position . ';';
|
744 |
} elseif ( 'right_docked' === $horizontal_type ) {
|
745 |
$horizontal_args['kit_style'] = 'bottom:' . $offset . ';right:' . $position . ';';
|
746 |
+
} elseif ( 'center_docked' === $horizontal_type ) {
|
747 |
+
$horizontal_args['kit_style'] = 'bottom:' . $offset . ';left:50%;transform:translateX(-50%);';
|
748 |
}
|
749 |
// Background color
|
750 |
if ( ! empty( $options['floating_horizontal_bg'] ) && 'custom' === $options['floating_horizontal_bg'] ) {
|
addtoany.admin.php
CHANGED
@@ -219,7 +219,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
219 |
if ( 'floating' == $current_screen ) {
|
220 |
// Floating options screen
|
221 |
|
222 |
-
$possible_floating_values = array( 'left_docked', 'right_docked', 'left_attached', 'right_attached', 'none' );
|
223 |
|
224 |
$new_options['floating_vertical'] = ( in_array( $_POST['A2A_SHARE_SAVE_floating_vertical'], $possible_floating_values ) ) ? $_POST['A2A_SHARE_SAVE_floating_vertical'] : 'none';
|
225 |
$new_options['floating_horizontal'] = ( in_array( $_POST['A2A_SHARE_SAVE_floating_horizontal'], $possible_floating_values ) ) ? $_POST['A2A_SHARE_SAVE_floating_horizontal'] : 'none';
|
@@ -243,6 +243,26 @@ function A2A_SHARE_SAVE_options_page() {
|
|
243 |
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] ) &&
|
244 |
is_numeric( $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] )
|
245 |
) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] : '981';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
$new_options['floating_horizontal_icon_size'] = (
|
248 |
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_icon_size'] ) &&
|
@@ -276,6 +296,26 @@ function A2A_SHARE_SAVE_options_page() {
|
|
276 |
is_numeric( $_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width'] )
|
277 |
) ? $_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width'] : '980';
|
278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
$new_options['floating_vertical_icon_size'] = (
|
280 |
isset( $_POST['A2A_SHARE_SAVE_floating_vertical_icon_size'] ) &&
|
281 |
is_numeric( $_POST['A2A_SHARE_SAVE_floating_vertical_icon_size'] )
|
@@ -506,7 +546,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
506 |
<input name="A2A_SHARE_SAVE_button" value="CUSTOM" id="A2A_SHARE_SAVE_button_is_custom" type="radio"<?php if ( isset( $options['button'] ) && 'CUSTOM' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
507 |
<span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
|
508 |
</label>
|
509 |
-
<input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_custom').checked=true" style="vertical-align:middle" value="<?php if ( isset( $options['button_custom'] ) )
|
510 |
</div>
|
511 |
<div class="addtoany_extra_element">
|
512 |
<label>
|
@@ -536,7 +576,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
536 |
<th scope="row"><?php _e('Sharing Header', 'add-to-any'); ?></th>
|
537 |
<td><fieldset id="addtoany_extra_section_sharing_header" class="addtoany_extra_section<?php if ( ! empty( $options['header'] ) ) echo ' addtoany_show_extra'; ?>" role="region">
|
538 |
<label>
|
539 |
-
<input name="A2A_SHARE_SAVE_header" type="text" class="code" placeholder="<?php esc_attr_e( 'Share this:' ); ?>" size="50" value="<?php if ( isset( $options['header'] ) )
|
540 |
</label>
|
541 |
</fieldset></td>
|
542 |
</tr>
|
@@ -655,14 +695,14 @@ function A2A_SHARE_SAVE_options_page() {
|
|
655 |
<input name="A2A_SHARE_SAVE_custom_icons" id="A2A_SHARE_SAVE_custom_icons" type="checkbox"<?php if ( isset( $options['custom_icons'] ) && $options['custom_icons'] == 'url' ) echo ' checked="checked"'; ?> value="url"/>
|
656 |
<?php _e('Use custom icons. URL:', 'add-to-any'); ?>
|
657 |
</label>
|
658 |
-
<input name="A2A_SHARE_SAVE_custom_icons_url" type="text" class="code" size="50" style="vertical-align:middle" placeholder="//example.com/blog/uploads/addtoany/icons/custom/" value="<?php if ( isset( $options['custom_icons_url'] ) )
|
659 |
<br/>
|
660 |
<label for="A2A_SHARE_SAVE_custom_icons_type"><?php _e('Filename extension', 'add-to-any'); ?></label>
|
661 |
-
<input name="A2A_SHARE_SAVE_custom_icons_type" type="text" class="code" size="5" maxlength="4" placeholder="png" value="<?php if ( isset( $options['custom_icons_type'] ) )
|
662 |
<label for="A2A_SHARE_SAVE_custom_icons_width"><?php _e('Width'); ?></label>
|
663 |
-
<input name="A2A_SHARE_SAVE_custom_icons_width" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" id="A2A_SHARE_SAVE_custom_icons_width" value="<?php if ( isset( $options['custom_icons_width'] ) )
|
664 |
<label for="A2A_SHARE_SAVE_custom_icons_height"><?php _e('Height'); ?></label>
|
665 |
-
<input name="A2A_SHARE_SAVE_custom_icons_height" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" id="A2A_SHARE_SAVE_custom_icons_height" value="<?php if ( isset( $options['custom_icons_height'] ) )
|
666 |
<p class="description">
|
667 |
<?php _e("Specify the URL of the directory containing your custom icons. For example, a URL of <code>//example.com/blog/uploads/addtoany/icons/custom/</code> containing <code>facebook.png</code> and <code>twitter.png</code>. Be sure that custom icon filenames match the icon filenames in <code>plugins/add-to-any/icons</code>. For AddToAny's Universal Button, select Image URL and specify the URL of your AddToAny universal share icon (<a href=\"#\" onclick=\"document.getElementsByName('A2A_SHARE_SAVE_button_custom')[0].focus();return false\">above</a>).", 'add-to-any'); ?>
|
668 |
</p>
|
@@ -703,7 +743,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
703 |
<div class="addtoany_floating_vertical_attached_to">
|
704 |
<br>
|
705 |
<label>
|
706 |
-
Attach to <input name="A2A_SHARE_SAVE_floating_vertical_attached_to" type="text" class="regular-text code" placeholder=".content-area" value="<?php if ( isset( $options['floating_vertical_attached_to'] ) )
|
707 |
<p class="description">Enter a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors" class="description" rel="noopener" target="_blank">CSS selector</a>,or group of selectors, that match the HTML element you want to attach to.</p>
|
708 |
</label>
|
709 |
</div>
|
@@ -715,26 +755,38 @@ function A2A_SHARE_SAVE_options_page() {
|
|
715 |
<label>
|
716 |
<input id="A2A_SHARE_SAVE_floating_vertical_responsive" name="A2A_SHARE_SAVE_floating_vertical_responsive" type="checkbox"<?php
|
717 |
if ( ! isset( $options['floating_vertical_responsive'] ) || $options['floating_vertical_responsive'] != '-1' ) echo ' checked="checked"'; ?> value="1" />
|
718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
</label>
|
720 |
</fieldset></td>
|
721 |
</tr>
|
722 |
<tr valign="top">
|
723 |
<th scope="row"><?php _e("Position", 'add-to-any'); ?></th>
|
724 |
<td><fieldset>
|
725 |
-
<label><input name="A2A_SHARE_SAVE_floating_vertical_position" type="number" value="<?php if ( isset( $options['floating_vertical_position'] ) )
|
726 |
</fieldset></td>
|
727 |
</tr>
|
728 |
<tr valign="top">
|
729 |
<th scope="row"><?php _e("Offset", 'add-to-any'); ?></th>
|
730 |
<td><fieldset>
|
731 |
-
<label><input name="A2A_SHARE_SAVE_floating_vertical_offset" type="number" value="<?php if ( isset( $options['floating_vertical_offset'] ) )
|
732 |
</fieldset></td>
|
733 |
</tr>
|
734 |
<tr valign="top">
|
735 |
<th scope="row"><?php _e("Icon Size", 'add-to-any'); ?></th>
|
736 |
<td><fieldset>
|
737 |
-
<label><input name="A2A_SHARE_SAVE_floating_vertical_icon_size" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" placeholder="32" value="<?php if ( isset( $options['floating_vertical_icon_size'] ) )
|
738 |
</fieldset></td>
|
739 |
</tr>
|
740 |
<tr valign="top">
|
@@ -760,6 +812,8 @@ function A2A_SHARE_SAVE_options_page() {
|
|
760 |
<br>
|
761 |
<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="right_docked"<?php if ( isset( $options['floating_horizontal'] ) && 'right_docked' == $options['floating_horizontal'] ) echo ' checked="checked"'; ?>> <?php _e('Right docked', 'add-to-any'); ?></label>
|
762 |
<br>
|
|
|
|
|
763 |
<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="none"<?php if ( ! isset( $options['floating_horizontal'] ) || 'none' == $options['floating_horizontal'] ) echo ' checked="checked"'; ?>> <?php _e('None', 'add-to-any'); ?></label>
|
764 |
</fieldset></td>
|
765 |
</tr>
|
@@ -769,26 +823,38 @@ function A2A_SHARE_SAVE_options_page() {
|
|
769 |
<label>
|
770 |
<input id="A2A_SHARE_SAVE_floating_horizontal_responsive" name="A2A_SHARE_SAVE_floating_horizontal_responsive" type="checkbox"<?php
|
771 |
if ( ! isset( $options['floating_horizontal_responsive'] ) || $options['floating_horizontal_responsive'] != '-1' ) echo ' checked="checked"'; ?> value="1" />
|
772 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
773 |
</label>
|
774 |
</fieldset></td>
|
775 |
</tr>
|
776 |
<tr valign="top">
|
777 |
<th scope="row"><?php _e("Position", 'add-to-any'); ?></th>
|
778 |
<td><fieldset>
|
779 |
-
<label><input name="A2A_SHARE_SAVE_floating_horizontal_position" type="number" value="<?php if ( isset( $options['floating_horizontal_position'] ) )
|
780 |
</fieldset></td>
|
781 |
</tr>
|
782 |
<tr valign="top">
|
783 |
<th scope="row"><?php _e("Offset", 'add-to-any'); ?></th>
|
784 |
<td><fieldset>
|
785 |
-
<label><input name="A2A_SHARE_SAVE_floating_horizontal_offset" type="number" value="<?php if ( isset( $options['floating_horizontal_offset'] ) )
|
786 |
</fieldset></td>
|
787 |
</tr>
|
788 |
<tr valign="top">
|
789 |
<th scope="row"><?php _e("Icon Size", 'add-to-any'); ?></th>
|
790 |
<td><fieldset>
|
791 |
-
<label><input name="A2A_SHARE_SAVE_floating_horizontal_icon_size" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" placeholder="32" value="<?php if ( isset( $options['floating_horizontal_icon_size'] ) )
|
792 |
</fieldset></td>
|
793 |
</tr>
|
794 |
<tr valign="top">
|
219 |
if ( 'floating' == $current_screen ) {
|
220 |
// Floating options screen
|
221 |
|
222 |
+
$possible_floating_values = array( 'left_docked', 'right_docked', 'center_docked', 'left_attached', 'right_attached', 'none' );
|
223 |
|
224 |
$new_options['floating_vertical'] = ( in_array( $_POST['A2A_SHARE_SAVE_floating_vertical'], $possible_floating_values ) ) ? $_POST['A2A_SHARE_SAVE_floating_vertical'] : 'none';
|
225 |
$new_options['floating_horizontal'] = ( in_array( $_POST['A2A_SHARE_SAVE_floating_horizontal'], $possible_floating_values ) ) ? $_POST['A2A_SHARE_SAVE_floating_horizontal'] : 'none';
|
243 |
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] ) &&
|
244 |
is_numeric( $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] )
|
245 |
) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] : '981';
|
246 |
+
|
247 |
+
$new_options['floating_horizontal_scroll_top'] = (
|
248 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_top'] ) &&
|
249 |
+
'1' == $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_top']
|
250 |
+
) ? '1' : '-1';
|
251 |
+
|
252 |
+
$new_options['floating_horizontal_scroll_top_pixels'] = (
|
253 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_top_pixels'] ) &&
|
254 |
+
is_numeric( $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_top_pixels'] )
|
255 |
+
) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_top_pixels'] : '100';
|
256 |
+
|
257 |
+
$new_options['floating_horizontal_scroll_bottom'] = (
|
258 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_bottom'] ) &&
|
259 |
+
'1' == $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_bottom']
|
260 |
+
) ? '1' : '-1';
|
261 |
+
|
262 |
+
$new_options['floating_horizontal_scroll_bottom_pixels'] = (
|
263 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_bottom_pixels'] ) &&
|
264 |
+
is_numeric( $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_bottom_pixels'] )
|
265 |
+
) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_scroll_bottom_pixels'] : '100';
|
266 |
|
267 |
$new_options['floating_horizontal_icon_size'] = (
|
268 |
isset( $_POST['A2A_SHARE_SAVE_floating_horizontal_icon_size'] ) &&
|
296 |
is_numeric( $_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width'] )
|
297 |
) ? $_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width'] : '980';
|
298 |
|
299 |
+
$new_options['floating_vertical_scroll_top'] = (
|
300 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_top'] ) &&
|
301 |
+
'1' == $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_top']
|
302 |
+
) ? '1' : '-1';
|
303 |
+
|
304 |
+
$new_options['floating_vertical_scroll_top_pixels'] = (
|
305 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_top_pixels'] ) &&
|
306 |
+
is_numeric( $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_top_pixels'] )
|
307 |
+
) ? $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_top_pixels'] : '100';
|
308 |
+
|
309 |
+
$new_options['floating_vertical_scroll_bottom'] = (
|
310 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_bottom'] ) &&
|
311 |
+
'1' == $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_bottom']
|
312 |
+
) ? '1' : '-1';
|
313 |
+
|
314 |
+
$new_options['floating_vertical_scroll_bottom_pixels'] = (
|
315 |
+
isset( $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_bottom_pixels'] ) &&
|
316 |
+
is_numeric( $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_bottom_pixels'] )
|
317 |
+
) ? $_POST['A2A_SHARE_SAVE_floating_vertical_scroll_bottom_pixels'] : '100';
|
318 |
+
|
319 |
$new_options['floating_vertical_icon_size'] = (
|
320 |
isset( $_POST['A2A_SHARE_SAVE_floating_vertical_icon_size'] ) &&
|
321 |
is_numeric( $_POST['A2A_SHARE_SAVE_floating_vertical_icon_size'] )
|
546 |
<input name="A2A_SHARE_SAVE_button" value="CUSTOM" id="A2A_SHARE_SAVE_button_is_custom" type="radio"<?php if ( isset( $options['button'] ) && 'CUSTOM' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
547 |
<span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
|
548 |
</label>
|
549 |
+
<input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_custom').checked=true" style="vertical-align:middle" value="<?php if ( isset( $options['button_custom'] ) ) echo esc_attr( $options['button_custom'] ); ?>" />
|
550 |
</div>
|
551 |
<div class="addtoany_extra_element">
|
552 |
<label>
|
576 |
<th scope="row"><?php _e('Sharing Header', 'add-to-any'); ?></th>
|
577 |
<td><fieldset id="addtoany_extra_section_sharing_header" class="addtoany_extra_section<?php if ( ! empty( $options['header'] ) ) echo ' addtoany_show_extra'; ?>" role="region">
|
578 |
<label>
|
579 |
+
<input name="A2A_SHARE_SAVE_header" type="text" class="code" placeholder="<?php esc_attr_e( 'Share this:' ); ?>" size="50" value="<?php if ( isset( $options['header'] ) ) echo esc_attr( $options['header'] ); ?>" />
|
580 |
</label>
|
581 |
</fieldset></td>
|
582 |
</tr>
|
695 |
<input name="A2A_SHARE_SAVE_custom_icons" id="A2A_SHARE_SAVE_custom_icons" type="checkbox"<?php if ( isset( $options['custom_icons'] ) && $options['custom_icons'] == 'url' ) echo ' checked="checked"'; ?> value="url"/>
|
696 |
<?php _e('Use custom icons. URL:', 'add-to-any'); ?>
|
697 |
</label>
|
698 |
+
<input name="A2A_SHARE_SAVE_custom_icons_url" type="text" class="code" size="50" style="vertical-align:middle" placeholder="//example.com/blog/uploads/addtoany/icons/custom/" value="<?php if ( isset( $options['custom_icons_url'] ) ) echo esc_attr( $options['custom_icons_url'] ); ?>" />
|
699 |
<br/>
|
700 |
<label for="A2A_SHARE_SAVE_custom_icons_type"><?php _e('Filename extension', 'add-to-any'); ?></label>
|
701 |
+
<input name="A2A_SHARE_SAVE_custom_icons_type" type="text" class="code" size="5" maxlength="4" placeholder="png" value="<?php if ( isset( $options['custom_icons_type'] ) ) echo esc_attr( $options['custom_icons_type'] ); else echo 'png'; ?>" />
|
702 |
<label for="A2A_SHARE_SAVE_custom_icons_width"><?php _e('Width'); ?></label>
|
703 |
+
<input name="A2A_SHARE_SAVE_custom_icons_width" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" id="A2A_SHARE_SAVE_custom_icons_width" value="<?php if ( isset( $options['custom_icons_width'] ) ) echo esc_attr( $options['custom_icons_width'] ); ?>" class="small-text" />
|
704 |
<label for="A2A_SHARE_SAVE_custom_icons_height"><?php _e('Height'); ?></label>
|
705 |
+
<input name="A2A_SHARE_SAVE_custom_icons_height" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" id="A2A_SHARE_SAVE_custom_icons_height" value="<?php if ( isset( $options['custom_icons_height'] ) ) echo esc_attr( $options['custom_icons_height'] ); ?>" class="small-text" />
|
706 |
<p class="description">
|
707 |
<?php _e("Specify the URL of the directory containing your custom icons. For example, a URL of <code>//example.com/blog/uploads/addtoany/icons/custom/</code> containing <code>facebook.png</code> and <code>twitter.png</code>. Be sure that custom icon filenames match the icon filenames in <code>plugins/add-to-any/icons</code>. For AddToAny's Universal Button, select Image URL and specify the URL of your AddToAny universal share icon (<a href=\"#\" onclick=\"document.getElementsByName('A2A_SHARE_SAVE_button_custom')[0].focus();return false\">above</a>).", 'add-to-any'); ?>
|
708 |
</p>
|
743 |
<div class="addtoany_floating_vertical_attached_to">
|
744 |
<br>
|
745 |
<label>
|
746 |
+
Attach to <input name="A2A_SHARE_SAVE_floating_vertical_attached_to" type="text" class="regular-text code" placeholder=".content-area" value="<?php if ( isset( $options['floating_vertical_attached_to'] ) ) echo esc_attr( $options['floating_vertical_attached_to'] ); else echo esc_attr( 'main, [role="main"], article, .status-publish' ); ?>" />
|
747 |
<p class="description">Enter a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors" class="description" rel="noopener" target="_blank">CSS selector</a>,or group of selectors, that match the HTML element you want to attach to.</p>
|
748 |
</label>
|
749 |
</div>
|
755 |
<label>
|
756 |
<input id="A2A_SHARE_SAVE_floating_vertical_responsive" name="A2A_SHARE_SAVE_floating_vertical_responsive" type="checkbox"<?php
|
757 |
if ( ! isset( $options['floating_vertical_responsive'] ) || $options['floating_vertical_responsive'] != '-1' ) echo ' checked="checked"'; ?> value="1" />
|
758 |
+
Hide on mobile screens <input name="A2A_SHARE_SAVE_floating_vertical_responsive_max_width" type="number" value="<?php if ( isset( $options['floating_vertical_responsive_max_width'] ) ) echo esc_attr( $options['floating_vertical_responsive_max_width'] ); else echo '980'; ?>" class="small-text" /> pixels or narrower
|
759 |
+
</label>
|
760 |
+
<br>
|
761 |
+
<label>
|
762 |
+
<input id="A2A_SHARE_SAVE_floating_vertical_scroll_top" name="A2A_SHARE_SAVE_floating_vertical_scroll_top" type="checkbox"<?php
|
763 |
+
if ( ! empty( $options['floating_vertical_scroll_top'] ) && $options['floating_vertical_scroll_top'] == '1' ) echo ' checked="checked"'; ?> value="1" />
|
764 |
+
Hide until page is scrolled <input name="A2A_SHARE_SAVE_floating_vertical_scroll_top_pixels" type="number" value="<?php if ( isset( $options['floating_vertical_scroll_top_pixels'] ) ) echo esc_attr( $options['floating_vertical_scroll_top_pixels'] ); else echo '100'; ?>" class="small-text" /> pixels or more from the top
|
765 |
+
</label>
|
766 |
+
<br>
|
767 |
+
<label>
|
768 |
+
<input id="A2A_SHARE_SAVE_floating_vertical_scroll_bottom" name="A2A_SHARE_SAVE_floating_vertical_scroll_bottom" type="checkbox"<?php
|
769 |
+
if ( ! empty( $options['floating_vertical_scroll_bottom'] ) && $options['floating_vertical_scroll_bottom'] == '1' ) echo ' checked="checked"'; ?> value="1" />
|
770 |
+
Hide when page is scrolled <input name="A2A_SHARE_SAVE_floating_vertical_scroll_bottom_pixels" type="number" value="<?php if ( isset( $options['floating_vertical_scroll_bottom_pixels'] ) ) echo esc_attr( $options['floating_vertical_scroll_bottom_pixels'] ); else echo '100'; ?>" class="small-text" /> pixels or less from the bottom
|
771 |
</label>
|
772 |
</fieldset></td>
|
773 |
</tr>
|
774 |
<tr valign="top">
|
775 |
<th scope="row"><?php _e("Position", 'add-to-any'); ?></th>
|
776 |
<td><fieldset>
|
777 |
+
<label><input name="A2A_SHARE_SAVE_floating_vertical_position" type="number" value="<?php if ( isset( $options['floating_vertical_position'] ) ) echo esc_attr( $options['floating_vertical_position'] ); else echo '100'; ?>" class="small-text" /> pixels from top</label>
|
778 |
</fieldset></td>
|
779 |
</tr>
|
780 |
<tr valign="top">
|
781 |
<th scope="row"><?php _e("Offset", 'add-to-any'); ?></th>
|
782 |
<td><fieldset>
|
783 |
+
<label><input name="A2A_SHARE_SAVE_floating_vertical_offset" type="number" value="<?php if ( isset( $options['floating_vertical_offset'] ) ) echo esc_attr( $options['floating_vertical_offset'] ); else echo '0'; ?>" class="small-text" /> pixels from left <span id="addtoany_vertical_offset_text">or right</span></label>
|
784 |
</fieldset></td>
|
785 |
</tr>
|
786 |
<tr valign="top">
|
787 |
<th scope="row"><?php _e("Icon Size", 'add-to-any'); ?></th>
|
788 |
<td><fieldset>
|
789 |
+
<label><input name="A2A_SHARE_SAVE_floating_vertical_icon_size" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" placeholder="32" value="<?php if ( isset( $options['floating_vertical_icon_size'] ) ) echo esc_attr( $options['floating_vertical_icon_size'] ); else echo '32'; ?>" class="small-text"> pixels</label>
|
790 |
</fieldset></td>
|
791 |
</tr>
|
792 |
<tr valign="top">
|
812 |
<br>
|
813 |
<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="right_docked"<?php if ( isset( $options['floating_horizontal'] ) && 'right_docked' == $options['floating_horizontal'] ) echo ' checked="checked"'; ?>> <?php _e('Right docked', 'add-to-any'); ?></label>
|
814 |
<br>
|
815 |
+
<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="center_docked"<?php if ( isset( $options['floating_horizontal'] ) && 'center_docked' == $options['floating_horizontal'] ) echo ' checked="checked"'; ?>> <?php _e('Center docked', 'add-to-any'); ?></label>
|
816 |
+
<br>
|
817 |
<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="none"<?php if ( ! isset( $options['floating_horizontal'] ) || 'none' == $options['floating_horizontal'] ) echo ' checked="checked"'; ?>> <?php _e('None', 'add-to-any'); ?></label>
|
818 |
</fieldset></td>
|
819 |
</tr>
|
823 |
<label>
|
824 |
<input id="A2A_SHARE_SAVE_floating_horizontal_responsive" name="A2A_SHARE_SAVE_floating_horizontal_responsive" type="checkbox"<?php
|
825 |
if ( ! isset( $options['floating_horizontal_responsive'] ) || $options['floating_horizontal_responsive'] != '-1' ) echo ' checked="checked"'; ?> value="1" />
|
826 |
+
Hide on desktop screens <input name="A2A_SHARE_SAVE_floating_horizontal_responsive_min_width" type="number" value="<?php if ( isset( $options['floating_horizontal_responsive_min_width'] ) ) echo esc_attr( $options['floating_horizontal_responsive_min_width'] ); else echo '981'; ?>" class="small-text" /> pixels or wider
|
827 |
+
</label>
|
828 |
+
<br>
|
829 |
+
<label>
|
830 |
+
<input id="A2A_SHARE_SAVE_floating_horizontal_scroll_top" name="A2A_SHARE_SAVE_floating_horizontal_scroll_top" type="checkbox"<?php
|
831 |
+
if ( ! empty( $options['floating_horizontal_scroll_top'] ) && $options['floating_horizontal_scroll_top'] == '1' ) echo ' checked="checked"'; ?> value="1" />
|
832 |
+
Hide until page is scrolled <input name="A2A_SHARE_SAVE_floating_horizontal_scroll_top_pixels" type="number" value="<?php if ( isset( $options['floating_horizontal_scroll_top_pixels'] ) ) echo esc_attr( $options['floating_horizontal_scroll_top_pixels'] ); else echo '100'; ?>" class="small-text" /> pixels or more from the top
|
833 |
+
</label>
|
834 |
+
<br>
|
835 |
+
<label>
|
836 |
+
<input id="A2A_SHARE_SAVE_floating_horizontal_scroll_bottom" name="A2A_SHARE_SAVE_floating_horizontal_scroll_bottom" type="checkbox"<?php
|
837 |
+
if ( ! empty( $options['floating_horizontal_scroll_bottom'] ) && $options['floating_horizontal_scroll_bottom'] == '1' ) echo ' checked="checked"'; ?> value="1" />
|
838 |
+
Hide when page is scrolled <input name="A2A_SHARE_SAVE_floating_horizontal_scroll_bottom_pixels" type="number" value="<?php if ( isset( $options['floating_horizontal_scroll_bottom_pixels'] ) ) echo esc_attr( $options['floating_horizontal_scroll_bottom_pixels'] ); else echo '100'; ?>" class="small-text" /> pixels or less from the bottom
|
839 |
</label>
|
840 |
</fieldset></td>
|
841 |
</tr>
|
842 |
<tr valign="top">
|
843 |
<th scope="row"><?php _e("Position", 'add-to-any'); ?></th>
|
844 |
<td><fieldset>
|
845 |
+
<label><input name="A2A_SHARE_SAVE_floating_horizontal_position" type="number" value="<?php if ( isset( $options['floating_horizontal_position'] ) ) echo esc_attr( $options['floating_horizontal_position'] ); else echo '0'; ?>" class="small-text" /> pixels from left or right</label>
|
846 |
</fieldset></td>
|
847 |
</tr>
|
848 |
<tr valign="top">
|
849 |
<th scope="row"><?php _e("Offset", 'add-to-any'); ?></th>
|
850 |
<td><fieldset>
|
851 |
+
<label><input name="A2A_SHARE_SAVE_floating_horizontal_offset" type="number" value="<?php if ( isset( $options['floating_horizontal_offset'] ) ) echo esc_attr( $options['floating_horizontal_offset'] ); else echo '0'; ?>" class="small-text" /> pixels from bottom</label>
|
852 |
</fieldset></td>
|
853 |
</tr>
|
854 |
<tr valign="top">
|
855 |
<th scope="row"><?php _e("Icon Size", 'add-to-any'); ?></th>
|
856 |
<td><fieldset>
|
857 |
+
<label><input name="A2A_SHARE_SAVE_floating_horizontal_icon_size" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" placeholder="32" value="<?php if ( isset( $options['floating_horizontal_icon_size'] ) ) echo esc_attr( $options['floating_horizontal_icon_size'] ); else echo '32'; ?>" class="small-text"> pixels</label>
|
858 |
</fieldset></td>
|
859 |
</tr>
|
860 |
<tr valign="top">
|