Version Description
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 0.9.8.6.6 |
Comparing to | |
See all releases |
Code changes from version 0.9.8.6.5 to 0.9.8.6.6
- README.txt +8 -1
- add-to-any.php +43 -20
- share_16_16.png +0 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.addtoany.com/contact/
|
|
4 |
Tags: bookmarking, social, social bookmarking, bookmark, bookmarks, sharing, share, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, addtoany, add, any
|
5 |
Requires at least: 2.0
|
6 |
Tested up to: 2.7
|
7 |
-
Stable tag: 0.9.8.6.
|
8 |
|
9 |
Helps readers share, save, and bookmark your posts and pages using any service, such as Delicious, Digg, Facebook, Twitter, and over 100 more.
|
10 |
|
@@ -66,6 +66,13 @@ This is done to overcome browser limitations that prevent the drop-down menu fro
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
.9.8.6.5:
|
70 |
|
71 |
* Less JavaScript redundancy from Additional Options (saves bandwidth)
|
4 |
Tags: bookmarking, social, social bookmarking, bookmark, bookmarks, sharing, share, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, addtoany, add, any
|
5 |
Requires at least: 2.0
|
6 |
Tested up to: 2.7
|
7 |
+
Stable tag: 0.9.8.6.6
|
8 |
|
9 |
Helps readers share, save, and bookmark your posts and pages using any service, such as Delicious, Digg, Facebook, Twitter, and over 100 more.
|
10 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
.9.8.6.6:
|
70 |
+
|
71 |
+
* Open Share Icon
|
72 |
+
* WordPress 2.7 admin styling
|
73 |
+
* Settings link on Plugins page
|
74 |
+
* Basename var
|
75 |
+
|
76 |
.9.8.6.5:
|
77 |
|
78 |
* Less JavaScript redundancy from Additional Options (saves bandwidth)
|
add-to-any.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Add to Any: Share/Save/Bookmark Button
|
4 |
Plugin URI: http://www.addtoany.com/
|
5 |
Description: Helps readers share, save, and bookmark your posts and pages using any service. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
|
6 |
-
Version: .9.8.6.
|
7 |
Author: Add to Any
|
8 |
Author URI: http://www.addtoany.com/contact/
|
9 |
*/
|
@@ -13,17 +13,21 @@ if( !isset($A2A_javascript) )
|
|
13 |
$A2A_javascript = '';
|
14 |
if( !isset($A2A_locale) )
|
15 |
$A2A_locale = '';
|
16 |
-
|
|
|
17 |
|
18 |
function A2A_SHARE_SAVE_textdomain() {
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
22 |
}
|
23 |
add_action('init', 'A2A_SHARE_SAVE_textdomain');
|
24 |
|
25 |
|
26 |
function ADDTOANY_SHARE_SAVE_BUTTON( $args = false) {
|
|
|
|
|
27 |
|
28 |
if( $args )
|
29 |
extract( $args );
|
@@ -49,7 +53,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = false) {
|
|
49 |
$button_fname = 'share_save_120_16.png';
|
50 |
$button_width = ' width="120"';
|
51 |
$button_height = ' height="16"';
|
52 |
-
$button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
53 |
} else if( get_option('A2A_SHARE_SAVE_button') == 'CUSTOM' ) {
|
54 |
$button_src = get_option('A2A_SHARE_SAVE_button_custom');
|
55 |
$button_width = '';
|
@@ -61,10 +65,10 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = false) {
|
|
61 |
$button_fname = $button_attrs[0];
|
62 |
$button_width = ' width="'.$button_attrs[1].'"';
|
63 |
$button_height = ' height="'.$button_attrs[2].'"';
|
64 |
-
$button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
65 |
}
|
66 |
-
if( $button_attrs[0] == 'favicon.png' ) {
|
67 |
-
$style_bg = 'background:url('.trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
68 |
$style_bg = ';' . $style_bg . ' !important;';
|
69 |
$style = ' style="'.$style_bg.'padding:1px 5px 5px 22px"';
|
70 |
$button = 'Share/Save';
|
@@ -184,6 +188,8 @@ add_action('wp_head', 'A2A_SHARE_SAVE_button_css');
|
|
184 |
|
185 |
function A2A_SHARE_SAVE_options_page() {
|
186 |
|
|
|
|
|
187 |
if( $_POST[ 'A2A_SHARE_SAVE_submit_hidden' ] == 'Y' ) {
|
188 |
|
189 |
update_option( 'A2A_SHARE_SAVE_display_in_posts_on_front_page', ($_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page']=='1') ? '1':'-1' );
|
@@ -224,25 +230,31 @@ function A2A_SHARE_SAVE_options_page() {
|
|
224 |
<label>
|
225 |
<input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='favicon.png|16|16') echo ' checked="checked"'; ?>
|
226 |
style="margin:9px 0;vertical-align:middle">
|
227 |
-
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
onclick="this.parentNode.firstChild.checked=true"/>
|
229 |
</label><br>
|
230 |
<label>
|
231 |
<input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if( !get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button' )=='share_save_120_16.png|120|16' ) echo ' checked="checked"'; ?>
|
232 |
style="margin:9px 0;vertical-align:middle">
|
233 |
-
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
234 |
onclick="this.parentNode.firstChild.checked=true"/>
|
235 |
</label><br>
|
236 |
<label>
|
237 |
<input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_171_16.png|171|16') echo ' checked="checked"'; ?>
|
238 |
style="margin:9px 0;vertical-align:middle">
|
239 |
-
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
240 |
onclick="this.parentNode.firstChild.checked=true"/>
|
241 |
</label><br>
|
242 |
<label>
|
243 |
<input name="A2A_SHARE_SAVE_button" value="share_save_256_24.png|256|24" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_256_24.png|256|24') echo ' checked="checked"'; ?>
|
244 |
style="margin:9px 0;vertical-align:middle">
|
245 |
-
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname(
|
246 |
onclick="this.parentNode.firstChild.checked=true"/>
|
247 |
</label><br>
|
248 |
<label>
|
@@ -293,14 +305,16 @@ function A2A_SHARE_SAVE_options_page() {
|
|
293 |
<?php _e('Display Share/Save button at the bottom of pages', 'add-to-any'); ?> <strong>*</strong>
|
294 |
</label>
|
295 |
<br/><br/>
|
296 |
-
<
|
297 |
-
|
|
|
|
|
298 |
</fieldset></td>
|
299 |
</tr>
|
300 |
<tr valign="top">
|
301 |
<th scope="row"><?php _e('Menu Style', 'add-to-any'); ?></th>
|
302 |
<td><fieldset>
|
303 |
-
|
304 |
<p>
|
305 |
<a href="http://www.addtoany.com/buttons/share_save/menu_style/wordpress" class="button-secondary" title="<?php _e("Open the Add to Any Menu Styler in a new window", "add-to-any"); ?>" target="_blank"
|
306 |
onclick="document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();
|
@@ -345,21 +359,21 @@ function A2A_SHARE_SAVE_options_page() {
|
|
345 |
</label>
|
346 |
</p>
|
347 |
<label for="A2A_SHARE_SAVE_additional_js_variables">
|
348 |
-
|
349 |
-
<?php _e("Advanced users might want to check out the code generated by Add to Any's <a href=\"http://www.addtoany.com/buttons/api/\">JavaScript API</a>.", "add-to-any");
|
350 |
</label>
|
351 |
<p>
|
352 |
<textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="5" cols="50"><?php echo stripslashes(get_option('A2A_SHARE_SAVE_additional_js_variables')); ?></textarea>
|
353 |
</p>
|
354 |
<?php if( get_option('A2A_SHARE_SAVE_additional_js_variables')!='' ) { ?>
|
355 |
-
<label for="A2A_SHARE_SAVE_additional_js_variables"><?php _e("<strong>Note</strong>: If you're adding new code, be careful not to accidentally overwrite any previous code.</label>", 'add-to-any'); ?>
|
356 |
<?php } ?>
|
357 |
</fieldset></td>
|
358 |
</tr>
|
359 |
</table>
|
360 |
|
361 |
<p class="submit">
|
362 |
-
<input type="submit" name="Submit" value="<?php _e('Save Changes', 'add-to-any' ) ?>" />
|
363 |
</p>
|
364 |
|
365 |
</form>
|
@@ -384,5 +398,14 @@ function A2A_SHARE_SAVE_add_menu_link() {
|
|
384 |
add_action('admin_menu', 'A2A_SHARE_SAVE_add_menu_link');
|
385 |
|
386 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
|
388 |
?>
|
3 |
Plugin Name: Add to Any: Share/Save/Bookmark Button
|
4 |
Plugin URI: http://www.addtoany.com/
|
5 |
Description: Helps readers share, save, and bookmark your posts and pages using any service. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
|
6 |
+
Version: .9.8.6.6
|
7 |
Author: Add to Any
|
8 |
Author URI: http://www.addtoany.com/contact/
|
9 |
*/
|
13 |
$A2A_javascript = '';
|
14 |
if( !isset($A2A_locale) )
|
15 |
$A2A_locale = '';
|
16 |
+
|
17 |
+
$A2A_SHARE_SAVE_plugin_basename = plugin_basename(__FILE__);
|
18 |
|
19 |
function A2A_SHARE_SAVE_textdomain() {
|
20 |
+
global $A2A_SHARE_SAVE_plugin_basename;
|
21 |
+
load_plugin_textdomain('add-to-any',
|
22 |
+
PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename),
|
23 |
+
dirname($A2A_SHARE_SAVE_plugin_basename));
|
24 |
}
|
25 |
add_action('init', 'A2A_SHARE_SAVE_textdomain');
|
26 |
|
27 |
|
28 |
function ADDTOANY_SHARE_SAVE_BUTTON( $args = false) {
|
29 |
+
|
30 |
+
global $A2A_SHARE_SAVE_plugin_basename;
|
31 |
|
32 |
if( $args )
|
33 |
extract( $args );
|
53 |
$button_fname = 'share_save_120_16.png';
|
54 |
$button_width = ' width="120"';
|
55 |
$button_height = ' height="16"';
|
56 |
+
$button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/'.$button_fname;
|
57 |
} else if( get_option('A2A_SHARE_SAVE_button') == 'CUSTOM' ) {
|
58 |
$button_src = get_option('A2A_SHARE_SAVE_button_custom');
|
59 |
$button_width = '';
|
65 |
$button_fname = $button_attrs[0];
|
66 |
$button_width = ' width="'.$button_attrs[1].'"';
|
67 |
$button_height = ' height="'.$button_attrs[2].'"';
|
68 |
+
$button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/'.$button_fname;
|
69 |
}
|
70 |
+
if( $button_attrs[0] == 'favicon.png' || $button_attrs[0] == 'share_16_16.png' ) {
|
71 |
+
$style_bg = 'background:url('.trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/'.$button_fname.') no-repeat scroll 0px 0px';
|
72 |
$style_bg = ';' . $style_bg . ' !important;';
|
73 |
$style = ' style="'.$style_bg.'padding:1px 5px 5px 22px"';
|
74 |
$button = 'Share/Save';
|
188 |
|
189 |
function A2A_SHARE_SAVE_options_page() {
|
190 |
|
191 |
+
global $A2A_SHARE_SAVE_plugin_basename;
|
192 |
+
|
193 |
if( $_POST[ 'A2A_SHARE_SAVE_submit_hidden' ] == 'Y' ) {
|
194 |
|
195 |
update_option( 'A2A_SHARE_SAVE_display_in_posts_on_front_page', ($_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page']=='1') ? '1':'-1' );
|
230 |
<label>
|
231 |
<input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='favicon.png|16|16') echo ' checked="checked"'; ?>
|
232 |
style="margin:9px 0;vertical-align:middle">
|
233 |
+
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ Share/Save" title="+ Share/Save"
|
234 |
+
onclick="this.parentNode.firstChild.checked=true"/>
|
235 |
+
</label>
|
236 |
+
<label style="padding-left:9px">
|
237 |
+
<input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_16_16.png|16|16') echo ' checked="checked"'; ?>
|
238 |
+
style="margin:9px 0;vertical-align:middle">
|
239 |
+
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/share_16_16.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ Share/Save" title="+ Share/Save"
|
240 |
onclick="this.parentNode.firstChild.checked=true"/>
|
241 |
</label><br>
|
242 |
<label>
|
243 |
<input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if( !get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button' )=='share_save_120_16.png|120|16' ) echo ' checked="checked"'; ?>
|
244 |
style="margin:9px 0;vertical-align:middle">
|
245 |
+
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/share_save_120_16.png'; ?>" width="120" height="16" border="0" style="padding:9px;vertical-align:middle"
|
246 |
onclick="this.parentNode.firstChild.checked=true"/>
|
247 |
</label><br>
|
248 |
<label>
|
249 |
<input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_171_16.png|171|16') echo ' checked="checked"'; ?>
|
250 |
style="margin:9px 0;vertical-align:middle">
|
251 |
+
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/share_save_171_16.png'; ?>" width="171" height="16" border="0" style="padding:9px;vertical-align:middle"
|
252 |
onclick="this.parentNode.firstChild.checked=true"/>
|
253 |
</label><br>
|
254 |
<label>
|
255 |
<input name="A2A_SHARE_SAVE_button" value="share_save_256_24.png|256|24" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_256_24.png|256|24') echo ' checked="checked"'; ?>
|
256 |
style="margin:9px 0;vertical-align:middle">
|
257 |
+
<img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/share_save_256_24.png'; ?>" width="256" height="24" border="0" style="padding:9px;vertical-align:middle"
|
258 |
onclick="this.parentNode.firstChild.checked=true"/>
|
259 |
</label><br>
|
260 |
<label>
|
305 |
<?php _e('Display Share/Save button at the bottom of pages', 'add-to-any'); ?> <strong>*</strong>
|
306 |
</label>
|
307 |
<br/><br/>
|
308 |
+
<div class="setting-description">
|
309 |
+
<strong>*</strong> <?php _e("If unchecked, be sure to place the following code in <a href=\"theme-editor.php\">your template pages</a> (within <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>)", "add-to-any"); ?>:<br/>
|
310 |
+
<code><?php if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?></code>
|
311 |
+
</div>
|
312 |
</fieldset></td>
|
313 |
</tr>
|
314 |
<tr valign="top">
|
315 |
<th scope="row"><?php _e('Menu Style', 'add-to-any'); ?></th>
|
316 |
<td><fieldset>
|
317 |
+
<p><?php _e("Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the <a href=\"#\" onclick=\"document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();return false\">Additional Options</a> box below.", "add-to-any"); ?></p>
|
318 |
<p>
|
319 |
<a href="http://www.addtoany.com/buttons/share_save/menu_style/wordpress" class="button-secondary" title="<?php _e("Open the Add to Any Menu Styler in a new window", "add-to-any"); ?>" target="_blank"
|
320 |
onclick="document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();
|
359 |
</label>
|
360 |
</p>
|
361 |
<label for="A2A_SHARE_SAVE_additional_js_variables">
|
362 |
+
<p><?php _e('Below you can set special JavaScript variables to apply to each Share/Save menu.', 'add-to-any'); ?>
|
363 |
+
<?php _e("Advanced users might want to check out the code generated by Add to Any's <a href=\"http://www.addtoany.com/buttons/api/\">JavaScript API</a>.", "add-to-any"); ?></p>
|
364 |
</label>
|
365 |
<p>
|
366 |
<textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="5" cols="50"><?php echo stripslashes(get_option('A2A_SHARE_SAVE_additional_js_variables')); ?></textarea>
|
367 |
</p>
|
368 |
<?php if( get_option('A2A_SHARE_SAVE_additional_js_variables')!='' ) { ?>
|
369 |
+
<label for="A2A_SHARE_SAVE_additional_js_variables" class="setting-description"><?php _e("<strong>Note</strong>: If you're adding new code, be careful not to accidentally overwrite any previous code.</label>", 'add-to-any'); ?>
|
370 |
<?php } ?>
|
371 |
</fieldset></td>
|
372 |
</tr>
|
373 |
</table>
|
374 |
|
375 |
<p class="submit">
|
376 |
+
<input class="button-primary" type="submit" name="Submit" value="<?php _e('Save Changes', 'add-to-any' ) ?>" />
|
377 |
</p>
|
378 |
|
379 |
</form>
|
398 |
add_action('admin_menu', 'A2A_SHARE_SAVE_add_menu_link');
|
399 |
|
400 |
|
401 |
+
function A2A_SHARE_SAVE_actlinks( $links ) {
|
402 |
+
// Add a link to this plugin's settings page
|
403 |
+
$settings_link = '<a href="options-general.php?page=add-to-any.php">Settings</a>';
|
404 |
+
array_unshift( $links, $settings_link );
|
405 |
+
return $links;
|
406 |
+
}
|
407 |
+
|
408 |
+
add_filter("plugin_action_links_$A2A_SHARE_SAVE_plugin_basename", 'A2A_SHARE_SAVE_actlinks' );
|
409 |
+
|
410 |
|
411 |
?>
|
share_16_16.png
ADDED
Binary file
|