Easy Social Icons - Version 3.0.1

Version Description

  • fix font-awesome icons color for some specific themes
  • automatically set sort order when add new icon
Download this release

Release Info

Developer cybernetikz
Plugin Icon 128x128 Easy Social Icons
Version 3.0.1
Comparing to
See all releases

Code changes from version 3.0.0 to 3.0.1

Files changed (3) hide show
  1. css/cnss.css +3 -67
  2. easy-social-icons.php +47 -14
  3. readme.txt +6 -2
css/cnss.css CHANGED
@@ -11,72 +11,7 @@ ul.cnss-social-icon li{vertical-align: middle; float:none!important; width:auto!
11
  ul.cnss-social-icon li a,ul.cnss-social-icon li a img{box-shadow: none!important; -webkit-box-shadow:none;}
12
  /* font-awesome-icons-settings */
13
  ul.cnss-social-icon li.cn-fa-icon a{display: block!important; text-align: center!important; background-color:#333; -webkit-transition: width 0.5s!important; transition: all 0.5s!important;box-sizing: border-box!important;}
14
- /* ul.cnss-social-icon li.cn-fa-icon a.cnss-dropbox{background-color:#007ee5;}
15
- ul.cnss-social-icon li.cn-fa-icon a.cnss-foursquare{background-color:#f94877;}
16
- ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus {background-color:#dc4a38;}
17
- ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus-circle {background-color:#dc4a38;}
18
- ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus-official {background-color:#dc4a38;}
19
- ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus-square {background-color:#dc4a38;}
20
- ul.cnss-social-icon li.cn-fa-icon a.cnss-google-wallet {background-color:#dc4a38;}
21
- ul.cnss-social-icon li.cn-fa-icon a.cnss-google {background-color:#dc4a38;}
22
- ul.cnss-social-icon li.cn-fa-icon a.cnss-internet-explorer{background-color:#0078d7;}
23
- ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest {background-color:#cb1f27;}
24
- ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest-square {background-color:#cb1f27;}
25
- ul.cnss-social-icon li.cn-fa-icon a.cnss-slideshare {background-color:#0ca8aa;}
26
- ul.cnss-social-icon li.cn-fa-icon a.cnss-trello{background-color:#0079bf;}
27
- ul.cnss-social-icon li.cn-fa-icon a.cnss-windows{background-color:#0078d7;}
28
- ul.cnss-social-icon li.cn-fa-icon a.cnss-yelp{background-color:#d32323;}
29
- ul.cnss-social-icon li.cn-fa-icon a.cnss-youtube{background-color:#e62f27;}
30
- ul.cnss-social-icon li.cn-fa-icon a.cnss-youtube-square{background-color:#e62f27;}
31
- ul.cnss-social-icon li.cn-fa-icon a.cnss-apple{background-color:#333333;}
32
- ul.cnss-social-icon li.cn-fa-icon a.cnss-bluetooth{background-color:#0082fc;}
33
- ul.cnss-social-icon li.cn-fa-icon a.cnss-drupal{background-color:#0073ba;}
34
- ul.cnss-social-icon li.cn-fa-icon a.cnss-facebook{background-color:#3b5998;}
35
- ul.cnss-social-icon li.cn-fa-icon a.cnss-facebook-f{background-color:#3b5998;}
36
- ul.cnss-social-icon li.cn-fa-icon a.cnss-facebook-official{background-color:#3b5998;}
37
- ul.cnss-social-icon li.cn-fa-icon a.cnss-facebook-square{background-color:#3b5998;}
38
- ul.cnss-social-icon li.cn-fa-icon a.cnss-html5{background-color:#e34c26;}
39
- ul.cnss-social-icon li.cn-fa-icon a.cnss-medium {background-color:#00ab6c;}
40
- ul.cnss-social-icon li.cn-fa-icon a.cnss-opera{background-color:#f71a2b;}
41
- ul.cnss-social-icon li.cn-fa-icon a.cnss-quora {background-color:#b92b27;}
42
- ul.cnss-social-icon li.cn-fa-icon a.cnss-reddit {background-color:#ff4500;}
43
- ul.cnss-social-icon li.cn-fa-icon a.cnss-spotify{background-color:#1ed760;}
44
- ul.cnss-social-icon li.cn-fa-icon a.cnss-twitter{background-color:#1da1f2;}
45
- ul.cnss-social-icon li.cn-fa-icon a.cnss-twitter-square{background-color:#1da1f2;}
46
- ul.cnss-social-icon li.cn-fa-icon a.cnss-vine {background-color:#00b386;}
47
- ul.cnss-social-icon li.cn-fa-icon a.cnss-wordpress {background-color:#00a0d2;}
48
- ul.cnss-social-icon li.cn-fa-icon a.cnss-xing{background-color:#005d5e;}
49
- ul.cnss-social-icon li.cn-fa-icon a.cnss-xing-square{background-color:#005d5e;}
50
- ul.cnss-social-icon li.cn-fa-icon a.cnss-yahoo{background-color:#4102b0;}
51
- ul.cnss-social-icon li.cn-fa-icon a.cnss-css3{background-color:#0c73b8;}
52
- ul.cnss-social-icon li.cn-fa-icon a.cnss-digg{background-color:#1b5891;}
53
- ul.cnss-social-icon li.cn-fa-icon a.cnss-edge {background-color:#2c74be;}
54
- ul.cnss-social-icon li.cn-fa-icon a.cnss-etsy{background-color:#f56400;}
55
- ul.cnss-social-icon li.cn-fa-icon a.cnss-joomla{background-color:#ed1c40;}
56
- ul.cnss-social-icon li.cn-fa-icon a.cnss-skype{background-color:#00aff0;}
57
- ul.cnss-social-icon li.cn-fa-icon a.cnss-tumblr{background-color:#36465d;}
58
- ul.cnss-social-icon li.cn-fa-icon a.cnss-tumblr-square{background-color:#36465d;}
59
- ul.cnss-social-icon li.cn-fa-icon a.cnss-whatsapp {background-color:#2ab200;}
60
- ul.cnss-social-icon li.cn-fa-icon a.cnss-android{background-color:#77c159;}
61
- ul.cnss-social-icon li.cn-fa-icon a.cnss-behance{background-color:#005cff;}
62
- ul.cnss-social-icon li.cn-fa-icon a.cnss-behance-square{background-color:#005cff;}
63
- ul.cnss-social-icon li.cn-fa-icon a.cnss-dribbble {background-color:#e04c86;}
64
- ul.cnss-social-icon li.cn-fa-icon a.cnss-expeditedssl{background-color:#000000;}
65
- ul.cnss-social-icon li.cn-fa-icon a.cnss-forumbee {background-color:#86ac2f;}
66
- ul.cnss-social-icon li.cn-fa-icon a.cnss-get-pocket{background-color:#e84352;}
67
- ul.cnss-social-icon li.cn-fa-icon a.cnss-hacker-news{background-color:#ff6600;}
68
- ul.cnss-social-icon li.cn-fa-icon a.cnss-linkedin{background-color:#0177b5;}
69
- ul.cnss-social-icon li.cn-fa-icon a.cnss-linkedin-square{background-color:#0177b5;}
70
- ul.cnss-social-icon li.cn-fa-icon a.cnss-maxcdn {background-color:#ff5b02;}
71
- ul.cnss-social-icon li.cn-fa-icon a.cnss-vimeo {background-color:#00b3ec;}
72
- ul.cnss-social-icon li.cn-fa-icon a.cnss-vimeo-square {background-color:#aad450;}
73
- ul.cnss-social-icon li.cn-fa-icon a.cnss-github {background-color:#000000;}
74
- ul.cnss-social-icon li.cn-fa-icon a.cnss-github-square {background-color:#000000;}
75
- ul.cnss-social-icon li.cn-fa-icon a.cnss-git {background-color:#f14e32;}
76
- ul.cnss-social-icon li.cn-fa-icon a.cnss-git-square {background-color:#f14e32;}
77
- ul.cnss-social-icon li.cn-fa-icon a.cnss-rss {background-color:#ff6600;}
78
- */
79
- ul.cnss-social-icon li.cn-fa-icon a.cnss-dropbox{background-color:#007ee5!important;}
80
  ul.cnss-social-icon li.cn-fa-icon a.cnss-foursquare{background-color:#f94877!important;}
81
  ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus {background-color:#dc4a38!important;}
82
  ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus-circle {background-color:#dc4a38!important;}
@@ -86,6 +21,7 @@ ul.cnss-social-icon li.cn-fa-icon a.cnss-google-wallet {background-color:#dc4a38
86
  ul.cnss-social-icon li.cn-fa-icon a.cnss-google {background-color:#dc4a38!important;}
87
  ul.cnss-social-icon li.cn-fa-icon a.cnss-internet-explorer{background-color:#0078d7!important;}
88
  ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest {background-color:#cb1f27!important;}
 
89
  ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest-square {background-color:#cb1f27!important;}
90
  ul.cnss-social-icon li.cn-fa-icon a.cnss-slideshare {background-color:#0ca8aa!important;}
91
  ul.cnss-social-icon li.cn-fa-icon a.cnss-trello{background-color:#0079bf!important;}
@@ -139,4 +75,4 @@ ul.cnss-social-icon li.cn-fa-icon a.cnss-github {background-color:#000000!import
139
  ul.cnss-social-icon li.cn-fa-icon a.cnss-github-square {background-color:#000000!important;}
140
  ul.cnss-social-icon li.cn-fa-icon a.cnss-git {background-color:#f14e32!important;}
141
  ul.cnss-social-icon li.cn-fa-icon a.cnss-git-square {background-color:#f14e32!important;}
142
- ul.cnss-social-icon li.cn-fa-icon a.cnss-rss {background-color:#ff6600!important;}
11
  ul.cnss-social-icon li a,ul.cnss-social-icon li a img{box-shadow: none!important; -webkit-box-shadow:none;}
12
  /* font-awesome-icons-settings */
13
  ul.cnss-social-icon li.cn-fa-icon a{display: block!important; text-align: center!important; background-color:#333; -webkit-transition: width 0.5s!important; transition: all 0.5s!important;box-sizing: border-box!important;}
14
+ ul.cnss-social-icon li.cn-fa-icon a.cnss-dropbox{background-color:#007ee5!important;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ul.cnss-social-icon li.cn-fa-icon a.cnss-foursquare{background-color:#f94877!important;}
16
  ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus {background-color:#dc4a38!important;}
17
  ul.cnss-social-icon li.cn-fa-icon a.cnss-google-plus-circle {background-color:#dc4a38!important;}
21
  ul.cnss-social-icon li.cn-fa-icon a.cnss-google {background-color:#dc4a38!important;}
22
  ul.cnss-social-icon li.cn-fa-icon a.cnss-internet-explorer{background-color:#0078d7!important;}
23
  ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest {background-color:#cb1f27!important;}
24
+ ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest-p {background-color:#cb1f27!important;}
25
  ul.cnss-social-icon li.cn-fa-icon a.cnss-pinterest-square {background-color:#cb1f27!important;}
26
  ul.cnss-social-icon li.cn-fa-icon a.cnss-slideshare {background-color:#0ca8aa!important;}
27
  ul.cnss-social-icon li.cn-fa-icon a.cnss-trello{background-color:#0079bf!important;}
75
  ul.cnss-social-icon li.cn-fa-icon a.cnss-github-square {background-color:#000000!important;}
76
  ul.cnss-social-icon li.cn-fa-icon a.cnss-git {background-color:#f14e32!important;}
77
  ul.cnss-social-icon li.cn-fa-icon a.cnss-git-square {background-color:#f14e32!important;}
78
+ ul.cnss-social-icon li.cn-fa-icon a.cnss-rss {background-color:#ff6600!important;}
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>&lt;?php if ( function_exists('cn_social_icon') ) echo cn_social_icon(); ?&gt;</strong> also you can use the widget <strong>"Easy Social Icons"</strong> for sidebar.
6
- Version: 3.0.0
7
  Author: cybernetikz
8
  Author URI: http://www.cybernetikz.com
9
  License: GPL2
@@ -127,13 +127,41 @@ function cnss_get_all_icons($where_sql = '') {
127
  }
128
  }
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  function social_profile_links_fn() {
131
 
132
- $social_profile_links = get_option('cnss-social-profile-links');
133
- $cnss_original_icon_color = get_option('cnss-original-icon-color');
134
- $icon_bg_color = get_option('cnss-icon-bg-color');
135
- $icon_bg_hover_color = get_option('cnss-icon-bg-hover-color');
136
- $icon_hover_color = get_option('cnss-icon-hover-color');
137
 
138
  $icons = cnss_get_all_icons();
139
  if ( !empty($icons) && $social_profile_links == 1 ) {
@@ -169,6 +197,7 @@ function social_profile_links_fn() {
169
 
170
  function cnss_add_menu_pages() {
171
  add_menu_page('Easy Social Icons', 'Easy Social Icons', 'manage_options', 'cnss_social_icon_page', 'cnss_social_icon_page_fn',plugins_url('/images/scc-sc.png', __FILE__) );
 
172
 
173
  add_submenu_page('cnss_social_icon_page', 'All Icons', 'All Icons', 'manage_options', 'cnss_social_icon_page', 'cnss_social_icon_page_fn');
174
 
@@ -196,7 +225,11 @@ function register_cnss_settings() {
196
  register_setting( 'cnss-settings-group', 'cnss-icon-color' );
197
  register_setting( 'cnss-settings-group', 'cnss-icon-hover-color' );
198
  register_setting( 'cnss-settings-group', 'cnss-icon-shape' );
199
- register_setting( 'cnss-settings-group', 'cnss-original-icon-color' );
 
 
 
 
200
  }
201
 
202
  function cnss_social_icon_option_fn() {
@@ -510,7 +543,7 @@ function cnss_db_install () {
510
  'cnss-social-profile-links' => '0',
511
  'cnss-social-profile-type' => 'Person',
512
  'cnss-icon-bg-color' => '#666666',
513
- 'cnss-icon-bg-hover-color' => '#ffffff',
514
  'cnss-icon-color' => '#ffffff',
515
  'cnss-icon-hover-color' => '#ffffff',
516
  'cnss-icon-shape' => 'square',
@@ -825,7 +858,7 @@ function cnss_social_icon_add_fn() {
825
  $url = "";
826
  $image_url = "";
827
 
828
- $sortorder = "0";
829
  $target = "";
830
  $uptxt = 'Icon';
831
  }
@@ -1140,11 +1173,11 @@ function cn_social_icon($attr = array(), $call_from_widget = NULL) {
1140
  $text_align = isset($attr['alignment'])?$attr['alignment']:get_option('cnss-text-align');
1141
 
1142
  // settings for font-awesome icons
1143
- $icon_bg_color = get_option('cnss-icon-bg-color');
1144
- $icon_color = get_option('cnss-icon-color');
1145
- $icon_hover_color = get_option('cnss-icon-hover-color');
1146
- $icon_shape = get_option('cnss-icon-shape');
1147
- $cnss_original_icon_color = get_option('cnss-original-icon-color');
1148
 
1149
  $table_name = $wpdb->prefix . "cn_social_icon";
1150
  $sql = "SELECT * FROM ".$table_name." WHERE image_url<>'' AND url<>'' $where_sql ORDER BY sortorder";
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>&lt;?php if ( function_exists('cn_social_icon') ) echo cn_social_icon(); ?&gt;</strong> also you can use the widget <strong>"Easy Social Icons"</strong> for sidebar.
6
+ Version: 3.0.1
7
  Author: cybernetikz
8
  Author URI: http://www.cybernetikz.com
9
  License: GPL2
127
  }
128
  }
129
 
130
+ function cn_esi_get_option($key='') {
131
+ if ($key == '') {
132
+ return;
133
+ }
134
+
135
+ $cnss_esi_settings = array(
136
+ 'cnss-width' => '32',
137
+ 'cnss-height' => '32',
138
+ 'cnss-margin' => '4',
139
+ 'cnss-row-count' => '1',
140
+ 'cnss-vertical-horizontal' => 'horizontal',
141
+ 'cnss-text-align' => 'center',
142
+ 'cnss-social-profile-links' => '0',
143
+ 'cnss-social-profile-type' => 'Person',
144
+ 'cnss-icon-bg-color' => '#666666',
145
+ 'cnss-icon-bg-hover-color' => '#333333',
146
+ 'cnss-icon-color' => '#ffffff',
147
+ 'cnss-icon-hover-color' => '#ffffff',
148
+ 'cnss-icon-shape' => 'square',
149
+ 'cnss-original-icon-color' => '1'
150
+ );
151
+ if ( get_option($key) != '' ) {
152
+ return get_option($key);
153
+ } else {
154
+ return $cnss_esi_settings[$key];
155
+ }
156
+ }
157
+
158
  function social_profile_links_fn() {
159
 
160
+ $social_profile_links = cn_esi_get_option('cnss-social-profile-links');
161
+ $cnss_original_icon_color = cn_esi_get_option('cnss-original-icon-color');
162
+ $icon_bg_color = cn_esi_get_option('cnss-icon-bg-color');
163
+ $icon_bg_hover_color = cn_esi_get_option('cnss-icon-bg-hover-color');
164
+ $icon_hover_color = cn_esi_get_option('cnss-icon-hover-color');
165
 
166
  $icons = cnss_get_all_icons();
167
  if ( !empty($icons) && $social_profile_links == 1 ) {
197
 
198
  function cnss_add_menu_pages() {
199
  add_menu_page('Easy Social Icons', 'Easy Social Icons', 'manage_options', 'cnss_social_icon_page', 'cnss_social_icon_page_fn',plugins_url('/images/scc-sc.png', __FILE__) );
200
+ //add_menu_page('Easy Social Icons', 'Easy Social Icons', 'manage_options', 'cnss_social_icon_page', 'cnss_social_icon_page_fn', 'dashicons-share' );
201
 
202
  add_submenu_page('cnss_social_icon_page', 'All Icons', 'All Icons', 'manage_options', 'cnss_social_icon_page', 'cnss_social_icon_page_fn');
203
 
225
  register_setting( 'cnss-settings-group', 'cnss-icon-color' );
226
  register_setting( 'cnss-settings-group', 'cnss-icon-hover-color' );
227
  register_setting( 'cnss-settings-group', 'cnss-icon-shape' );
228
+ register_setting( 'cnss-settings-group', 'cnss-original-icon-color', 'cnss_original_icon_color_fn' );
229
+ }
230
+
231
+ function cnss_original_icon_color_fn($value) {
232
+ return $value==''?'0':$value;
233
  }
234
 
235
  function cnss_social_icon_option_fn() {
543
  'cnss-social-profile-links' => '0',
544
  'cnss-social-profile-type' => 'Person',
545
  'cnss-icon-bg-color' => '#666666',
546
+ 'cnss-icon-bg-hover-color' => '#333333',
547
  'cnss-icon-color' => '#ffffff',
548
  'cnss-icon-hover-color' => '#ffffff',
549
  'cnss-icon-shape' => 'square',
858
  $url = "";
859
  $image_url = "";
860
 
861
+ $sortorder = count(cnss_get_all_icons());
862
  $target = "";
863
  $uptxt = 'Icon';
864
  }
1173
  $text_align = isset($attr['alignment'])?$attr['alignment']:get_option('cnss-text-align');
1174
 
1175
  // settings for font-awesome icons
1176
+ $icon_bg_color = cn_esi_get_option('cnss-icon-bg-color');
1177
+ $icon_color = cn_esi_get_option('cnss-icon-color');
1178
+ $icon_hover_color = cn_esi_get_option('cnss-icon-hover-color');
1179
+ $icon_shape = cn_esi_get_option('cnss-icon-shape');
1180
+ $cnss_original_icon_color = cn_esi_get_option('cnss-original-icon-color');
1181
 
1182
  $table_name = $wpdb->prefix . "cn_social_icon";
1183
  $sql = "SELECT * FROM ".$table_name." WHERE image_url<>'' AND url<>'' $where_sql ORDER BY sortorder";
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: 4.7.2
7
- Stable tag: 3.0.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
 
@@ -32,7 +32,7 @@ If you are using <strong>wordpress version lower than 3.5</strong> please use "E
32
  * You can insert your social icon set in pages/posts using shortcode
33
  * Sort social media icons using drag drop
34
  * Also if you are familiar with PHP code then you can use the template tag to place the social icon set anywhere in the PHP template file
35
- * Google Social Profile Links feature added, so if someone search your website/blog in goggle it will show your social icons also.
36
 
37
  Please visit our site <a target="_blank" href="http://www.cybernetikz.com/blog/wordpress-plugins-easy-social-icons/">www.cybernetikz.com/</a>
38
 
@@ -70,6 +70,10 @@ If you are using wordpress version lower than 3.5 please use Easy social Icon ve
70
 
71
  == Changelog ==
72
 
 
 
 
 
73
  = 3.0.0 =
74
  * add font awesome icons
75
  * css fix/update to remove unwanted icon border, shadow for "Twenty Seventeen"
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: 4.7.2
7
+ Stable tag: 3.0.1
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
 
32
  * You can insert your social icon set in pages/posts using shortcode
33
  * Sort social media icons using drag drop
34
  * Also if you are familiar with PHP code then you can use the template tag to place the social icon set anywhere in the PHP template file
35
+ * Google Social Profile Links feature added, so if someone search your website/blog in google it will show your social icons also.
36
 
37
  Please visit our site <a target="_blank" href="http://www.cybernetikz.com/blog/wordpress-plugins-easy-social-icons/">www.cybernetikz.com/</a>
38
 
70
 
71
  == Changelog ==
72
 
73
+ = 3.0.1 =
74
+ * fix font-awesome icons color for some specific themes
75
+ * automatically set sort order when add new icon
76
+
77
  = 3.0.0 =
78
  * add font awesome icons
79
  * css fix/update to remove unwanted icon border, shadow for "Twenty Seventeen"