Genesis Simple Share - Version 1.0.7

Version Description

  • Fixed: potential xss vector
Download this release

Release Info

Developer Nick_theGeek
Plugin Icon 128x128 Genesis Simple Share
Version 1.0.7
Comparing to
See all releases

Code changes from version 1.0.6 to 1.0.7

lib/sharrre/sharrre.php CHANGED
@@ -7,7 +7,7 @@ if( invalid_request() ){
7
  header('content-type: application/json');
8
  //Sharrre by Julien Hany
9
  $json = array('url'=>'','count'=>0);
10
- $json['url'] = $_GET['url'];
11
  $url = urlencode($_GET['url']);
12
  $type = urlencode($_GET['type']);
13
 
7
  header('content-type: application/json');
8
  //Sharrre by Julien Hany
9
  $json = array('url'=>'','count'=>0);
10
+ //$json['url'] = $_GET['url'];
11
  $url = urlencode($_GET['url']);
12
  $type = urlencode($_GET['type']);
13
 
plugin.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI:
5
 
6
  Description: A simple sharing plugin using the Share script.
7
 
8
- Version: 1.0.6
9
 
10
  Author: Rainmaker Digital LLC
11
  Author URI: http://www.copyblogger.com
5
 
6
  Description: A simple sharing plugin using the Share script.
7
 
8
+ Version: 1.0.7
9
 
10
  Author: Rainmaker Digital LLC
11
  Author URI: http://www.copyblogger.com
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: nathanrice, studiopress, wpmuguru, nick_thegeek, bgardner
3
  Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
  Requires at least: 3.7
5
  Tested up to: 4.3.1
6
- Stable tag: 1.0.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -31,6 +31,9 @@ https://github.com/copyblogger/genesis-simple-share/wiki/Usage-Tips
31
 
32
  == Changelog ==
33
 
 
 
 
34
  = 1.0.6 =
35
  * Fixed: styling tweeks for twitter button without count.
36
 
@@ -55,6 +58,9 @@ https://github.com/copyblogger/genesis-simple-share/wiki/Usage-Tips
55
 
56
  == Upgrade Notice ==
57
 
 
 
 
58
  = 1.0.1 =
59
  * Fixes potential error where only first post in archive will show share buttons
60
 
3
  Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
  Requires at least: 3.7
5
  Tested up to: 4.3.1
6
+ Stable tag: 1.0.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.0.7 =
35
+ * Fixed: potential xss vector
36
+
37
  = 1.0.6 =
38
  * Fixed: styling tweeks for twitter button without count.
39
 
58
 
59
  == Upgrade Notice ==
60
 
61
+ = 1.0.7 =
62
+ * Fixed: potential xss vector. Recommend immediate upgrade.
63
+
64
  = 1.0.1 =
65
  * Fixes potential error where only first post in archive will show share buttons
66
 
trunk/Gruntfile.js ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ module.exports = function(grunt) {
4
+
5
+ // Load tasks
6
+ require('load-grunt-tasks')(grunt);
7
+
8
+ grunt.initConfig({
9
+ pkg: grunt.file.readJSON('package.json'),
10
+
11
+
12
+ // Dependencies
13
+
14
+ // PHP
15
+
16
+ // Lint .php files for syntax errors
17
+ phplint: {
18
+ all: [ '*.php', 'lib/**/*.php' ]
19
+ },
20
+
21
+
22
+ // I18n
23
+
24
+ // Add text domain as last argument of i18n functions
25
+ addtextdomain: {
26
+ php: {
27
+ options: {
28
+ updateDomains: true
29
+ },
30
+ src: [
31
+ '*.php',
32
+ 'lib/**/*.php'
33
+ ]
34
+ }
35
+ },
36
+
37
+ // Check text domain is last argument of i18n functions
38
+ checktextdomain: {
39
+ options: {
40
+ text_domain: '<%= pkg.name %>',
41
+ keywords: [
42
+ '__:1,2d',
43
+ '_e:1,2d',
44
+ '_x:1,2c,3d',
45
+ '_ex:1,2c,3d',
46
+ '_n:1,2,4d',
47
+ '_nx:1,2,4c,5d',
48
+ '_n_noop:1,2,3d',
49
+ '_nx_noop:1,2,3c,4d',
50
+ 'esc_attr__:1,2d',
51
+ 'esc_html__:1,2d',
52
+ 'esc_attr_e:1,2d',
53
+ 'esc_html_e:1,2d',
54
+ 'esc_attr_x:1,2c,3d',
55
+ 'esc_html_x:1,2c,3d'
56
+ ]
57
+ },
58
+ files: {
59
+ expand: true,
60
+ src: [
61
+ '*.php',
62
+ 'lib/**/*.php'
63
+ ]
64
+ }
65
+ },
66
+
67
+
68
+ // Build language .pot file
69
+ makepot: {
70
+ plugin: {
71
+ options: {
72
+ domainPath: '/languages',
73
+ processPot: function( pot ) {
74
+ pot.headers['report-msgid-bugs-to'] = 'StudioPress <translations@studiopress.com>';
75
+ pot.headers['last-translator'] = 'StudioPress <translations@studiopress.com>';
76
+ pot.headers['language-team'] = 'English <translations@studiopress.com>';
77
+ pot.headers['plural-forms'] = 'nplurals=2; plural=n != 1;';
78
+ pot.headers['x-generator'] = 'grunt-wp-i18n 0.4.4';
79
+ pot.headers['x-poedit-basepath'] = '.';
80
+ pot.headers['x-poedit-language'] = 'English';
81
+ pot.headers['x-poedit-country'] = 'UNITED STATES';
82
+ pot.headers['x-poedit-sourcecharset'] = 'utf-8';
83
+ pot.headers['x-poedit-keywordslist'] = '__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;';
84
+ pot.headers['x-poedit-bookmarks'] = '';
85
+ pot.headers['x-poedit-searchpath-0'] = '.';
86
+ pot.headers['x-textdomain-support'] = 'yes';
87
+ return pot;
88
+ },
89
+ type: 'wp-plugin'
90
+ }
91
+ }
92
+ },
93
+
94
+
95
+ });
96
+
97
+ };
trunk/README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Genesis Simple Share
2
+ ==================
3
+
4
+ Genesis Simple Share is created to be simple and easy to use within your Genesis child theme. We have tried to focus on making default options and initial setup a breeze.
5
+
6
+ Installation
7
+ ==================
8
+
9
+ Download the latest version of the Genesis Simple Share plugin and upload as a new plugin within your WordPress dashboard or via FTP to the wp-content/plugins folder and then activate the plugin.
10
+
11
+ Setup
12
+ ==================
13
+
14
+ The default settings should automatically enable the share icons on posts. You may wish to make some changes so in your WordPress dashboard hover over the Genesis menu item and click the Simple Share menu item in that submenu.
15
+
16
+ Once there you can choose which post types Simple Share will be active on, if it should show on archives, and which icons to enable. You can also drag and drop the icons to change the order they will display in on your site. You may wish to add your Twitter user name to the twitter icon settings. This will add a via: @username after the share text on Twitter. You may also add a URL to an image to use as the default image.
17
+
18
+
19
+ Tips and Tricks
20
+ ==================
21
+
22
+ [Additional Usage Tips](https://github.com/copyblogger/genesis-simple-share/wiki/Usage-Tips)
trunk/assets/banner-772x250.jpg ADDED
Binary file
trunk/assets/icon-256x256.png ADDED
Binary file
trunk/languages/genesis-simple-share.pot ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2015 copyblogger
2
+ # This file is distributed under the same license as the Genesis Simple Share package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Genesis Simple Share 1.0.5\n"
6
+ "Report-Msgid-Bugs-To: StudioPress <translations@studiopress.com>\n"
7
+ "POT-Creation-Date: 2015-10-09 19:42:50+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: StudioPress <translations@studiopress.com>\n"
13
+ "Language-Team: English <translations@studiopress.com>\n"
14
+ "X-Generator: grunt-wp-i18n 0.4.4\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ "X-Poedit-Language: English\n"
18
+ "X-Poedit-Country: UNITED STATES\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+ "X-Poedit-KeywordsList: "
21
+ "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
22
+ "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
23
+ "X-Poedit-Bookmarks: \n"
24
+ "X-Poedit-SearchPath-0: .\n"
25
+ "X-Textdomain-Support: yes\n"
26
+
27
+ #: lib/admin-icon-preview.php:14 lib/admin.php:14 lib/functions.php:16
28
+ #: plugin.php:19
29
+ msgid "Sorry, you are not allowed to access this page directly."
30
+ msgstr ""
31
+
32
+ #: lib/admin.php:40
33
+ msgid "You can change button position by reordering these boxes:"
34
+ msgstr ""
35
+
36
+ #: lib/admin.php:64
37
+ msgid "Genesis Simple Share Settings"
38
+ msgstr ""
39
+
40
+ #: lib/admin.php:65
41
+ msgid "Simple Share"
42
+ msgstr ""
43
+
44
+ #: lib/admin.php:232
45
+ msgid "Google+"
46
+ msgstr ""
47
+
48
+ #: lib/admin.php:233
49
+ msgid "Facebook"
50
+ msgstr ""
51
+
52
+ #: lib/admin.php:234
53
+ msgid "Twitter"
54
+ msgstr ""
55
+
56
+ #: lib/admin.php:235
57
+ msgid "Pinterest"
58
+ msgstr ""
59
+
60
+ #: lib/admin.php:236
61
+ msgid "Linkedin"
62
+ msgstr ""
63
+
64
+ #: lib/admin.php:237
65
+ msgid "StumbleUpon"
66
+ msgstr ""
67
+
68
+ #: lib/admin.php:264
69
+ msgid "Icon Size"
70
+ msgstr ""
71
+
72
+ #: lib/admin.php:265
73
+ msgid "Small Bar"
74
+ msgstr ""
75
+
76
+ #: lib/admin.php:266
77
+ msgid "Medium Bar"
78
+ msgstr ""
79
+
80
+ #: lib/admin.php:267
81
+ msgid "Box"
82
+ msgstr ""
83
+
84
+ #: lib/admin.php:270
85
+ msgid "Icon Appearance"
86
+ msgstr ""
87
+
88
+ #: lib/admin.php:271
89
+ msgid "Outlined"
90
+ msgstr ""
91
+
92
+ #: lib/admin.php:272
93
+ msgid "Filled"
94
+ msgstr ""
95
+
96
+ #: lib/admin.php:319 lib/admin.php:336 lib/admin.php:353 lib/admin.php:374
97
+ #: lib/admin.php:389 lib/admin.php:409
98
+ msgid "Use this button?"
99
+ msgstr ""
100
+
101
+ #: lib/admin.php:356
102
+ msgid "Enter Twitter ID for @via to be added to default tweet text:"
103
+ msgstr ""
104
+
105
+ #: lib/admin.php:392
106
+ msgid ""
107
+ "Enter Default Image URL if there is no image available in content being "
108
+ "shared:"
109
+ msgstr ""
110
+
111
+ #: lib/admin.php:423
112
+ msgid "Icon Display Position"
113
+ msgstr ""
114
+
115
+ #: lib/admin.php:424
116
+ msgid "Select display position to enable icons."
117
+ msgstr ""
118
+
119
+ #: lib/admin.php:425
120
+ msgid "Before the Content"
121
+ msgstr ""
122
+
123
+ #: lib/admin.php:426
124
+ msgid "After the Content"
125
+ msgstr ""
126
+
127
+ #: lib/admin.php:427
128
+ msgid "Before and After the Content"
129
+ msgstr ""
130
+
131
+ #: lib/admin.php:477
132
+ msgid "Enable on:"
133
+ msgstr ""
134
+
135
+ #: lib/admin.php:484
136
+ msgid "Show on Archive Pages"
137
+ msgstr ""
138
+
139
+ #: lib/post-meta.php:18
140
+ msgid "Share Settings"
141
+ msgstr ""
142
+
143
+ #: lib/post-meta.php:37
144
+ msgid "Disable Share Buttons"
145
+ msgstr ""
146
+
147
+ #. Plugin Name of the plugin/theme
148
+ msgid "Genesis Simple Share"
149
+ msgstr ""
150
+
151
+ #. Description of the plugin/theme
152
+ msgid "A simple sharing plugin using the Share script."
153
+ msgstr ""
154
+
155
+ #. Author of the plugin/theme
156
+ msgid "copyblogger"
157
+ msgstr ""
158
+
159
+ #. Author URI of the plugin/theme
160
+ msgid "http://www.copyblogger.com"
161
+ msgstr ""
trunk/lib/admin-icon-preview.php ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Creates the plugin front end output.
4
+ *
5
+ *
6
+ * @category Genesis Simple Share
7
+ * @package Output
8
+ * @author copyblogger
9
+ * @license http://www.opensource.org/licenses/gpl-license.php GPL-2.0+
10
+ */
11
+
12
+ //* Prevent direct access to the plugin
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die( __( 'Sorry, you are not allowed to access this page directly.', 'genesis-simple-share' ) );
15
+ }
16
+
17
+ /**
18
+ * Generates output on the front end of a Premise enabled site
19
+ *
20
+ * @category Genesis Simple Share
21
+ * @package Output
22
+ *
23
+ * @since 0.1.0
24
+ */
25
+ class Gensis_Simple_Share_Preview {
26
+
27
+ var $icons;
28
+ var $appearance;
29
+ var $size;
30
+
31
+ /**
32
+ * Create front end output.
33
+ *
34
+ * @since 0.1.0
35
+ *
36
+ */
37
+ function __construct() {
38
+
39
+ $icons = get_option( 'genesis_simple_share_sort', array(
40
+ 'main' => 'genesis_simple_share_google_plus,genesis_simple_share_facebook,genesis_simple_share_twitter,genesis_simple_share_pinterest,genesis_simple_share_linkedin,genesis_simple_share_stumbleupon'
41
+ ) );
42
+
43
+ $icons = explode( ',', $icons['main'] );
44
+
45
+ $icon_sort = array();
46
+
47
+ foreach( $icons as $icon ){
48
+ switch( $icon ){
49
+
50
+ case 'genesis_simple_share_google_plus':
51
+ $icon_sort[] = 'googlePlus';
52
+ break;
53
+
54
+ case 'genesis_simple_share_facebook':
55
+ $icon_sort[] = 'facebook';
56
+ break;
57
+
58
+ case 'genesis_simple_share_twitter':
59
+ $icon_sort[] = 'twitter';
60
+ break;
61
+
62
+ case 'genesis_simple_share_pinterest':
63
+ $icon_sort[] = 'pinterest';
64
+ break;
65
+
66
+ case 'genesis_simple_share_linkedin':
67
+ $icon_sort[] = 'linkedin';
68
+ break;
69
+
70
+ case 'genesis_simple_share_stumbleupon':
71
+ $icon_sort[] = 'stumbleupon';
72
+ break;
73
+
74
+ }
75
+ }
76
+
77
+ //echo '<pre><code>'; var_dump($icon_sort); echo '</code></pre>';
78
+
79
+ $this->icons = $this->get_display_icons( $icon_sort );
80
+ $this->appearance = genesis_get_option( 'general_appearance', 'genesis_simple_share' );
81
+ $this->size = genesis_get_option( 'general_size' , 'genesis_simple_share' );
82
+
83
+ }
84
+
85
+ /**
86
+ * Check to see if any icons are set to show for the post type and return array of icons or false
87
+ *
88
+ * @since 0.1.0
89
+ *
90
+ * @param string $post_type post type to check against
91
+ *
92
+ * @returns array/boolean conditionally returns array of available icons or false.
93
+ *
94
+ */
95
+ function get_display_icons( $icon_sort ){
96
+
97
+ $icons = array();
98
+
99
+ foreach( $icon_sort as $icon )
100
+ if( genesis_get_option( $icon, 'genesis_simple_share' ) )
101
+ $icons[] = $icon;
102
+
103
+ if( ! empty( $icons ) )
104
+ return $icons;
105
+
106
+ return false;
107
+
108
+ }
109
+
110
+ /**
111
+ * Build output for the icons based on position
112
+ *
113
+ * @since 0.1.0
114
+ *
115
+ * @param string $location before or after location
116
+ * @param array $icons array of icons to use when building output
117
+ *
118
+ * @returns string HTML and JS required to build the share icons.
119
+ *
120
+ */
121
+ function get_icon_output( $location, $icons = array() ){
122
+
123
+ $icons = empty( $icons ) ? $this->icons : $icons;
124
+
125
+ if( empty( $icons ) )
126
+ return;
127
+
128
+ $id = 'preview';
129
+
130
+ $scripts = '';
131
+ $buttons = array();
132
+
133
+ foreach( $icons as $icon ){
134
+
135
+ $shares[] = $icon .': true';
136
+
137
+ $div_id = strtolower( $icon .'-'. $location .'-'. $id );
138
+
139
+ //media
140
+ $button = '';
141
+
142
+
143
+ $scripts .= sprintf( "$('#%s').sharrre({
144
+ share: {
145
+ %s: true
146
+ },
147
+ urlCurl: '%s',
148
+ enableHover: false,
149
+ enableTracking: true,
150
+ buttons: { %s },
151
+ click: function(api, options){
152
+ api.simulateClick();
153
+ api.openPopup('%s');
154
+ }
155
+ });\n",
156
+ $div_id,
157
+ $icon,
158
+ plugins_url( 'sharrre/sharrre.php', __FILE__ ),
159
+ $button,
160
+ $icon
161
+ );
162
+
163
+ switch( $icon ){
164
+
165
+ case 'twitter' :
166
+
167
+ $data_title = 'Tweet';
168
+ break;
169
+
170
+ case 'pinterest' :
171
+
172
+ $data_title = 'Pin';
173
+ break;
174
+
175
+ default:
176
+
177
+ $data_title = 'Share';
178
+
179
+ }
180
+
181
+ $buttons[] = sprintf( '<div class="%s" id="%s" data-url="%s" data-text="%s" data-title="%s"></div>',
182
+ $icon,
183
+ $div_id,
184
+ get_site_url(),
185
+ get_bloginfo( 'name' ),
186
+ $data_title
187
+ );
188
+
189
+ }
190
+
191
+ $divs = implode( '', $buttons );
192
+
193
+ $div_id = 'share-'. $location .'-' . $id;
194
+
195
+ $div = sprintf( '<div class="share-%s share-%s share-%s" id="%s">%s</div>',
196
+ $location,
197
+ $this->appearance,
198
+ $this->size,
199
+ $div_id,
200
+ $divs
201
+ );
202
+
203
+ $script = "
204
+ <script type='text/javascript'>
205
+ jQuery(document).ready(function($) {
206
+ $scripts
207
+ });
208
+ </script>";
209
+
210
+ return $div . $script;
211
+
212
+ }
213
+
214
+ /**
215
+ * Build output for the icons based on position
216
+ *
217
+ * @since 0.1.0
218
+ *
219
+ * @param string $location before or after location
220
+ * @param array $icons array of icons to use when building output
221
+ *
222
+ * @returns string HTML and JS required to build the share icons.
223
+ *
224
+ */
225
+ function get_hide_icon_output( $location, $icons = array() ){
226
+ $id = get_the_ID();
227
+
228
+ $div_id = 'share-'. $location .'-' . $id;
229
+
230
+ $div = sprintf( '<div class="share-%s share-%s share-%s" id="%s" data-url="%s" data-text="%s" data-title="share"></div>',
231
+ $location,
232
+ $this->appearance,
233
+ $this->size,
234
+ $div_id,
235
+ get_permalink( $id ),
236
+ the_title_attribute( array( 'echo' => false ) )
237
+ );
238
+
239
+ $shares = array();
240
+ $buttons = '';
241
+
242
+ foreach( $icons as $icon => $args ){
243
+
244
+ $shares[] = $icon .': true';
245
+
246
+ }
247
+
248
+ $share = implode( ',', $shares );
249
+
250
+ $script = "
251
+ <script type='text/javascript'>
252
+ jQuery(document).ready(function($) {
253
+ $('#$div_id').share({
254
+ share: {
255
+ $share
256
+ },
257
+ ". /*buttons: {
258
+ googlePlus: {size: 'tall', annotation:'bubble'},
259
+ facebook: {layout: 'box_count'},
260
+ twitter: {count: 'vertical', via: '_JulienH'}
261
+ },*/"
262
+ hover: function(api, options){
263
+ $(api.element).find('.buttons').show();
264
+ },
265
+ hide: function(api, options){
266
+ $(api.element).find('.buttons').hide();
267
+ },
268
+ enableTracking: true
269
+ });
270
+ });
271
+ </script>";
272
+
273
+ return $div . $script;
274
+
275
+ }
276
+
277
+ }
278
+
279
+ function genesis_simple_share_preview() {
280
+ global $Genesis_Simple_Share;
281
+
282
+ $Genesis_Simple_Share = new Gensis_Simple_Share_Preview;
283
+
284
+ }
285
+
286
+ genesis_simple_share_preview();
287
+
288
+ function genesis_share_get_icon_preview_output( $position, $icons = array() ) {
289
+ global $Genesis_Simple_Share;
290
+
291
+ return $Genesis_Simple_Share->get_icon_output( $position, $icons );
292
+
293
+ }
294
+
295
+ function genesis_share_icon_preview_output( $position, $icons = array() ) {
296
+
297
+ echo genesis_share_get_icon_preview_output( $position, $icons );
298
+
299
+ }
trunk/lib/admin.php ADDED
@@ -0,0 +1,515 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Creates the plugin admin page.
4
+ *
5
+ *
6
+ * @category Genesis Simple Share
7
+ * @package Admin
8
+ * @author copyblogger
9
+ * @license http://www.opensource.org/licenses/gpl-license.php GPL-2.0+
10
+ */
11
+
12
+ //* Prevent direct access to the plugin
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die( __( 'Sorry, you are not allowed to access this page directly.', 'genesis-simple-share' ) );
15
+ }
16
+
17
+
18
+ /**
19
+ * Registers a new admin page, providing content and corresponding menu items
20
+ *
21
+ * @category Genesis
22
+ * @package Admin
23
+ *
24
+ * @since 0.1.0
25
+ */
26
+ class Genesis_Simple_Share_Boxes extends Genesis_Admin_Boxes {
27
+
28
+ var $sort_text;
29
+
30
+ /**
31
+ * Create an admin menu item and settings page.
32
+ *
33
+ * @since 0.1.0
34
+ *
35
+ * @uses MEMBER_ACCESS_SETTINGS_FIELD settings field key
36
+ *
37
+ */
38
+ function __construct() {
39
+
40
+ $this->sort_text = sprintf( '%s', __( 'You can change button position by reordering these boxes:', 'genesis-simple-share' ) );
41
+
42
+ $settings_field = 'genesis_simple_share';
43
+
44
+ $default_settings = apply_filters(
45
+ 'genesis_simple_share_defaults',
46
+ array(
47
+ 'general_size' => 'small',
48
+ 'general_appearance' => 'filled',
49
+ 'general_position' => 'before_content',
50
+ 'general_post' => 1,
51
+ 'googlePlus' => 1,
52
+ 'facebook' => 1,
53
+ 'twitter' => 1,
54
+ 'pinterest' => 1,
55
+ 'linkedin' => 1,
56
+ 'stumbleupon' => 1,
57
+ )
58
+ );
59
+
60
+ $menu_ops = array(
61
+ 'submenu' => array(
62
+ /** Do not use without 'main_menu' */
63
+ 'parent_slug' => 'genesis',
64
+ 'page_title' => __( 'Genesis Simple Share Settings', 'genesis-simple-share' ),
65
+ 'menu_title' => __( 'Simple Share', 'genesis-simple-share' )
66
+ )
67
+ );
68
+
69
+ $page_ops = array();
70
+ /** Just use the defaults */
71
+
72
+ $this->create( 'genesis_simple_share_settings', $menu_ops, $page_ops, $settings_field, $default_settings );
73
+
74
+ add_action( 'genesis_settings_sanitizer_init', array( $this, 'sanitizer_filters' ) );
75
+
76
+ add_filter( "update_user_metadata", array( $this, 'user_meta_save' ), 10, 4 );
77
+ add_filter( "get_user_option_meta-box-order_genesis_page_genesis_simple_share_settings", array( $this, 'user_meta_return' ) );
78
+
79
+ }
80
+
81
+ /**
82
+ * Register each of the settings with a sanitization filter type.
83
+ *
84
+ * @since 0.9.0
85
+ *
86
+ * @uses genesis_add_option_filter() Assign filter to array of settings.
87
+ *
88
+ * @see \Genesis_Settings_Sanitizer::add_filter() Add sanitization filters to options.
89
+ */
90
+ function sanitizer_filters() {
91
+
92
+ $one_zero = array(
93
+ 'googlePlus',
94
+ 'facebook',
95
+ 'twitter',
96
+ 'pinterest',
97
+ 'linkedin',
98
+ 'stumbleupon',
99
+ 'general_show_archive',
100
+ );
101
+
102
+ $post_types = get_post_types( array( 'public' => true, ) );
103
+
104
+ foreach( $post_types as $post_type ){
105
+ $one_zero[] = 'general_' . $post_type;
106
+ }
107
+
108
+ genesis_add_option_filter(
109
+ 'one_zero',
110
+ $this->settings_field,
111
+ $one_zero
112
+ );
113
+
114
+ genesis_add_option_filter(
115
+ 'no_html',
116
+ $this->settings_field,
117
+ array(
118
+ 'general_size',
119
+ 'general_position',
120
+ 'general_appearance',
121
+ 'twitter_id',
122
+ )
123
+ );
124
+
125
+ genesis_add_option_filter(
126
+ 'url',
127
+ $this->settings_field,
128
+ array(
129
+ 'image_url',
130
+ )
131
+ );
132
+
133
+ }
134
+
135
+ /**
136
+ * Loads required scripts.
137
+ *
138
+ * @since 0.1.0
139
+ *
140
+ */
141
+ function scripts() {
142
+
143
+ wp_enqueue_script( 'common' );
144
+ wp_enqueue_script( 'wp-lists' );
145
+ wp_enqueue_script( 'postbox' );
146
+
147
+ //use wp_enqueue_script() and wp_enqueue_style() to load scripts and styles
148
+ wp_enqueue_script( 'genesis-simple-share-plugin-js',
149
+ plugins_url( 'sharrre/jquery.sharrre.min.js', __FILE__ ),
150
+ array( 'jquery' ),
151
+ '0.1.0'
152
+ );
153
+
154
+ wp_enqueue_style( 'genesis-simple-share-plugin-css',
155
+ plugins_url( 'css/share.css', __FILE__ ),
156
+ array(),
157
+ '0.1.0'
158
+ );
159
+
160
+ wp_enqueue_style( 'genesis-simple-share-genericons-css',
161
+ plugins_url( 'css/genericons.css', __FILE__ ),
162
+ array(),
163
+ '0.1.0'
164
+ );
165
+
166
+ wp_enqueue_script( 'genesis-simple-share-admin-js',
167
+ plugins_url( 'js/admin.js', __FILE__ ),
168
+ array( 'jquery' ),
169
+ '0.1.0'
170
+ );
171
+
172
+ wp_enqueue_style( 'genesis-simple-share-admin-css',
173
+ plugins_url( 'css/admin.css', __FILE__ ),
174
+ array(),
175
+ '0.1.0'
176
+ );
177
+
178
+ }
179
+
180
+ /**
181
+ * Hijacks meta save and switches to the option save for the meta box order on the simple share settings page
182
+ *
183
+ * @since 0.1.0
184
+ *
185
+ * @param null $check default null value if other value returned the meta is not saved
186
+ * @param string $object_id ID of the object being edited
187
+ * @param string $meta_key key being edited
188
+ * @param string $meta_value value being assigned to the key
189
+ *
190
+ * return boolean
191
+ */
192
+ function user_meta_save( $check, $object_id, $meta_key, $meta_value ) {
193
+
194
+ if( 'meta-box-order_genesis_page_genesis_simple_share_settings' == $meta_key )
195
+ return update_option( 'genesis_simple_share_sort', $meta_value );
196
+
197
+ return $check;
198
+ }
199
+
200
+ /**
201
+ * Hijacks user meta check for the meta box order on simple share settings page
202
+ *
203
+ * @since 0.1.0
204
+ *
205
+ * @param mixed $result old value
206
+ *
207
+ * return array
208
+ */
209
+ function user_meta_return( $result ) {
210
+
211
+ if( $new_result = get_option( 'genesis_simple_share_sort' ) )
212
+ return $new_result;
213
+
214
+ return $result;
215
+ }
216
+
217
+ /**
218
+ * Register meta boxes.
219
+ *
220
+ *
221
+ * @since 0.1.0
222
+ *
223
+ */
224
+ function metaboxes() {
225
+
226
+ //var_dump( $current_screen );
227
+
228
+ add_action( 'genesis_simple_share_admin_table_before_rows', array( $this, 'live_preview' ) );
229
+ add_action( $this->pagehook . '_settings_page_boxes' , array( $this, 'general_settings' ), 0 );
230
+ add_action( $this->pagehook . '_settings_page_boxes' , array( $this, 'sort_text' ), 0 );
231
+
232
+ add_meta_box( 'genesis_simple_share_google_plus', __( 'Google+', 'genesis-simple-share' ), array( $this, 'google_plus' ), $this->pagehook, 'main' );
233
+ add_meta_box( 'genesis_simple_share_facebook', __( 'Facebook', 'genesis-simple-share' ), array( $this, 'facebook' ), $this->pagehook, 'main' );
234
+ add_meta_box( 'genesis_simple_share_twitter', __( 'Twitter', 'genesis-simple-share' ), array( $this, 'twitter' ), $this->pagehook, 'main' );
235
+ add_meta_box( 'genesis_simple_share_pinterest', __( 'Pinterest', 'genesis-simple-share' ), array( $this, 'pinterest' ), $this->pagehook, 'main' );
236
+ add_meta_box( 'genesis_simple_share_linkedin', __( 'Linkedin', 'genesis-simple-share' ), array( $this, 'linkedin' ), $this->pagehook, 'main' );
237
+ add_meta_box( 'genesis_simple_share_stumbleupon', __( 'StumbleUpon', 'genesis-simple-share' ), array( $this, 'stumbleupon' ), $this->pagehook, 'main' );
238
+
239
+
240
+
241
+ }
242
+
243
+ /**
244
+ * Create General settings metabox output
245
+ *
246
+ *
247
+ * @since 0.1.0
248
+ *
249
+ */
250
+ function general_settings() {
251
+
252
+ $id = 'general';
253
+
254
+ ?>
255
+
256
+ <div class="wrap gss-clear">
257
+
258
+ <table class="form-table">
259
+ <tbody>
260
+
261
+ <?php
262
+ do_action( 'genesis_simple_share_admin_table_before_rows' );
263
+
264
+ $this->select_field( $id . '_size', __( 'Icon Size', 'genesis-simple-share' ), array(
265
+ 'small' => __( 'Small Bar' , 'genesis-simple-share' ),
266
+ 'medium' => __( 'Medium Bar', 'genesis-simple-share' ),
267
+ 'tall' => __( 'Box' , 'genesis-simple-share' ),
268
+ ) );
269
+
270
+ $this->select_field( $id . '_appearance', __( 'Icon Appearance', 'genesis-simple-share' ), array(
271
+ 'outlined' => __( 'Outlined', 'genesis-simple-share' ),
272
+ 'filled' => __( 'Filled' , 'genesis-simple-share' ),
273
+ ) );
274
+
275
+ $this->position( $id );
276
+ $this->post_type_checkbox( $id );
277
+
278
+ do_action( 'genesis_simple_share_admin_table_after_rows' );
279
+ ?>
280
+ </tbody>
281
+ </table>
282
+ </div>
283
+
284
+ <?php
285
+
286
+ }
287
+
288
+ function live_preview() {
289
+ ?>
290
+ <tr valign="top" class="share-preview-row">
291
+ <th scope="row">Live Preview</th>
292
+ <td>
293
+ <?php
294
+
295
+ require_once( GENESIS_SIMPLE_SHARE_LIB . 'admin-icon-preview.php' );
296
+ genesis_share_icon_preview_output( 'preview' );
297
+
298
+ ?>
299
+ </td>
300
+ </tr>
301
+ <?php
302
+ }
303
+
304
+ function sort_text() {
305
+ printf( '<br /><br /><h3>%s</h3>', $this->sort_text );
306
+ }
307
+
308
+ /**
309
+ * Create Google+ settings metabox output
310
+ *
311
+ *
312
+ * @since 0.1.0
313
+ *
314
+ */
315
+ function google_plus() {
316
+
317
+ $id = 'googlePlus';
318
+
319
+ $this->checkbox( $id , __( 'Use this button?', 'genesis-simple-share' ) );
320
+
321
+ //echo $this->sort_text;
322
+
323
+ }
324
+
325
+ /**
326
+ * Create Facebook settings metabox output
327
+ *
328
+ *
329
+ * @since 0.1.0
330
+ *
331
+ */
332
+ function facebook() {
333
+
334
+ $id = 'facebook';
335
+
336
+ $this->checkbox( $id , __( 'Use this button?', 'genesis-simple-share' ) );
337
+
338
+ //echo $this->sort_text;
339
+
340
+ }
341
+
342
+ /**
343
+ * Create Twitter settings metabox output
344
+ *
345
+ *
346
+ * @since 0.1.0
347
+ *
348
+ */
349
+ function twitter() {
350
+
351
+ $id = 'twitter';
352
+
353
+ $this->checkbox( $id , __( 'Use this button?', 'genesis-simple-share' ) );
354
+
355
+ ?><p>
356
+ <label for="<?php echo $this->get_field_id( 'twitter_id' ); ?>"><?php _e( 'Enter Twitter ID for @via to be added to default tweet text:', 'genesis-simple-share' ); ?></label>
357
+ <input type="text" name="<?php echo $this->get_field_name( 'twitter_id' ); ?>" id="<?php echo $this->get_field_id( 'twitter_id' ); ?>" value="<?php echo esc_attr( str_replace( '@', '', $this->get_field_value( 'twitter_id' ) ) ); ?>" size="27" />
358
+ </p><?php
359
+
360
+
361
+ }
362
+
363
+ /**
364
+ * Create StumbleUpon settings metabox output
365
+ *
366
+ *
367
+ * @since 0.1.0
368
+ *
369
+ */
370
+ function stumbleupon() {
371
+
372
+ $id = 'stumbleupon';
373
+
374
+ $this->checkbox( $id , __( 'Use this button?', 'genesis-simple-share' ) );
375
+
376
+ }
377
+
378
+ /**
379
+ * Create Pinterest settings metabox output
380
+ *
381
+ *
382
+ * @since 0.1.0
383
+ *
384
+ */
385
+ function pinterest() {
386
+
387
+ $id = 'pinterest';
388
+
389
+ $this->checkbox( $id , __( 'Use this button?', 'genesis-simple-share' ) );
390
+
391
+ ?><p>
392
+ <label for="<?php echo $this->get_field_id( 'image_url' ); ?>"><?php _e( 'Enter Default Image URL if there is no image available in content being shared:', 'genesis-simple-share' ); ?></label>
393
+ <input type="text" name="<?php echo $this->get_field_name( 'image_url' ); ?>" id="<?php echo $this->get_field_id( 'image_url' ); ?>" value="<?php echo esc_attr( $this->get_field_value( 'image_url' ) ); ?>" size="27" />
394
+ </p><?php
395
+
396
+ }
397
+
398
+ /**
399
+ * Create Linkedin settings metabox output
400
+ *
401
+ *
402
+ * @since 0.1.0
403
+ *
404
+ */
405
+ function linkedin() {
406
+
407
+ $id = 'linkedin';
408
+
409
+ $this->checkbox( $id , __( 'Use this button?', 'genesis-simple-share' ) );
410
+
411
+ }
412
+
413
+ /**
414
+ * Outputs select field to select position for the icon
415
+ *
416
+ * @since 0.1.0
417
+ *
418
+ * @param string $id ID base to use when building select box.
419
+ *
420
+ */
421
+ function position( $id ){
422
+
423
+ $this->select_field( $id . '_position', __( 'Icon Display Position' , 'genesis-simple-share' ), array(
424
+ 'off' => __( 'Select display position to enable icons.', 'genesis-simple-share' ),
425
+ 'before_content' => __( 'Before the Content' , 'genesis-simple-share' ),
426
+ 'after_content' => __( 'After the Content' , 'genesis-simple-share' ),
427
+ 'both' => __( 'Before and After the Content' , 'genesis-simple-share' ),
428
+ ) );
429
+
430
+ }
431
+
432
+ /**
433
+ * Outputs select field
434
+ *
435
+ * @since 0.1.0
436
+ *
437
+ * @param string $id ID to use when building select box.
438
+ * @param string $name Label text for the select field.
439
+ * @param array $option Array key $option=>$title used to build select options.
440
+ *
441
+ */
442
+ function select_field( $id, $name, $options = array() ){
443
+ $current = $this->get_field_value( $id );
444
+ ?>
445
+ <tr valign="top">
446
+ <th scope="row"><label for="<?php echo $this->get_field_id( $name ); ?>"><?php echo $name ?></label></th>
447
+ <td><select name="<?php echo $this->get_field_name( $id ); ?>" class="<?php echo 'genesis_simple_share_' . $id; ?>" id="<?php echo $this->get_field_id( $id ); ?>">
448
+ <?php
449
+ if ( ! empty( $options ) ) {
450
+ foreach ( (array) $options as $option => $title ) {
451
+
452
+ printf( '<option value="%s"%s>%s</option>',
453
+ esc_attr( $option ),
454
+ selected( $current, $option, false ),
455
+ esc_html( $title )
456
+ );
457
+
458
+ }
459
+ }
460
+ ?>
461
+ </select></td>
462
+ </tr><?php
463
+ }
464
+
465
+ /**
466
+ * Outputs checkbox fields for public post types.
467
+ *
468
+ * @since 0.1.0
469
+ *
470
+ * @param string $id ID base to use when building checkbox.
471
+ *
472
+ */
473
+ function post_type_checkbox( $id ){
474
+
475
+ $post_types = get_post_types( array( 'public' => true, ) );
476
+
477
+ printf( '<tr valign="top"><th scope="row">%s</th>', __( 'Enable on:', 'genesis-simple-share' ) );
478
+
479
+ echo '<td>';
480
+
481
+ foreach( $post_types as $post_type )
482
+ $this->checkbox( $id . '_' . $post_type, $post_type );
483
+
484
+ $this->checkbox( $id . '_show_archive', __( 'Show on Archive Pages', 'genesis-simple-share' ) );
485
+
486
+ echo '</td></tr>';
487
+
488
+ }
489
+
490
+ /**
491
+ * Outputs checkbox field.
492
+ *
493
+ * @since 0.1.0
494
+ *
495
+ * @param string $id ID to use when building checkbox.
496
+ * @param string $name Label text for the checkbox.
497
+ *
498
+ */
499
+ function checkbox( $id, $name ){
500
+ printf( '<label for="%s"><input type="checkbox" name="%s" id="%s" value="1"%s /> %s </label> ',
501
+ $this->get_field_id( $id ),
502
+ $this->get_field_name( $id ),
503
+ $this->get_field_id( $id ),
504
+ checked( $this->get_field_value( $id ), 1, false ),
505
+ $name
506
+ );
507
+ echo '<br />';
508
+ }
509
+
510
+
511
+ }
512
+
513
+ global $genesis_simple_share;
514
+
515
+ $genesis_simple_share = new Genesis_Simple_Share_Boxes;
trunk/lib/css/admin.css ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .gss-clear {
2
+ clear:both;
3
+ }
4
+
5
+ .genesis_page_genesis_simple_share_settings .genesis-metaboxes {
6
+ width: auto;
7
+ }
8
+
9
+ .genesis_page_genesis_simple_share_settings .genesis-metaboxes .top-buttons {
10
+ float: left;
11
+ }
12
+
13
+ .genesis_page_genesis_simple_share_settings .genesis-metaboxes .bottom-buttons {
14
+ clear: both;
15
+ float: left;
16
+ }
17
+
18
+ #main-sortables:after {
19
+ content: "";
20
+ clear: both;
21
+ display: block;
22
+ margin-bottom: 20px;
23
+ }
24
+
25
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox,
26
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .sortable-placeholder {
27
+ display: block;
28
+ float: left;
29
+ height: 240px;
30
+ margin: 5px;
31
+ width: 260px;
32
+ }
33
+
34
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox.closed {
35
+ height: 30px;
36
+ }
37
+
38
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox .handlediv {
39
+ display: none;
40
+ }
41
+
42
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox h3.hndle {
43
+ color: #fff;
44
+ display: block !important;
45
+ text-shadow: none;
46
+ }
47
+
48
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox h3.hndle:before {
49
+ line-height: 1;
50
+ display: inline-block;
51
+ font-family: 'Genericons';
52
+ font-size: 13px;
53
+ margin-right: 10px;
54
+ -webkit-font-smoothing: antialiased;
55
+ }
56
+
57
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox .inside {
58
+ margin: 0px;
59
+ padding: 20px;
60
+ }
61
+
62
+ .genesis_page_genesis_simple_share_settings .meta-box-sortables .postbox input[type=text] {
63
+ margin-top: 5px;
64
+ width: 100%;
65
+ }
66
+
67
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_twitter h3.hndle { background: #09b0ed; }
68
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_facebook h3.hndle { background: #3d5a98; }
69
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_google_plus h3.hndle { background: #dd4c39; }
70
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_pinterest h3.hndle { background: #cb2127; }
71
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_linkedin h3.hndle { background: #035a87; }
72
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_stumbleupon h3.hndle { background: #eb4923; }
73
+
74
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_twitter h3.hndle:before { content: '\f202'; }
75
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_facebook h3.hndle:before { content: '\f204'; }
76
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_google_plus h3.hndle:before { content: '\f218'; }
77
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_pinterest h3.hndle:before { content: '\f209'; }
78
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_linkedin h3.hndle:before { content: '\f207'; }
79
+ .genesis_page_genesis_simple_share_settings #genesis_simple_share_stumbleupon h3.hndle:before { content: '\f223'; }
trunk/lib/css/genericons.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+
3
+ Genericons Helper CSS
4
+
5
+ */
6
+
7
+
8
+ /**
9
+ * The font was graciously generated by Font Squirrel (//www.fontsquirrel.com). We love those guys.
10
+ */
11
+
12
+ @font-face {
13
+ font-family: 'Genericons';
14
+ src: url('../font/genericons-regular-webfont.eot');
15
+ }
16
+
17
+ @font-face {
18
+ font-family: 'Genericons';
19
+ src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAACs4AA4AAAAARowAAQA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Q7+Nf8JfGinOiTbhu/b1+7wBiGuf7/kaIaKdfN5n8hOZnjfTl+i8y5nADb/nAKZ4i+dtXAXAAAAeNpt0tVyG0EYBWG1Ag4zMzNoZ/7ZtUMO2WFmZnDAQYcrj5hXClhtX2WrVOdG9e1O17TardHn969Wav3v+fn3R6tNmwlMZBKT6WEKU5nGdGYwk1nMZg5zmcd8FrCQRSxmCUtZxnJWsJJVrGYNa1nHejawkU1sZgtb2cZ2drCTXeymQ0UiExRqGnrpYw972cd+DtDPQQ5xmCMcZYBBjnGcE5zkFKc5w1nOcZ4LXOQSl7nCVa5xnRvc5Ba3ucNd7nGfBzzkEY95wlOe8ZwhXvCSV7xmmDe85R3v+cBHRvjEZ77wlW9850fPyPDQQKfT+beD1fhWbnKzG25xa7dxe92+0U16SS/pJb2kl/SSXtJLemnMq/QqvUqv0qv0Kr1Kr9Kr9Cq9pJf0kl7SS10ve47sObLnyJ4jd8b+V9zabdzue0MndEIndEIndEIndGLc6X5/2CPsEfYIe4Q9wh5hj7BH2CPsEfYIe4Q9wh5hj0h6SS/pJb2kl/WyXtbLelkv62W9rJf1sl7ohV7ohV7ohV7ohV7ohV7RK3pFr+gVvaJX9Ipe0St6tV6tV+vVerVerVfr1Xq1Xq3X6DV6jV7T9Yr3qXifivepdPIfY1AvlQABUnNepwAA) format('woff'),
20
+ url('../font/genericons-regular-webfont.ttf') format('truetype'),
21
+ url('../font/genericons-regular-webfont.svg#genericonsregular') format('svg');
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ }
trunk/lib/css/share.css ADDED
@@ -0,0 +1,392 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sharrre {
2
+ display: inline-block;
3
+ font-family: Helvetica, Arial, sans-serif;
4
+ font-style: normal;
5
+ font-weight: normal;
6
+ margin-right: 5px;
7
+ overflow: hidden;
8
+
9
+ position: relative;
10
+ -webkit-transition: all 0.3s ease-in-out;
11
+ -moz-transition: all 0.3s ease-in-out;
12
+ -ms-transition: all 0.3s ease-in-out;
13
+ -o-transition: all 0.3s ease-in-out;
14
+ transition: all 0.3s ease-in-out;
15
+ }
16
+
17
+ .share-before {
18
+ margin-bottom: 25px;
19
+ }
20
+
21
+ .share-after {
22
+ margin: 25px 0;
23
+ }
24
+
25
+ .share-before:after,
26
+ .share-after:after {
27
+ visibility: hidden;
28
+ display: block;
29
+ font-size: 0;
30
+ content: " ";
31
+ clear: both;
32
+ height: 0;
33
+ }
34
+
35
+ /* Buttons */
36
+ .sharrre .share,
37
+ .sharrre .count {
38
+ -moz-box-sizing: border-box;
39
+ -webkit-box-sizing: border-box;
40
+ box-sizing: border-box;
41
+ border: none;
42
+ display: inline-block;
43
+ padding: 0;
44
+ text-decoration: none !important;
45
+
46
+ -webkit-transition: all 0.3s ease-in-out;
47
+ -moz-transition: all 0.3s ease-in-out;
48
+ -ms-transition: all 0.3s ease-in-out;
49
+ -o-transition: all 0.3s ease-in-out;
50
+ transition: all 0.3s ease-in-out;
51
+ }
52
+
53
+ .sharrre .share {
54
+ background-color: #fff;
55
+ color: #fff;
56
+ float: left;
57
+ font-family: Helvetica, Arial, sans-serif;
58
+ font-style: normal;
59
+ font-weight: normal;
60
+ text-decoration: none;
61
+ }
62
+
63
+ .sharrre:hover .share {
64
+ border: none;
65
+ color: #fff;
66
+ text-decoration: none;
67
+ }
68
+
69
+ .sharrre .count {
70
+ background-color: #fff;
71
+ font-family: Helvetica, Arial, sans-serif;
72
+ font-style: normal;
73
+ font-weight: bold;
74
+ position: relative;
75
+ text-align: center;
76
+ }
77
+
78
+
79
+ /* Small */
80
+ .share-small .share,
81
+ .share-small .count {
82
+ font-size: 12px;
83
+ height: 20px;
84
+ line-height: 20px;
85
+ }
86
+
87
+ .share-small .share {
88
+ border-top-left-radius: 3px;
89
+ border-bottom-left-radius: 3px;
90
+ padding: 0 0 0 24px;
91
+ width: 20px;
92
+ }
93
+
94
+ .share-small .sharrre:hover .share { width: 60px; }
95
+ .share-small .facebook:hover .share { width: 60px; }
96
+ .share-small .pinterest:hover .share { width: 45px; }
97
+ .share-small .googlePlus:hover .share { width: 60px; }
98
+ .share-small .twitter:hover .share { width: 65px; }
99
+
100
+ .share-small .count {
101
+ border-top-right-radius: 3px;
102
+ border-bottom-right-radius: 3px;
103
+ float: right;
104
+ width: 42px;
105
+ }
106
+
107
+ .share-small .no-count .share {
108
+ border-top-right-radius: 3px;
109
+ border-bottom-right-radius: 3px;
110
+ width: 65px;
111
+ }
112
+
113
+ .share-small .no-count .count {
114
+ display: none;
115
+ }
116
+
117
+ /* Medium */
118
+ .share-medium .share,
119
+ .share-medium .count {
120
+ font-size: 13px;
121
+ height: 25px;
122
+ line-height: 25px;
123
+ }
124
+
125
+ .share-medium .share {
126
+ border-top-left-radius: 3px;
127
+ border-bottom-left-radius: 3px;
128
+ padding: 0 0 0 28px;
129
+ width: 28px;
130
+ }
131
+
132
+ .share-medium .count {
133
+ border-top-right-radius: 3px;
134
+ border-bottom-right-radius: 3px;
135
+ float: right;
136
+ width: 42px;
137
+ }
138
+
139
+ .share-medium .sharrre:hover .share { width: 65px; }
140
+ .share-medium .facebook:hover .share { width: 65px; }
141
+ .share-medium .pinterest:hover .share { width: 50px; }
142
+ .share-medium .googlePlus:hover .share { width: 65px; }
143
+ .share-medium .twitter:hover .share { width: 75px; }
144
+
145
+ .share-medium .no-count .share {
146
+ border-top-right-radius: 3px;
147
+ border-bottom-right-radius: 3px;
148
+ width: 75px;
149
+ }
150
+
151
+ .share-medium .no-count .count {
152
+ display: none;
153
+ }
154
+
155
+ /* Tall */
156
+ .share-tall .share {
157
+ border-bottom-left-radius: 3px;
158
+ border-bottom-right-radius: 3px;
159
+ font-size: 13px;
160
+ height: 25px;
161
+ line-height: 25px;
162
+ padding-left: 20px;
163
+ text-align: center;
164
+ width: 100%;
165
+ }
166
+
167
+ .share-tall .googlePlus .share { padding-left: 16px; }
168
+ .share-tall .facebook .share { padding-left: 18px; }
169
+ .share-tall .twitter .share { padding-left: 0; }
170
+
171
+ .share-tall .count {
172
+ border-top-left-radius: 3px;
173
+ border-top-right-radius: 3px;
174
+ display: block;
175
+ float: none;
176
+ font-size: 16px;
177
+ height: 55px;
178
+ line-height: 55px;
179
+ width: 75px;
180
+ }
181
+
182
+ .share-tall .no-count .share {
183
+ width: 75px;
184
+ }
185
+
186
+ /* Icons */
187
+ .share-small .share:before,
188
+ .share-medium .share:before,
189
+ .share-tall .share:before {
190
+ line-height: 1;
191
+ display: block;
192
+ font-family: 'Genericons';
193
+ font-size: 13px;
194
+ height: 20px;
195
+ top: 4px;
196
+ left: 6px;
197
+ text-indent: 0;
198
+ -webkit-font-smoothing: antialiased;
199
+ position: absolute;
200
+ width: 20px;
201
+ }
202
+
203
+ .share-medium .share:before {
204
+ font-size: 14px;
205
+ top: 5px;
206
+ left: 7px;
207
+ }
208
+
209
+ .share-tall .share:before {
210
+ bottom: 0px;
211
+ top: auto;
212
+ }
213
+
214
+ .twitter .share:before { content: '\f202'; }
215
+ .facebook .share:before { content: '\f204'; }
216
+ .googlePlus .share:before { content: '\f218'; }
217
+ .youtube .share:before { content: '\f213'; }
218
+ .digg .share:before { content: '\f221'; }
219
+ .delicious .share:before { content: '\f202'; }
220
+ .pinterest .share:before { content: '\f209'; }
221
+ .linkedin .share:before { content: '\f207'; }
222
+ .stumbleupon .share:before { content: '\f223'; }
223
+
224
+ .share-small .pinterest .share:before {
225
+ font-size: 12px;
226
+ }
227
+
228
+ .share-small .linkedin .share:before {
229
+ font-size: 16px;
230
+ top: 1px;
231
+ }
232
+
233
+ .share-small .stumbleupon .share:before {
234
+ font-size: 16px;
235
+ top: 3px;
236
+ }
237
+
238
+ .share-medium .pinterest .share:before {
239
+ font-size: 13px;
240
+ top: 6px;
241
+ }
242
+
243
+ .share-medium .linkedin .share:before {
244
+ font-size: 17px;
245
+ top: 3px;
246
+ }
247
+
248
+ .share-medium .stumbleupon .share:before {
249
+ font-size: 16px;
250
+ top: 5px;
251
+ }
252
+
253
+ .share-tall .pinterest .share:before {
254
+ font-size: 13px;
255
+ bottom: -1px;
256
+ }
257
+
258
+ .share-tall .linkedin .share:before {
259
+ font-size: 17px;
260
+ bottom: 2px;
261
+ }
262
+
263
+ .share-tall .stumbleupon .share:before {
264
+ font-size: 16px;
265
+ }
266
+
267
+ .share-tall .twitter .share:before { display: none; }
268
+
269
+ .share-tall .twitter .count:before {
270
+ content: '\f202';
271
+ display: block;
272
+ line-height: 44px;
273
+ font-family: 'Genericons';
274
+ font-size: 20px;
275
+ position: relative;
276
+ top: 5px;
277
+ -webkit-font-smoothing: antialiased;
278
+ -webkit-transition: all 0.3s ease-in-out;
279
+ -moz-transition: all 0.3s ease-in-out;
280
+ -ms-transition: all 0.3s ease-in-out;
281
+ -o-transition: all 0.3s ease-in-out;
282
+ transition: all 0.3s ease-in-out;
283
+ }
284
+
285
+ .share-tall .twitter:hover .count:before {
286
+ color: #fff;
287
+ }
288
+
289
+
290
+ /* Appearance - filled */
291
+ .share-filled .twitter .share { background: #09b0ed; }
292
+ .share-filled .twitter .count,
293
+ .share-filled .twitter .count:hover { color: #09b0ed; border: 1px solid #09b0ed; }
294
+
295
+ .share-filled .facebook .share { background: #3d5a98; }
296
+ .share-filled .facebook .count,
297
+ .share-filled .facebook .count:hover { color: #3d5a98; border: 1px solid #3d5a98; }
298
+
299
+ .share-filled .googlePlus .share { background: #dd4c39; }
300
+ .share-filled .googlePlus .count,
301
+ .share-filled .googlePlus .count:hover { color: #dd4c39; border: 1px solid #dd4c39; }
302
+
303
+ .share-filled .linkedin .share { background: #035a87; }
304
+ .share-filled .linkedin .count,
305
+ .share-filled .linkedin .count:hover { color: #035a87; border: 1px solid #035a87; }
306
+
307
+ .share-filled .youtube .share { background: #cc181e; }
308
+ .share-filled .youtube .count,
309
+ .share-filled .youtube .count:hover { color: #cc181e; border: 1px solid #cc181e; }
310
+
311
+ .share-filled .pinterest .share { background: #cb2127; }
312
+ .share-filled .pinterest .count,
313
+ .share-filled .pinterest .count:hover { color: #cb2127; border: 1px solid #cb2127; }
314
+
315
+ .share-filled .stumbleupon .share { background: #eb4923; }
316
+ .share-filled .stumbleupon .count,
317
+ .share-filled .stumbleupon .count:hover { color: #eb4923; border: 1px solid #eb4923; }
318
+
319
+ .share-filled .twitter:hover .count { background: #09b0ed !important; }
320
+ .share-filled .facebook:hover .count { background: #3d5a98 !important; }
321
+ .share-filled .googlePlus:hover .count { background: #dd4c39 !important; }
322
+ .share-filled .linkedin:hover .count { background: #035a87 !important; }
323
+ .share-filled .youtube:hover .count { background: #cc181e !important; }
324
+ .share-filled .pinterest:hover .count { background: #cb2127 !important; }
325
+ .share-filled .stumbleupon:hover .count { background: #eb4923 !important; }
326
+
327
+ .share-filled .sharrre:hover .count {
328
+ color: #fff;
329
+ }
330
+
331
+ /* Appearance - outlined */
332
+ .share-outlined .twitter .share,
333
+ .share-outlined .twitter .count,
334
+ .share-outlined .twitter .count:hover { border: 1px solid #09b0ed; color: #09b0ed; }
335
+
336
+ .share-outlined .facebook .share,
337
+ .share-outlined .facebook .count,
338
+ .share-outlined .facebook .count:hover { border: 1px solid #3d5a98; color: #3d5a98; }
339
+
340
+ .share-outlined .googlePlus .share,
341
+ .share-outlined .googlePlus .count,
342
+ .share-outlined .googlePlus .count:hover { border: 1px solid #dd4c39; color: #dd4c39; }
343
+
344
+ .share-outlined .linkedin .share,
345
+ .share-outlined .linkedin .count,
346
+ .share-outlined .linkedin .count:hover { border: 1px solid #035a87; color: #035a87; }
347
+
348
+ .share-outlined .youtube .share,
349
+ .share-outlined .youtube .count,
350
+ .share-outlined .youtube .count:hover { border: 1px solid #cc181e; color: #cc181e; }
351
+
352
+ .share-outlined .pinterest .share,
353
+ .share-outlined .pinterest .count,
354
+ .share-outlined .pinterest .count:hover { border: 1px solid #cb2127; color: #cb2127; }
355
+
356
+ .share-outlined .stumbleupon .share,
357
+ .share-outlined .stumbleupon .count,
358
+ .share-outlined .stumbleupon .count:hover { border: 1px solid #eb4923; color: #eb4923; }
359
+
360
+ .share-outlined.share-small .share,
361
+ .share-outlined.share-medium .share { border-right: none !important; }
362
+
363
+ .share-outlined.share-small .twitter .share,
364
+ .share-outlined.share-medium .twitter .share { border-right: 1px solid #09b0ed !important; }
365
+
366
+ .share-outlined.share-tall .share { border-top: none !important; }
367
+
368
+ .share-outlined .twitter:hover .share,
369
+ .share-outlined .twitter:hover .count { background: #09b0ed; }
370
+
371
+ .share-outlined .facebook:hover .share,
372
+ .share-outlined .facebook:hover .count { background: #3d5a98; }
373
+
374
+ .share-outlined .googlePlus:hover .share,
375
+ .share-outlined .googlePlus:hover .count { background: #dd4c39; }
376
+
377
+ .share-outlined .linkedin:hover .share,
378
+ .share-outlined .linkedin:hover .count { background: #035a87; }
379
+
380
+ .share-outlined .youtube:hover .share,
381
+ .share-outlined .youtube:hover .count { background: #cc181e; }
382
+
383
+ .share-outlined .pinterest:hover .share,
384
+ .share-outlined .pinterest:hover .count { background: #cb2127; }
385
+
386
+ .share-outlined .stumbleupon:hover .share,
387
+ .share-outlined .stumbleupon:hover .count { background: #eb4923; }
388
+
389
+ .share-outlined .sharrre:hover .count,
390
+ .share-outlined .sharrre:hover .share {
391
+ color: #fff;
392
+ }
trunk/lib/font/genericons-regular-webfont.eot ADDED
Binary file
trunk/lib/font/genericons-regular-webfont.svg ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata></metadata>
5
+ <defs>
6
+ <font id="genericonsregular" horiz-adv-x="2048" >
7
+ <font-face units-per-em="2048" ascent="1638" descent="-410" />
8
+ <missing-glyph horiz-adv-x="500" />
9
+ <glyph unicode="&#xe000;" horiz-adv-x="500" d="M0 0z" />
10
+ <glyph unicode="&#xf100;" d="M1536 1408v-128h-1024v128h1024zM1152 1024h-640v128h640v-128zM1280 1152h256v-128h-256v128zM768 768h-256v128h256v-128zM896 896h640v-128h-640v128zM512 640h768v-128h-768v128z" />
11
+ <glyph unicode="&#xf101;" d="M1024 1792q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1024 768q106 0 181 75t75 181t-75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75z" />
12
+ <glyph unicode="&#xf102;" d="M1920 1408v-1024h-1792v896l512 128l128 256h512l128 -256h512zM512 1504l-256 -64v160h256v-96zM1024 512q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM1024 1280q133 0 226.5 -93.5t93.5 -226.5 t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5z" />
13
+ <glyph unicode="&#xf103;" d="M128 1408h896v-384h-896v384zM2048 1408v-896h-896v896h896zM128 896h384v-384h-384v384zM640 896h384v-384h-384v384z" />
14
+ <glyph unicode="&#xf104;" d="M1664 1024l-1152 -640v1280z" />
15
+ <glyph unicode="&#xf105;" d="M1408 1408q0 -124 -71.5 -222t-184.5 -138v-536l-256 -128v664q-113 40 -184.5 138t-71.5 222q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
16
+ <glyph unicode="&#xf106;" d="M512 1408h512l-256 -768h-384zM1792 1408l-256 -768h-384l128 768h512z" />
17
+ <glyph unicode="&#xf107;" d="M1088 1792q133 0 226.5 -93.5t93.5 -226.5v-384q0 -97 -53 -176.5t-139 -116.5v151q64 57 64 142v384q0 80 -56 136t-136 56t-136 -56t-56 -136v-384q0 -85 64 -142v-151q-86 37 -139 116.5t-53 176.5v384q0 133 93.5 226.5t226.5 93.5zM960 1230v151q86 -37 139 -116.5 t53 -176.5v-384q0 -133 -93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5v384q0 97 53 176.5t139 116.5v-151q-64 -57 -64 -142v-384q0 -80 56 -136t136 -56t136 56t56 136v384q0 85 -64 142z" />
18
+ <glyph unicode="&#xf108;" d="M256 1792h1024q96 0 176 -80t80 -176v-384q0 -96 -80 -176t-176 -80h-448l-448 -448v448h-128q-96 0 -176 80t-80 176v384q0 96 80 176t176 80zM1664 1152v384q96 0 176 -80t80 -176v-384q0 -96 -80 -176t-176 -80h-128v-448l-448 448h-320l128 128h384q168 0 276 108 t108 276z" />
19
+ <glyph unicode="&#xf109;" d="M640 1280l384 384v-1280l-384 384h-384v512h384zM1386 1386l91 91q88 -89 137.5 -206t49.5 -247q0 -87 -23 -170t-64.5 -153.5t-99.5 -129.5l-91 91q71 71 110.5 164.5t39.5 197.5t-39.5 197.5t-110.5 164.5zM1205 1205l91 91q26 -27 46.5 -57.5t35 -65t22.5 -72.5t8 -77 q0 -78 -29.5 -148t-82.5 -124l-91 91q75 75 75 181t-75 181z" />
20
+ <glyph unicode="&#xf200;" d="M1024 2048q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5q0 -335 -195.5 -601.5t-504.5 -369.5q-36 -7 -53 8.5t-17 40.5q0 4 0.5 102t0.5 179q0 130 -69 189q77 9 137.5 24.5t124.5 51.5t107 89t70.5 140t27.5 201q0 161 -105 274q6 15 11 35t9 56t-3.5 83.5 t-26.5 96.5q-4 1 -10.5 2t-32 -1t-55.5 -11t-79.5 -33.5t-104.5 -61.5q-118 33 -256 35q-138 -2 -256 -35q-55 37 -104 61.5t-80 33t-54.5 11.5t-33.5 1l-10 -2q-58 -146 -10 -271q-105 -115 -105 -274q0 -114 27.5 -201t70.5 -140t107 -89t124.5 -52t136.5 -24 q-53 -47 -65 -137q-28 -13 -59.5 -20t-75.5 -6.5t-87.5 28.5t-75.5 83q-2 4 -6.5 10.5t-19 24t-31.5 31t-44 25.5t-56 14h-10t-18.5 -3.5t-17 -9t4 -18.5t34.5 -31q3 -1 7.5 -4t19 -14.5t27.5 -27t30 -43.5t30 -61q1 -3 2.5 -7t8 -17t15.5 -25.5t24.5 -28t33.5 -28t45 -23.5 t57.5 -16t71.5 -3.5t87 11.5q0 -50 0.5 -110t0.5 -64q0 -24 -17 -40t-53 -10q-309 103 -504.5 370t-195.5 602q0 208 81 398t218.5 327t327 218t397.5 81z" />
21
+ <glyph unicode="&#xf201;" d="M1024 2048q206 0 395.5 -82t327 -219.5t219.5 -327t82 -395.5t-82 -395.5t-219.5 -327t-327 -219.5t-395.5 -82t-395.5 82t-327 219.5t-219.5 327t-82 395.5t82 395.5t219.5 327t327 219.5t395.5 82zM1024 1920q-32 0 -96 -8t-96 -8q102 -166 304 -512q6 2 86 31 t118.5 45t108 47t122 64t93.5 69q-126 126 -290.5 199t-349.5 73zM672 1856q-194 -85 -329.5 -247.5t-182.5 -376.5q194 -22 444 14t388 82q-141 282 -320 528zM1760 1536q-71 -57 -162 -104.5t-214.5 -100.5t-183.5 -83q22 -29 36.5 -54.5t34 -67.5t25.5 -54q170 33 336 30 t288 -30q-26 285 -160 464zM128 1088v-64q0 -167 58 -319.5t166 -272.5q125 205 339 360t445 232q-16 48 -80 176q-282 -86 -481.5 -111t-446.5 -1zM1536 288q156 108 258 278t126 362q-276 46 -576 0q14 -27 43 -103t74.5 -231t74.5 -306zM1024 128q181 0 368 80 q-33 300 -208 688q-222 -74 -410 -225.5t-294 -350.5q216 -192 544 -192z" />
22
+ <glyph unicode="&#xf202;" d="M1920 1584q-73 -111 -183 -191q0 -7 0.5 -23t0.5 -24q0 -122 -31 -246t-89.5 -241t-149.5 -218.5t-204 -177.5t-260.5 -119.5t-311.5 -43.5q-305 0 -564 165q48 -5 88 -5q256 0 456 157q-119 2 -213 73.5t-130 182.5q39 -7 69 -7q47 0 97 13q-127 26 -211 127t-84 233v5 q80 -43 167 -46q-76 50 -120 131t-44 175q0 101 50 185q138 -170 335 -271.5t423 -112.5q-10 39 -10 84q0 152 108 259.5t260 107.5q160 0 268 -116q128 26 233 89q-42 -132 -161 -203q109 13 211 58z" />
23
+ <glyph unicode="&#xf203;" d="M384 1920h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-282v711h270l12 260h-282v192v12q0 60 21.5 87.5t87.5 27.5l166 -1l6 242q-78 10 -183 10q-94 0 -167 -27.5t-117 -74.5t-66 -105.5t-22 -126.5v-236h-254v-260h254v-711h-724q-106 0 -181 75 t-75 181v1280q0 106 75 181t181 75z" />
24
+ <glyph unicode="&#xf204;" d="M1511 1272l-14 -303h-315v-841h-320v841h-222v303h222v258q0 78 26 147t77 124t136.5 87t194.5 32q55 0 108 -3t79 -6l26 -3l-7 -282h-193q-76 0 -101.5 -32t-25.5 -101v-14v-207h329z" />
25
+ <glyph unicode="&#xf205;" d="M1024 1920q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1426 536l81 268q24 79 32.5 107.5t18.5 74.5t10 79q0 46 -11.5 90.5t-23.5 71t-32 60.5q-2 4 -11.5 19 t-12 20t-10.5 18.5t-11 19t-9 17.5t-8.5 19t-6.5 18t-5.5 19.5t-3 18.5t-1.5 20q0 57 39 100t97 43l10 -1q-110 101 -249.5 156.5t-294.5 55.5q-207 0 -385 -98t-288 -266h52q37 0 91 2.5t89 4.5l34 3q21 1 30.5 -14.5t2.5 -32.5t-27 -20q-44 -5 -93 -7l294 -873l176 529 l-125 344l-85 7q-20 2 -27.5 19t2.5 33t30 15q133 -10 212 -10q38 0 91.5 2.5t88.5 4.5l35 3q16 1 25.5 -8.5t10 -22t-7 -23.5t-23.5 -13q-43 -5 -92 -7zM1731 1410q5 -40 5 -82q0 -135 -61 -289l-246 -711q183 106 292 291.5t109 404.5q0 207 -99 386zM218 1024 q0 -236 125 -430.5t330 -294.5l-385 1053q-70 -156 -70 -328zM1024 218q138 0 268 46q-4 6 -6 11l-248 679l-242 -703q112 -33 228 -33z" />
26
+ <glyph unicode="&#xf206;" d="M1664 1536v256h-128v-256h-256v-128h256v-256h128v256h256v-1024q0 -106 -75 -181t-181 -75h-507q5 28 5 50q0 143 -46.5 230t-189.5 194q-3 2 -20.5 15t-25 19t-25.5 20t-27.5 22.5t-24 22t-23 23.5t-17 22t-12.5 22.5t-4 20.5q0 52 23 87t99 94q180 141 180 324 q0 113 -45 204.5t-128 139.5h160l135 142h-607q-127 0 -241.5 -49t-194.5 -132v65q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-128h-256zM575 937q-125 4 -225.5 108t-121.5 262q-21 161 50.5 269.5t194.5 104.5q121 -4 215.5 -118.5t116.5 -277.5q21 -160 -43 -256 t-187 -92zM572 570q-18 0 -54.5 -0.5t-55.5 -0.5q-183 0 -334 -83v485q125 -127 330 -127q30 0 59 3q-32 -61 -32 -118q0 -33 13 -63t28.5 -48.5t45.5 -47.5zM966 218q7 -29 7 -66q0 -16 -1 -24h-588q-85 0 -153 50.5t-92 130.5q57 85 166 137.5t237 51.5q84 -1 158 -26 q19 -13 62 -42.5t61 -42t48 -37t44.5 -41.5t29 -41.5t21.5 -49.5z" />
27
+ <glyph unicode="&#xf207;" d="M530 1285h1q67 0 108.5 39.5t41.5 97.5q-2 60 -42 98.5t-106 38.5q-67 0 -108 -39t-41 -98q0 -58 40.5 -97.5t105.5 -39.5zM1614 384v455q0 175 -83.5 266t-220.5 91q-50 0 -90.5 -12t-68.5 -34t-45 -41t-33 -44v112h-264v-793h264v443q0 45 8 64q16 40 50.5 68t85.5 28 q133 0 133 -179v-424h264zM663 1177h-263v-793h263v793z" />
28
+ <glyph unicode="&#xf208;" d="M384 1920h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181v1280q0 106 75 181t181 75zM530 1285h1q67 0 108.5 39.5t41.5 97.5q-2 60 -42 98.5t-106 38.5q-67 0 -108 -39t-41 -98q0 -58 40.5 -97.5t105.5 -39.5zM1614 384v455 q0 175 -83.5 266t-220.5 91q-50 0 -90.5 -12t-68.5 -34t-45 -41t-33 -44v112h-264v-793h264v443q0 45 8 64q16 40 50.5 68t85.5 28q133 0 133 -179v-424h264zM663 1177h-263v-793h263v793z" />
29
+ <glyph unicode="&#xf209;" d="M1073 2048q176 0 327.5 -60.5t253.5 -161t160 -231t58 -270.5q0 -246 -85 -443t-241 -309.5t-355 -112.5q-99 0 -186.5 46.5t-121.5 110.5q-73 -290 -89 -347q-34 -123 -127 -270l-149 54q-7 167 22 290l162 688q-40 81 -40 200q0 139 70.5 232.5t172.5 93.5 q83 0 127 -53.5t44 -135.5q0 -51 -18.5 -124t-49 -170t-44.5 -154q-23 -99 37.5 -171t161.5 -72q117 0 209.5 92t142 244.5t49.5 334.5q0 214 -139 349t-387 135q-139 0 -257.5 -49.5t-197 -133t-122.5 -193t-44 -229.5q0 -147 83 -247q18 -21 21.5 -34t-3.5 -37 q-16 -61 -25 -101q-7 -24 -24.5 -32t-39.5 1q-127 51 -192.5 181.5t-65.5 300.5q0 109 35.5 219t110 213t179 182t254 126.5t323.5 47.5z" />
30
+ <glyph unicode="&#xf210;" d="M1024 2048q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5t-81 -398.5t-218 -326.5t-326.5 -218t-398.5 -81q-147 0 -290 42q74 116 103 219l72 282q28 -53 99 -90.5t151 -37.5q162 0 288.5 91.5t195.5 251t69 359.5q0 114 -47 220t-130 187.5t-206.5 130.5t-265.5 49 q-141 0 -262 -38.5t-205.5 -103t-145.5 -147.5t-89.5 -172.5t-28.5 -178.5q0 -138 53 -243.5t156 -147.5q18 -8 32.5 -1t18.5 26q2 9 10 41t11 41q5 19 2.5 30t-16.5 28q-68 78 -68 200q0 97 35.5 186t99.5 156.5t160 108t209 40.5q201 0 313.5 -109.5t112.5 -283.5 q0 -148 -40 -271.5t-115 -198t-169 -74.5q-82 0 -131.5 58.5t-30.5 138.5q11 46 35.5 125t39.5 138t15 101q0 66 -35.5 109.5t-102.5 43.5q-82 0 -139.5 -76t-57.5 -189q0 -43 8 -83.5t16 -59.5l9 -19q-113 -475 -132 -558q-24 -97 -18 -235q-275 120 -444 374t-169 564 q0 208 81 398t218.5 327t327 218t397.5 81z" />
31
+ <glyph unicode="&#xf211;" d="M992 1024q0 172 -122 294t-294 122t-294 -122t-122 -294t122 -294t294 -122t294 122t122 294zM1888 1024q0 172 -122 294t-294 122t-294 -122t-122 -294t122 -294t294 -122t294 122t122 294z" />
32
+ <glyph unicode="&#xf212;" d="M1919 1437q16 347 -260 355q-373 12 -505 -417q69 29 133 29q136 0 120 -152q-8 -92 -120 -268q-113 -176 -169 -176q-73 0 -133 271q-20 79 -72 407q-49 303 -258 284q-89 -8 -265 -160q-127 -113 -262 -231l84 -108q121 84 141 84q92 0 173 -287l144 -525 q108 -287 265 -287q253 0 619 471q353 451 365 710z" />
33
+ <glyph unicode="&#xf213;" d="M512 1664h1024q159 0 271.5 -112.5t112.5 -271.5v-512q0 -159 -112.5 -271.5t-271.5 -112.5h-1024q-159 0 -271.5 112.5t-112.5 271.5v512q0 159 112.5 271.5t271.5 112.5zM1408 1024l-640 384v-768z" />
34
+ <glyph unicode="&#xf214;" d="M1091 1920h-255q-17 -139 -62 -228q-48 -93 -121 -154q-74 -64 -181 -99v-253h198v-629q0 -121 26 -187q26 -65 92 -122t161 -89q93 -31 218 -31q110 0 201 22q88 20 208 76v282q-134 -88 -271 -88q-76 0 -136 36q-44 25 -61 70q-17 46 -17 200v460h426v281h-426v453z " />
35
+ <glyph unicode="&#xf215;" d="M384 1920h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181v1280q0 106 75 181t181 75zM1792 1536v128q0 53 -37.5 90.5t-90.5 37.5h-128q-53 0 -90.5 -37.5t-37.5 -90.5v-128q0 -53 37.5 -90.5t90.5 -37.5h128q53 0 90.5 37.5 t37.5 90.5zM1024 1408q-159 0 -271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5zM1792 1152h-272q16 -66 16 -128q0 -212 -150 -362t-362 -150t-362 150t-150 362q0 62 16 128h-272v-768q0 -53 37.5 -90.5 t90.5 -37.5h1280q53 0 90.5 37.5t37.5 90.5v768z" />
36
+ <glyph unicode="&#xf216;" d="M1061 1779l702 -467q29 -24 29 -55v-467q0 -32 -29 -54l-702 -468q-17 -11 -37 -11q-18 0 -37 11l-702 468q-29 22 -29 54v467q0 31 29 55l702 467q17 11 37 11t37 -11zM441 1257l231 -154l286 191v307zM1090 1294l286 -191l231 154l-517 344v-307zM1258 1024l-234 156 l-233 -156l233 -156zM388 914l165 110l-165 110v-220zM1660 1134l-165 -110l165 -110v220zM958 754l-286 191l-231 -155l517 -344v308zM1607 790l-231 155l-286 -191v-308z" />
37
+ <glyph unicode="&#xf217;" d="M1024 1920q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1024 208q236 0 432 123.5t298 327.5q59 136 59 266q0 117 -43.5 221.5t-118.5 182.5t-175.5 131 t-215.5 73q116 -48 204 -145t127 -218q54 -151 17.5 -320t-150.5 -289q-111 -123 -276 -179t-332 -27q-168 27 -307 138t-210 270q-74 156 -67.5 338.5t93.5 335.5q88 155 238.5 260t328.5 135q2 0 35 6q-208 -16 -380.5 -128t-272.5 -293.5t-100 -392.5q0 -221 109.5 -409 t297.5 -297.5t409 -109.5zM1113 1770q-157 7 -306.5 -51.5t-258.5 -169.5q-109 -107 -159 -254.5t-30 -296.5q17 -148 100 -275.5t207 -200.5q120 -71 264 -78.5t267 49.5q-76 -21 -148 -21q-149 0 -275.5 74t-200.5 201t-74 276q0 214 146 373l3 3l14 14l1 1 q98 114 235 178t293 64q163 0 306 -70t241 -193q-36 57 -70 96q-104 126 -250 200.5t-305 80.5zM1415 1006q6 -142 -81 -257q-86 -115 -225 -157q-114 -35 -234 -7q83 -34 174 -34q195 0 333.5 138.5t138.5 333.5v2q-10 107 -63.5 202.5t-137.5 157.5q-102 77 -236 87 t-243 -49q-116 -62 -177 -167q-61 -107 -52 -231q8 -119 85 -217t186 -128q110 -33 221.5 8.5t170.5 134.5q61 91 50 204t-86 187q-70 77 -179.5 87t-188.5 -50q-85 -62 -105 -157q-21 -98 30 -182q50 -84 142 -108q92 -23 172 26q38 23 64 58.5t34 76.5q17 88 -34 159 q-52 72 -136 77q-83 6 -142 -54q-57 -55 -45 -138q6 -37 27.5 -68.5t52.5 -47.5q40 -21 87 -16q-46 1 -82 29t-49 71l-2 3q-14 30 -9.5 67t25.5 66q22 30 56.5 46.5t72.5 14.5t73.5 -23.5t54.5 -55.5q46 -76 8 -158q-18 -39 -53.5 -66.5t-78.5 -35.5q-43 -9 -88.5 3.5 t-78.5 43.5q-74 68 -68 169q2 65 45 118.5t109.5 77t132.5 5.5q68 -16 118.5 -70.5t65 -124.5t-9.5 -144q-37 -107 -150 -158.5t-224 -8.5q-114 43 -170 158q-55 117 -17 238q35 121 152 191t246 47q131 -19 223 -128t95 -246z" />
38
+ <glyph unicode="&#xf218;" d="M1151 1835l151 85h-485q-264 0 -421 -129q-73 -64 -111.5 -147.5t-38.5 -167.5q0 -56 16 -109.5t49.5 -100.5t79.5 -82.5t109 -56.5t136 -21q19 0 75 5q0 -2 -4 -10.5t-4.5 -10.5t-3.5 -9.5t-4 -11l-3 -10.5t-2.5 -12.5t-1 -13t-0.5 -14.5q0 -26 5 -48t18.5 -45 t20.5 -32.5t26 -34.5q-61 -4 -98 -7.5t-107 -14.5t-131.5 -32.5t-112.5 -53.5q-50 -29 -86.5 -66.5t-56.5 -76.5t-29 -74.5t-9 -69.5q0 -66 32 -125.5t92.5 -107t159 -75.5t222.5 -28q117 0 218.5 25t174 68t124 99.5t76.5 120.5t25 131q0 40 -6.5 74.5t-22.5 65t-30.5 53 t-41.5 50t-45 43t-51 44.5l-85 66q-19 15 -28.5 24.5t-21 31t-11.5 45.5t12 47.5t21.5 34.5t32.5 33q37 29 59 48t52 52t46 64t28 75.5t12 94.5q0 43 -8 82t-23.5 70.5t-30.5 55.5t-38 47.5t-35 34.5t-32 27h146zM906 1238q-18 -19 -44 -33.5t-56.5 -23.5t-58.5 -9 q-58 0 -108 28.5t-83.5 73.5t-57.5 101.5t-34.5 111.5t-10.5 104q0 110 51 174q28 35 73.5 56t91.5 21q56 0 105.5 -28.5t83.5 -74.5t59 -103.5t36.5 -115.5t11.5 -110q0 -113 -59 -172zM2048 1152v-128h-256v-256h-128v256h-256v128h256v256h128v-256h256zM838 791 q51 -36 82 -59t63.5 -50.5t50.5 -48.5t33.5 -46t21.5 -50.5t6 -55.5q0 -113 -91 -183.5t-255 -70.5q-187 0 -300.5 80t-113.5 207q0 47 17 87.5t38.5 64.5t54 45t50.5 28.5t42 16.5q35 11 76.5 19.5t77.5 12t58.5 5t34.5 1.5q35 0 54 -3z" />
39
+ <glyph unicode="&#xf219;" d="M1438 1833q12 -5 32 -14.5t74.5 -45.5t101 -78.5t97 -114.5t78 -153t27.5 -194.5t-40 -238.5q-43 -89 -97 -157.5t-109.5 -110t-115.5 -69t-115.5 -37t-107.5 -12t-95.5 4t-76 13t-49.5 13.5l-18 6v-277q-1 -3 -2 -9t-6.5 -23t-14 -34t-24.5 -39.5t-36 -42t-51.5 -39.5 t-68.5 -33q-52 -19 -107 -20t-97 11.5t-76.5 27.5t-53.5 27l-18 13v280q33 -34 67 -55.5t67.5 -28.5t61.5 11t44 63v946h312v-538l65 -13q206 -32 329 60q105 78 128 243q2 76 -15.5 141t-49 110.5t-72.5 82.5t-86.5 59.5t-91.5 39t-87.5 24t-73.5 11.5t-52 5h-19l-66 -2 q-217 -16 -359 -141q-57 -50 -97 -115q-27 -45 -39.5 -93t-11 -88t10 -78.5t22 -67.5t25.5 -51t21 -33l9 -12l-225 -201q-7 9 -18.5 25t-40.5 68.5t-49.5 107.5t-34.5 137.5t-8.5 163t41 179.5t102.5 191q70 78 153.5 135t167 86.5t172 45.5t169 15t156.5 -8t137.5 -21 t107.5 -26.5t72 -22.5z" />
40
+ <glyph unicode="&#xf220;" d="M1857 834q51 -106 50 -217q0 -133 -65.5 -245.5t-178 -178t-244.5 -65.5q-123 0 -231 58q-79 -14 -155 -14q-171 0 -327 67t-269 180t-179.5 269t-66.5 327q0 86 17 169q-67 116 -67 247q0 133 65.5 245.5t178 178t245.5 65.5q141 0 260 -75q69 12 144 12 q171 0 327 -66.5t269 -179.5t179.5 -269t66.5 -327q0 -96 -19 -181zM1466 612q59 85 59 188q0 88 -34 149q-35 62 -96 100q-58 39 -143 66q-77 25 -187 49q-89 20 -116 28q-35 9 -68 27q-33 15 -50 38q-17 20 -17 49q0 46 52 80q54 36 146 36q97 0 141 -32q43 -32 75 -94 q30 -48 51 -67q25 -22 72 -22q53 0 87 36q34 35 34 81t-25 96q-24 47 -82 92q-57 45 -139 70q-86 26 -197 26q-139 0 -247 -40q-107 -39 -164 -113q-57 -73 -57 -170q0 -102 55 -170q52 -65 144 -105q95 -40 221 -66q93 -20 154 -38q57 -19 90 -50q33 -30 33 -80 q0 -64 -62 -105q-65 -44 -170 -44q-78 0 -123 22q-47 22 -70 54q-27 34 -49 86q-21 49 -49 72q-32 26 -75 26q-52 0 -87 -33q-36 -33 -36 -79q0 -75 54 -153q52 -76 139 -123q119 -63 302 -63q150 0 263 46q111 46 171 130z" />
41
+ <glyph unicode="&#xf221;" d="M1664 1024q0 -41 -24 -74t-62 -46q22 -33 22 -72q0 -41 -24 -74t-62 -46q22 -33 22 -72q0 -53 -37.5 -90.5t-90.5 -37.5h-64q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-448q-65 0 -123 20t-93.5 44t-80.5 44t-87 20h-128v640h192q49 0 104 47t103.5 127.5 t80.5 204.5t32 261q0 5 0.5 13.5t4 31t9.5 39t19 30.5t31 14q33 0 77.5 -42t79.5 -119t35 -159q0 -85 -8 -165t-16 -117l-8 -38h416q53 0 90.5 -37.5t37.5 -90.5z" />
42
+ <glyph unicode="&#xf222;" d="M1843 1168q0 -55 -28 -100.5t-74 -72.5q14 -50 14 -99q0 -135 -98.5 -250t-267.5 -181.5t-368 -66.5t-368.5 66.5t-268 181t-98.5 249.5q0 50 16 104q-44 27 -70.5 71.5t-26.5 97.5q0 83 59 142t142 59q100 0 160 -83q183 97 412 106l92 457q5 22 23 33q18 12 39 7 l313 -72q24 41 65.5 65.5t89.5 24.5q74 0 126.5 -52.5t52.5 -126.5t-52.5 -126.5t-126.5 -52.5q-71 0 -122 48.5t-56 119.5l-262 60l-77 -386q222 -12 397 -108q60 86 163 86q83 0 141.5 -59t58.5 -142zM1600 1805q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5 t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM1021 501q171 0 316.5 53t230.5 143.5t85 197.5q0 108 -85 199t-230.5 144t-316.5 53q-172 0 -317.5 -53t-230.5 -144t-85 -198t85 -198t230.5 -144t317.5 -53zM307 1168q0 -47 40 -75q47 75 132 137q-29 36 -73 36 q-41 0 -70 -28.5t-29 -69.5zM1698 1089q43 31 43 79q0 40 -28.5 69t-69.5 29q-45 0 -76 -39q83 -61 131 -138zM895 982q0 -46 -33 -79t-79 -33t-78.5 33t-32.5 79t32.5 79t78.5 33q47 0 79.5 -33t32.5 -79zM1265 1094q47 0 79.5 -33t32.5 -79t-33 -79t-79 -33t-79 33t-33 79 t32.5 79t79.5 33zM1224 776q15 15 36 15t36 -15t15 -36.5t-15 -36.5q-86 -86 -271 -86q-187 0 -273 86q-15 15 -15 36.5t15 36.5t36 15t36 -15q56 -56 199 -56q145 0 201 56z" />
43
+ <glyph unicode="&#xf223;" d="M1105 1233v92q0 34 -23.5 57t-57.5 23t-57.5 -23t-23.5 -57l-1 -481q-1 -138 -101.5 -235t-241.5 -97q-142 0 -242.5 99t-100.5 238v209h263v-206q0 -33 23.5 -56.5t57.5 -23.5t57.5 23.5t23.5 56.5v487q5 136 104.5 230.5t238.5 94.5t238.5 -95.5t104.5 -231.5v-107 l-157 -45zM1792 1058v-209q0 -139 -100.5 -238t-242.5 -99t-242 97.5t-102 236.5v210l105 -48l157 46v-212q0 -33 23.5 -56.5t57.5 -23.5t57.5 23.5t23.5 56.5v216h263z" />
44
+ <glyph unicode="&#xf224;" d="M512 1792h1024q106 0 181 -75t75 -181v-384q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5v384q0 106 75 181t181 75zM1024 1077l-293 294q-37 37 -91 37t-90 -37q-38 -37 -38 -90t38 -91l362 -362l4 4q37 -64 108 -64t108 64l5 -4 l362 362q37 38 37 91t-37 90t-91 37q-53 0 -90 -37z" />
45
+ <glyph unicode="&#xf300;" d="M512 1536h1024q106 0 181 -75t75 -181v-384q0 -106 -75 -181t-181 -75h-448l-448 -448v448h-128q-106 0 -181 75t-75 181v384q0 106 75 181t181 75z" />
46
+ <glyph unicode="&#xf301;" d="M1664 1152l-256 -640h-1024v1024h384l64 -128h448v-128h-640l-128 -256h128l64 128h960z" />
47
+ <glyph unicode="&#xf302;" d="M1536 1536v-512l-768 -768l-512 512l768 768h512zM1280 1152q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
48
+ <glyph unicode="&#xf303;" d="M960 1792q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5t-55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5zM960 512q117 0 223.5 45.5t184 123t123 184t45.5 223.5t-45.5 223.5 t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5zM1024 1115l298 -298l-90 -91l-336 336v474h128v-421z" />
49
+ <glyph unicode="&#xf304;" d="M1024 1152q-106 0 -181 75t-75 181t75 181t181 75t181 -75t75 -181t-75 -181t-181 -75zM896 1024h256q159 0 271.5 -112.5t112.5 -271.5v-256h-1024v256q0 159 112.5 271.5t271.5 112.5z" />
50
+ <glyph unicode="&#xf305;" d="M1664 1664v-1280h-1408v1280h256v128h128v-128h640v128h128v-128h256zM1536 640v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5zM832 1280h128q26 0 45 -19t19 -45v-512 q0 -26 -19 -45t-45 -19t-45 19t-19 45v448h-64q-26 0 -45 19t-19 45t19 45t45 19z" />
51
+ <glyph unicode="&#xf306;" d="M1664 1664v-1280h-1408v1280h256v128h128v-128h640v128h128v-128h256zM1536 640v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5zM1088 1280h2h1h3q22 -2 38.5 -18t19.5 -39v-2v-2 v-1v-2q0 -5 -2 -15l-128 -512q-6 -26 -28.5 -40t-48.5 -7q-26 6 -40 28.5t-7 48.5l108 433h-174q-26 0 -45 19t-19 45t19 45t45 19h256z" />
52
+ <glyph unicode="&#xf307;" d="M1664 1664v-1280h-1408v1280h256v128h128v-128h640v128h128v-128h256zM1536 640v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5zM768 1280h128v-128h-128v128zM1024 1280h128v-128 h-128v128zM1280 1280h128v-128h-128v128zM512 1024h128v-128h-128v128zM768 1024h128v-128h-128v128zM1024 1024h128v-128h-128v128zM1280 1024h128v-128h-128v128zM512 768h128v-128h-128v128zM768 768h128v-128h-128v128zM1024 768h128v-128h-128v128z" />
53
+ <glyph unicode="&#xf308;" d="M1914 1371l-181 -181q-37 38 -90 38t-91 -38l-181 -181q-37 -37 -37 -90t37 -91l-181 -181l-227 226l-395 -395q-68 -68 -113.5 -93t-112.5 -43q12 45 22 71t38 66.5t76 88.5l395 395l-227 227l181 181q37 -37 90.5 -37t91.5 37l181 181q38 38 38 91t-38 90l181 181z" />
54
+ <glyph unicode="&#xf400;" d="M1792 384l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337zM832 768q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5 q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
55
+ <glyph unicode="&#xf401;" d="M1792 384l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337zM832 768q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5 q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM512 1280h640v-128h-640v128z" />
56
+ <glyph unicode="&#xf402;" d="M1664 256l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495zM384 1216q0 -185 131.5 -316.5t316.5 -131.5 q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5zM1152 1152h-256v-256h-128v256h-256v128h256v256h128v-256h256v-128z" />
57
+ <glyph unicode="&#xf403;" d="M0 1024l506 506q101 103 234.5 160.5t283.5 57.5t283.5 -57.5t233.5 -159.5l507 -507l-506 -507q-101 -103 -234.5 -160t-283.5 -57t-283.5 57.5t-233.5 160.5zM272 1024l370 -371q77 -78 175.5 -119.5t206.5 -41.5t206 41.5t174 118.5l373 372l-371 371 q-158 161 -382 161q-108 0 -206.5 -41t-173.5 -119zM1024 1408q159 0 271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5zM1152 1024q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5 t37.5 -90.5t90.5 -37.5z" />
58
+ <glyph unicode="&#xf404;" d="M1382 1653l-143 -143q-103 46 -215 46q-108 0 -206.5 -41t-173.5 -119l-372 -372l240 -240l-136 -136l-376 376l506 506q101 103 234.5 160.5t283.5 57.5q193 0 358 -95zM1709 1619l-90 90l-1280 -1280l90 -90zM1122 1394l-468 -468q-14 54 -14 98q0 159 112.5 271.5 t271.5 112.5q44 0 98 -14zM2048 1024l-506 -507q-101 -103 -234.5 -160t-283.5 -57q-193 0 -358 95l143 143q103 -46 215 -46q108 0 206 41.5t174 118.5l373 372l-241 241l136 135zM926 654l468 468q14 -54 14 -98q0 -159 -112.5 -271.5t-271.5 -112.5q-44 0 -98 14z" />
59
+ <glyph unicode="&#xf405;" d="M1216 1088l320 -320l-128 -128l-320 320l-320 -320l-128 128l320 320l-320 320l128 128l320 -320l320 320l128 -128z" />
60
+ <glyph unicode="&#xf406;" d="M1216 1088l832 -832l-128 -128l-832 832l-832 -832l-128 128l832 832l-832 832l128 128l832 -832l832 832l128 -128z" />
61
+ <glyph unicode="&#xf407;" d="M1536 1408v-128h-1152v128l256 128q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5zM832 1408h256q26 0 45 19t19 45t-19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19zM1408 1216v-704q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5 t-37.5 90.5v704h128v-704h128v704h128v-704h128v704h128v-704h128v704h128z" />
62
+ <glyph unicode="&#xf408;" d="M844 1150l-588 1l476 -330l-183 -535l475 332l475 -332l-183 535l476 330l-587 -1l-181 535z" />
63
+ <glyph unicode="&#xf409;" d="M1664 1152l-128 -128v-512h-1024v512l-128 128l640 512zM1152 1024h-256v-448h256v448z" />
64
+ <glyph unicode="&#xf410;" d="M1792 1536v-128l-768 -384l-768 384v128h1536zM1024 832l768 384v-704h-1536v704z" />
65
+ <glyph unicode="&#xf411;" d="M1728 1280l-896 -896h-448v448l896 896zM685 941l96 -96l595 595l-96 96zM1440 1376l-595 -595l96 -96l595 595zM896 640l-256 256l-128 -128l256 -256z" />
66
+ <glyph unicode="&#xf412;" d="M1280 192v448h-1024v704l384 384v-704h640v448l640 -640z" />
67
+ <glyph unicode="&#xf413;" d="M256 1536v256q209 0 408 -55t367.5 -154t310.5 -241t241 -310.5t154 -367.5t55 -408h-256q0 260 -101.5 497t-273 408.5t-408.5 273t-497 101.5zM256 1024v256q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5h-256q0 209 -103 385.5t-279.5 279.5t-385.5 103zM640 448 q0 80 -56 136t-136 56t-136 -56t-56 -136t56 -136t136 -56t136 56t56 136z" />
68
+ <glyph unicode="&#xf414;" d="M1237 1711l759 -1237q88 -142 31 -244t-224 -102h-1557q-168 0 -225 102t31 244l760 1237q57 93 134.5 126.5t155 0t135.5 -126.5zM1152 896v384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-384q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 384 q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
69
+ <glyph unicode="&#xf415;" d="M128 1024h400q45 0 79.5 27.5t44.5 69.5q33 125 136.5 206t235.5 81q154 0 270 -114q38 -38 90.5 -38t90.5 38q37 38 37 91t-37 90q-88 89 -204.5 139t-246.5 50q-194 0 -353 -106t-234 -278h-309v-256zM1280 1024q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181 t181 -75t181 75t75 181zM1920 1024h-400q-45 0 -79.5 -27.5t-44.5 -69.5q-33 -125 -136.5 -206t-235.5 -81q-156 0 -269 115q-38 37 -91 37t-91 -38q-37 -38 -37 -91t37 -90q89 -89 205 -139t246 -50q194 0 353 106t234 278h309v256z" />
70
+ <glyph unicode="&#xf416;" d="M1088 1792q133 0 226.5 -93.5t93.5 -226.5v-640q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5v320h128v-320q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5v640q0 80 -56 136t-136 56t-136 -56t-56 -136v-512q0 -26 19 -45t45 -19t45 19 t19 45v452h128v-452q0 -80 -56 -136t-136 -56t-136 56t-56 136v512q0 133 93.5 226.5t226.5 93.5z" />
71
+ <glyph unicode="&#xf417;" d="M1536 1216q0 -117 -44.5 -222.5t-124.5 -185.5l-407 -406l-407 406q-80 80 -124.5 185.5t-44.5 222.5t45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM960 896q133 0 226.5 93.5t93.5 226.5t-93.5 226.5t-226.5 93.5t-226.5 -93.5 t-93.5 -226.5t93.5 -226.5t226.5 -93.5z" />
72
+ <glyph unicode="&#xf418;" d="M1536 1408l-512 -768h-128l-288 416l128 128l224 -192l448 512z" />
73
+ <glyph unicode="&#xf419;" d="M2048 1792v-256h-2048v256h2048zM0 1152h2048v-256h-2048v256zM0 512h2048v-256h-2048v256z" />
74
+ <glyph unicode="&#xf420;" d="M256 1792h640v-640l-232 232q-72 -71 -112 -163.5t-40 -196.5q0 -176 108.5 -313.5t275.5 -180.5v-262q-180 30 -326 137t-230 269.5t-84 349.5q0 155 60 294.5t167 246.5zM1792 1024q0 -155 -60 -294.5t-167 -246.5l227 -227h-640v640l19 -19l213 -213q71 71 111.5 164 t40.5 196q0 176 -108.5 313.5t-275.5 180.5v263q180 -31 326 -137.5t230 -269.5t84 -350z" />
75
+ <glyph unicode="&#xf421;" d="M1536 1152v-256h-1152v256h1152z" />
76
+ <glyph unicode="&#xf422;" d="M1536 1536v-1024h-1152v1024h1152zM1408 1280h-896v-640h896v640z" />
77
+ <glyph unicode="&#xf423;" d="M301 960h403v-384h-128v256h-493l373 671l112 -62zM2048 960v-384h-128v256h-493l373 671l112 -62l-267 -481h403zM1088 1344q87 0 160.5 -43t116.5 -116.5t43 -160.5t-43 -160.5t-116.5 -116.5t-160.5 -43t-160.5 43t-116.5 116.5t-43 160.5t43 160.5t116.5 116.5 t160.5 43zM1088 832q79 0 135.5 56.5t56.5 135.5t-56.5 135.5t-135.5 56.5t-135.5 -56.5t-56.5 -135.5t56.5 -135.5t135.5 -56.5z" />
78
+ <glyph unicode="&#xf424;" d="M1792 1408v-768l-384 -384h-768l-384 384v768l384 384h768zM1152 1024v384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-384q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
79
+ <glyph unicode="&#xf425;" d="M1536 1664v-1280h-1152v1280h256q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5h256zM1088 1664h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45t-19 45t-45 19zM1408 1536h-128v-128h-640v128h-128v-1024h896v1024zM704 1280q26 0 45 -19 t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM896 1280h384v-128h-384v128zM704 1024q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM896 1024h384v-128h-384v128zM704 768q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19z M896 768h384v-128h-384v128z" />
80
+ <glyph unicode="&#xf426;" d="M1641 1024h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-1280q-106 0 -181 75t-75 181t75 181t181 75h7q-7 29 -7 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128z" />
81
+ <glyph unicode="&#xf427;" d="M1432 1722l286 -286q74 -75 74 -180.5t-74 -180.5l-233 -233q-74 -73 -178.5 -74t-179.5 71l-455 -455h-288v288l455 455l-1 1q-74 74 -74 180t74 181l233 233q75 74 181 74t180 -74zM1504 1264l-256 256l-160 -160l256 -256z" />
82
+ <glyph unicode="&#xf428;" d="M1024 1280q106 0 181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181t75 181t181 75z" />
83
+ <glyph unicode="&#xf429;" d="M1517 960l-493 -493l-87 86l343 343h-896v128h896l-343 343l87 86z" />
84
+ <glyph unicode="&#xf430;" d="M531 960l493 -493l87 86l-343 343h896v128h-896l343 343l-87 86z" />
85
+ <glyph unicode="&#xf431;" d="M1536 1152l-576 -576l-576 576l128 128l448 -448l448 448z" />
86
+ <glyph unicode="&#xf432;" d="M1536 768l-128 -128l-448 448l-448 -448l-128 128l576 576z" />
87
+ <glyph unicode="&#xf433;" d="M896 0h-896v896z" />
88
+ <glyph unicode="&#xf434;" d="M2048 896v-896h-896z" />
89
+ <glyph unicode="&#xf435;" d="M1664 1408v-128h-1280v128h1280zM1024 1152l640 -640h-1280z" />
90
+ <glyph unicode="&#xf436;" d="M512 1536h128v-128h-128v128zM768 1536h128v-128h-128v128zM1024 1536h128v-128h-128v128zM1408 1536v-128h-128v128h128zM512 1280h128v-128h-128v128zM768 1280h128v-128h-128v128zM1024 1280h128v-128h-128v128zM1280 1280h128v-128h-128v128zM512 1024h128v-128h-128 v128zM768 1024h128v-128h-128v128zM1024 1024h128v-128h-128v128zM1280 1024h128v-128h-128v128zM512 768h128v-128h-128v128zM768 768h128v-128h-128v128zM1024 768h128v-128h-128v128zM1280 768h128v-128h-128v128z" />
91
+ <glyph unicode="&#xf437;" d="M768 1792h512q106 0 181 -75t75 -181v-1024q0 -106 -75 -181t-181 -75h-512q-106 0 -181 75t-75 181v1024q0 106 75 181t181 75zM1408 1536h-768v-768h768v768zM1024 384q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 z" />
92
+ <glyph unicode="&#xf438;" d="M768 1792h512q106 0 181 -75t75 -181v-1024q0 -106 -75 -181t-181 -75h-512q-106 0 -181 75t-75 181v384h128v-128h768v768h-768v-128h-128v128q0 106 75 181t181 75zM768 1024h-512v256h512v128l384 -256l-384 -256v128zM1024 384q53 0 90.5 37.5t37.5 90.5t-37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
93
+ <glyph unicode="&#xf439;" d="M896 1280h-256v384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5v-384zM1408 1280h-256v384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5v-384zM384 1152h1280q0 -231 -145.5 -406.5t-366.5 -220.5v-269h-256v269q-221 45 -366.5 220.5t-145.5 406.5z" />
94
+ <glyph unicode="&#xf440;" d="M1641 1024h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-384v256h-512v-256h-384q-106 0 -181 75t-75 181t75 181t181 75h6q-6 32 -6 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128z M1152 384h256l-384 -384l-384 384h256v256h256v-256z" />
95
+ <glyph unicode="&#xf441;" d="M1641 1024h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-512v256h256l-384 384l-384 -384h256v-256h-512q-106 0 -181 75t-75 181t75 181t181 75h6q-6 32 -6 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5 t112.5 -271.5q0 -62 -23 -128z" />
96
+ <glyph unicode="&#xf442;" d="M1664 1664v-640h-128v422l-550 -550l-90 91l550 549h-422v128h640zM1280 896l128 128v-512h-896v896h512l-128 -128h-256v-640h640v256z" />
97
+ <glyph unicode="&#xf443;" d="M1536 1280v-896h-1024v1280h640zM1408 1152h-384v384h-384v-1024h768v640z" />
98
+ <glyph unicode="&#xf444;" d="M1664 640h-64q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5h64v-128h-1024q-106 0 -181 75t-75 181v1024q0 106 75 181t181 75h1024v-1152zM640 384h818q-50 55 -50 128t50 128h-818q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
99
+ <glyph unicode="&#xf445;" d="M1888 748l-58 -140l-305 22q-44 -56 -107 -107l22 -305l-139 -58l-201 232q-67 -8 -76 -8q-8 0 -75 8l-201 -232l-139 58l21 305q-56 44 -107 107l-305 -22l-58 139l232 201q-8 67 -8 76q0 8 8 75l-232 201l58 139l305 -21q47 60 107 107l-21 305l139 58l201 -232 q67 8 75 8t75 -8l201 232l140 -58l-22 -305q56 -44 107 -107l305 22l58 -139l-232 -201q8 -67 8 -76q0 -8 -8 -75zM1024 768q106 0 181 75t75 181t-75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75z" />
100
+ <glyph unicode="&#xf446;" d="M1024 1792q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1536 1024q0 212 -150 362t-362 150q-136 0 -259 -72l699 -699q72 123 72 259zM512 1024 q0 -212 150 -362t362 -150q135 0 259 72l-699 699q-72 -126 -72 -259z" />
101
+ <glyph unicode="&#xf447;" d="M640 896v-128h896v-128h-1024v1024h-256v128h384v-256h1152l-256 -640h-896zM640 512q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5zM1408 512q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5z" />
102
+ <glyph unicode="&#xf448;" d="M896 1664v-1280h-384v1280h384zM1536 1664v-1280h-384v1280h384z" />
103
+ <glyph unicode="&#xf449;" d="M1536 1536v-1024h-1024v1024h1024z" />
104
+ <glyph unicode="&#xf450;" d="M640 1664v-1280h-384v1280h384zM1792 1664v-1280l-1024 640z" />
105
+ <glyph unicode="&#xf451;" d="M1280 1024l-1024 -640v1280zM1792 1664v-1280h-384v1280h384z" />
106
+ <glyph unicode="&#xf452;" d="M1536 1024l-1024 -640v1280z" />
107
+ <glyph unicode="&#xf453;" d="M512 2048h1024q106 0 181 -75t75 -181v-1536q0 -106 -75 -181t-181 -75h-1024q-106 0 -181 75t-75 181v1536q0 106 75 181t181 75zM1536 1792h-1024v-1280h1024v1280zM1024 128q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5 t90.5 -37.5z" />
108
+ <glyph unicode="&#xf454;" d="M512 2048h1024q106 0 181 -75t75 -181v-1536q0 -106 -75 -181t-181 -75h-1024q-106 0 -181 75t-75 181v640h256v-384h1024v1280h-1024v-384h-256v384q0 106 75 181t181 75zM640 1024h-512v256h512v128l384 -256l-384 -256v128zM1024 128q53 0 90.5 37.5t37.5 90.5 t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
109
+ <glyph unicode="&#xf455;" d="M960 1792q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5t-55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5zM960 512q117 0 223.5 45.5t184 123t123 184t45.5 223.5t-45.5 223.5 t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5zM960 1440q40 0 68 -28t28 -68t-28 -68t-68 -28t-68 28t-28 68t28 68t68 28zM896 1184h128v-448h-128v448z" />
110
+ <glyph unicode="&#xf456;" d="M960 1792q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5t-55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5zM960 512q117 0 223.5 45.5t184 123t123 184t45.5 223.5t-45.5 223.5 t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5zM888 1024l-22 414h189l-23 -414h-144zM960 928q40 0 68 -28t28 -68t-28 -68t-68 -28t-68 28t-28 68t28 68t68 28z" />
111
+ <glyph unicode="&#xf457;" d="M960 1792q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5t-55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5zM960 512q117 0 223.5 45.5t184 123t123 184t45.5 223.5t-45.5 223.5 t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5zM1142 1404q55 -42 55 -117q0 -52 -24 -91q-25 -38 -79 -74q-43 -27 -58 -43q-11 -12 -11 -33v-22h-135v38q0 42 18 72q16 29 62 58q32 20 51 40 q15 18 15 41q0 19 -16 29q-17 11 -44 11q-65 0 -154 -47l-61 119q110 62 228 62q98 0 153 -43zM960 928q40 0 68 -28t28 -68t-28 -68t-68 -28t-68 28t-28 68t28 68t68 28z" />
112
+ <glyph unicode="&#xf458;" d="M896 384v480l-768 -480v1280l768 -480v480l1024 -640z" />
113
+ <glyph unicode="&#xf459;" d="M1152 384v480l768 -480v1280l-768 -480v480l-1024 -640z" />
114
+ <glyph unicode="&#xf460;" d="M896 1280l-256 -768h-128l-256 768h128l86 256h340zM1792 1280l-256 -768h-768l256 768h128l86 256h340l86 -256h128zM747 1280l-43 128h-128l-43 -128h214zM1515 1280l-43 128h-128l-43 -128h214z" />
115
+ <glyph unicode="&#xf461;" d="M1024 384l648 613q112 106 120 264t-93 276t-251.5 126.5t-262.5 -97.5l-161 -153l-161 153q-112 106 -262.5 97.5t-251.5 -126.5t-93 -276t120 -264z" />
116
+ <glyph unicode="&#xf462;" d="M1276 1505l-248 62l-256 -1024l248 -62zM619 711l-209 313l209 313l-213 142l-304 -455l304 -455zM1946 1024l-303 455l-213 -142l208 -313l-208 -313l213 -142z" />
117
+ <glyph unicode="&#xf463;" d="M768 1024l-768 384v128h1536v-128zM1024 512h-1024v704l768 -384l256 128v-448zM1280 1152h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5zM1920 768h-256v256h-128v-256h-256 v-128h256v-256h128v256h256v128z" />
118
+ <glyph unicode="&#xf464;" d="M768 1024l-768 384v128h1536v-128zM1024 512h-1024v704l768 -384l256 128v-448zM1280 1152h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5zM1920 768h-640v-128h640v128z" />
119
+ <glyph unicode="&#xf465;" d="M768 1024l-768 384v128h1536v-128zM768 832l256 128v-448h-1024v704zM1280 1152h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5zM1984 837l-90 90l-362 -362l-181 181l-91 -90 l272 -272z" />
120
+ <glyph unicode="&#xf466;" d="M320 1024l320 -320v-320l-640 640l640 640v-320zM1152 1280h256q212 0 362 -150t150 -362v-300l-150 150q-74 74 -168 112t-194 38h-256v-384l-640 640l640 640v-384z" />
121
+ <glyph unicode="&#xf467;" d="M1024 1280h256q212 0 362 -150t150 -362v-300l-150 150q-74 74 -168 112t-194 38h-256v-384l-640 640l640 640v-384z" />
122
+ <glyph unicode="&#xf468;" d="M256 1792h256v-1536h-256v1536zM1792 1664v-768h-256q-70 0 -125.5 13t-93 32l-75 38t-93 32t-125.5 13q-71 0 -125 -13t-85 -32t-56.5 -38t-54 -32t-63.5 -13v768q35 0 63.5 13t54 32t56.5 38t85 32t125 13q70 0 125.5 -13t93 -32l75 -38t93 -32t125.5 -13h256z" />
123
+ <glyph unicode="&#xf469;" d="M1408 1664h-768v-256h768v256zM1792 1280v-768h-256v384h-1024v-384h-256v768h1536zM1633 256h-768l-112 113q-113 113 -113 271v128h768v-128q0 -158 113 -271z" />
124
+ <glyph unicode="&#xf470;" d="M1536 1280v-128q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-1024q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5v128q0 212 150 362t362 150t362 -150t150 -362zM1280 1152v128q0 106 -75 181t-181 75t-181 -75t-75 -181v-128h512z " />
125
+ <glyph unicode="&#xf471;" d="M1223 1121q83 -39 134 -117t51 -172q0 -133 -93.5 -226.5t-226.5 -93.5h-576v1024h512q106 0 181 -75t75 -181q0 -87 -57 -159zM768 1152h128q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5h-128v-256zM768 640h192q80 0 136 56t56 136t-56 136t-136 56h-192v-384z " />
126
+ <glyph unicode="&#xf472;" d="M1240 1408l-240 -768h128l-40 -128h-448l40 128h128l240 768h-128l40 128h448l-40 -128h-128z" />
127
+ <glyph unicode="&#xf473;" d="M1664 1664v-1280h-1280v1280h1280zM768 1408q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5zM1536 1088l-128 192l-448 -672l-192 288l-256 -384h1024v576z" />
128
+ <glyph unicode="&#xf500;" d="M128 0l960 960l960 -960h-1920z" />
129
+ <glyph unicode="&#xf501;" d="M0 128l960 960l-960 960v-1920z" />
130
+ <glyph unicode="&#xf502;" d="M128 2048l960 -960l960 960h-1920z" />
131
+ <glyph unicode="&#xf503;" d="M2048 128l-960 960l960 960v-1920z" />
132
+ </font>
133
+ </defs></svg>
trunk/lib/font/genericons-regular-webfont.ttf ADDED
Binary file
trunk/lib/font/genericons-regular-webfont.woff ADDED
Binary file
trunk/lib/front-end.php ADDED
@@ -0,0 +1,616 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Creates the plugin front end output.
4
+ *
5
+ *
6
+ * @category Genesis Simple Share
7
+ * @package Output
8
+ * @author copyblogger
9
+ * @license http://www.opensource.org/licenses/gpl-license.php GPL-2.0+
10
+ */
11
+
12
+ /* Prevent direct access to the plugin */
13
+ if ( !defined( 'ABSPATH' ) ) {
14
+ die( "Sorry, you are not allowed to access this page directly." );
15
+ }
16
+
17
+ /**
18
+ * Generates output on the front end of a Premise enabled site
19
+ *
20
+ * @category Genesis Simple Share
21
+ * @package Output
22
+ *
23
+ * @since 0.1.0
24
+ */
25
+ class Gensis_Simple_Share_Front_End {
26
+
27
+ var $icons;
28
+ var $appearance;
29
+ var $size;
30
+ var $archive;
31
+ var $locations = array();
32
+
33
+ /**
34
+ * Create front end output.
35
+ *
36
+ * @since 0.1.0
37
+ *
38
+ */
39
+ function __construct() {
40
+
41
+ $icons = get_option( 'genesis_simple_share_sort', array(
42
+ 'main' => 'genesis_simple_share_google_plus,genesis_simple_share_facebook,genesis_simple_share_twitter,genesis_simple_share_pinterest,genesis_simple_share_linkedin,genesis_simple_share_stumbleupon'
43
+ ) );
44
+
45
+ $icons = explode( ',', $icons['main'] );
46
+
47
+ $icon_sort = array();
48
+
49
+ foreach( $icons as $icon ){
50
+ switch( $icon ){
51
+
52
+ case 'genesis_simple_share_google_plus':
53
+ $icon_sort[] = 'googlePlus';
54
+ break;
55
+
56
+ case 'genesis_simple_share_facebook':
57
+ $icon_sort[] = 'facebook';
58
+ break;
59
+
60
+ case 'genesis_simple_share_twitter':
61
+ $icon_sort[] = 'twitter';
62
+ break;
63
+
64
+ case 'genesis_simple_share_pinterest':
65
+ $icon_sort[] = 'pinterest';
66
+ break;
67
+
68
+ case 'genesis_simple_share_linkedin':
69
+ $icon_sort[] = 'linkedin';
70
+ break;
71
+
72
+ case 'genesis_simple_share_stumbleupon':
73
+ $icon_sort[] = 'stumbleupon';
74
+ break;
75
+
76
+ }
77
+ }
78
+
79
+ //echo '<pre><code>'; var_dump($icon_sort); echo '</code></pre>';
80
+
81
+ $this->icons = $this->get_display_icons( $icon_sort );
82
+ $this->appearance = genesis_get_option( 'general_appearance', 'genesis_simple_share' );
83
+ $this->size = genesis_get_option( 'general_size' , 'genesis_simple_share' );
84
+
85
+ add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ), 5 );
86
+
87
+
88
+ add_action( 'genesis_loop', array( $this, 'start_icon_actions' ), 5 );
89
+ add_action( 'genesis_loop', array( $this, 'end_icon_actions' ), 15 );
90
+
91
+ }
92
+
93
+ /**
94
+ * Loads required scripts.
95
+ *
96
+ * @since 0.1.0
97
+ *
98
+ */
99
+ function load_scripts() {
100
+
101
+ $url = preg_replace( '/^https?:/', '', plugins_url( '/', __FILE__ ) );
102
+
103
+ //use wp_enqueue_script() and wp_enqueue_style() to load scripts and styles
104
+ wp_register_script( 'genesis-simple-share-plugin-js',
105
+ $url . 'sharrre/jquery.sharrre.min.js',
106
+ array( 'jquery' ),
107
+ '0.1.0'
108
+ );
109
+
110
+ wp_register_style( 'genesis-simple-share-plugin-css',
111
+ $url . 'css/share.css',
112
+ array(),
113
+ '0.1.0'
114
+ );
115
+
116
+ wp_register_style( 'genesis-simple-share-genericons-css',
117
+ $url . 'css/genericons.css',
118
+ array(),
119
+ '0.1.0'
120
+ );
121
+
122
+ wp_register_script( 'genesis-simple-share-waypoint-js',
123
+ $url . 'jquery-waypoints/waypoints.min.js',
124
+ array( 'jquery' ),
125
+ '0.1.0'
126
+ );
127
+
128
+ if( $this->is_archive() && ! genesis_get_option( 'general_show_archive', 'genesis_simple_share' ) ) {
129
+ $this->archive = 'no-load';
130
+ return;
131
+ }
132
+
133
+ //use wp_enqueue_script() and wp_enqueue_style() to load scripts and styles
134
+ wp_enqueue_script( 'genesis-simple-share-plugin-js' );
135
+ wp_enqueue_style( 'genesis-simple-share-plugin-css' );
136
+ wp_enqueue_style( 'genesis-simple-share-genericons-css' );
137
+
138
+ if( $this->is_archive() ) {
139
+ wp_enqueue_script( 'genesis-simple-share-waypoint-js' );
140
+ }
141
+
142
+ }
143
+
144
+ /**
145
+ * Load the icon actions/filters only within the genesis_loop hook
146
+ *
147
+ * @since 0.2.0
148
+ *
149
+ */
150
+ function start_icon_actions(){
151
+
152
+ add_filter( 'the_content', array( $this, 'icon_output' ), 15 );
153
+ add_filter( 'the_excerpt', array( $this, 'icon_output' ), 15 );
154
+
155
+ if( genesis_get_option( 'content_archive_limit' ) && 'full' == genesis_get_option( 'content_archive' ) && $this->is_archive() ){
156
+ add_action( 'genesis_post_content' , array( $this, 'before_entry_icons' ), 9 );
157
+ add_action( 'genesis_entry_content', array( $this, 'before_entry_icons' ), 9 );
158
+ add_action( 'genesis_post_content' , array( $this, 'after_entry_icons' ), 11 );
159
+ add_action( 'genesis_entry_content', array( $this, 'after_entry_icons' ), 11 );
160
+ }
161
+
162
+ }
163
+
164
+ /**
165
+ * Remove the icon actions/filters after the loop has run
166
+ *
167
+ * @since 0.2.0
168
+ *
169
+ */
170
+ function end_icon_actions(){
171
+
172
+ remove_filter( 'the_content', array( $this, 'icon_output' ), 15 );
173
+ remove_filter( 'the_excerpt', array( $this, 'icon_output' ), 15 );
174
+
175
+ remove_action( 'genesis_post_content' , array( $this, 'before_entry_icons' ), 9 );
176
+ remove_action( 'genesis_entry_content', array( $this, 'before_entry_icons' ), 9 );
177
+ remove_action( 'genesis_post_content' , array( $this, 'after_entry_icons' ), 11 );
178
+ remove_action( 'genesis_entry_content', array( $this, 'after_entry_icons' ), 11 );
179
+
180
+ }
181
+
182
+ /**
183
+ * Conditionally outputs icon output
184
+ * Alters the_content if icons are available
185
+ *
186
+ * @since 0.1.0
187
+ *
188
+ * @param string $content the_content
189
+ *
190
+ * @returns string $content conditionally modified $content or unmodified $content if icons not available.
191
+ *
192
+ */
193
+ function icon_output( $content ){
194
+
195
+ if( $this->archive === 'no-load' )
196
+ return $content;
197
+
198
+ if( ! $this->icons )
199
+ return $content; //return early if no icons available
200
+
201
+ switch( genesis_get_option( 'general_position', 'genesis_simple_share' ) ){
202
+
203
+ case 'before_content':
204
+ $content = $this->get_icon_output( 'before', $this->icons ) . $content;
205
+ break;
206
+
207
+ case 'after_content':
208
+ $content .= $this->get_icon_output( 'after', $this->icons );
209
+ break;
210
+
211
+ case 'both':
212
+ $content = $this->get_icon_output( 'before', $this->icons ) . $content . $this->get_icon_output( 'after', $this->icons );
213
+ break;
214
+
215
+ }
216
+
217
+ return $content;
218
+
219
+ }
220
+
221
+ /**
222
+ * Conditionally outputs icon output
223
+ * Alters the_content if icons are available
224
+ *
225
+ * @since 0.1.0
226
+ *
227
+ * @param string $content the_content
228
+ *
229
+ * @returns string $content conditionally modified $content or unmodified $content if icons not available.
230
+ *
231
+ */
232
+ function before_entry_icons(){
233
+
234
+ if( $this->archive === 'no-load' )
235
+ return;
236
+
237
+ if( ! $this->icons )
238
+ return; //return early if no icons available
239
+
240
+ $position = genesis_get_option( 'general_position', 'genesis_simple_share' );
241
+
242
+ if( 'before_content' == $position || 'both' == $position ) {
243
+
244
+ echo $this->get_icon_output( 'before', $this->icons );
245
+
246
+ }
247
+
248
+ }
249
+
250
+ /**
251
+ * Conditionally outputs icon output
252
+ * Alters the_content if icons are available
253
+ *
254
+ * @since 0.1.0
255
+ *
256
+ * @param string $content the_content
257
+ *
258
+ * @returns string $content conditionally modified $content or unmodified $content if icons not available.
259
+ *
260
+ */
261
+ function after_entry_icons(){
262
+
263
+ if( $this->archive === 'no-load' )
264
+ return;
265
+
266
+ if( ! $this->icons )
267
+ return; //return early if no icons available
268
+
269
+ $position = genesis_get_option( 'general_position', 'genesis_simple_share' );
270
+
271
+ if( 'after_content' == $position || 'both' == $position ) {
272
+
273
+ echo $this->get_icon_output( 'after', $this->icons );
274
+
275
+ }
276
+
277
+ }
278
+
279
+ /**
280
+ * Check to see if any icons are set to show for the post type and return array of icons or false
281
+ *
282
+ * @since 0.1.0
283
+ *
284
+ * @param string $post_type post type to check against
285
+ *
286
+ * @returns array/boolean conditionally returns array of available icons or false.
287
+ *
288
+ */
289
+ function get_display_icons( $icon_sort ){
290
+
291
+ $icons = array();
292
+
293
+ foreach( $icon_sort as $icon )
294
+ if( genesis_get_option( $icon, 'genesis_simple_share' ) )
295
+ $icons[] = $icon;
296
+
297
+ if( ! empty( $icons ) )
298
+ return $icons;
299
+
300
+ return false;
301
+
302
+ }
303
+
304
+ /**
305
+ * Build output for the icons based on position
306
+ *
307
+ * @since 0.1.0
308
+ *
309
+ * @param string $location before or after location
310
+ * @param array $icons array of icons to use when building output
311
+ *
312
+ * @returns string HTML and JS required to build the share icons.
313
+ *
314
+ */
315
+ function get_icon_output( $location, $icons = array(), $force_show = false ){
316
+
317
+ if( is_feed() ) {
318
+ return;
319
+ }
320
+
321
+ $filter = 'the_excerpt' == current_filter() ? 'excerpt' : '';
322
+
323
+ if( ! $force_show && in_array( $location . $filter . '-' . get_the_ID(), $this->locations ) ){
324
+ return '<!-- Genesis Simple Share error: This location ( '. $location .' ) has already been used. -->';
325
+ }
326
+
327
+ if( empty( $icons ) ||
328
+ (
329
+ in_array( $location, array( 'before', 'after' ) ) &&
330
+ (
331
+ ! genesis_get_option( 'general_' . get_post_type(), 'genesis_simple_share' ) ||
332
+ get_post_meta( get_the_ID(), '_disable_gss', true )
333
+ )
334
+ )
335
+ ) {
336
+ return;
337
+ }
338
+
339
+ $icons = empty( $icons ) ? $this->icons : $icons;
340
+
341
+ if( empty( $icons ) )
342
+ return;
343
+
344
+ $id = get_the_ID();
345
+
346
+ $scripts = '';
347
+ $buttons = array();
348
+
349
+ foreach( $icons as $icon ){
350
+
351
+ $shares[] = $icon .': true';
352
+
353
+ $div_id = strtolower( $icon .'-'. $location .'-'. $id );
354
+
355
+ $image = ( $image = genesis_get_image( array( 'format' => 'url', 'size' => 'full' ) ) ) ? $image : $this->get_first_image();
356
+
357
+ $image = $image ? $image : genesis_get_option( 'image_url', 'genesis_simple_share' );
358
+ $description = the_title_attribute( array( 'echo' => false ) );
359
+
360
+ //media
361
+ $button = 'twitter' == $icon && ( $via = genesis_get_option( 'twitter_id', 'genesis_simple_share' ) ) ? " twitter: { via: '". str_replace( '@', '', $via ) ."' }" : '';
362
+ $button = 'pinterest' == $icon && $image ? " pinterest: { media: '$image', description: '$description' }" : $button;
363
+
364
+ if( $this->is_archive() )
365
+ $scripts .= sprintf( "$('#%s').waypoint( function() {
366
+ $('#%s').sharrre({
367
+ share: {
368
+ %s: true
369
+ },
370
+ urlCurl: '%s',
371
+ enableHover: false,
372
+ enableTracking: true,
373
+ buttons: { %s },
374
+ click: function(api, options){
375
+ api.simulateClick();
376
+ api.openPopup('%s');
377
+ }
378
+ });
379
+ },
380
+ { offset: 'bottom-in-view' });\n",
381
+ $div_id,
382
+ $div_id,
383
+ $icon,
384
+ plugins_url( 'sharrre/sharrre.php', __FILE__ ),
385
+ $button,
386
+ $icon
387
+ );
388
+
389
+ else
390
+ $scripts .= sprintf( "$('#%s').sharrre({
391
+ share: {
392
+ %s: true
393
+ },
394
+ urlCurl: '%s',
395
+ enableHover: false,
396
+ enableTracking: true,
397
+ buttons: { %s },
398
+ click: function(api, options){
399
+ api.simulateClick();
400
+ api.openPopup('%s');
401
+ }
402
+ });\n",
403
+ $div_id,
404
+ $icon,
405
+ plugins_url( 'sharrre/sharrre.php', __FILE__ ),
406
+ $button,
407
+ $icon
408
+ );
409
+
410
+ switch( $icon ){
411
+
412
+ case 'twitter' :
413
+
414
+ $data_title = 'Tweet';
415
+ break;
416
+
417
+ case 'pinterest' :
418
+
419
+ $data_title = 'Pin';
420
+ break;
421
+
422
+ default:
423
+
424
+ $data_title = 'Share';
425
+
426
+ }
427
+
428
+ $buttons[] = sprintf( '<div class="%s" id="%s" data-url="%s" data-urlalt="%s" data-text="%s" data-title="%s"></div>',
429
+ $icon,
430
+ $div_id,
431
+ get_permalink( $id ),
432
+ wp_get_shortlink( $id ),
433
+ $description,
434
+ $data_title
435
+ );
436
+
437
+ }
438
+
439
+ $divs = implode( '', $buttons );
440
+
441
+ $div_id = 'share-'. $location . '-' . $id;
442
+
443
+ $div = sprintf( '<div class="share-%s share-%s share-%s" id="%s">%s</div>',
444
+ $location,
445
+ $this->appearance,
446
+ $this->size,
447
+ $div_id,
448
+ $divs
449
+ );
450
+
451
+ $script = "
452
+ <script type='text/javascript'>
453
+ jQuery(document).ready(function($) {
454
+ $scripts
455
+ });
456
+ </script>";
457
+
458
+ $this->locations[] = $location . $filter . '-' . get_the_ID();
459
+
460
+ return $div . $script;
461
+
462
+ }
463
+ /**
464
+ * Build output for the icons based on position
465
+ *
466
+ * @since 0.1.0
467
+ *
468
+ * @param string $location before or after location
469
+ * @param array $icons array of icons to use when building output
470
+ *
471
+ * @returns string HTML and JS required to build the share icons.
472
+ *
473
+ */
474
+ function get_hide_icon_output( $location, $icons = array() ){
475
+ $id = get_the_ID();
476
+
477
+ $div_id = 'share-'. $location .'-' . $id;
478
+
479
+ $div = sprintf( '<div class="share-%s share-%s share-%s" id="%s" data-url="%s" data-urlalt="%s" data-text="%s" data-title="share"></div>',
480
+ $location,
481
+ $this->appearance,
482
+ $this->size,
483
+ $div_id,
484
+ get_permalink( $id ),
485
+ wp_get_shortlink( $id ),
486
+ the_title_attribute( array( 'echo' => false ) )
487
+ );
488
+
489
+ $shares = array();
490
+ $buttons = '';
491
+
492
+ foreach( $icons as $icon => $args ){
493
+
494
+ $shares[] = $icon .': true';
495
+
496
+ }
497
+
498
+ $share = implode( ',', $shares );
499
+
500
+ $script = "
501
+ <script type='text/javascript'>
502
+ jQuery(document).ready(function($) {
503
+ $('#$div_id').share({
504
+ share: {
505
+ $share
506
+ },
507
+ ". /*buttons: {
508
+ googlePlus: {size: 'tall', annotation:'bubble'},
509
+ facebook: {layout: 'box_count'},
510
+ twitter: {count: 'vertical', via: '_JulienH'}
511
+ },*/"
512
+ hover: function(api, options){
513
+ $(api.element).find('.buttons').show();
514
+ },
515
+ hide: function(api, options){
516
+ $(api.element).find('.buttons').hide();
517
+ },
518
+ enableTracking: true
519
+ });
520
+ });
521
+ </script>";
522
+
523
+ return $div . $script;
524
+
525
+ }
526
+
527
+ /**
528
+ * Checks to see if any archive including home, search, and the blog template is being used
529
+ *
530
+ * @since 0.1.0
531
+ *
532
+ * @returns boolean true if archive of any kind, else false
533
+ *
534
+ */
535
+ function is_archive() {
536
+
537
+ if( is_home() || is_archive() || is_search() || is_page_template('page_blog.php') )
538
+ return true;
539
+
540
+ return false;
541
+ }
542
+
543
+ /**
544
+ * Checks content for <img> tags and returns the src value of the first image tag
545
+ *
546
+ * @since 0.1.0
547
+ *
548
+ * @returns mixed
549
+ *
550
+ */
551
+ function get_first_image( ) {
552
+
553
+ $content = get_the_content();
554
+
555
+ $output = preg_match_all('/<img[^>]+src=[\'"]([^\'"]+)[\'"][^>]*>/i', $content, $matches);
556
+
557
+ if( $output )
558
+ return $matches[1][0];
559
+
560
+ return false;
561
+
562
+ }
563
+
564
+
565
+ }
566
+
567
+ /**
568
+ * Loads the Share Class
569
+ *
570
+ * @since 0.1.0
571
+ */
572
+ function genesis_simple_share() {
573
+ global $Genesis_Simple_Share;
574
+
575
+ $Genesis_Simple_Share = new Gensis_Simple_Share_Front_End;
576
+
577
+ }
578
+
579
+ genesis_simple_share();
580
+
581
+ /**
582
+ * Gets the Share Icon output.
583
+ * Can specify the icons to use in the optional second param
584
+ *
585
+ * @since 0.1.0
586
+ *
587
+ * @param string $location before or after location
588
+ * @param array $icons array of icons to use when building output
589
+ *
590
+ * @returns string HTML and JS required to build the share icons.
591
+ *
592
+ */
593
+ function genesis_share_get_icon_output( $position, $icons = array(), $force_show = false ) {
594
+ global $Genesis_Simple_Share;
595
+
596
+ return $Genesis_Simple_Share->get_icon_output( $position, $icons, $force_show );
597
+
598
+ }
599
+
600
+ /**
601
+ * Wrapper function for genesis_share_get_icon_output to echo output
602
+ * Can specify the icons to use in the optional second param
603
+ *
604
+ * @since 0.1.0
605
+ *
606
+ * @param string $location before or after location
607
+ * @param array $icons array of icons to use when building output
608
+ *
609
+ * @returns string HTML and JS required to build the share icons.
610
+ *
611
+ */
612
+ function genesis_share_icon_output( $position, $icons = array(), $force_show = false ) {
613
+
614
+ echo genesis_share_get_icon_output( $position, $icons, $force_show );
615
+
616
+ }
trunk/lib/functions.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * General functions that may be needed in admin or in the front end.
4
+ *
5
+ *
6
+ * @category Genesis Simple Sharrre
7
+ * @package Functions
8
+ * @author copyblogger
9
+ * @license http://www.opensource.org/licenses/gpl-license.php GPL-2.0+
10
+ */
11
+
12
+ //add functions that are used in admin and front end of the site
13
+
14
+ //* Prevent direct access to the plugin
15
+ if ( ! defined( 'ABSPATH' ) ) {
16
+ die( __( 'Sorry, you are not allowed to access this page directly.', 'genesis-simple-share' ) );
17
+ }
trunk/lib/jquery-waypoints/licenses.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2011-2012 Caleb Troughton
2
+
3
+ -----------------------------------------------------------------------
4
+
5
+ The MIT License
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
trunk/lib/jquery-waypoints/waypoints.js ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Generated by CoffeeScript 1.6.2
2
+ /*
3
+ jQuery Waypoints - v2.0.3
4
+ Copyright (c) 2011-2013 Caleb Troughton
5
+ Dual licensed under the MIT license and GPL license.
6
+ https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
7
+ */
8
+
9
+
10
+ (function() {
11
+ var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
12
+ __slice = [].slice;
13
+
14
+ (function(root, factory) {
15
+ if (typeof define === 'function' && define.amd) {
16
+ return define('waypoints', ['jquery'], function($) {
17
+ return factory($, root);
18
+ });
19
+ } else {
20
+ return factory(root.jQuery, root);
21
+ }
22
+ })(this, function($, window) {
23
+ var $w, Context, Waypoint, allWaypoints, contextCounter, contextKey, contexts, isTouch, jQMethods, methods, resizeEvent, scrollEvent, waypointCounter, waypointKey, wp, wps;
24
+
25
+ $w = $(window);
26
+ isTouch = __indexOf.call(window, 'ontouchstart') >= 0;
27
+ allWaypoints = {
28
+ horizontal: {},
29
+ vertical: {}
30
+ };
31
+ contextCounter = 1;
32
+ contexts = {};
33
+ contextKey = 'waypoints-context-id';
34
+ resizeEvent = 'resize.waypoints';
35
+ scrollEvent = 'scroll.waypoints';
36
+ waypointCounter = 1;
37
+ waypointKey = 'waypoints-waypoint-ids';
38
+ wp = 'waypoint';
39
+ wps = 'waypoints';
40
+ Context = (function() {
41
+ function Context($element) {
42
+ var _this = this;
43
+
44
+ this.$element = $element;
45
+ this.element = $element[0];
46
+ this.didResize = false;
47
+ this.didScroll = false;
48
+ this.id = 'context' + contextCounter++;
49
+ this.oldScroll = {
50
+ x: $element.scrollLeft(),
51
+ y: $element.scrollTop()
52
+ };
53
+ this.waypoints = {
54
+ horizontal: {},
55
+ vertical: {}
56
+ };
57
+ $element.data(contextKey, this.id);
58
+ contexts[this.id] = this;
59
+ $element.bind(scrollEvent, function() {
60
+ var scrollHandler;
61
+
62
+ if (!(_this.didScroll || isTouch)) {
63
+ _this.didScroll = true;
64
+ scrollHandler = function() {
65
+ _this.doScroll();
66
+ return _this.didScroll = false;
67
+ };
68
+ return window.setTimeout(scrollHandler, $[wps].settings.scrollThrottle);
69
+ }
70
+ });
71
+ $element.bind(resizeEvent, function() {
72
+ var resizeHandler;
73
+
74
+ if (!_this.didResize) {
75
+ _this.didResize = true;
76
+ resizeHandler = function() {
77
+ $[wps]('refresh');
78
+ return _this.didResize = false;
79
+ };
80
+ return window.setTimeout(resizeHandler, $[wps].settings.resizeThrottle);
81
+ }
82
+ });
83
+ }
84
+
85
+ Context.prototype.doScroll = function() {
86
+ var axes,
87
+ _this = this;
88
+
89
+ axes = {
90
+ horizontal: {
91
+ newScroll: this.$element.scrollLeft(),
92
+ oldScroll: this.oldScroll.x,
93
+ forward: 'right',
94
+ backward: 'left'
95
+ },
96
+ vertical: {
97
+ newScroll: this.$element.scrollTop(),
98
+ oldScroll: this.oldScroll.y,
99
+ forward: 'down',
100
+ backward: 'up'
101
+ }
102
+ };
103
+ if (isTouch && (!axes.vertical.oldScroll || !axes.vertical.newScroll)) {
104
+ $[wps]('refresh');
105
+ }
106
+ $.each(axes, function(aKey, axis) {
107
+ var direction, isForward, triggered;
108
+
109
+ triggered = [];
110
+ isForward = axis.newScroll > axis.oldScroll;
111
+ direction = isForward ? axis.forward : axis.backward;
112
+ $.each(_this.waypoints[aKey], function(wKey, waypoint) {
113
+ var _ref, _ref1;
114
+
115
+ if ((axis.oldScroll < (_ref = waypoint.offset) && _ref <= axis.newScroll)) {
116
+ return triggered.push(waypoint);
117
+ } else if ((axis.newScroll < (_ref1 = waypoint.offset) && _ref1 <= axis.oldScroll)) {
118
+ return triggered.push(waypoint);
119
+ }
120
+ });
121
+ triggered.sort(function(a, b) {
122
+ return a.offset - b.offset;
123
+ });
124
+ if (!isForward) {
125
+ triggered.reverse();
126
+ }
127
+ return $.each(triggered, function(i, waypoint) {
128
+ if (waypoint.options.continuous || i === triggered.length - 1) {
129
+ return waypoint.trigger([direction]);
130
+ }
131
+ });
132
+ });
133
+ return this.oldScroll = {
134
+ x: axes.horizontal.newScroll,
135
+ y: axes.vertical.newScroll
136
+ };
137
+ };
138
+
139
+ Context.prototype.refresh = function() {
140
+ var axes, cOffset, isWin,
141
+ _this = this;
142
+
143
+ isWin = $.isWindow(this.element);
144
+ cOffset = this.$element.offset();
145
+ this.doScroll();
146
+ axes = {
147
+ horizontal: {
148
+ contextOffset: isWin ? 0 : cOffset.left,
149
+ contextScroll: isWin ? 0 : this.oldScroll.x,
150
+ contextDimension: this.$element.width(),
151
+ oldScroll: this.oldScroll.x,
152
+ forward: 'right',
153
+ backward: 'left',
154
+ offsetProp: 'left'
155
+ },
156
+ vertical: {
157
+ contextOffset: isWin ? 0 : cOffset.top,
158
+ contextScroll: isWin ? 0 : this.oldScroll.y,
159
+ contextDimension: isWin ? $[wps]('viewportHeight') : this.$element.height(),
160
+ oldScroll: this.oldScroll.y,
161
+ forward: 'down',
162
+ backward: 'up',
163
+ offsetProp: 'top'
164
+ }
165
+ };
166
+ return $.each(axes, function(aKey, axis) {
167
+ return $.each(_this.waypoints[aKey], function(i, waypoint) {
168
+ var adjustment, elementOffset, oldOffset, _ref, _ref1;
169
+
170
+ adjustment = waypoint.options.offset;
171
+ oldOffset = waypoint.offset;
172
+ elementOffset = $.isWindow(waypoint.element) ? 0 : waypoint.$element.offset()[axis.offsetProp];
173
+ if ($.isFunction(adjustment)) {
174
+ adjustment = adjustment.apply(waypoint.element);
175
+ } else if (typeof adjustment === 'string') {
176
+ adjustment = parseFloat(adjustment);
177
+ if (waypoint.options.offset.indexOf('%') > -1) {
178
+ adjustment = Math.ceil(axis.contextDimension * adjustment / 100);
179
+ }
180
+ }
181
+ waypoint.offset = elementOffset - axis.contextOffset + axis.contextScroll - adjustment;
182
+ if ((waypoint.options.onlyOnScroll && (oldOffset != null)) || !waypoint.enabled) {
183
+ return;
184
+ }
185
+ if (oldOffset !== null && (oldOffset < (_ref = axis.oldScroll) && _ref <= waypoint.offset)) {
186
+ return waypoint.trigger([axis.backward]);
187
+ } else if (oldOffset !== null && (oldOffset > (_ref1 = axis.oldScroll) && _ref1 >= waypoint.offset)) {
188
+ return waypoint.trigger([axis.forward]);
189
+ } else if (oldOffset === null && axis.oldScroll >= waypoint.offset) {
190
+ return waypoint.trigger([axis.forward]);
191
+ }
192
+ });
193
+ });
194
+ };
195
+
196
+ Context.prototype.checkEmpty = function() {
197
+ if ($.isEmptyObject(this.waypoints.horizontal) && $.isEmptyObject(this.waypoints.vertical)) {
198
+ this.$element.unbind([resizeEvent, scrollEvent].join(' '));
199
+ return delete contexts[this.id];
200
+ }
201
+ };
202
+
203
+ return Context;
204
+
205
+ })();
206
+ Waypoint = (function() {
207
+ function Waypoint($element, context, options) {
208
+ var idList, _ref;
209
+
210
+ options = $.extend({}, $.fn[wp].defaults, options);
211
+ if (options.offset === 'bottom-in-view') {
212
+ options.offset = function() {
213
+ var contextHeight;
214
+
215
+ contextHeight = $[wps]('viewportHeight');
216
+ if (!$.isWindow(context.element)) {
217
+ contextHeight = context.$element.height();
218
+ }
219
+ return contextHeight - $(this).outerHeight();
220
+ };
221
+ }
222
+ this.$element = $element;
223
+ this.element = $element[0];
224
+ this.axis = options.horizontal ? 'horizontal' : 'vertical';
225
+ this.callback = options.handler;
226
+ this.context = context;
227
+ this.enabled = options.enabled;
228
+ this.id = 'waypoints' + waypointCounter++;
229
+ this.offset = null;
230
+ this.options = options;
231
+ context.waypoints[this.axis][this.id] = this;
232
+ allWaypoints[this.axis][this.id] = this;
233
+ idList = (_ref = $element.data(waypointKey)) != null ? _ref : [];
234
+ idList.push(this.id);
235
+ $element.data(waypointKey, idList);
236
+ }
237
+
238
+ Waypoint.prototype.trigger = function(args) {
239
+ if (!this.enabled) {
240
+ return;
241
+ }
242
+ if (this.callback != null) {
243
+ this.callback.apply(this.element, args);
244
+ }
245
+ if (this.options.triggerOnce) {
246
+ return this.destroy();
247
+ }
248
+ };
249
+
250
+ Waypoint.prototype.disable = function() {
251
+ return this.enabled = false;
252
+ };
253
+
254
+ Waypoint.prototype.enable = function() {
255
+ this.context.refresh();
256
+ return this.enabled = true;
257
+ };
258
+
259
+ Waypoint.prototype.destroy = function() {
260
+ delete allWaypoints[this.axis][this.id];
261
+ delete this.context.waypoints[this.axis][this.id];
262
+ return this.context.checkEmpty();
263
+ };
264
+
265
+ Waypoint.getWaypointsByElement = function(element) {
266
+ var all, ids;
267
+
268
+ ids = $(element).data(waypointKey);
269
+ if (!ids) {
270
+ return [];
271
+ }
272
+ all = $.extend({}, allWaypoints.horizontal, allWaypoints.vertical);
273
+ return $.map(ids, function(id) {
274
+ return all[id];
275
+ });
276
+ };
277
+
278
+ return Waypoint;
279
+
280
+ })();
281
+ methods = {
282
+ init: function(f, options) {
283
+ var _ref;
284
+
285
+ if (options == null) {
286
+ options = {};
287
+ }
288
+ if ((_ref = options.handler) == null) {
289
+ options.handler = f;
290
+ }
291
+ this.each(function() {
292
+ var $this, context, contextElement, _ref1;
293
+
294
+ $this = $(this);
295
+ contextElement = (_ref1 = options.context) != null ? _ref1 : $.fn[wp].defaults.context;
296
+ if (!$.isWindow(contextElement)) {
297
+ contextElement = $this.closest(contextElement);
298
+ }
299
+ contextElement = $(contextElement);
300
+ context = contexts[contextElement.data(contextKey)];
301
+ if (!context) {
302
+ context = new Context(contextElement);
303
+ }
304
+ return new Waypoint($this, context, options);
305
+ });
306
+ $[wps]('refresh');
307
+ return this;
308
+ },
309
+ disable: function() {
310
+ return methods._invoke(this, 'disable');
311
+ },
312
+ enable: function() {
313
+ return methods._invoke(this, 'enable');
314
+ },
315
+ destroy: function() {
316
+ return methods._invoke(this, 'destroy');
317
+ },
318
+ prev: function(axis, selector) {
319
+ return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) {
320
+ if (index > 0) {
321
+ return stack.push(waypoints[index - 1]);
322
+ }
323
+ });
324
+ },
325
+ next: function(axis, selector) {
326
+ return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) {
327
+ if (index < waypoints.length - 1) {
328
+ return stack.push(waypoints[index + 1]);
329
+ }
330
+ });
331
+ },
332
+ _traverse: function(axis, selector, push) {
333
+ var stack, waypoints;
334
+
335
+ if (axis == null) {
336
+ axis = 'vertical';
337
+ }
338
+ if (selector == null) {
339
+ selector = window;
340
+ }
341
+ waypoints = jQMethods.aggregate(selector);
342
+ stack = [];
343
+ this.each(function() {
344
+ var index;
345
+
346
+ index = $.inArray(this, waypoints[axis]);
347
+ return push(stack, index, waypoints[axis]);
348
+ });
349
+ return this.pushStack(stack);
350
+ },
351
+ _invoke: function($elements, method) {
352
+ $elements.each(function() {
353
+ var waypoints;
354
+
355
+ waypoints = Waypoint.getWaypointsByElement(this);
356
+ return $.each(waypoints, function(i, waypoint) {
357
+ waypoint[method]();
358
+ return true;
359
+ });
360
+ });
361
+ return this;
362
+ }
363
+ };
364
+ $.fn[wp] = function() {
365
+ var args, method;
366
+
367
+ method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
368
+ if (methods[method]) {
369
+ return methods[method].apply(this, args);
370
+ } else if ($.isFunction(method)) {
371
+ return methods.init.apply(this, arguments);
372
+ } else if ($.isPlainObject(method)) {
373
+ return methods.init.apply(this, [null, method]);
374
+ } else if (!method) {
375
+ return $.error("jQuery Waypoints needs a callback function or handler option.");
376
+ } else {
377
+ return $.error("The " + method + " method does not exist in jQuery Waypoints.");
378
+ }
379
+ };
380
+ $.fn[wp].defaults = {
381
+ context: window,
382
+ continuous: true,
383
+ enabled: true,
384
+ horizontal: false,
385
+ offset: 0,
386
+ triggerOnce: false
387
+ };
388
+ jQMethods = {
389
+ refresh: function() {
390
+ return $.each(contexts, function(i, context) {
391
+ return context.refresh();
392
+ });
393
+ },
394
+ viewportHeight: function() {
395
+ var _ref;
396
+
397
+ return (_ref = window.innerHeight) != null ? _ref : $w.height();
398
+ },
399
+ aggregate: function(contextSelector) {
400
+ var collection, waypoints, _ref;
401
+
402
+ collection = allWaypoints;
403
+ if (contextSelector) {
404
+ collection = (_ref = contexts[$(contextSelector).data(contextKey)]) != null ? _ref.waypoints : void 0;
405
+ }
406
+ if (!collection) {
407
+ return [];
408
+ }
409
+ waypoints = {
410
+ horizontal: [],
411
+ vertical: []
412
+ };
413
+ $.each(waypoints, function(axis, arr) {
414
+ $.each(collection[axis], function(key, waypoint) {
415
+ return arr.push(waypoint);
416
+ });
417
+ arr.sort(function(a, b) {
418
+ return a.offset - b.offset;
419
+ });
420
+ waypoints[axis] = $.map(arr, function(waypoint) {
421
+ return waypoint.element;
422
+ });
423
+ return waypoints[axis] = $.unique(waypoints[axis]);
424
+ });
425
+ return waypoints;
426
+ },
427
+ above: function(contextSelector) {
428
+ if (contextSelector == null) {
429
+ contextSelector = window;
430
+ }
431
+ return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) {
432
+ return waypoint.offset <= context.oldScroll.y;
433
+ });
434
+ },
435
+ below: function(contextSelector) {
436
+ if (contextSelector == null) {
437
+ contextSelector = window;
438
+ }
439
+ return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) {
440
+ return waypoint.offset > context.oldScroll.y;
441
+ });
442
+ },
443
+ left: function(contextSelector) {
444
+ if (contextSelector == null) {
445
+ contextSelector = window;
446
+ }
447
+ return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) {
448
+ return waypoint.offset <= context.oldScroll.x;
449
+ });
450
+ },
451
+ right: function(contextSelector) {
452
+ if (contextSelector == null) {
453
+ contextSelector = window;
454
+ }
455
+ return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) {
456
+ return waypoint.offset > context.oldScroll.x;
457
+ });
458
+ },
459
+ enable: function() {
460
+ return jQMethods._invoke('enable');
461
+ },
462
+ disable: function() {
463
+ return jQMethods._invoke('disable');
464
+ },
465
+ destroy: function() {
466
+ return jQMethods._invoke('destroy');
467
+ },
468
+ extendFn: function(methodName, f) {
469
+ return methods[methodName] = f;
470
+ },
471
+ _invoke: function(method) {
472
+ var waypoints;
473
+
474
+ waypoints = $.extend({}, allWaypoints.vertical, allWaypoints.horizontal);
475
+ return $.each(waypoints, function(key, waypoint) {
476
+ waypoint[method]();
477
+ return true;
478
+ });
479
+ },
480
+ _filter: function(selector, axis, test) {
481
+ var context, waypoints;
482
+
483
+ context = contexts[$(selector).data(contextKey)];
484
+ if (!context) {
485
+ return [];
486
+ }
487
+ waypoints = [];
488
+ $.each(context.waypoints[axis], function(i, waypoint) {
489
+ if (test(context, waypoint)) {
490
+ return waypoints.push(waypoint);
491
+ }
492
+ });
493
+ waypoints.sort(function(a, b) {
494
+ return a.offset - b.offset;
495
+ });
496
+ return $.map(waypoints, function(waypoint) {
497
+ return waypoint.element;
498
+ });
499
+ }
500
+ };
501
+ $[wps] = function() {
502
+ var args, method;
503
+
504
+ method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
505
+ if (jQMethods[method]) {
506
+ return jQMethods[method].apply(null, args);
507
+ } else {
508
+ return jQMethods.aggregate.call(null, method);
509
+ }
510
+ };
511
+ $[wps].settings = {
512
+ resizeThrottle: 100,
513
+ scrollThrottle: 30
514
+ };
515
+ return $w.load(function() {
516
+ return $[wps]('refresh');
517
+ });
518
+ });
519
+
520
+ }).call(this);
trunk/lib/jquery-waypoints/waypoints.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ // Generated by CoffeeScript 1.6.2
2
+ /*
3
+ jQuery Waypoints - v2.0.3
4
+ Copyright (c) 2011-2013 Caleb Troughton
5
+ Dual licensed under the MIT license and GPL license.
6
+ https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
7
+ */
8
+ (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
trunk/lib/js/admin.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+
3
+ $( ".genesis_simple_share_general_size, .genesis_simple_share_general_appearance" ).change( function() {
4
+
5
+ var size = "share-" + $( ".genesis_simple_share_general_size" ).val();
6
+ var appearance = "share-" + $( ".genesis_simple_share_general_appearance" ).val();
7
+
8
+ //$( "#share-preview-preview" ).hide();
9
+
10
+ $( "#share-preview-preview" ).removeClass();
11
+ $( "#share-preview-preview" ).addClass( "share-preview " + size + " " + appearance );
12
+
13
+ //$( "#share-preview-preview" ).fadeIn();
14
+
15
+ } );
16
+
17
+ } );
trunk/lib/languages/genesis-simple-share.pot ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2015 copyblogger
2
+ # This file is distributed under the same license as the Genesis Simple Share package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Genesis Simple Share 1.0.4\n"
6
+ "Report-Msgid-Bugs-To: StudioPress <translations@studiopress.com>\n"
7
+ "POT-Creation-Date: 2015-09-28 19:58:47+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: StudioPress <translations@studiopress.com>\n"
13
+ "Language-Team: English <translations@studiopress.com>\n"
14
+ "X-Generator: grunt-wp-i18n 0.4.4\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ "X-Poedit-Language: English\n"
18
+ "X-Poedit-Country: UNITED STATES\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+ "X-Poedit-KeywordsList: "
21
+ "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
22
+ "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
23
+ "X-Poedit-Bookmarks: \n"
24
+ "X-Poedit-SearchPath-0: .\n"
25
+ "X-Textdomain-Support: yes\n"
26
+
27
+ #: lib/admin-icon-preview.php:14 lib/admin.php:14 lib/functions.php:16
28
+ #: plugin.php:19
29
+ msgid "Sorry, you are not allowed to access this page directly."
30
+ msgstr ""
31
+
32
+ #: lib/admin.php:40
33
+ msgid "You can change button position by reordering these boxes:"
34
+ msgstr ""
35
+
36
+ #: lib/admin.php:64
37
+ msgid "Genesis Simple Share Settings"
38
+ msgstr ""
39
+
40
+ #: lib/admin.php:65
41
+ msgid "Simple Share"
42
+ msgstr ""
43
+
44
+ #: lib/admin.php:232
45
+ msgid "Google+"
46
+ msgstr ""
47
+
48
+ #: lib/admin.php:233
49
+ msgid "Facebook"
50
+ msgstr ""
51
+
52
+ #: lib/admin.php:234
53
+ msgid "Twitter"
54
+ msgstr ""
55
+
56
+ #: lib/admin.php:235
57
+ msgid "Pinterest"
58
+ msgstr ""
59
+
60
+ #: lib/admin.php:236
61
+ msgid "Linkedin"
62
+ msgstr ""
63
+
64
+ #: lib/admin.php:237
65
+ msgid "StumbleUpon"
66
+ msgstr ""
67
+
68
+ #: lib/admin.php:264
69
+ msgid "Icon Size"
70
+ msgstr ""
71
+
72
+ #: lib/admin.php:265
73
+ msgid "Small Bar"
74
+ msgstr ""
75
+
76
+ #: lib/admin.php:266
77
+ msgid "Medium Bar"
78
+ msgstr ""
79
+
80
+ #: lib/admin.php:267
81
+ msgid "Box"
82
+ msgstr ""
83
+
84
+ #: lib/admin.php:270
85
+ msgid "Icon Appearance"
86
+ msgstr ""
87
+
88
+ #: lib/admin.php:271
89
+ msgid "Outlined"
90
+ msgstr ""
91
+
92
+ #: lib/admin.php:272
93
+ msgid "Filled"
94
+ msgstr ""
95
+
96
+ #: lib/admin.php:319 lib/admin.php:336 lib/admin.php:353 lib/admin.php:374
97
+ #: lib/admin.php:389 lib/admin.php:409
98
+ msgid "Use this button?"
99
+ msgstr ""
100
+
101
+ #: lib/admin.php:356
102
+ msgid "Enter Twitter ID for @via to be added to default tweet text:"
103
+ msgstr ""
104
+
105
+ #: lib/admin.php:392
106
+ msgid ""
107
+ "Enter Default Image URL if there is no image available in content being "
108
+ "shared:"
109
+ msgstr ""
110
+
111
+ #: lib/admin.php:423
112
+ msgid "Icon Display Position"
113
+ msgstr ""
114
+
115
+ #: lib/admin.php:424
116
+ msgid "Select display position to enable icons."
117
+ msgstr ""
118
+
119
+ #: lib/admin.php:425
120
+ msgid "Before the Content"
121
+ msgstr ""
122
+
123
+ #: lib/admin.php:426
124
+ msgid "After the Content"
125
+ msgstr ""
126
+
127
+ #: lib/admin.php:427
128
+ msgid "Before and After the Content"
129
+ msgstr ""
130
+
131
+ #: lib/admin.php:477
132
+ msgid "Enable on:"
133
+ msgstr ""
134
+
135
+ #: lib/admin.php:484
136
+ msgid "Show on Archive Pages"
137
+ msgstr ""
138
+
139
+ #: lib/post-meta.php:18
140
+ msgid "Share Settings"
141
+ msgstr ""
142
+
143
+ #: lib/post-meta.php:37
144
+ msgid "Disable Share Buttons"
145
+ msgstr ""
146
+
147
+ #. Plugin Name of the plugin/theme
148
+ msgid "Genesis Simple Share"
149
+ msgstr ""
150
+
151
+ #. Description of the plugin/theme
152
+ msgid "A simple sharing plugin using the Share script."
153
+ msgstr ""
154
+
155
+ #. Author of the plugin/theme
156
+ msgid "copyblogger"
157
+ msgstr ""
158
+
159
+ #. Author URI of the plugin/theme
160
+ msgid "http://www.copyblogger.com"
161
+ msgstr ""
trunk/lib/post-meta.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Genesis_Simple_Share_Entry_Meta {
4
+
5
+ function __construct() {
6
+
7
+ add_action( 'admin_menu', array( $this, 'add_meta_box' ) );
8
+ add_action( 'save_post' , array( $this, 'save_meta' ) );
9
+
10
+ }
11
+
12
+ function add_meta_box() {
13
+
14
+ foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) {
15
+ if ( genesis_get_option( 'general_' . $type, 'genesis_simple_share' ) ) {
16
+ add_meta_box(
17
+ 'genesis-simple-share-entry-meta',
18
+ __( 'Share Settings', 'genesis-simple-share' ),
19
+ array( $this, 'meta_box' ),
20
+ $type,
21
+ 'side',
22
+ 'default'
23
+ );
24
+ }
25
+ }
26
+
27
+ }
28
+
29
+ function meta_box() {
30
+
31
+ $check = get_post_meta( get_the_ID(), '_disable_gss', true ) ? 1 : '';
32
+
33
+ wp_nonce_field( 'genesis_simple_share_inpost_save', 'genesis_simple_share_inpost_nonce' )
34
+ ?>
35
+ <p>
36
+ <input type="checkbox" id="_disable_gss" name="_disable_gss" <?php checked( $check, '1' ); ?> />
37
+ <label for="_disable_gss"><?php _e( 'Disable Share Buttons', 'genesis-simple-share' ); ?></label>
38
+ </p>
39
+ <?php
40
+
41
+ }
42
+
43
+ function save_meta( $post_id ) {
44
+
45
+ // Bail if we're doing an auto save
46
+ if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
47
+ return;
48
+ }
49
+
50
+ // if our nonce isn't there, or we can't verify it, bail
51
+ if( ! isset( $_POST['genesis_simple_share_inpost_nonce'] ) || ! wp_verify_nonce( $_POST['genesis_simple_share_inpost_nonce'], 'genesis_simple_share_inpost_save' ) ) {
52
+ return;
53
+ }
54
+
55
+ // if our current user can't edit this post, bail
56
+ if( !current_user_can( 'edit_posts' ) ) {
57
+ return;
58
+ }
59
+
60
+ if( isset( $_POST['_disable_gss'] ) ){
61
+ update_post_meta( $post_id, '_disable_gss', 1 );
62
+ }
63
+ else {
64
+ delete_post_meta( $post_id, '_disable_gss' );
65
+ }
66
+
67
+ }
68
+
69
+ }
70
+
71
+ global $genesis_simple_share_entry_meta;
72
+
73
+ $genesis_simple_share_entry_meta = new Genesis_Simple_Share_Entry_Meta;
trunk/lib/sharrre/README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery Sharrre Plugin
2
+ ===
3
+
4
+ Make your sharing widget!
5
+ Sharrre is a jQuery plugin that allows you to create nice widgets sharing for Facebook, Twitter, Google Plus (with PHP script) and more.
6
+ More information on [Sharrre] (http://sharrre.com/#demos)
7
+
8
+ Usage
9
+ ===
10
+
11
+ $('#sharrre').sharrre({
12
+ share: {
13
+ googlePlus: true,
14
+ facebook: true,
15
+ twitter: true
16
+ },
17
+ url: 'http://sharrre.com'
18
+ });
19
+
20
+ Example
21
+ ===
22
+
23
+ <div id="demo1" data-title="sharrre" data-url="http://sharrre.com" ></div>
24
+ $(document).ready(function(){
25
+ $('#demo1').sharrre({
26
+ share: {
27
+ googlePlus: true,
28
+ facebook: true,
29
+ twitter: true,
30
+ delicious: true
31
+ },
32
+ buttons: {
33
+ googlePlus: {size: 'tall'},
34
+ facebook: {layout: 'box_count'},
35
+ twitter: {count: 'vertical'},
36
+ delicious: {size: 'tall'}
37
+ },
38
+ hover: function(api, options){
39
+ $(api.element).find('.buttons').show();
40
+ },
41
+ hide: function(api, options){
42
+ $(api.element).find('.buttons').hide();
43
+ }
44
+ });
45
+ });
46
+
47
+ See example on [official website] (http://sharrre.com/#demos)
48
+
49
+
50
+ Dependencies
51
+ ===
52
+
53
+ jQuery 1.7
54
+
55
+ Author
56
+ ===
57
+
58
+ - [Julien Hany](http://hany.fr)
59
+ - [Twitter (@_JulienH)](http://twitter.com/_JulienH)
60
+ - [Google+](http://plus.google.com/111637545317893682325)
trunk/lib/sharrre/index.html ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Sharrre.com</title>
6
+ <meta name="description" content="Sharrre" />
7
+ <script src="http://code.jquery.com/jquery-1.7.min.js"></script>
8
+ <script src="jquery.sharrre-1.3.1.js"></script>
9
+ <script>
10
+ $(function(){
11
+ $('#demo1').sharrre({
12
+ share: {
13
+ googlePlus: true,
14
+ facebook: true,
15
+ twitter: true,
16
+ delicious: true
17
+ },
18
+ buttons: {
19
+ googlePlus: {size: 'tall'},
20
+ facebook: {layout: 'box_count'},
21
+ twitter: {count: 'vertical'},
22
+ delicious: {size: 'tall'}
23
+ },
24
+ hover: function(api, options){
25
+ $(api.element).find('.buttons').show();
26
+ },
27
+ hide: function(api, options){
28
+ $(api.element).find('.buttons').hide();
29
+ }
30
+ });
31
+
32
+ $('#demo2').sharrre({
33
+ share: {
34
+ googlePlus: true,
35
+ facebook: true,
36
+ twitter: true
37
+ },
38
+ url: 'http://sharrre.com',
39
+ enableHover: false
40
+ });
41
+ });
42
+ </script>
43
+ <style type="text/css">
44
+ #demo1.sharrre {
45
+ width:100%;
46
+ display:inline-block;
47
+ }
48
+ #demo2.sharrre {
49
+ width:50px;
50
+ }
51
+ .sharrre .box{
52
+ float:left;
53
+ }
54
+ .sharrre .count {
55
+ color:#444444;
56
+ display:block;
57
+ font-size:17px;
58
+ line-height:34px;
59
+ height:34px;
60
+ padding:4px 0;
61
+ position:relative;
62
+ text-align:center;
63
+ text-decoration:none;
64
+ width:50px;
65
+ background-color:#eee;
66
+ -webkit-border-radius:4px;
67
+ -moz-border-radius:4px;
68
+ border-radius:4px;
69
+ }
70
+ .sharrre .share {
71
+ color:#FFFFFF;
72
+ display:block;
73
+ font-size:11px;
74
+ height:16px;
75
+ line-height:16px;
76
+ margin-top:3px;
77
+ padding:0;
78
+ text-align:center;
79
+ text-decoration:none;
80
+ width:50px;
81
+ background-color:#9CCE39;
82
+ -webkit-border-radius:4px;
83
+ -moz-border-radius:4px;
84
+ border-radius:4px;
85
+ }
86
+ .sharrre .buttons {
87
+ display:none;
88
+ float:left;
89
+ width:300px;
90
+ }
91
+ .sharrre .button {
92
+ float:left;
93
+ max-width:50px;
94
+ height:50px;
95
+ margin-left:10px;
96
+ }
97
+ </style>
98
+ </head>
99
+ <body>
100
+ <h1>Sharrre demo</h1>
101
+ <div id="demo1" data-title="sharrre" data-url="http://sharrre.com" ></div>
102
+ <br /><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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Sharrre.com - Make your sharing widget!
3
+ * Version: beta 1.3.5
4
+ * Author: Julien Hany
5
+ * License: MIT //en.wikipedia.org/wiki/MIT_License or GPLv2 //en.wikipedia.org/wiki/GNU_General_Public_License
6
+ */
7
+
8
+ ;(function ( $, window, document, undefined ) {
9
+
10
+ /* Defaults
11
+ ================================================== */
12
+ var pluginName = 'sharrre',
13
+ defaults = {
14
+ className: 'sharrre',
15
+ share: {
16
+ googlePlus: false,
17
+ facebook: false,
18
+ twitter: false,
19
+ digg: false,
20
+ delicious: false,
21
+ stumbleupon: false,
22
+ linkedin: false,
23
+ pinterest: false
24
+ },
25
+ shareTotal: 0,
26
+ template: '',
27
+ title: '',
28
+ url: document.location.href,
29
+ text: document.title,
30
+ urlCurl: 'sharrre.php', //PHP script for google plus...
31
+ count: {}, //counter by social network
32
+ total: 0, //total of sharing
33
+ shorterTotal: true, //show total by k or M when number is to big
34
+ enableHover: true, //disable if you want to personalize hover event with callback
35
+ enableCounter: true, //disable if you just want use buttons
36
+ enableTracking: false, //tracking with google analitycs
37
+ hover: function(){}, //personalize hover event with this callback function
38
+ hide: function(){}, //personalize hide event with this callback function
39
+ click: function(){}, //personalize click event with this callback function
40
+ render: function(){}, //personalize render event with this callback function
41
+ buttons: { //settings for buttons
42
+ googlePlus : { ////www.google.com/webmasters/+1/button/
43
+ url: '', //if you need to personnalize button url
44
+ urlCount: false, //if you want to use personnalize button url on global counter
45
+ size: 'medium',
46
+ lang: 'en-US',
47
+ annotation: ''
48
+ },
49
+ facebook: { ////developers.facebook.com/docs/reference/plugins/like/
50
+ url: '', //if you need to personalize url button
51
+ urlCount: false, //if you want to use personnalize button url on global counter
52
+ action: 'like',
53
+ layout: 'button_count',
54
+ width: '',
55
+ send: 'false',
56
+ faces: 'false',
57
+ colorscheme: '',
58
+ font: '',
59
+ lang: 'en_US'
60
+ },
61
+ twitter: { ////twitter.com/about/resources/tweetbutton
62
+ url: '', //if you need to personalize url button
63
+ urlCount: false, //if you want to use personnalize button url on global counter
64
+ count: 'horizontal',
65
+ hashtags: '',
66
+ via: '',
67
+ related: '',
68
+ lang: 'en'
69
+ },
70
+ digg: { ////about.digg.com/downloads/button/smart
71
+ url: '', //if you need to personalize url button
72
+ urlCount: false, //if you want to use personnalize button url on global counter
73
+ type: 'DiggCompact'
74
+ },
75
+ delicious: {
76
+ url: '', //if you need to personalize url button
77
+ urlCount: false, //if you want to use personnalize button url on global counter
78
+ size: 'medium' //medium or tall
79
+ },
80
+ stumbleupon: { ////www.stumbleupon.com/badges/
81
+ url: '', //if you need to personalize url button
82
+ urlCount: false, //if you want to use personnalize button url on global counter
83
+ layout: '1'
84
+ },
85
+ linkedin: { ////developer.linkedin.com/plugins/share-button
86
+ url: '', //if you need to personalize url button
87
+ urlCount: false, //if you want to use personnalize button url on global counter
88
+ counter: ''
89
+ },
90
+ pinterest: { ////pinterest.com/about/goodies/
91
+ url: '', //if you need to personalize url button
92
+ media: '',
93
+ description: '',
94
+ layout: 'horizontal'
95
+ }
96
+ }
97
+ },
98
+ /* Json URL to get count number
99
+ ================================================== */
100
+ urlJson = {
101
+ googlePlus: "",
102
+
103
+ //new FQL method by Sire
104
+ facebook: "https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?",
105
+ //old method facebook: "//graph.facebook.com/?id={url}&callback=?",
106
+ //facebook : "//api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&urls={url}&format=json"
107
+
108
+ twitter: "//cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",
109
+ digg: "//services.digg.com/2.0/story.getInfo?links={url}&type=javascript&callback=?",
110
+ delicious: '//feeds.delicious.com/v2/json/urlinfo/data?url={url}&callback=?',
111
+ //stumbleupon: "//www.stumbleupon.com/services/1.01/badge.getinfo?url={url}&format=jsonp&callback=?",
112
+ stumbleupon: "",
113
+ linkedin: "",
114
+ pinterest: "//api.pinterest.com/v1/urls/count.json?url={url}&callback=?"
115
+ },
116
+ /* Load share buttons asynchronously
117
+ ================================================== */
118
+ loadButton = {
119
+ googlePlus : function(self){
120
+ var sett = self.options.buttons.googlePlus;
121
+ //$(self.element).find('.buttons').append('<div class="button googleplus"><g:plusone size="'+self.options.buttons.googlePlus.size+'" href="'+self.options.url+'"></g:plusone></div>');
122
+ $(self.element).find('.buttons').append('<div class="button googleplus"><div class="g-plusone" data-size="'+sett.size+'" data-href="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-annotation="'+sett.annotation+'"></div></div>');
123
+ window.___gcfg = {
124
+ lang: self.options.buttons.googlePlus.lang
125
+ };
126
+ var loading = 0;
127
+ if(typeof gapi === 'undefined' && loading == 0){
128
+ loading = 1;
129
+ (function() {
130
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
131
+ po.src = '//apis.google.com/js/plusone.js';
132
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
133
+ })();
134
+ }
135
+ else{
136
+ gapi.plusone.go();
137
+ }
138
+ },
139
+ facebook : function(self){
140
+ var sett = self.options.buttons.facebook;
141
+ $(self.element).find('.buttons').append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-send="'+sett.send+'" data-layout="'+sett.layout+'" data-width="'+sett.width+'" data-show-faces="'+sett.faces+'" data-action="'+sett.action+'" data-colorscheme="'+sett.colorscheme+'" data-font="'+sett.font+'" data-via="'+sett.via+'"></div></div>');
142
+ var loading = 0;
143
+ if(typeof FB === 'undefined' && loading == 0){
144
+ loading = 1;
145
+ (function(d, s, id) {
146
+ var js, fjs = d.getElementsByTagName(s)[0];
147
+ if (d.getElementById(id)) {return;}
148
+ js = d.createElement(s); js.id = id;
149
+ js.src = '//connect.facebook.net/'+sett.lang+'/all.js#xfbml=1';
150
+ fjs.parentNode.insertBefore(js, fjs);
151
+ }(document, 'script', 'facebook-jssdk'));
152
+ }
153
+ else{
154
+ FB.XFBML.parse();
155
+ }
156
+ },
157
+ twitter : function(self){
158
+ var sett = self.options.buttons.twitter;
159
+ $(self.element).find('.buttons').append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-count="'+sett.count+'" data-text="'+self.options.text+'" data-via="'+sett.via+'" data-hashtags="'+sett.hashtags+'" data-related="'+sett.related+'" data-lang="'+sett.lang+'">Tweet</a></div>');
160
+ var loading = 0;
161
+ if(typeof twttr === 'undefined' && loading == 0){
162
+ loading = 1;
163
+ (function() {
164
+ var twitterScriptTag = document.createElement('script');
165
+ twitterScriptTag.type = 'text/javascript';
166
+ twitterScriptTag.async = true;
167
+ twitterScriptTag.src = '//platform.twitter.com/widgets.js';
168
+ var s = document.getElementsByTagName('script')[0];
169
+ s.parentNode.insertBefore(twitterScriptTag, s);
170
+ })();
171
+ }
172
+ else{
173
+ $.ajax({ url: '//platform.twitter.com/widgets.js', dataType: 'script', cache:true}); ////stackoverflow.com/q/6536108
174
+ }
175
+ },
176
+ digg : function(self){
177
+ var sett = self.options.buttons.digg;
178
+ $(self.element).find('.buttons').append('<div class="button digg"><a class="DiggThisButton '+sett.type+'" rel="nofollow external" href="//digg.com/submit?url='+encodeURIComponent((sett.url !== '' ? sett.url : self.options.url))+'"></a></div>');
179
+ var loading = 0;
180
+ if(typeof __DBW === 'undefined' && loading == 0){
181
+ loading = 1;
182
+ (function() {
183
+ var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
184
+ s.type = 'text/javascript';
185
+ s.async = true;
186
+ s.src = '//widgets.digg.com/buttons.js';
187
+ s1.parentNode.insertBefore(s, s1);
188
+ })();
189
+ }
190
+ },
191
+ delicious : function(self){
192
+ if(self.options.buttons.delicious.size == 'tall'){//tall
193
+ var css = 'width:50px;',
194
+ cssCount = 'height:35px;width:50px;font-size:15px;line-height:35px;',
195
+ cssShare = 'height:18px;line-height:18px;margin-top:3px;';
196
+ }
197
+ else{//medium
198
+ var css = 'width:93px;',
199
+ cssCount = 'float:right;padding:0 3px;height:20px;width:26px;line-height:20px;',
200
+ cssShare = 'float:left;height:20px;line-height:20px;';
201
+ }
202
+ var count = self.shorterTotal(self.options.count.delicious);
203
+ if(typeof count === "undefined"){
204
+ count = 0;
205
+ }
206
+ $(self.element).find('.buttons').append(
207
+ '<div class="button delicious"><div style="'+css+'font:12px Arial,Helvetica,sans-serif;cursor:pointer;color:#666666;display:inline-block;float:none;height:20px;line-height:normal;margin:0;padding:0;text-indent:0;vertical-align:baseline;">'+
208
+ '<div style="'+cssCount+'background-color:#fff;margin-bottom:5px;overflow:hidden;text-align:center;border:1px solid #ccc;border-radius:3px;">'+count+'</div>'+
209
+ '<div style="'+cssShare+'display:block;padding:0;text-align:center;text-decoration:none;width:50px;background-color:#7EACEE;border:1px solid #40679C;border-radius:3px;color:#fff;">'+
210
+ '<img src="//www.delicious.com/static/img/delicious.small.gif" height="10" width="10" alt="Delicious" /> Add</div></div></div>');
211
+
212
+ $(self.element).find('.delicious').on('click', function(){
213
+ self.openPopup('delicious');
214
+ });
215
+ },
216
+ stumbleupon : function(self){
217
+ var sett = self.options.buttons.stumbleupon;
218
+ $(self.element).find('.buttons').append('<div class="button stumbleupon"><su:badge layout="'+sett.layout+'" location="'+(sett.url !== '' ? sett.url : self.options.url)+'"></su:badge></div>');
219
+ var loading = 0;
220
+ if(typeof STMBLPN === 'undefined' && loading == 0){
221
+ loading = 1;
222
+ (function() {
223
+ var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
224
+ li.src = '//platform.stumbleupon.com/1/widgets.js';
225
+ var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
226
+ })();
227
+ s = window.setTimeout(function(){
228
+ if(typeof STMBLPN !== 'undefined'){
229
+ STMBLPN.processWidgets();
230
+ clearInterval(s);
231
+ }
232
+ },500);
233
+ }
234
+ else{
235
+ STMBLPN.processWidgets();
236
+ }
237
+ },
238
+ linkedin : function(self){
239
+ var sett = self.options.buttons.linkedin;
240
+ $(self.element).find('.buttons').append('<div class="button linkedin"><script type="in/share" data-url="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-counter="'+sett.counter+'"></script></div>');
241
+ var loading = 0;
242
+ if(typeof window.IN === 'undefined' && loading == 0){
243
+ loading = 1;
244
+ (function() {
245
+ var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
246
+ li.src = '//platform.linkedin.com/in.js';
247
+ var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
248
+ })();
249
+ }
250
+ else{
251
+ window.IN.init();
252
+ }
253
+ },
254
+ pinterest : function(self){
255
+ var sett = self.options.buttons.pinterest;
256
+ $(self.element).find('.buttons').append('<div class="button pinterest"><a href="//pinterest.com/pin/create/button/?url='+(sett.url !== '' ? sett.url : self.options.url)+'&media='+sett.media+'&description='+sett.description+'" class="pin-it-button" count-layout="'+sett.layout+'">Pin It</a></div>');
257
+
258
+ (function() {
259
+ var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
260
+ li.src = '//assets.pinterest.com/js/pinit.js';
261
+ var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
262
+ })();
263
+ }
264
+ },
265
+ /* Tracking for Google Analytics
266
+ ================================================== */
267
+ tracking = {
268
+ googlePlus: function(){},
269
+ facebook: function(){
270
+ //console.log('facebook');
271
+ fb = window.setInterval(function(){
272
+ if (typeof FB !== 'undefined') {
273
+ FB.Event.subscribe('edge.create', function(targetUrl) {
274
+ _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
275
+ });
276
+ FB.Event.subscribe('edge.remove', function(targetUrl) {
277
+ _gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);
278
+ });
279
+ FB.Event.subscribe('message.send', function(targetUrl) {
280
+ _gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]);
281
+ });
282
+ //console.log('ok');
283
+ clearInterval(fb);
284
+ }
285
+ },1000);
286
+ },
287
+ twitter: function(){
288
+ //console.log('twitter');
289
+ tw = window.setInterval(function(){
290
+ if (typeof twttr !== 'undefined') {
291
+ twttr.events.bind('tweet', function(event) {
292
+ if (event) {
293
+ _gaq.push(['_trackSocial', 'twitter', 'tweet']);
294
+ }
295
+ });
296
+ //console.log('ok');
297
+ clearInterval(tw);
298
+ }
299
+ },1000);
300
+ },
301
+ digg: function(){
302
+ //if somenone find a solution, mail me !
303
+ /*$(this.element).find('.digg').on('click', function(){
304
+ _gaq.push(['_trackSocial', 'digg', 'add']);
305
+ });*/
306
+ },
307
+ delicious: function(){},
308
+ stumbleupon: function(){},
309
+ linkedin: function(){
310
+ function LinkedInShare() {
311
+ _gaq.push(['_trackSocial', 'linkedin', 'share']);
312
+ }
313
+ },
314
+ pinterest: function(){
315
+ //if somenone find a solution, mail me !
316
+ }
317
+ },
318
+ /* Popup for each social network
319
+ ================================================== */
320
+ popup = {
321
+ googlePlus: function(opt){
322
+ window.open("https://plus.google.com/share?hl="+opt.buttons.googlePlus.lang+"&url="+encodeURIComponent((opt.buttons.googlePlus.url !== '' ? opt.buttons.googlePlus.url : opt.url)), "", "toolbar=0, status=0, width=900, height=500");
323
+ },
324
+ facebook: function(opt){
325
+ window.open("//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent((opt.buttons.facebook.url !== '' ? opt.buttons.facebook.url : opt.url))+"&t="+opt.text+"", "", "toolbar=0, status=0, width=900, height=500");
326
+ },
327
+ twitter: function(opt){
328
+ window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(opt.text)+"&url="+encodeURIComponent((opt.buttons.twitter.url !== '' ? opt.buttons.twitter.url : opt.url))+(opt.buttons.twitter.via !== '' ? '&via='+opt.buttons.twitter.via : ''), "", "toolbar=0, status=0, width=650, height=360");
329
+ },
330
+ digg: function(opt){
331
+ window.open("//digg.com/tools/diggthis/submit?url="+encodeURIComponent((opt.buttons.digg.url !== '' ? opt.buttons.digg.url : opt.url))+"&title="+opt.text+"&related=true&style=true", "", "toolbar=0, status=0, width=650, height=360");
332
+ },
333
+ delicious: function(opt){
334
+ window.open('//www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent((opt.buttons.delicious.url !== '' ? opt.buttons.delicious.url : opt.url))+'&title='+opt.text, 'delicious', 'toolbar=no,width=550,height=550');
335
+ },
336
+ stumbleupon: function(opt){
337
+ window.open('//www.stumbleupon.com/badge/?url='+encodeURIComponent((opt.buttons.delicious.url !== '' ? opt.buttons.delicious.url : opt.url)), 'stumbleupon', 'toolbar=no,width=550,height=550');
338
+ },
339
+ linkedin: function(opt){
340
+ window.open('https://www.linkedin.com/cws/share?url='+encodeURIComponent((opt.buttons.delicious.url !== '' ? opt.buttons.delicious.url : opt.url))+'&token=&isFramed=true', 'linkedin', 'toolbar=no,width=550,height=550');
341
+ },
342
+ pinterest: function(opt){
343
+ window.open('//pinterest.com/pin/create/button/?url='+encodeURIComponent((opt.buttons.pinterest.url !== '' ? opt.buttons.pinterest.url : opt.url))+'&media='+encodeURIComponent(opt.buttons.pinterest.media)+'&description='+opt.buttons.pinterest.description, 'pinterest', 'toolbar=no,width=700,height=300');
344
+ }
345
+ };
346
+
347
+ /* Plugin constructor
348
+ ================================================== */
349
+ function Plugin( element, options ) {
350
+ this.element = element;
351
+
352
+ this.options = $.extend( true, {}, defaults, options);
353
+ this.options.share = options.share; //simple solution to allow order of buttons
354
+
355
+ this._defaults = defaults;
356
+ this._name = pluginName;
357
+
358
+ this.init();
359
+ };
360
+
361
+ /* Initialization method
362
+ ================================================== */
363
+ Plugin.prototype.init = function () {
364
+ var self = this;
365
+ if(this.options.urlCurl !== ''){
366
+ urlJson.googlePlus = this.options.urlCurl + '?url={url}&type=googlePlus'; // PHP script for GooglePlus...
367
+ urlJson.stumbleupon = this.options.urlCurl + '?url={url}&type=stumbleupon';
368
+ urlJson.linkedin = this.options.urlCurl + '?url={url}&type=linkedin'; // PHP script for linkedin...
369
+ }
370
+ $(this.element).addClass(this.options.className); //add class
371
+
372
+ //HTML5 Custom data
373
+ if(typeof $(this.element).data('title') !== 'undefined'){
374
+ this.options.title = $(this.element).attr('data-title');
375
+ }
376
+ if(typeof $(this.element).data('url') !== 'undefined'){
377
+ this.options.url = $(this.element).data('url');
378
+ }
379
+ if(typeof $(this.element).data('urlalt') !== 'undefined'){
380
+ this.options.urlalt = $(this.element).data('urlalt');
381
+ }
382
+ if(typeof $(this.element).data('text') !== 'undefined'){
383
+ this.options.text = $(this.element).data('text');
384
+ }
385
+
386
+ //how many social website have been selected
387
+ $.each(this.options.share, function(name, val) {
388
+ if(val === true){
389
+ self.options.shareTotal ++;
390
+ }
391
+ });
392
+
393
+ if(self.options.enableCounter === true){ //if for some reason you don't need counter
394
+ //get count of social share that have been selected
395
+ $.each(this.options.share, function(name, val) {
396
+ if(val === true){
397
+ //self.getSocialJson(name);
398
+ try {
399
+ self.getSocialJson(name);
400
+ self.getSocialJson(getSocialAltJson);
401
+ } catch(e){
402
+ }
403
+ }
404
+ });
405
+ }
406
+ else if(self.options.template !== ''){ //for personalized button (with template)
407
+ this.options.render(this, this.options);
408
+ }
409
+ else{ // if you want to use official button like example 3 or 5
410
+ this.loadButtons();
411
+ }
412
+
413
+ //add hover event
414
+ $(this.element).hover(function(){
415
+ //load social button if enable and 1 time
416
+ if($(this).find('.buttons').length === 0 && self.options.enableHover === true){
417
+ self.loadButtons();
418
+ }
419
+ self.options.hover(self, self.options);
420
+ }, function(){
421
+ self.options.hide(self, self.options);
422
+ });
423
+
424
+ //click event
425
+ $(this.element).click(function(){
426
+ self.options.click(self, self.options);
427
+ return false;
428
+ });
429
+ };
430
+
431
+ /* loadButtons methode
432
+ ================================================== */
433
+ Plugin.prototype.loadButtons = function () {
434
+ var self = this;
435
+ $(this.element).append('<div class="buttons"></div>');
436
+ $.each(self.options.share, function(name, val) {
437
+ if(val == true){
438
+ loadButton[name](self);
439
+ if(self.options.enableTracking === true){ //add tracking
440
+ tracking[name]();
441
+ }
442
+ }
443
+ });
444
+ };
445
+
446
+ /* getSocialJson methode
447
+ ================================================== */
448
+ Plugin.prototype.getSocialJson = function (name) {
449
+ var self = this,
450
+ count = 0,
451
+ url = urlJson[name].replace('{url}', encodeURIComponent(this.options.url));
452
+
453
+ if( 'twitter' == name ){ //twitter is dropping support for count service so for now we cannot get the count.
454
+ self.options.hideCount = 1;
455
+ self.renderer();
456
+ self.options.count[name] = 0;
457
+ self.rendererPerso();
458
+ } else {
459
+
460
+ self.options.hideCount = 0;
461
+
462
+ if(this.options.buttons[name].urlCount === true && this.options.buttons[name].url !== ''){
463
+ url = urlJson[name].replace('{url}', this.options.buttons[name].url);
464
+ }
465
+ //console.log('name : ' + name + ' - url : '+url); //debug
466
+ if(url != '' && self.options.urlCurl !== ''){ //urlCurl = '' if you don't want to used PHP script but used social button
467
+ $.getJSON(url, function(json){
468
+ if( null != json ){
469
+
470
+ if(typeof json.count !== "undefined"){ //GooglePlus, Stumbleupon, Twitter, Pinterest and Digg
471
+ var temp = json.count + '';
472
+ temp = temp.replace('\u00c2\u00a0', ''); //remove google plus special chars
473
+ count += parseInt(temp, 10);
474
+ }
475
+ //get the FB total count (shares, likes and more)
476
+ else if(json.data && json.data.length > 0 && typeof json.data[0].total_count !== "undefined"){ //Facebook total count
477
+ count += parseInt(json.data[0].total_count, 10);
478
+ }
479
+ else if(typeof json[0] !== "undefined"){ //Delicious
480
+ count += parseInt(json[0].total_posts, 10);
481
+ }
482
+ else if(typeof json[0] !== "undefined"){ //Stumbleupon
483
+ }
484
+ self.options.count[name] = count;
485
+ self.options.total += count;
486
+ self.renderer();
487
+ self.rendererPerso();
488
+ //console.log(json); //debug
489
+ }
490
+ else {
491
+ self.renderer();
492
+ self.options.count[name] = 0;
493
+ self.rendererPerso();
494
+ }
495
+ //console.log(json); //debug
496
+ })
497
+ .fail(function() {
498
+ self.options.hideCount = 1;
499
+ self.renderer();
500
+ self.options.count[name] = 0;
501
+ self.rendererPerso();
502
+ });
503
+ }
504
+ else{
505
+ self.renderer();
506
+ self.options.count[name] = 0;
507
+ self.rendererPerso();
508
+ }
509
+
510
+ }
511
+ };
512
+
513
+ /* getSocialJson methode
514
+ ================================================== */
515
+ Plugin.prototype.getSocialAltJson = function (name) {
516
+ var self = this,
517
+ count = 0,
518
+ url = urlJson[name].replace('{url}', encodeURIComponent(this.options.urlalt));
519
+ self.options.hideCount = 0;
520
+
521
+ if(this.options.buttons[name].urlCount === true && this.options.buttons[name].url !== ''){
522
+ url = urlJson[name].replace('{url}', this.options.buttons[name].url);
523
+ }
524
+ //console.log('name : ' + name + ' - url : '+url); //debug
525
+ if(url != '' && self.options.urlCurl !== ''){ //urlCurl = '' if you don't want to used PHP script but used social button
526
+ $.getJSON(url, function(json){
527
+ if( null != json ){
528
+ if(typeof json.count !== "undefined"){ //GooglePlus, Stumbleupon, Twitter, Pinterest and Digg
529
+ var temp = json.count + '';
530
+ temp = temp.replace('\u00c2\u00a0', ''); //remove google plus special chars
531
+ count += parseInt(temp, 10);
532
+ }
533
+ //get the FB total count (shares, likes and more)
534
+ else if(json.data && json.data.length > 0 && typeof json.data[0].total_count !== "undefined"){ //Facebook total count
535
+ count += parseInt(json.data[0].total_count, 10);
536
+ }
537
+ else if(typeof json[0] !== "undefined"){ //Delicious
538
+ count += parseInt(json[0].total_posts, 10);
539
+ }
540
+ else if(typeof json[0] !== "undefined"){ //Stumbleupon
541
+ }
542
+ self.options.count[name] += count;
543
+ self.options.total += count;
544
+ self.renderer();
545
+ self.rendererPerso();
546
+ }
547
+ else {
548
+ self.renderer();
549
+ self.rendererPerso();
550
+ }
551
+ //console.log(json); //debug
552
+ })
553
+ .fail(function() {
554
+ self.renderer();
555
+ self.rendererPerso();
556
+ });
557
+ }
558
+ else{
559
+ self.renderer();
560
+ self.rendererPerso();
561
+ }
562
+ };
563
+
564
+ /* launch render methode
565
+ ================================================== */
566
+ Plugin.prototype.rendererPerso = function () {
567
+ //check if this is the last social website to launch render
568
+ var shareCount = 0;
569
+ for (e in this.options.count) { shareCount++; }
570
+ if(shareCount === this.options.shareTotal){
571
+ this.options.render(this, this.options);
572
+ }
573
+ };
574
+
575
+ /* render methode
576
+ ================================================== */
577
+ Plugin.prototype.renderer = function () {
578
+ var total = this.options.total,
579
+ template = this.options.template
580
+ hideCount = this.options.hideCount;
581
+
582
+ if( hideCount ){
583
+ $(this.element).html(
584
+ '<div class="box no-count"><a class="count" href="#"></a>' +
585
+ (this.options.title !== '' ? '<a class="share" href="#">' + this.options.title + '</a>' : '') +
586
+ '</div>'
587
+ );
588
+ }
589
+ else{
590
+ if(this.options.shorterTotal === true){ //format number like 1.2k or 5M
591
+ total = this.shorterTotal(total);
592
+ }
593
+
594
+ if(template !== ''){ //if there is a template
595
+ template = template.replace('{total}', total);
596
+ $(this.element).html(template);
597
+ }
598
+ else{ //template by defaults
599
+ $(this.element).html(
600
+ '<div class="box"><a class="count" href="#">' + total + '</a>' +
601
+ (this.options.title !== '' ? '<a class="share" href="#">' + this.options.title + '</a>' : '') +
602
+ '</div>'
603
+ );
604
+ }
605
+ }
606
+ };
607
+
608
+ /* format total numbers like 1.2k or 5M
609
+ ================================================== */
610
+ Plugin.prototype.shorterTotal = function (num) {
611
+ if (num >= 1e6){
612
+ num = (num / 1e6).toFixed(2) + "M"
613
+ } else if (num >= 1e3){
614
+ num = (num / 1e3).toFixed(1) + "k"
615
+ }
616
+ return num;
617
+ };
618
+
619
+ /* Methode for open popup
620
+ ================================================== */
621
+ Plugin.prototype.openPopup = function (site) {
622
+ popup[site](this.options); //open
623
+ if(this.options.enableTracking === true){ //tracking!
624
+ var tracking = {
625
+ googlePlus: {site: 'Google', action: '+1'},
626
+ facebook: {site: 'facebook', action: 'like'},
627
+ twitter: {site: 'twitter', action: 'tweet'},
628
+ digg: {site: 'digg', action: 'add'},
629
+ delicious: {site: 'delicious', action: 'add'},
630
+ stumbleupon: {site: 'stumbleupon', action: 'add'},
631
+ linkedin: {site: 'linkedin', action: 'share'},
632
+ pinterest: {site: 'pinterest', action: 'pin'}
633
+ };
634
+ _gaq.push(['_trackSocial', tracking[site].site, tracking[site].action]);
635
+ }
636
+ };
637
+
638
+ /* Methode for add +1 to a counter
639
+ ================================================== */
640
+ Plugin.prototype.simulateClick = function () {
641
+ var html = $(this.element).html();
642
+ $(this.element).html(html.replace(this.options.total, this.options.total+1));
643
+ };
644
+
645
+ /* Methode for add +1 to a counter
646
+ ================================================== */
647
+ Plugin.prototype.update = function (url, text) {
648
+ if(url !== ''){
649
+ this.options.url = url;
650
+ }
651
+ if(text !== ''){
652
+ this.options.text = text;
653
+ }
654
+ };
655
+
656
+ /* A really lightweight plugin wrapper around the constructor, preventing against multiple instantiations
657
+ ================================================== */
658
+ $.fn[pluginName] = function ( options ) {
659
+ var args = arguments;
660
+ if (options === undefined || typeof options === 'object') {
661
+ return this.each(function () {
662
+ if (!$.data(this, 'plugin_' + pluginName)) {
663
+ $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
664
+ }
665
+ });
666
+ } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
667
+ return this.each(function () {
668
+ var instance = $.data(this, 'plugin_' + pluginName);
669
+ if (instance instanceof Plugin && typeof instance[options] === 'function') {
670
+ instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
671
+ }
672
+ });
673
+ }
674
+ };
675
+ })(jQuery, window, document);
trunk/lib/sharrre/jquery.sharrre.min.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function($,window,document,undefined){var pluginName='sharrre',defaults={className:'sharrre',share:{googlePlus:false,facebook:false,twitter:false,digg:false,delicious:false,stumbleupon:false,linkedin:false,pinterest:false},shareTotal:0,template:'',title:'',url:document.location.href,text:document.title,urlCurl:'sharrre.php',count:{},total:0,shorterTotal:true,enableHover:true,enableCounter:true,enableTracking:false,hover:function(){},hide:function(){},click:function(){},render:function(){},buttons:{googlePlus:{url:'',urlCount:false,size:'medium',lang:'en-US',annotation:''},facebook:{url:'',urlCount:false,action:'like',layout:'button_count',width:'',send:'false',faces:'false',colorscheme:'',font:'',lang:'en_US'},twitter:{url:'',urlCount:false,count:'horizontal',hashtags:'',via:'',related:'',lang:'en'},digg:{url:'',urlCount:false,type:'DiggCompact'},delicious:{url:'',urlCount:false,size:'medium'},stumbleupon:{url:'',urlCount:false,layout:'1'},linkedin:{url:'',urlCount:false,counter:''},pinterest:{url:'',media:'',description:'',layout:'horizontal'}}},urlJson={googlePlus:"",facebook:"https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?",twitter:"//cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",digg:"//services.digg.com/2.0/story.getInfo?links={url}&type=javascript&callback=?",delicious:'//feeds.delicious.com/v2/json/urlinfo/data?url={url}&callback=?',stumbleupon:"",linkedin:"",pinterest:"//api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},loadButton={googlePlus:function(self){var sett=self.options.buttons.googlePlus;$(self.element).find('.buttons').append('<div class="button googleplus"><div class="g-plusone" data-size="'+sett.size+'" data-href="'+(sett.url!==''?sett.url:self.options.url)+'" data-annotation="'+sett.annotation+'"></div></div>');window.___gcfg={lang:self.options.buttons.googlePlus.lang};var loading=0;if(typeof gapi==='undefined'&&loading==0){loading=1;(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='//apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();}
2
+ else{gapi.plusone.go();}},facebook:function(self){var sett=self.options.buttons.facebook;$(self.element).find('.buttons').append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(sett.url!==''?sett.url:self.options.url)+'" data-send="'+sett.send+'" data-layout="'+sett.layout+'" data-width="'+sett.width+'" data-show-faces="'+sett.faces+'" data-action="'+sett.action+'" data-colorscheme="'+sett.colorscheme+'" data-font="'+sett.font+'" data-via="'+sett.via+'"></div></div>');var loading=0;if(typeof FB==='undefined'&&loading==0){loading=1;(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}
3
+ js=d.createElement(s);js.id=id;js.src='//connect.facebook.net/'+sett.lang+'/all.js#xfbml=1';fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));}
4
+ else{FB.XFBML.parse();}},twitter:function(self){var sett=self.options.buttons.twitter;$(self.element).find('.buttons').append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(sett.url!==''?sett.url:self.options.url)+'" data-count="'+sett.count+'" data-text="'+self.options.text+'" data-via="'+sett.via+'" data-hashtags="'+sett.hashtags+'" data-related="'+sett.related+'" data-lang="'+sett.lang+'">Tweet</a></div>');var loading=0;if(typeof twttr==='undefined'&&loading==0){loading=1;(function(){var twitterScriptTag=document.createElement('script');twitterScriptTag.type='text/javascript';twitterScriptTag.async=true;twitterScriptTag.src='//platform.twitter.com/widgets.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(twitterScriptTag,s);})();}
5
+ else{$.ajax({url:'//platform.twitter.com/widgets.js',dataType:'script',cache:true});}},digg:function(self){var sett=self.options.buttons.digg;$(self.element).find('.buttons').append('<div class="button digg"><a class="DiggThisButton '+sett.type+'" rel="nofollow external" href="//digg.com/submit?url='+encodeURIComponent((sett.url!==''?sett.url:self.options.url))+'"></a></div>');var loading=0;if(typeof __DBW==='undefined'&&loading==0){loading=1;(function(){var s=document.createElement('SCRIPT'),s1=document.getElementsByTagName('SCRIPT')[0];s.type='text/javascript';s.async=true;s.src='//widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s,s1);})();}},delicious:function(self){if(self.options.buttons.delicious.size=='tall'){var css='width:50px;',cssCount='height:35px;width:50px;font-size:15px;line-height:35px;',cssShare='height:18px;line-height:18px;margin-top:3px;';}
6
+ else{var css='width:93px;',cssCount='float:right;padding:0 3px;height:20px;width:26px;line-height:20px;',cssShare='float:left;height:20px;line-height:20px;';}
7
+ var count=self.shorterTotal(self.options.count.delicious);if(typeof count==="undefined"){count=0;}
8
+ $(self.element).find('.buttons').append('<div class="button delicious"><div style="'+css+'font:12px Arial,Helvetica,sans-serif;cursor:pointer;color:#666666;display:inline-block;float:none;height:20px;line-height:normal;margin:0;padding:0;text-indent:0;vertical-align:baseline;">'+'<div style="'+cssCount+'background-color:#fff;margin-bottom:5px;overflow:hidden;text-align:center;border:1px solid #ccc;border-radius:3px;">'+count+'</div>'+'<div style="'+cssShare+'display:block;padding:0;text-align:center;text-decoration:none;width:50px;background-color:#7EACEE;border:1px solid #40679C;border-radius:3px;color:#fff;">'+'<img src="//www.delicious.com/static/img/delicious.small.gif" height="10" width="10" alt="Delicious" /> Add</div></div></div>');$(self.element).find('.delicious').on('click',function(){self.openPopup('delicious');});},stumbleupon:function(self){var sett=self.options.buttons.stumbleupon;$(self.element).find('.buttons').append('<div class="button stumbleupon"><su:badge layout="'+sett.layout+'" location="'+(sett.url!==''?sett.url:self.options.url)+'"></su:badge></div>');var loading=0;if(typeof STMBLPN==='undefined'&&loading==0){loading=1;(function(){var li=document.createElement('script');li.type='text/javascript';li.async=true;li.src='//platform.stumbleupon.com/1/widgets.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li,s);})();s=window.setTimeout(function(){if(typeof STMBLPN!=='undefined'){STMBLPN.processWidgets();clearInterval(s);}},500);}
9
+ else{STMBLPN.processWidgets();}},linkedin:function(self){var sett=self.options.buttons.linkedin;$(self.element).find('.buttons').append('<div class="button linkedin"><script type="in/share" data-url="'+(sett.url!==''?sett.url:self.options.url)+'" data-counter="'+sett.counter+'"></script></div>');var loading=0;if(typeof window.IN==='undefined'&&loading==0){loading=1;(function(){var li=document.createElement('script');li.type='text/javascript';li.async=true;li.src='//platform.linkedin.com/in.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li,s);})();}
10
+ else{window.IN.init();}},pinterest:function(self){var sett=self.options.buttons.pinterest;$(self.element).find('.buttons').append('<div class="button pinterest"><a href="//pinterest.com/pin/create/button/?url='+(sett.url!==''?sett.url:self.options.url)+'&media='+sett.media+'&description='+sett.description+'" class="pin-it-button" count-layout="'+sett.layout+'">Pin It</a></div>');(function(){var li=document.createElement('script');li.type='text/javascript';li.async=true;li.src='//assets.pinterest.com/js/pinit.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li,s);})();}},tracking={googlePlus:function(){},facebook:function(){fb=window.setInterval(function(){if(typeof FB!=='undefined'){FB.Event.subscribe('edge.create',function(targetUrl){_gaq.push(['_trackSocial','facebook','like',targetUrl]);});FB.Event.subscribe('edge.remove',function(targetUrl){_gaq.push(['_trackSocial','facebook','unlike',targetUrl]);});FB.Event.subscribe('message.send',function(targetUrl){_gaq.push(['_trackSocial','facebook','send',targetUrl]);});clearInterval(fb);}},1000);},twitter:function(){tw=window.setInterval(function(){if(typeof twttr!=='undefined'){twttr.events.bind('tweet',function(event){if(event){_gaq.push(['_trackSocial','twitter','tweet']);}});clearInterval(tw);}},1000);},digg:function(){},delicious:function(){},stumbleupon:function(){},linkedin:function(){function LinkedInShare(){_gaq.push(['_trackSocial','linkedin','share']);}},pinterest:function(){}},popup={googlePlus:function(opt){window.open("https://plus.google.com/share?hl="+opt.buttons.googlePlus.lang+"&url="+encodeURIComponent((opt.buttons.googlePlus.url!==''?opt.buttons.googlePlus.url:opt.url)),"","toolbar=0, status=0, width=900, height=500");},facebook:function(opt){window.open("//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent((opt.buttons.facebook.url!==''?opt.buttons.facebook.url:opt.url))+"&t="+opt.text+"","","toolbar=0, status=0, width=900, height=500");},twitter:function(opt){window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(opt.text)+"&url="+encodeURIComponent((opt.buttons.twitter.url!==''?opt.buttons.twitter.url:opt.url))+(opt.buttons.twitter.via!==''?'&via='+opt.buttons.twitter.via:''),"","toolbar=0, status=0, width=650, height=360");},digg:function(opt){window.open("//digg.com/tools/diggthis/submit?url="+encodeURIComponent((opt.buttons.digg.url!==''?opt.buttons.digg.url:opt.url))+"&title="+opt.text+"&related=true&style=true","","toolbar=0, status=0, width=650, height=360");},delicious:function(opt){window.open('//www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent((opt.buttons.delicious.url!==''?opt.buttons.delicious.url:opt.url))+'&title='+opt.text,'delicious','toolbar=no,width=550,height=550');},stumbleupon:function(opt){window.open('//www.stumbleupon.com/badge/?url='+encodeURIComponent((opt.buttons.delicious.url!==''?opt.buttons.delicious.url:opt.url)),'stumbleupon','toolbar=no,width=550,height=550');},linkedin:function(opt){window.open('https://www.linkedin.com/cws/share?url='+encodeURIComponent((opt.buttons.delicious.url!==''?opt.buttons.delicious.url:opt.url))+'&token=&isFramed=true','linkedin','toolbar=no,width=550,height=550');},pinterest:function(opt){window.open('//pinterest.com/pin/create/button/?url='+encodeURIComponent((opt.buttons.pinterest.url!==''?opt.buttons.pinterest.url:opt.url))+'&media='+encodeURIComponent(opt.buttons.pinterest.media)+'&description='+opt.buttons.pinterest.description,'pinterest','toolbar=no,width=700,height=300');}};function Plugin(element,options){this.element=element;this.options=$.extend(true,{},defaults,options);this.options.share=options.share;this._defaults=defaults;this._name=pluginName;this.init();};Plugin.prototype.init=function(){var self=this;if(this.options.urlCurl!==''){urlJson.googlePlus=this.options.urlCurl+'?url={url}&type=googlePlus';urlJson.stumbleupon=this.options.urlCurl+'?url={url}&type=stumbleupon';urlJson.linkedin=this.options.urlCurl+'?url={url}&type=linkedin';}
11
+ $(this.element).addClass(this.options.className);if(typeof $(this.element).data('title')!=='undefined'){this.options.title=$(this.element).attr('data-title');}
12
+ if(typeof $(this.element).data('url')!=='undefined'){this.options.url=$(this.element).data('url');}
13
+ if(typeof $(this.element).data('urlalt')!=='undefined'){this.options.urlalt=$(this.element).data('urlalt');}
14
+ if(typeof $(this.element).data('text')!=='undefined'){this.options.text=$(this.element).data('text');}
15
+ $.each(this.options.share,function(name,val){if(val===true){self.options.shareTotal++;}});if(self.options.enableCounter===true){$.each(this.options.share,function(name,val){if(val===true){try{self.getSocialJson(name);self.getSocialJson(getSocialAltJson);}catch(e){}}});}
16
+ else if(self.options.template!==''){this.options.render(this,this.options);}
17
+ else{this.loadButtons();}
18
+ $(this.element).hover(function(){if($(this).find('.buttons').length===0&&self.options.enableHover===true){self.loadButtons();}
19
+ self.options.hover(self,self.options);},function(){self.options.hide(self,self.options);});$(this.element).click(function(){self.options.click(self,self.options);return false;});};Plugin.prototype.loadButtons=function(){var self=this;$(this.element).append('<div class="buttons"></div>');$.each(self.options.share,function(name,val){if(val==true){loadButton[name](self);if(self.options.enableTracking===true){tracking[name]();}}});};Plugin.prototype.getSocialJson=function(name){var self=this,count=0,url=urlJson[name].replace('{url}',encodeURIComponent(this.options.url));if('twitter'==name){self.options.hideCount=1;self.renderer();self.options.count[name]=0;self.rendererPerso();}else{self.options.hideCount=0;if(this.options.buttons[name].urlCount===true&&this.options.buttons[name].url!==''){url=urlJson[name].replace('{url}',this.options.buttons[name].url);}
20
+ if(url!=''&&self.options.urlCurl!==''){$.getJSON(url,function(json){if(null!=json){if(typeof json.count!=="undefined"){var temp=json.count+'';temp=temp.replace('\u00c2\u00a0','');count+=parseInt(temp,10);}
21
+ else if(json.data&&json.data.length>0&&typeof json.data[0].total_count!=="undefined"){count+=parseInt(json.data[0].total_count,10);}
22
+ else if(typeof json[0]!=="undefined"){count+=parseInt(json[0].total_posts,10);}
23
+ else if(typeof json[0]!=="undefined"){}
24
+ self.options.count[name]=count;self.options.total+=count;self.renderer();self.rendererPerso();}
25
+ else{self.renderer();self.options.count[name]=0;self.rendererPerso();}}).fail(function(){self.options.hideCount=1;self.renderer();self.options.count[name]=0;self.rendererPerso();});}
26
+ else{self.renderer();self.options.count[name]=0;self.rendererPerso();}}};Plugin.prototype.getSocialAltJson=function(name){var self=this,count=0,url=urlJson[name].replace('{url}',encodeURIComponent(this.options.urlalt));self.options.hideCount=0;if(this.options.buttons[name].urlCount===true&&this.options.buttons[name].url!==''){url=urlJson[name].replace('{url}',this.options.buttons[name].url);}
27
+ if(url!=''&&self.options.urlCurl!==''){$.getJSON(url,function(json){if(null!=json){if(typeof json.count!=="undefined"){var temp=json.count+'';temp=temp.replace('\u00c2\u00a0','');count+=parseInt(temp,10);}
28
+ else if(json.data&&json.data.length>0&&typeof json.data[0].total_count!=="undefined"){count+=parseInt(json.data[0].total_count,10);}
29
+ else if(typeof json[0]!=="undefined"){count+=parseInt(json[0].total_posts,10);}
30
+ else if(typeof json[0]!=="undefined"){}
31
+ self.options.count[name]+=count;self.options.total+=count;self.renderer();self.rendererPerso();}
32
+ else{self.renderer();self.rendererPerso();}}).fail(function(){self.renderer();self.rendererPerso();});}
33
+ else{self.renderer();self.rendererPerso();}};Plugin.prototype.rendererPerso=function(){var shareCount=0;for(e in this.options.count){shareCount++;}
34
+ if(shareCount===this.options.shareTotal){this.options.render(this,this.options);}};Plugin.prototype.renderer=function(){var total=this.options.total,template=this.options.template
35
+ hideCount=this.options.hideCount;if(hideCount){$(this.element).html('<div class="box no-count"><a class="count" href="#"></a>'+
36
+ (this.options.title!==''?'<a class="share" href="#">'+this.options.title+'</a>':'')+'</div>');}
37
+ else{if(this.options.shorterTotal===true){total=this.shorterTotal(total);}
38
+ if(template!==''){template=template.replace('{total}',total);$(this.element).html(template);}
39
+ else{$(this.element).html('<div class="box"><a class="count" href="#">'+total+'</a>'+
40
+ (this.options.title!==''?'<a class="share" href="#">'+this.options.title+'</a>':'')+'</div>');}}};Plugin.prototype.shorterTotal=function(num){if(num>=1e6){num=(num/1e6).toFixed(2)+"M"}else if(num>=1e3){num=(num/1e3).toFixed(1)+"k"}
41
+ return num;};Plugin.prototype.openPopup=function(site){popup[site](this.options);if(this.options.enableTracking===true){var tracking={googlePlus:{site:'Google',action:'+1'},facebook:{site:'facebook',action:'like'},twitter:{site:'twitter',action:'tweet'},digg:{site:'digg',action:'add'},delicious:{site:'delicious',action:'add'},stumbleupon:{site:'stumbleupon',action:'add'},linkedin:{site:'linkedin',action:'share'},pinterest:{site:'pinterest',action:'pin'}};_gaq.push(['_trackSocial',tracking[site].site,tracking[site].action]);}};Plugin.prototype.simulateClick=function(){var html=$(this.element).html();$(this.element).html(html.replace(this.options.total,this.options.total+1));};Plugin.prototype.update=function(url,text){if(url!==''){this.options.url=url;}
42
+ if(text!==''){this.options.text=text;}};$.fn[pluginName]=function(options){var args=arguments;if(options===undefined||typeof options==='object'){return this.each(function(){if(!$.data(this,'plugin_'+pluginName)){$.data(this,'plugin_'+pluginName,new Plugin(this,options));}});}else if(typeof options==='string'&&options[0]!=='_'&&options!=='init'){return this.each(function(){var instance=$.data(this,'plugin_'+pluginName);if(instance instanceof Plugin&&typeof instance[options]==='function'){instance[options].apply(instance,Array.prototype.slice.call(args,1));}});}};})(jQuery,window,document);
trunk/lib/sharrre/sharrre.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( invalid_request() ){
4
+ die();
5
+ }
6
+
7
+ header('content-type: application/json');
8
+ //Sharrre by Julien Hany
9
+ $json = array('url'=>'','count'=>0);
10
+ //$json['url'] = $_GET['url'];
11
+ $url = urlencode($_GET['url']);
12
+ $type = urlencode($_GET['type']);
13
+
14
+ if(filter_var($_GET['url'], FILTER_VALIDATE_URL)){
15
+ if($type == 'googlePlus'){ //source http://www.helmutgranda.com/2011/11/01/get-a-url-google-count-via-php/
16
+ $content = parse("https://plusone.google.com/u/0/_/+1/fastbutton?url=".$url."&count=true");
17
+
18
+ $dom = new DOMDocument;
19
+ $dom->preserveWhiteSpace = false;
20
+ @$dom->loadHTML($content);
21
+ $domxpath = new DOMXPath($dom);
22
+ $newDom = new DOMDocument;
23
+ $newDom->formatOutput = true;
24
+
25
+ $filtered = $domxpath->query("//div[@id='aggregateCount']");
26
+ if (isset($filtered->item(0)->nodeValue))
27
+ {
28
+ $json['count'] = str_replace('>', '', $filtered->item(0)->nodeValue);
29
+ }
30
+ }
31
+ else if($type == 'stumbleupon'){
32
+ $content = parse("http://www.stumbleupon.com/services/1.01/badge.getinfo?url=$url");
33
+
34
+ $result = json_decode($content);
35
+ if (isset($result->result->views))
36
+ {
37
+ $json['count'] = $result->result->views;
38
+ }
39
+
40
+ }
41
+ else if($type == 'linkedin'){
42
+ $content = parse("https://www.linkedin.com/countserv/count/share?format=jsonp&url=$url");
43
+
44
+ if ( strpos( $content, '"count":' ) !== false ) {
45
+ preg_match( '/"count":([^,]+),/', $content, $matches );
46
+ $json['count'] = $matches[1];
47
+ }
48
+
49
+ }
50
+ }
51
+
52
+ //*
53
+ if( isset( $json['count'] ) ){
54
+ if( strpos( $json['count'], 'k' ) ){
55
+ $json['count'] = ( str_replace( 'k', '', $json['count'] ) )*1000;
56
+ }
57
+ elseif( strpos( $json['count'], 'M' ) ){
58
+ $json['count'] = ( str_replace( 'M', '', $json['count'] ) )*1000000;
59
+ }
60
+ }/**/
61
+
62
+ echo str_replace('\\/','/',json_encode($json));
63
+
64
+ function parse($encUrl){
65
+ $options = array(
66
+ CURLOPT_RETURNTRANSFER => true, // return web page
67
+ CURLOPT_HEADER => false, // don't return headers
68
+ CURLOPT_FOLLOWLOCATION => true, // follow redirects
69
+ CURLOPT_ENCODING => "", // handle all encodings
70
+ CURLOPT_USERAGENT => 'sharrre', // who am i
71
+ CURLOPT_AUTOREFERER => true, // set referer on redirect
72
+ CURLOPT_CONNECTTIMEOUT => 5, // timeout on connect
73
+ CURLOPT_TIMEOUT => 10, // timeout on response
74
+ CURLOPT_MAXREDIRS => 3, // stop after 10 redirects
75
+ CURLOPT_SSL_VERIFYHOST => 0,
76
+ CURLOPT_SSL_VERIFYPEER => false,
77
+ );
78
+ $ch = curl_init();
79
+
80
+ $options[CURLOPT_URL] = $encUrl;
81
+ curl_setopt_array($ch, $options);
82
+
83
+ $content = curl_exec($ch);
84
+ $err = curl_errno($ch);
85
+ $errmsg = curl_error($ch);
86
+
87
+ curl_close($ch);
88
+
89
+ if ($errmsg != '' || $err != '') {
90
+ /*print_r($errmsg);
91
+ print_r($errmsg);*/
92
+ }
93
+ return $content;
94
+ }
95
+
96
+ /**
97
+ * Validates the request by making sure the url and type values are set and are acceptable values
98
+ *
99
+ * @return boolean
100
+ */
101
+ function invalid_request() {
102
+
103
+ //die( json_encode( $_GET ) );
104
+
105
+ if( empty( $_GET['url'] ) || empty( $_GET['type'] ) ) {
106
+ return true;
107
+ }
108
+
109
+ elseif( ! strpos( $_GET['url'], sharrre_get_host() ) ) {
110
+ return true;
111
+ }
112
+
113
+ elseif( ! in_array( $_GET['type'], array( 'googlePlus', 'stumbleupon', 'linkedin' ) ) ) {
114
+ return true;
115
+ }
116
+
117
+ return false;
118
+
119
+ }
120
+
121
+ /**
122
+ * Polls different methods for getting the current domain and returns the value
123
+ *
124
+ * @return string
125
+ */
126
+ function sharrre_get_host() {
127
+
128
+ $host = '';
129
+
130
+ if( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ){
131
+ $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
132
+ $elements = explode(',', $host);
133
+
134
+ $host = trim(end($elements));
135
+ }
136
+ elseif( ! empty( $_SERVER['HTTP_HOST'] ) ){
137
+ $host = $_SERVER['HTTP_HOST'];
138
+ }
139
+ elseif( ! empty( $_SERVER['SERVER_NAME'] ) ){
140
+ $host = $_SERVER['SERVER_NAME'];
141
+ }
142
+ elseif( ! empty( $_SERVER['SERVER_ADDR'] ) ){
143
+ $host = $_SERVER['SERVER_ADDR'];
144
+ }
145
+
146
+ // Remove port number from host
147
+ $host = preg_replace( '/:\d+$/', '', $host );
148
+
149
+ return trim( $host );
150
+
151
+ }
trunk/package.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "genesis-simple-share",
3
+ "description": "Development files for the Genesis Simple Share plugin.",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/copyblogger/genesis-simple-share"
7
+ },
8
+ "dependencies": {},
9
+ "devDependencies": {
10
+ "grunt": "*",
11
+ "grunt-autoprefixer": "*",
12
+ "grunt-checktextdomain": "*",
13
+ "grunt-contrib-cssmin": "*",
14
+ "grunt-contrib-imagemin": "*",
15
+ "grunt-contrib-jshint": "*",
16
+ "grunt-contrib-uglify": "*",
17
+ "grunt-contrib-watch": "*",
18
+ "grunt-csscomb": "*",
19
+ "grunt-jsbeautifier": "*",
20
+ "grunt-jsvalidate": "*",
21
+ "grunt-phplint": "*",
22
+ "grunt-styledocco": "*",
23
+ "grunt-wp-i18n": "*",
24
+ "load-grunt-tasks": "*"
25
+ },
26
+ "plugin": {
27
+ "name": "Genesis Simple Share",
28
+ "uri": "https://github.com/copyblogger/genesis-simple-share",
29
+ "description": "A simple sharing plugin using the Share script.",
30
+ "author": "StudioPress",
31
+ "authoruri": "http://www.studiopress.com/",
32
+ "version": "1.0.6",
33
+ "license": "GPL-2.0+",
34
+ "licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html",
35
+ "textdomain": "genesis-simple-share"
36
+ }
37
+ }
trunk/plugin.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Genesis Simple Share
4
+ Plugin URI:
5
+
6
+ Description: A simple sharing plugin using the Share script.
7
+
8
+ Version: 1.0.7
9
+
10
+ Author: Rainmaker Digital LLC
11
+ Author URI: http://www.copyblogger.com
12
+
13
+ Text Domain: genesis-simple-share
14
+ Domain Path /languages/
15
+ */
16
+
17
+ //* Prevent direct access to the plugin
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ die( __( 'Sorry, you are not allowed to access this page directly.', 'genesis-simple-share' ) );
20
+ }
21
+
22
+ define( 'GENESIS_SIMPLE_SHARE_LIB', dirname( __FILE__ ) . '/lib/' );
23
+
24
+ add_action( 'genesis_init', 'genesis_simple_share_init', 99 );
25
+ /**
26
+ * Loads plugin text domain and required files. Uses genesis_init to ensure Genesis functions are available
27
+ *
28
+ * @since 0.1.0
29
+ *
30
+ * @uses GENESIS_SIMPLE_SHArE_LIB
31
+ *
32
+ */
33
+ function genesis_simple_share_init() {
34
+
35
+ //* Load textdomain for translation
36
+ load_plugin_textdomain( 'genesis-simple-share', false, basename( dirname( __FILE__ ) ) . '/languages/' );
37
+
38
+ if ( is_admin() && class_exists( 'Genesis_Admin_Boxes' ) ) {
39
+ require_once( GENESIS_SIMPLE_SHARE_LIB . 'admin.php' );
40
+ require_once( GENESIS_SIMPLE_SHARE_LIB . 'post-meta.php' );
41
+ }
42
+ else
43
+ require_once( GENESIS_SIMPLE_SHARE_LIB . 'front-end.php' );
44
+
45
+ //require_once( GENESIS_SIMPLE_SHArE_LIB . 'functions.php' );
46
+
47
+ }
trunk/readme.txt ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Genesis Simple Share ===
2
+ Contributors: nathanrice, studiopress, wpmuguru, nick_thegeek, bgardner
3
+ Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
+ Requires at least: 3.7
5
+ Tested up to: 4.5.2
6
+ Stable tag: 1.0.7
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Genesis Simple Share allows you to easily add beautiful share buttons to your site using a Genesis child theme
11
+
12
+ == Description ==
13
+
14
+ Genesis Simple Share is created to be simple and easy to use within your Genesis child theme. We have tried to focus on making default options and initial setup a breeze.
15
+
16
+ The default settings should automatically enable the share icons on posts. You may wish to make some changes so in your WordPress dashboard hover over the Genesis menu item and click the Simple Share menu item in that submenu.
17
+
18
+ Once there you can choose which post types Simple Share will be active on, if it should show on archives, and which icons to enable. You can also drag and drop the icons to change the order they will display in on your site. You may wish to add your Twitter user name to the twitter icon settings. This will add a via: @username after the share text on Twitter. You may also add a URL to an image to use as the default image.
19
+
20
+ == Installation ==
21
+
22
+ Download the latest version of the Genesis Simple Share plugin and upload as a new plugin within your WordPress dashboard or via FTP to the wp-content/plugins folder and then activate the plugin.
23
+
24
+ == Frequently Asked Questions ==
25
+
26
+ = Where can I learn more about this plugin? =
27
+
28
+ We’ve got a small wiki in the git repo for the plugin with some cool tips and tricks you can use.
29
+ https://github.com/copyblogger/genesis-simple-share/wiki/Usage-Tips
30
+
31
+
32
+ == Changelog ==
33
+
34
+ = 1.0.7 =
35
+ * Fixed: LinkedIn button works with recent change to LinkedIn API. Note, the button now uses the sharrre.php file to fetch results, which can cause problems accessing share counts with some hosts depending on settings.
36
+
37
+ = 1.0.6 =
38
+ * Fixed: styling tweeks for twitter button without count.
39
+
40
+ = 1.0.5 =
41
+ * Fixed: styling issues following removal of tweet count.
42
+
43
+ = 1.0.4 =
44
+ * Include a force to show argument in icon output functions.
45
+ * Disabled Twitter counter for now because twitter is removing the ability to get the counts after 10-2015.
46
+
47
+ = 1.0.3 =
48
+ * Fix error resulting in double icon output.
49
+
50
+ = 1.0.2 =
51
+ * Fix error where icons do not show in archives when showing the excerpt.
52
+
53
+ = 1.0.1 =
54
+ * Fixes potential error where only first post in archive will show share buttons.
55
+
56
+ = 1.0 =
57
+ * Initial WordPress.org release.
58
+
59
+ == Upgrade Notice ==
60
+
61
+ = 1.0.7 =
62
+ * Fixes LinkedIn button so that it works with recent change to LinkedIn API. Note, the button now uses the sharrre.php file to fetch results, which can cause problems accessing share counts with some hosts depending on settings.
63
+
64
+ = 1.0.1 =
65
+ * Fixes potential error where only first post in archive will show share buttons
66
+
67
+ = 1.0 =
68
+ Plugin was added to the WordPress.org repo. Users should update to ensure they have the latest code.