Version Description
- fix/update security issue
Download this release
Release Info
Developer | cybernetikz |
Plugin | Easy Social Icons |
Version | 3.1.0 |
Comparing to | |
See all releases |
Code changes from version 3.0.9 to 3.1.0
- easy-social-icons.php +43 -28
- js/cnss.js +10 -17
- readme.txt +4 -1
easy-social-icons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Easy Social Icons
|
4 |
Plugin URI: http://www.cybernetikz.com
|
5 |
Description: You can upload your own social icon, set your social URL, choose weather you want to display vertical or horizontal. You can use the shortcode <strong>[cn-social-icon]</strong> in page/post, template tag for php file <strong><?php if ( function_exists('cn_social_icon') ) echo cn_social_icon(); ?></strong> also you can use the widget <strong>"Easy Social Icons"</strong> for sidebar.
|
6 |
-
Version: 3.0
|
7 |
Author: cybernetikz
|
8 |
Author URI: http://www.cybernetikz.com
|
9 |
License: GPL2
|
@@ -14,7 +14,7 @@ if( !defined('ABSPATH') ) die();
|
|
14 |
$cnssUploadDir = wp_upload_dir();
|
15 |
$cnssBaseDir = $cnssUploadDir['basedir'].'/';
|
16 |
$cnssBaseURL = $cnssUploadDir['baseurl'].'';
|
17 |
-
$cnssPluginsURI = plugins_url('/
|
18 |
|
19 |
add_action('init', 'cnss_init_script');
|
20 |
add_action('init', 'cn_process_post');
|
@@ -391,27 +391,27 @@ function cnss_social_icon_option_fn() {
|
|
391 |
if( isset($_POST['generate_shortcode']) && check_admin_referer('cn_gen_sc') )
|
392 |
{
|
393 |
if(is_numeric($_POST['_width']) && $cnss_width != $_POST['_width']){
|
394 |
-
$shortcode .= ' width="'
|
395 |
}
|
396 |
if(is_numeric($_POST['_height']) && $cnss_height != $_POST['_height'] ){
|
397 |
-
$shortcode .= ' height="'
|
398 |
}
|
399 |
if(is_numeric($_POST['_margin']) && $cnss_margin != $_POST['_margin'] ){
|
400 |
-
$shortcode .= ' margin="'
|
401 |
}
|
402 |
if(isset($_POST['_alignment']) && $text_align != $_POST['_alignment'] ){
|
403 |
-
$shortcode .= ' alignment="'
|
404 |
-
$text_align = $_POST['_alignment'];
|
405 |
}
|
406 |
if(isset($_POST['_display']) && $vorh != $_POST['_display'] ){
|
407 |
-
$shortcode .= ' display="'
|
408 |
-
$vorh = $_POST['_display'];
|
409 |
}
|
410 |
if(isset($_POST['_attr_id']) && $_POST['_attr_id']!=''){
|
411 |
-
$shortcode .= ' attr_id="'
|
412 |
}
|
413 |
if(isset($_POST['_attr_class']) && $_POST['_attr_class']!=''){
|
414 |
-
$shortcode .= ' attr_class="'
|
415 |
}
|
416 |
if( isset($_POST['_selected_icons']) ) {
|
417 |
if(is_array($_POST['_selected_icons'])) {
|
@@ -428,44 +428,59 @@ function cnss_social_icon_option_fn() {
|
|
428 |
?>
|
429 |
<p>Copy and paste following shortcode to any <strong>Page</strong> or <strong>Post</strong>.<p>
|
430 |
|
431 |
-
<p><input onclick="this.select();" readonly="readonly" type="text" value="<?php echo $shortcode; ?>" class="large-text" /></p>
|
432 |
<p>Or you can change following icon settings and click <strong>Generate Shortcode</strong> button to get updated shortcode.</p>
|
433 |
<form method="post" action="admin.php?page=cnss_social_icon_option#shortcode" enctype="application/x-www-form-urlencoded">
|
434 |
<?php wp_nonce_field('cn_gen_sc'); ?>
|
435 |
<input type="hidden" name="generate_shortcode" value="1" />
|
436 |
<table width="100%" border="0">
|
437 |
<tr>
|
438 |
-
<td width="110"
|
439 |
-
|
|
|
|
|
|
|
440 |
<td> </td>
|
441 |
-
<td width="110"
|
442 |
-
|
|
|
|
|
|
|
443 |
<td> </td>
|
444 |
-
<td
|
445 |
-
|
|
|
|
|
|
|
446 |
<td> </td>
|
447 |
<td><label><?php _e( 'Alignment:' ); ?></label><br />
|
448 |
<select name="_alignment">
|
449 |
-
<option <?php if($text_align=='center')echo 'selected="selected"'; ?> value="center">Center</option>
|
450 |
-
<option <?php if($text_align=='left')echo 'selected="selected"'; ?> value="left">Left</option>
|
451 |
-
<option <?php if($text_align=='right')echo 'selected="selected"'; ?> value="right">Right</option>
|
452 |
</select></td>
|
453 |
<td> </td>
|
454 |
<td><label><?php _e( 'Display:' ); ?></label><br />
|
455 |
<select name="_display">
|
456 |
-
<option <?php if($vorh=='horizontal')echo 'selected="selected"'; ?> value="horizontal">Horizontally</option>
|
457 |
-
<option <?php if($vorh=='vertical')echo 'selected="selected"'; ?> value="vertical">Vertically</option>
|
458 |
</select></td>
|
459 |
<td> </td>
|
460 |
-
<td
|
461 |
-
|
|
|
|
|
|
|
462 |
<td> </td>
|
463 |
-
<td
|
464 |
-
|
|
|
|
|
|
|
465 |
</tr>
|
466 |
</table>
|
467 |
<p></p>
|
468 |
-
<?php echo _cn_social_icon_sc( isset($_POST['_selected_icons'])
|
469 |
<p><label><?php _e( 'Select Social Icons:' ); ?></label> <em>(If select none all icons will be displayed)</em></p>
|
470 |
<p>
|
471 |
<input type="submit" class="button-primary" value="<?php _e('Generate Shortcode') ?>" />
|
3 |
Plugin Name: Easy Social Icons
|
4 |
Plugin URI: http://www.cybernetikz.com
|
5 |
Description: You can upload your own social icon, set your social URL, choose weather you want to display vertical or horizontal. You can use the shortcode <strong>[cn-social-icon]</strong> in page/post, template tag for php file <strong><?php if ( function_exists('cn_social_icon') ) echo cn_social_icon(); ?></strong> also you can use the widget <strong>"Easy Social Icons"</strong> for sidebar.
|
6 |
+
Version: 3.1.0
|
7 |
Author: cybernetikz
|
8 |
Author URI: http://www.cybernetikz.com
|
9 |
License: GPL2
|
14 |
$cnssUploadDir = wp_upload_dir();
|
15 |
$cnssBaseDir = $cnssUploadDir['basedir'].'/';
|
16 |
$cnssBaseURL = $cnssUploadDir['baseurl'].'';
|
17 |
+
$cnssPluginsURI = plugins_url('/', __FILE__);
|
18 |
|
19 |
add_action('init', 'cnss_init_script');
|
20 |
add_action('init', 'cn_process_post');
|
391 |
if( isset($_POST['generate_shortcode']) && check_admin_referer('cn_gen_sc') )
|
392 |
{
|
393 |
if(is_numeric($_POST['_width']) && $cnss_width != $_POST['_width']){
|
394 |
+
$shortcode .= ' width="'.esc_attr($_POST['_width']).'"';
|
395 |
}
|
396 |
if(is_numeric($_POST['_height']) && $cnss_height != $_POST['_height'] ){
|
397 |
+
$shortcode .= ' height="'.esc_attr($_POST['_height']).'"';
|
398 |
}
|
399 |
if(is_numeric($_POST['_margin']) && $cnss_margin != $_POST['_margin'] ){
|
400 |
+
$shortcode .= ' margin="'.esc_attr($_POST['_margin']).'"';
|
401 |
}
|
402 |
if(isset($_POST['_alignment']) && $text_align != $_POST['_alignment'] ){
|
403 |
+
$shortcode .= ' alignment="'.esc_attr($_POST['_alignment']).'"';
|
404 |
+
$text_align = esc_attr($_POST['_alignment']);
|
405 |
}
|
406 |
if(isset($_POST['_display']) && $vorh != $_POST['_display'] ){
|
407 |
+
$shortcode .= ' display="'.esc_attr($_POST['_display']).'"';
|
408 |
+
$vorh = esc_attr($_POST['_display']);
|
409 |
}
|
410 |
if(isset($_POST['_attr_id']) && $_POST['_attr_id']!=''){
|
411 |
+
$shortcode .= ' attr_id="'.esc_attr($_POST['_attr_id']).'"';
|
412 |
}
|
413 |
if(isset($_POST['_attr_class']) && $_POST['_attr_class']!=''){
|
414 |
+
$shortcode .= ' attr_class="'.esc_attr($_POST['_attr_class']).'"';
|
415 |
}
|
416 |
if( isset($_POST['_selected_icons']) ) {
|
417 |
if(is_array($_POST['_selected_icons'])) {
|
428 |
?>
|
429 |
<p>Copy and paste following shortcode to any <strong>Page</strong> or <strong>Post</strong>.<p>
|
430 |
|
431 |
+
<p><input onclick="this.select();" readonly="readonly" type="text" value="<?php echo esc_attr($shortcode); ?>" class="large-text" /></p>
|
432 |
<p>Or you can change following icon settings and click <strong>Generate Shortcode</strong> button to get updated shortcode.</p>
|
433 |
<form method="post" action="admin.php?page=cnss_social_icon_option#shortcode" enctype="application/x-www-form-urlencoded">
|
434 |
<?php wp_nonce_field('cn_gen_sc'); ?>
|
435 |
<input type="hidden" name="generate_shortcode" value="1" />
|
436 |
<table width="100%" border="0">
|
437 |
<tr>
|
438 |
+
<td width="110">
|
439 |
+
<label><?php _e( 'Icon Width <em>(px)</em>:' ); ?></label>
|
440 |
+
<input class="widefat" name="_width" type="number" value="<?php
|
441 |
+
echo isset($_POST['_width']) ? esc_attr($_POST['_width']) : $cnss_width; ?>">
|
442 |
+
</td>
|
443 |
<td> </td>
|
444 |
+
<td width="110">
|
445 |
+
<label><?php _e( 'Icon Height <em>(px)</em>:' ); ?></label>
|
446 |
+
<input class="widefat" name="_height" type="number" value="<?php
|
447 |
+
echo isset($_POST['_height']) ? esc_attr($_POST['_height']) : $cnss_height; ?>">
|
448 |
+
</td>
|
449 |
<td> </td>
|
450 |
+
<td>
|
451 |
+
<label><?php _e( 'Margin <em>(px)</em>:' ); ?></label><br />
|
452 |
+
<input class="widefat" name="_margin" type="number" value="<?php
|
453 |
+
echo isset($_POST['_margin']) ? esc_attr($_POST['_margin']) : $cnss_margin; ?>">
|
454 |
+
</td>
|
455 |
<td> </td>
|
456 |
<td><label><?php _e( 'Alignment:' ); ?></label><br />
|
457 |
<select name="_alignment">
|
458 |
+
<option <?php if($text_align=='center') echo 'selected="selected"'; ?> value="center">Center</option>
|
459 |
+
<option <?php if($text_align=='left') echo 'selected="selected"'; ?> value="left">Left</option>
|
460 |
+
<option <?php if($text_align=='right') echo 'selected="selected"'; ?> value="right">Right</option>
|
461 |
</select></td>
|
462 |
<td> </td>
|
463 |
<td><label><?php _e( 'Display:' ); ?></label><br />
|
464 |
<select name="_display">
|
465 |
+
<option <?php if($vorh=='horizontal') echo 'selected="selected"'; ?> value="horizontal">Horizontally</option>
|
466 |
+
<option <?php if($vorh=='vertical') echo 'selected="selected"'; ?> value="vertical">Vertically</option>
|
467 |
</select></td>
|
468 |
<td> </td>
|
469 |
+
<td>
|
470 |
+
<label><?php _e( 'Custom ID:' ); ?></label>
|
471 |
+
<input class="widefat" placeholder="ID" name="_attr_id" type="text" value="<?php
|
472 |
+
echo isset($_POST['_attr_id']) ? esc_attr($_POST['_attr_id']) : ''; ?>">
|
473 |
+
</td>
|
474 |
<td> </td>
|
475 |
+
<td>
|
476 |
+
<label><?php _e( 'Custom Class:' ); ?></label>
|
477 |
+
<input class="widefat" placeholder="Class" name="_attr_class" type="text" value="<?php
|
478 |
+
echo isset($_POST['_attr_class']) ? esc_attr($_POST['_attr_class']) : ''; ?>">
|
479 |
+
</td>
|
480 |
</tr>
|
481 |
</table>
|
482 |
<p></p>
|
483 |
+
<?php echo _cn_social_icon_sc( isset($_POST['_selected_icons']) ? $_POST['_selected_icons'] : array() ); ?>
|
484 |
<p><label><?php _e( 'Select Social Icons:' ); ?></label> <em>(If select none all icons will be displayed)</em></p>
|
485 |
<p>
|
486 |
<input type="submit" class="button-primary" value="<?php _e('Generate Shortcode') ?>" />
|
js/cnss.js
CHANGED
@@ -1,25 +1,18 @@
|
|
1 |
jQuery(document).ready(function($) {
|
2 |
-
jQuery('
|
3 |
jQuery(this).animate({
|
4 |
opacity: 0.5
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
jQuery(this).animate({
|
10 |
-
opacity: 1
|
11 |
-
//marginTop:'0px'
|
12 |
-
}, 200 );
|
13 |
});
|
14 |
-
|
15 |
-
jQuery('ul.cnss-social-icon li img').hover(function() {
|
16 |
-
jQuery(this).animate({
|
17 |
-
opacity: 0.5
|
18 |
-
}, {duration:200, queue:false} );
|
19 |
-
},
|
20 |
-
function() {
|
21 |
jQuery(this).animate({
|
22 |
opacity: 1
|
23 |
-
|
|
|
|
|
|
|
24 |
});
|
25 |
});
|
1 |
jQuery(document).ready(function($) {
|
2 |
+
jQuery('ul.cnss-social-icon li img').on('mouseenter', function() {
|
3 |
jQuery(this).animate({
|
4 |
opacity: 0.5
|
5 |
+
}, {
|
6 |
+
duration: 200,
|
7 |
+
queue: false
|
8 |
+
});
|
|
|
|
|
|
|
|
|
9 |
});
|
10 |
+
jQuery('ul.cnss-social-icon li img').on('mouseleave', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
jQuery(this).animate({
|
12 |
opacity: 1
|
13 |
+
}, {
|
14 |
+
duration: 200,
|
15 |
+
queue: false
|
16 |
+
});
|
17 |
});
|
18 |
});
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: easy social icon,easy social icons,social icon,social icons,social,social share,follow,followus,follow us,share,icon,custom social icons, social media icons
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 3.0
|
8 |
|
9 |
Upload your own social media icons or choose from font-awesome. Use widget|shortcode to place icons anywhere(sidebar, header, footer, page) in theme.
|
10 |
|
@@ -76,6 +76,9 @@ If you are using wordpress version lower than 3.5 please use Easy social Icon ve
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
79 |
= 3.0.9 =
|
80 |
* fix/update security issue
|
81 |
* check with latest wordpress version 5.8
|
4 |
Tags: easy social icon,easy social icons,social icon,social icons,social,social share,follow,followus,follow us,share,icon,custom social icons, social media icons
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 3.1.0
|
8 |
|
9 |
Upload your own social media icons or choose from font-awesome. Use widget|shortcode to place icons anywhere(sidebar, header, footer, page) in theme.
|
10 |
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 3.1.0 =
|
80 |
+
* fix/update security issue
|
81 |
+
|
82 |
= 3.0.9 =
|
83 |
* fix/update security issue
|
84 |
* check with latest wordpress version 5.8
|