Version Description
- Add filter for custom icons and URLs.
- Add icon for
mailto:
links. - Thanks to mmcginnis for both of these changes.
Download this release
Release Info
Developer | pdclark |
Plugin | Menu Social Icons |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.2
- menu-social-icons.php +4 -2
- readme.txt +36 -3
menu-social-icons.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Menu Social Icons
|
4 |
Description: Change menu links to social sites to icons automatically. Uses <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome</a> and supports: Bitbucket, Dribbble, Dropbox, Flickr, Foursquare, Gittip, Instagram, RenRen, Stack Overflow, Trello, Tumblr, VK, Weibo, Xing, and YouTube.
|
5 |
-
Version: 1.
|
6 |
Author: Brainstorm Media
|
7 |
Author URI: http://brainstormmedia.com
|
8 |
*/
|
@@ -33,7 +33,7 @@ add_action( 'template_redirect', create_function( '', 'global $storm_menu_social
|
|
33 |
|
34 |
class Storm_Menu_Social_Icons {
|
35 |
|
36 |
-
var $version = '1.
|
37 |
|
38 |
/**
|
39 |
* Should we hide the original menu text, or put the icon before it?
|
@@ -58,6 +58,7 @@ class Storm_Menu_Social_Icons {
|
|
58 |
'instagr.am' => array( 'class' => 'instagram', 'icon' => 'icon-instagram', 'icon-sign' => 'icon-instagram' ),
|
59 |
'instagram.com' => array( 'class' => 'instagram', 'icon' => 'icon-instagram', 'icon-sign' => 'icon-instagram' ),
|
60 |
'linkedin.com' => array( 'class' => 'linkedin', 'icon' => 'icon-linkedin', 'icon-sign' => 'icon-linkedin-sign' ),
|
|
|
61 |
'pinterest.com' => array( 'class' => 'pinterest', 'icon' => 'icon-pinterest', 'icon-sign' => 'icon-pinterest-sign' ),
|
62 |
'plus.google.com' => array( 'class' => 'google-plus', 'icon' => 'icon-google-plus', 'icon-sign' => 'icon-google-plus-sign' ),
|
63 |
'renren.com' => array( 'class' => 'renren', 'icon' => 'icon-renren', 'icon-sign' => 'icon-renren' ),
|
@@ -110,6 +111,7 @@ class Storm_Menu_Social_Icons {
|
|
110 |
$this->size = apply_filters( 'storm_social_icons_size', $this->size );
|
111 |
$this->type = apply_filters( 'storm_social_icons_type', $this->type );
|
112 |
$this->hide_text = apply_filters( 'storm_social_icons_hide_text', $this->hide_text );
|
|
|
113 |
|
114 |
add_action( 'wp_print_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
115 |
add_action( 'wp_print_scripts', array( $this, 'wp_print_scripts' ) );
|
2 |
/*
|
3 |
Plugin Name: Menu Social Icons
|
4 |
Description: Change menu links to social sites to icons automatically. Uses <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome</a> and supports: Bitbucket, Dribbble, Dropbox, Flickr, Foursquare, Gittip, Instagram, RenRen, Stack Overflow, Trello, Tumblr, VK, Weibo, Xing, and YouTube.
|
5 |
+
Version: 1.2
|
6 |
Author: Brainstorm Media
|
7 |
Author URI: http://brainstormmedia.com
|
8 |
*/
|
33 |
|
34 |
class Storm_Menu_Social_Icons {
|
35 |
|
36 |
+
var $version = '1.2';
|
37 |
|
38 |
/**
|
39 |
* Should we hide the original menu text, or put the icon before it?
|
58 |
'instagr.am' => array( 'class' => 'instagram', 'icon' => 'icon-instagram', 'icon-sign' => 'icon-instagram' ),
|
59 |
'instagram.com' => array( 'class' => 'instagram', 'icon' => 'icon-instagram', 'icon-sign' => 'icon-instagram' ),
|
60 |
'linkedin.com' => array( 'class' => 'linkedin', 'icon' => 'icon-linkedin', 'icon-sign' => 'icon-linkedin-sign' ),
|
61 |
+
'mailto:' => array( 'class' => 'envelope', 'icon' => 'icon-envelope', 'icon-sign' => 'icon-envelope-alt' ),
|
62 |
'pinterest.com' => array( 'class' => 'pinterest', 'icon' => 'icon-pinterest', 'icon-sign' => 'icon-pinterest-sign' ),
|
63 |
'plus.google.com' => array( 'class' => 'google-plus', 'icon' => 'icon-google-plus', 'icon-sign' => 'icon-google-plus-sign' ),
|
64 |
'renren.com' => array( 'class' => 'renren', 'icon' => 'icon-renren', 'icon-sign' => 'icon-renren' ),
|
111 |
$this->size = apply_filters( 'storm_social_icons_size', $this->size );
|
112 |
$this->type = apply_filters( 'storm_social_icons_type', $this->type );
|
113 |
$this->hide_text = apply_filters( 'storm_social_icons_hide_text', $this->hide_text );
|
114 |
+
$this->networks = apply_filters( 'storm_social_icons_networks', $this->networks );
|
115 |
|
116 |
add_action( 'wp_print_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
117 |
add_action( 'wp_print_scripts', array( $this, 'wp_print_scripts' ) );
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Plugin URI: https://github.com/brainstormmedia/menu-social-icons
|
|
4 |
Author URI: http://brainstormmedia.com
|
5 |
Tags: social, icons, menus, FontAwesome, social media, easy
|
6 |
Requires at least: 3.4
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 1.
|
9 |
|
10 |
Add social icons to your WordPress menu items automatically.
|
11 |
|
@@ -29,6 +29,7 @@ http://www.youtube.com/watch?v=AS3hLeyV4S0
|
|
29 |
* gittip.com
|
30 |
* instagram.com
|
31 |
* linkedin.com
|
|
|
32 |
* pinterest.com
|
33 |
* plus.google.com
|
34 |
* renren.com
|
@@ -41,10 +42,20 @@ http://www.youtube.com/watch?v=AS3hLeyV4S0
|
|
41 |
* xing.com
|
42 |
* youtube.com
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
**Available Options**
|
47 |
|
|
|
|
|
48 |
Show menu item text in addition to the icons:
|
49 |
`add_filter( 'storm_social_icons_hide_text', '__return_false' );`
|
50 |
|
@@ -59,6 +70,18 @@ Various sizes for icons. Pick one. (Default is 2x).
|
|
59 |
add_filter( 'storm_social_icons_size', create_function( '', 'return "3x";' ) );
|
60 |
add_filter( 'storm_social_icons_size', create_function( '', 'return "4x";' ) );
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
== Installation ==
|
63 |
|
64 |
1. Search for "Menu Social Icons" under `WordPress Admin > Plugins > Add New`
|
@@ -85,6 +108,11 @@ We load FontAwesome onto your site using NetDNA's [Bootstrap CDN](http://www.boo
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
88 |
= 1.1 =
|
89 |
* Upgrade to FontAwesome 3.2.1
|
90 |
* Add lots of new site icons: bitbucket.org, dribbble.com, dropbox.com, flickr.com, foursquare.com, gittip.com, instagram.com, renren.com, stackoverflow.com, trello.com, tumblr.com, vk.com, weibo.com, xing.com, youtube.com
|
@@ -94,5 +122,10 @@ We load FontAwesome onto your site using NetDNA's [Bootstrap CDN](http://www.boo
|
|
94 |
|
95 |
== Upgrade Notice ==
|
96 |
|
|
|
|
|
|
|
|
|
|
|
97 |
**1.1**
|
98 |
Add lots of new networks: bitbucket.org, dribbble.com, dropbox.com, flickr.com, foursquare.com, gittip.com, instagram.com, renren.com, stackoverflow.com, trello.com, tumblr.com, vk.com, weibo.com, xing.com, youtube.com
|
4 |
Author URI: http://brainstormmedia.com
|
5 |
Tags: social, icons, menus, FontAwesome, social media, easy
|
6 |
Requires at least: 3.4
|
7 |
+
Tested up to: 3.6
|
8 |
+
Stable tag: 1.2
|
9 |
|
10 |
Add social icons to your WordPress menu items automatically.
|
11 |
|
29 |
* gittip.com
|
30 |
* instagram.com
|
31 |
* linkedin.com
|
32 |
+
* mailto: (email links)
|
33 |
* pinterest.com
|
34 |
* plus.google.com
|
35 |
* renren.com
|
42 |
* xing.com
|
43 |
* youtube.com
|
44 |
|
45 |
+
**Editing the Appearance**
|
46 |
+
|
47 |
+
If you want to edit the appearance of the icons in ways that the options below don't provide, you can do more with custom CSS to match your theme.
|
48 |
+
|
49 |
+
Menu Social Icons adds a `social-icon` class to every menu item that's an icon, as well as a class for each social network, like `facebook` or `twitter`.
|
50 |
+
|
51 |
+
If you're not familiar with how to use CSS to make these changes, here is a video walkthrough that will guide you through the process:
|
52 |
+
|
53 |
+
http://www.youtube.com/watch?v=hA2rjDwmvms
|
54 |
|
55 |
**Available Options**
|
56 |
|
57 |
+
There are several configuration options that can be changed by adding filters to your theme's `functions.php` file.
|
58 |
+
|
59 |
Show menu item text in addition to the icons:
|
60 |
`add_filter( 'storm_social_icons_hide_text', '__return_false' );`
|
61 |
|
70 |
add_filter( 'storm_social_icons_size', create_function( '', 'return "3x";' ) );
|
71 |
add_filter( 'storm_social_icons_size', create_function( '', 'return "4x";' ) );
|
72 |
|
73 |
+
Add icons from [FontAwesome](http://fortawesome.github.io/Font-Awesome/) for other URLs. For example, an RSS feed:
|
74 |
+
|
75 |
+
add_filter( 'storm_social_icons_networks', 'storm_social_icons_networks');
|
76 |
+
function storm_social_icons_networks( $networks ) {
|
77 |
+
$extra_icons = array (
|
78 |
+
'/feed' => array( 'class' => 'rss', 'icon' => 'icon-rss', 'icon-sign' => 'icon-rss-sign' ),
|
79 |
+
);
|
80 |
+
$extra_icons = array_merge( $networks, $extra_icons );
|
81 |
+
return $extra_icons;
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
== Installation ==
|
86 |
|
87 |
1. Search for "Menu Social Icons" under `WordPress Admin > Plugins > Add New`
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.2 =
|
112 |
+
* Add filter for custom icons and URLs.
|
113 |
+
* Add icon for `mailto:` links.
|
114 |
+
* [Thanks to mmcginnis](http://wordpress.org/support/topic/just-works-40) for both of these changes.
|
115 |
+
|
116 |
= 1.1 =
|
117 |
* Upgrade to FontAwesome 3.2.1
|
118 |
* Add lots of new site icons: bitbucket.org, dribbble.com, dropbox.com, flickr.com, foursquare.com, gittip.com, instagram.com, renren.com, stackoverflow.com, trello.com, tumblr.com, vk.com, weibo.com, xing.com, youtube.com
|
122 |
|
123 |
== Upgrade Notice ==
|
124 |
|
125 |
+
**1.2**
|
126 |
+
* Add filter for custom icons and URLs.
|
127 |
+
* Add icon for `mailto:` links.
|
128 |
+
* [Thanks to mmcginnis](http://wordpress.org/support/topic/just-works-40) for both of these changes.
|
129 |
+
|
130 |
**1.1**
|
131 |
Add lots of new networks: bitbucket.org, dribbble.com, dropbox.com, flickr.com, foursquare.com, gittip.com, instagram.com, renren.com, stackoverflow.com, trello.com, tumblr.com, vk.com, weibo.com, xing.com, youtube.com
|