Version Description
Download this release
Release Info
Developer | dannisbet |
Plugin | Social Icons Widget |
Version | 13.05 |
Comparing to | |
See all releases |
Code changes from version 13.04 to 13.05
- lib/form.php +1 -1
- lib/social-networks.php +27 -0
- lib/widget.php +1 -1
- readme.txt +9 -4
- social-media-icons-widget.php +4 -28
lib/form.php
CHANGED
@@ -51,7 +51,7 @@ $sizes = array(
|
|
51 |
|
52 |
<ul class="social_accounts">
|
53 |
<?php foreach ($social_accounts as $site => $id) :
|
54 |
-
$icon = plugins_url('
|
55 |
if ( @getimagesize($icon) ) { $image = '<img class="site_icon" src="'.$icon.'" alt="'.$site.'" height="16" width="16" />'; }
|
56 |
else { $image = ''; }
|
57 |
?>
|
51 |
|
52 |
<ul class="social_accounts">
|
53 |
<?php foreach ($social_accounts as $site => $id) :
|
54 |
+
$icon = plugins_url('social-media-icons-widget/icons/small/'.$id.'.jpg', '');
|
55 |
if ( @getimagesize($icon) ) { $image = '<img class="site_icon" src="'.$icon.'" alt="'.$site.'" height="16" width="16" />'; }
|
56 |
else { $image = ''; }
|
57 |
?>
|
lib/social-networks.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Declare supported social media websites
|
3 |
+
global $social_accounts;
|
4 |
+
$social_accounts = array(
|
5 |
+
'Behance' => 'behance',
|
6 |
+
'Dribbble' => 'dribbble',
|
7 |
+
'Facebook' => 'facebook',
|
8 |
+
'Flickr' => 'flickr',
|
9 |
+
'Forrst' => 'forrst',
|
10 |
+
'Foursquare' => 'foursquare',
|
11 |
+
'Google+' => 'googleplus',
|
12 |
+
'Instagram' => 'instagram',
|
13 |
+
'Klout' => 'klout',
|
14 |
+
'LinkedIn' => 'linkedin',
|
15 |
+
'Path' => 'path',
|
16 |
+
'Pinterest' => 'pinterest',
|
17 |
+
'RSS Feed' => 'rss',
|
18 |
+
'StumbleUpon' => 'stumbleupon',
|
19 |
+
'Technorati' => 'technorati',
|
20 |
+
'Tumblr' => 'tumblr',
|
21 |
+
'Twitter' => 'twitter',
|
22 |
+
'Vimeo' => 'vimeo',
|
23 |
+
'Yelp' => 'yelp',
|
24 |
+
'YouTube' => 'youtube',
|
25 |
+
'Zerply' => 'zerply'
|
26 |
+
);
|
27 |
+
?>
|
lib/widget.php
CHANGED
@@ -33,7 +33,7 @@ $ul_class .= 'icons-'.$icons;
|
|
33 |
$icon_path = STYLESHEETPATH .'/social_icons/'.$size.'/'.$id.'.{gif,jpg,jpeg,png}';
|
34 |
}
|
35 |
else {
|
36 |
-
$icon_path = ABSPATH .'wp-content/plugins/
|
37 |
}
|
38 |
|
39 |
$result = glob( $icon_path, GLOB_BRACE );
|
33 |
$icon_path = STYLESHEETPATH .'/social_icons/'.$size.'/'.$id.'.{gif,jpg,jpeg,png}';
|
34 |
}
|
35 |
else {
|
36 |
+
$icon_path = ABSPATH .'wp-content/plugins/social-media-icons-widget/icons/'.$icons.'/'.$id.'.{gif,jpg,jpeg,png}';
|
37 |
}
|
38 |
|
39 |
$result = glob( $icon_path, GLOB_BRACE );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dannisbet
|
|
3 |
Tags: social, media, widget, follow, profile, icons, twitter, facebook, linkedin, forrst, dribbble
|
4 |
Donate link: http://dannisbet.com/
|
5 |
Requires at least: 3.5.1
|
6 |
-
Tested up to: 3.6-
|
7 |
-
Stable tag: 2013.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -53,14 +53,19 @@ Coming soon.
|
|
53 |
|
54 |
== Changelog ==
|
55 |
|
56 |
-
=
|
57 |
-
*
|
58 |
|
59 |
= 2013.04 =
|
|
|
60 |
|
|
|
61 |
* Initial commit
|
62 |
|
63 |
== Upgrade Notice ==
|
64 |
|
|
|
|
|
|
|
65 |
= 2013.04 =
|
66 |
Initial commit to WordPress plugin repository
|
3 |
Tags: social, media, widget, follow, profile, icons, twitter, facebook, linkedin, forrst, dribbble
|
4 |
Donate link: http://dannisbet.com/
|
5 |
Requires at least: 3.5.1
|
6 |
+
Tested up to: 3.6-beta2
|
7 |
+
Stable tag: 2013.05
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
53 |
|
54 |
== Changelog ==
|
55 |
|
56 |
+
= 2013.05 =
|
57 |
+
* Fixed image and CSS paths
|
58 |
|
59 |
= 2013.04 =
|
60 |
+
* Initial commit
|
61 |
|
62 |
+
= trunk =
|
63 |
* Initial commit
|
64 |
|
65 |
== Upgrade Notice ==
|
66 |
|
67 |
+
= 2013.05 =
|
68 |
+
Fixed image and CSS paths
|
69 |
+
|
70 |
= 2013.04 =
|
71 |
Initial commit to WordPress plugin repository
|
social-media-icons-widget.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Social Icons Widget
|
4 |
Plugin URI: http://github.com/dannisbet/Social-Icons-Widget
|
5 |
-
Version: 2013.
|
6 |
Description: Displays a list of social media website icons and a link to your profile.
|
7 |
Author: Dan Nisbet
|
8 |
Author URI: http://dannisbet.com/
|
@@ -27,31 +27,7 @@ class Social_Icons_Widget extends WP_Widget {
|
|
27 |
add_action('admin_print_styles', array($this, 'register_admin_styles'));
|
28 |
add_action('wp_enqueue_scripts', array($this, 'register_widget_styles'));
|
29 |
|
30 |
-
|
31 |
-
global $social_accounts;
|
32 |
-
$social_accounts = array(
|
33 |
-
'Behance' => 'behance',
|
34 |
-
'Dribbble' => 'dribbble',
|
35 |
-
'Facebook' => 'facebook',
|
36 |
-
'Flickr' => 'flickr',
|
37 |
-
'Forrst' => 'forrst',
|
38 |
-
'Foursquare' => 'foursquare',
|
39 |
-
'Google+' => 'googleplus',
|
40 |
-
'Instagram' => 'instagram',
|
41 |
-
'Klout' => 'klout',
|
42 |
-
'LinkedIn' => 'linkedin',
|
43 |
-
'Path' => 'path',
|
44 |
-
'Pinterest' => 'pinterest',
|
45 |
-
'RSS Feed' => 'rss',
|
46 |
-
'StumbleUpon' => 'stumbleupon',
|
47 |
-
'Technorati' => 'technorati',
|
48 |
-
'Tumblr' => 'tumblr',
|
49 |
-
'Twitter' => 'twitter',
|
50 |
-
'Vimeo' => 'vimeo',
|
51 |
-
'Yelp' => 'yelp',
|
52 |
-
'YouTube' => 'youtube',
|
53 |
-
'Zerply' => 'zerply'
|
54 |
-
);
|
55 |
}
|
56 |
|
57 |
function form($instance) {
|
@@ -78,11 +54,11 @@ class Social_Icons_Widget extends WP_Widget {
|
|
78 |
}
|
79 |
|
80 |
function register_admin_styles() {
|
81 |
-
wp_enqueue_style('social-icons-widget-admin', plugins_url('
|
82 |
}
|
83 |
|
84 |
function register_widget_styles() {
|
85 |
-
wp_enqueue_style('social-icons-widget-widget', plugins_url('
|
86 |
}
|
87 |
|
88 |
}
|
2 |
/*
|
3 |
Plugin Name: Social Icons Widget
|
4 |
Plugin URI: http://github.com/dannisbet/Social-Icons-Widget
|
5 |
+
Version: 2013.05
|
6 |
Description: Displays a list of social media website icons and a link to your profile.
|
7 |
Author: Dan Nisbet
|
8 |
Author URI: http://dannisbet.com/
|
27 |
add_action('admin_print_styles', array($this, 'register_admin_styles'));
|
28 |
add_action('wp_enqueue_scripts', array($this, 'register_widget_styles'));
|
29 |
|
30 |
+
include('lib/social-networks.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
function form($instance) {
|
54 |
}
|
55 |
|
56 |
function register_admin_styles() {
|
57 |
+
wp_enqueue_style('social-icons-widget-admin', plugins_url('social-media-icons-widget/css/social_icons_admin.css'));
|
58 |
}
|
59 |
|
60 |
function register_widget_styles() {
|
61 |
+
wp_enqueue_style('social-icons-widget-widget', plugins_url('social-media-icons-widget/css/social_icons_widget.css'));
|
62 |
}
|
63 |
|
64 |
}
|