Version Description
- Improved migration of checkbox settings from 4.0 plugin
- Improved settings page layout on mobile devices and small screens
- Improved CSS class naming around red/green enable sliders on the settings page, to reduce CSS conflicts
- Proactively removing all other CSS and JavaScript files from other plugins when on our settings page to reduce conflicts with other active plugins
- Removing unused CSS
Download this release
Release Info
Developer | jgrodel |
Plugin | WordPress Share Buttons Plugin – AddThis |
Version | 5.0.1 |
Comparing to | |
See all releases |
Code changes from version 5.0 to 5.0.1
- AddThisConfigs.php +12 -1
- AddThisWordPressConnector.php +275 -2
- addthis-for-wordpress.php +16 -81
- addthis-toolbox.php +10 -5
- addthis_settings_functions.php +46 -67
- addthis_sidebar_widget.php +3 -1
- addthis_social_widget.php +172 -209
- css/addthis.css +0 -162
- css/gtc.sharing-personalize.css +16 -76
- css/options-page.css +389 -365
- css/output.css +6 -2
- css/style.css +27 -6
- includes/addthis_addjs_new.php +4 -13
- js/addthis.js +0 -31
- js/gtc-sharing-personalize.js +4 -98
- js/options-page.32.js +27 -297
- js/options-page.js +25 -308
- readme.txt +8 -1
AddThisConfigs.php
CHANGED
@@ -127,7 +127,7 @@ if (!class_exists('AddThisConfigs')) {
|
|
127 |
}
|
128 |
|
129 |
private function setDefaultConfigs() {
|
130 |
-
$this->configs = $this->cmsInterface->getConfigs();
|
131 |
|
132 |
if (!is_array($this->configs)) {
|
133 |
$this->configs = $this->getDefaultConfigs();
|
@@ -189,5 +189,16 @@ if (!class_exists('AddThisConfigs')) {
|
|
189 |
|
190 |
return $fields;
|
191 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
}
|
127 |
}
|
128 |
|
129 |
private function setDefaultConfigs() {
|
130 |
+
$this->configs = $this->cmsInterface->getConfigs(true);
|
131 |
|
132 |
if (!is_array($this->configs)) {
|
133 |
$this->configs = $this->getDefaultConfigs();
|
189 |
|
190 |
return $fields;
|
191 |
}
|
192 |
+
|
193 |
+
public function getProfileId() {
|
194 |
+
$this->getConfigs();
|
195 |
+
if(isset($this->configs['addthis_profile'])
|
196 |
+
&& !empty($this->configs['addthis_profile'])
|
197 |
+
) {
|
198 |
+
return $this->configs['addthis_profile'];
|
199 |
+
}
|
200 |
+
|
201 |
+
return '';
|
202 |
+
}
|
203 |
}
|
204 |
}
|
AddThisWordPressConnector.php
CHANGED
@@ -25,7 +25,8 @@ if (!class_exists('AddthisWordpressConnector')) {
|
|
25 |
Class AddthisWordpressConnector implements AddThisCmsConnectorInterface {
|
26 |
|
27 |
static $settingsVariableName = 'addthis_settings';
|
28 |
-
static $pluginVersion = '5.0';
|
|
|
29 |
protected $configs = null;
|
30 |
|
31 |
protected $defaultConfigs = array(
|
@@ -67,6 +68,73 @@ if (!class_exists('AddthisWordpressConnector')) {
|
|
67 |
return self::$pluginVersion;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
public function getDefaultConfigs() {
|
71 |
return $this->defaultConfigs;
|
72 |
}
|
@@ -224,12 +292,217 @@ if (!class_exists('AddthisWordpressConnector')) {
|
|
224 |
// if we don't have this value, get from a the depricated field
|
225 |
if ( is_array($this->configs)
|
226 |
&& isset($this->configs[$deprecatedFieldName])
|
227 |
-
&& !empty($this->configs[$deprecatedFieldName])
|
228 |
&& !isset($this->configs[$currentFieldName])
|
229 |
) {
|
230 |
$deprecatedValue = $this->configs[$deprecatedFieldName];
|
231 |
$this->configs[$currentFieldName] = $deprecatedValue;
|
232 |
}
|
233 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
}
|
25 |
Class AddthisWordpressConnector implements AddThisCmsConnectorInterface {
|
26 |
|
27 |
static $settingsVariableName = 'addthis_settings';
|
28 |
+
static $pluginVersion = '5.0.1';
|
29 |
+
static $settingsPageId = 'addthis_social_widget';
|
30 |
protected $configs = null;
|
31 |
|
32 |
protected $defaultConfigs = array(
|
68 |
return self::$pluginVersion;
|
69 |
}
|
70 |
|
71 |
+
static function getSettingsPageId() {
|
72 |
+
return self::$settingsPageId;
|
73 |
+
}
|
74 |
+
|
75 |
+
static function getCmsVersion() {
|
76 |
+
$version = get_bloginfo('version');
|
77 |
+
return $version;
|
78 |
+
}
|
79 |
+
|
80 |
+
static function getCmsMinorVersion() {
|
81 |
+
$version = (float)substr(self::getCmsVersion(),0,3);
|
82 |
+
return $version;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* the folder name for the AddThis plugin - OMG why is this hard coded?!?
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public function getPluginFolder(){
|
90 |
+
return 'addthis';
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* gives you the base URL for our plugin
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
public function getPluginUrl(){
|
98 |
+
$url = apply_filters(
|
99 |
+
'addthis_files_uri',
|
100 |
+
plugins_url()
|
101 |
+
);
|
102 |
+
$url .= '/' . $this->getPluginFolder();
|
103 |
+
return $url;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* gives you the base URL for our plugin's JavaScript
|
108 |
+
* @return string
|
109 |
+
*/
|
110 |
+
public function getPluginJsFolderUrl() {
|
111 |
+
$url = $this->getPluginUrl() . '/js/';
|
112 |
+
return $url;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* gives you the base URL for our plugin's CSS
|
117 |
+
* @return string
|
118 |
+
*/
|
119 |
+
public function getPluginCssFolderUrl() {
|
120 |
+
$url = $this->getPluginUrl() . '/css/';
|
121 |
+
return $url;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* gives you the base URL for our plugin's images
|
126 |
+
* @return string
|
127 |
+
*/
|
128 |
+
public function getPluginImageFolderUrl() {
|
129 |
+
$url = $this->getPluginUrl() . '/img/';
|
130 |
+
return $url;
|
131 |
+
}
|
132 |
+
|
133 |
+
public function getSettingsPageUrl() {
|
134 |
+
$url = admin_url("options-general.php?page=" . $this->getSettingsPageId());
|
135 |
+
return $url;
|
136 |
+
}
|
137 |
+
|
138 |
public function getDefaultConfigs() {
|
139 |
return $this->defaultConfigs;
|
140 |
}
|
292 |
// if we don't have this value, get from a the depricated field
|
293 |
if ( is_array($this->configs)
|
294 |
&& isset($this->configs[$deprecatedFieldName])
|
|
|
295 |
&& !isset($this->configs[$currentFieldName])
|
296 |
) {
|
297 |
$deprecatedValue = $this->configs[$deprecatedFieldName];
|
298 |
$this->configs[$currentFieldName] = $deprecatedValue;
|
299 |
}
|
300 |
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Evaluates a handle and its source to determine if we should keep it.
|
304 |
+
* We want to keep stuff from out plugin, from themes and from core
|
305 |
+
* WordPress, but not stuff from other plugins as it can conflict with
|
306 |
+
* our code.
|
307 |
+
*
|
308 |
+
* @param string $handle The name given to an enqueued script or
|
309 |
+
* @param mixed $src style. This is usually a string with the
|
310 |
+
* the location of the enqueued script or
|
311 |
+
* style, relative or absolute. Sometimes
|
312 |
+
* this is not a string, and it adds CSS code
|
313 |
+
* to a WordPress generated CSS file.
|
314 |
+
* @param string[] $whitelist We will inevitably run into code from
|
315 |
+
* other plugins that should be included on
|
316 |
+
* our settings page. For those, their
|
317 |
+
* handles can be added to this array of
|
318 |
+
* strings. We've decided to whitelist
|
319 |
+
* instead of blacklist, as we are likely to
|
320 |
+
* encounter fewer plugins that add
|
321 |
+
* functionality to our settings page than
|
322 |
+
* plugins that behave badly and add unwanted
|
323 |
+
* code to our page. This also keeps our code
|
324 |
+
* working (though perhaps without the added
|
325 |
+
* functionality from another plugin that may
|
326 |
+
* be desired by the user) instead of
|
327 |
+
* breaking the page outright.
|
328 |
+
* Troubleshooting should also be easier, as
|
329 |
+
* a user is more likely to be aware of which
|
330 |
+
* of their plugins add functionality on
|
331 |
+
* their settings pages, rather than which
|
332 |
+
* ones doesn't play nicely with how they
|
333 |
+
* enqueue their scripts and styles.
|
334 |
+
* @return boolean true when a particular script or style should be
|
335 |
+
* killed from our settings page, false when it should
|
336 |
+
* not be killed
|
337 |
+
*/
|
338 |
+
public function evalKillEnqueue($handle, $src, $whitelist = array()) {
|
339 |
+
$pluginsFolder = '/wp-content/plugins/';
|
340 |
+
$addThisPluginsFolder = $pluginsFolder . $this->getPluginFolder();
|
341 |
+
$addThisUrl = $this->getPluginUrl();
|
342 |
+
|
343 |
+
if (!is_string($src)) { return false; }
|
344 |
+
|
345 |
+
if ( !is_string($src) // is the source location a string? keep css if not, cause, for some reason it breaks otherwise
|
346 |
+
|| in_array($handle, $whitelist) // keep stuff that's in the whitelist
|
347 |
+
|| substr($handle, 0, 7) === 'addthis' // handle has our prefix
|
348 |
+
|| substr($src, 0, strlen($addThisPluginsFolder)) === $addThisPluginsFolder // keep relative path stuff from this plugin
|
349 |
+
|| substr($src, 0, strlen($addThisUrl)) === $addThisUrl //full urls for this plugin
|
350 |
+
|| ( substr($src, 0, 4) === "/wp-" // keep css for non-plugins
|
351 |
+
&& substr($src, 0, strlen($pluginsFolder)) !== $pluginsFolder)
|
352 |
+
) {
|
353 |
+
return false;
|
354 |
+
}
|
355 |
+
|
356 |
+
return true;
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Dequeues unwanted scripts from the HTML page generated by WordPress.
|
361 |
+
* This should only be used for our settings page. See the documentation
|
362 |
+
* for the evalKillEnqueue function for more details, secifically for
|
363 |
+
* more information on the $whitespace variable.
|
364 |
+
*/
|
365 |
+
public function killUnwantedScripts() {
|
366 |
+
global $wp_scripts;
|
367 |
+
$whitelist = array();
|
368 |
+
|
369 |
+
foreach ($wp_scripts->queue as $handle) {
|
370 |
+
$obj = $wp_scripts->registered[$handle];
|
371 |
+
$src = $obj->src;
|
372 |
+
$kill = $this->evalKillEnqueue($handle, $src, $whitelist);
|
373 |
+
if ($kill) {
|
374 |
+
wp_dequeue_script($handle);
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Dequeues unwanted styles from the HTML page generated by WordPress.
|
381 |
+
* This should only be used for our settings page. See the documentation
|
382 |
+
* for the evalKillEnqueue function for more details, secifically for
|
383 |
+
* more information on the $whitespace variable.
|
384 |
+
*/
|
385 |
+
public function killUnwantedStyles() {
|
386 |
+
global $wp_styles;
|
387 |
+
$whitelist = array();
|
388 |
+
|
389 |
+
foreach ($wp_styles->queue as $handle) {
|
390 |
+
$obj = $wp_styles->registered[$handle];
|
391 |
+
$src = $obj->src;
|
392 |
+
$kill = $this->evalKillEnqueue($handle, $src, $whitelist);
|
393 |
+
if ($kill) {
|
394 |
+
wp_dequeue_style($handle);
|
395 |
+
}
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
public function addSettingsPageScripts() {
|
400 |
+
$this->getConfigs(true);
|
401 |
+
$this->killUnwantedScripts();
|
402 |
+
|
403 |
+
$jsRootUrl = $this->getPluginJsFolderUrl();
|
404 |
+
$imgRootUrl = $this->getPluginImageFolderUrl();
|
405 |
+
|
406 |
+
if ( $this->getCmsMinorVersion() >= 3.2
|
407 |
+
|| $this->assumeLatest()
|
408 |
+
) {
|
409 |
+
$optionsJsUrl = $jsRootUrl . 'options-page.32.js';
|
410 |
+
} else {
|
411 |
+
$optionsJsUrl = $jsRootUrl . 'options-page.js';
|
412 |
+
}
|
413 |
+
|
414 |
+
wp_enqueue_script(
|
415 |
+
'addthis_options_page_script',
|
416 |
+
$optionsJsUrl,
|
417 |
+
array('jquery-ui-tabs', 'thickbox')
|
418 |
+
);
|
419 |
+
|
420 |
+
if ($this->configs['addthis_plugin_controls'] == 'AddThis') {
|
421 |
+
wp_enqueue_script(
|
422 |
+
'addThisScript',
|
423 |
+
$jsRootUrl . 'addthis-for-wordpress.js'
|
424 |
+
);
|
425 |
+
|
426 |
+
return;
|
427 |
+
}
|
428 |
+
|
429 |
+
wp_enqueue_script('addthis_core', $jsRootUrl . 'core-1.1.1.js');
|
430 |
+
wp_enqueue_script('addthis_lr', $jsRootUrl . 'lr.js');
|
431 |
+
wp_enqueue_script('addthis_qtip_script', $jsRootUrl . 'jquery.qtip.min.js');
|
432 |
+
wp_enqueue_script('addthis_ui_script', $jsRootUrl . 'jqueryui.sortable.js');
|
433 |
+
wp_enqueue_script('addthis_selectbox', $jsRootUrl . 'jquery.selectBoxIt.min.js');
|
434 |
+
wp_enqueue_script('addthis_jquery_messagebox', $jsRootUrl . 'jquery.messagebox.js');
|
435 |
+
wp_enqueue_script('addthis_jquery_atjax', $jsRootUrl . 'jquery.atjax.js');
|
436 |
+
wp_enqueue_script('addthis_lodash_script', $jsRootUrl . 'lodash-0.10.0.js');
|
437 |
+
wp_enqueue_script('addthis_services_script', $jsRootUrl . 'gtc-sharing-personalize.js');
|
438 |
+
wp_enqueue_script('addthis_service_script', $jsRootUrl . 'gtc.cover.js');
|
439 |
+
|
440 |
+
wp_localize_script(
|
441 |
+
'addthis_services_script',
|
442 |
+
'addthis_params',
|
443 |
+
array('img_base' => $imgRootUrl)
|
444 |
+
);
|
445 |
+
wp_localize_script(
|
446 |
+
'addthis_options_page_script',
|
447 |
+
'addthis_option_params',
|
448 |
+
array(
|
449 |
+
'wp_ajax_url'=> admin_url('admin-ajax.php'),
|
450 |
+
'addthis_validate_action' => 'validate_addthis_api_credentials',
|
451 |
+
'img_base' => $imgRootUrl
|
452 |
+
)
|
453 |
+
);
|
454 |
+
}
|
455 |
+
|
456 |
+
public function addSettingsPageStyles() {
|
457 |
+
$this->getConfigs(true);
|
458 |
+
$this->killUnwantedStyles();
|
459 |
+
$cssRootUrl = $this->getPluginCssFolderUrl();
|
460 |
+
|
461 |
+
wp_enqueue_style('addthis_options_page_style', $cssRootUrl . 'options-page.css');
|
462 |
+
wp_enqueue_style('addthis_general_style', $cssRootUrl . 'style.css');
|
463 |
+
|
464 |
+
if ($this->configs['addthis_plugin_controls'] == 'AddThis') {
|
465 |
+
return;
|
466 |
+
}
|
467 |
+
|
468 |
+
wp_enqueue_style('thickbox');
|
469 |
+
wp_enqueue_style('addthis_services_style', $cssRootUrl . 'gtc.sharing-personalize.css');
|
470 |
+
wp_enqueue_style('addthis_bootstrap_style', $cssRootUrl . 'bootstrap.css');
|
471 |
+
wp_enqueue_style('addthis_widget', 'https://ct1.addthis.com/static/r07/widget114.css');
|
472 |
+
wp_enqueue_style('addthis_widget_big', 'https://ct1.addthis.com/static/r07/widgetbig056.css');
|
473 |
+
}
|
474 |
+
|
475 |
+
public function addSettingsPage($htmlGeneratingFunction) {
|
476 |
+
$hook_suffix = add_options_page(
|
477 |
+
'AddThis Sharing Buttons',
|
478 |
+
'AddThis Sharing Buttons',
|
479 |
+
'manage_options',
|
480 |
+
self::$settingsPageId,
|
481 |
+
$htmlGeneratingFunction
|
482 |
+
);
|
483 |
+
|
484 |
+
$print_scripts_hook = 'admin_print_scripts-' . $hook_suffix;
|
485 |
+
$print_styles_hook = 'admin_print_styles-' . $hook_suffix;
|
486 |
+
|
487 |
+
add_action(
|
488 |
+
$print_scripts_hook,
|
489 |
+
array($this, 'addSettingsPageScripts')
|
490 |
+
);
|
491 |
+
add_action(
|
492 |
+
$print_styles_hook,
|
493 |
+
array($this, 'addSettingsPageStyles')
|
494 |
+
);
|
495 |
+
|
496 |
+
}
|
497 |
+
|
498 |
+
public function assumeLatest() {
|
499 |
+
if ( apply_filters('at_assume_latest', __return_false())
|
500 |
+
|| apply_filters('addthis_assume_latest', __return_false())
|
501 |
+
) {
|
502 |
+
return true;
|
503 |
+
}
|
504 |
+
|
505 |
+
return false;
|
506 |
+
}
|
507 |
}
|
508 |
}
|
addthis-for-wordpress.php
CHANGED
@@ -27,9 +27,6 @@ if (!defined('ADDTHIS_ATVERSION')) {
|
|
27 |
define('ADDTHIS_ATVERSION', '300');
|
28 |
}
|
29 |
|
30 |
-
define('ADDTHIS_CSS_PATH', 'css/style.css');
|
31 |
-
define('ADDTHIS_JS_PATH', 'js/addthis-for-wordpress.js');
|
32 |
-
define('ADDTHIS_SETTINGS_PAGE_ID', 'addthis_social_widget');
|
33 |
define('ADDTHIS_PLUGIN_FILE', $path.'/addthis_social_widget.php');
|
34 |
define('ADDTHIS_PUBNAME_LIMIT', 255);
|
35 |
|
@@ -37,10 +34,6 @@ require_once('addthis_settings_functions.php');
|
|
37 |
|
38 |
class Addthis_Wordpress
|
39 |
{
|
40 |
-
const ADDTHIS_PROFILE_SETTINGS_PAGE = 'https://www.addthis.com/settings/publisher';
|
41 |
-
const ADDTHIS_SITE_URL = 'https://www.addthis.com/settings/plugin-pubs';
|
42 |
-
const ADDTHIS_SITE_URL_WITH_PUB = 'https://www.addthis.com/dashboard#gallery';
|
43 |
-
const ADDTHIS_SITE_URL_ANALYTICS = 'https://www.addthis.com/dashboard#analytics';
|
44 |
const ADDTHIS_REFERER = 'www.addthis.com';
|
45 |
|
46 |
/** PHP $_GET Variables * */
|
@@ -52,13 +45,11 @@ class Addthis_Wordpress
|
|
52 |
/** check upgrade or fresh installation **/
|
53 |
private $_upgrade;
|
54 |
|
55 |
-
/** Addthis Profile id **/
|
56 |
-
private $_pubid;
|
57 |
-
|
58 |
/** Addthis Settings **/
|
59 |
private $_options;
|
60 |
|
61 |
private $addThisConfigs;
|
|
|
62 |
|
63 |
/**
|
64 |
* Initializes the plugin.
|
@@ -67,9 +58,10 @@ class Addthis_Wordpress
|
|
67 |
*
|
68 |
* @return null
|
69 |
* */
|
70 |
-
public function __construct($upgrade, $addThisConfigs)
|
71 |
{
|
72 |
$this->addThisConfigs = $addThisConfigs;
|
|
|
73 |
// Save async load settings via ajax request
|
74 |
add_action( 'wp_ajax_at_async_loading', array($this, 'addthisAsyncLoading'));
|
75 |
$this->_upgrade = $upgrade;
|
@@ -77,18 +69,10 @@ class Addthis_Wordpress
|
|
77 |
$this->_postVariables = $_POST;
|
78 |
$this->_options = $this->addThisConfigs->getConfigs();
|
79 |
|
80 |
-
$this->_pubid = null;
|
81 |
-
if ( isset($this->_options)
|
82 |
-
&& isset($this->_options['addthis_profile'])
|
83 |
-
&& !empty($this->_options['addthis_profile'])
|
84 |
-
) {
|
85 |
-
$this->_pubid = $this->_options['addthis_profile'];
|
86 |
-
}
|
87 |
-
|
88 |
include_once 'addthis-toolbox.php';
|
89 |
-
new Addthis_ToolBox;
|
90 |
|
91 |
-
add_action('admin_menu', array($this, '
|
92 |
|
93 |
// Deactivation
|
94 |
register_deactivation_hook(
|
@@ -111,7 +95,7 @@ class Addthis_Wordpress
|
|
111 |
*/
|
112 |
public function addSettingsLink($links)
|
113 |
{
|
114 |
-
$settingsLink = '<a href="'
|
115 |
array_push($links, $settingsLink);
|
116 |
return $links;
|
117 |
}
|
@@ -133,15 +117,10 @@ class Addthis_Wordpress
|
|
133 |
*
|
134 |
* @return null
|
135 |
*/
|
136 |
-
public function
|
137 |
{
|
138 |
-
|
139 |
-
|
140 |
-
'AddThis Sharing Buttons',
|
141 |
-
'manage_options',
|
142 |
-
ADDTHIS_SETTINGS_PAGE_ID,
|
143 |
-
array($this, 'addthisWordpressOptions')
|
144 |
-
);
|
145 |
}
|
146 |
|
147 |
/**
|
@@ -151,28 +130,11 @@ class Addthis_Wordpress
|
|
151 |
*/
|
152 |
public function addthisWordpressOptions()
|
153 |
{
|
154 |
-
if (!current_user_can('manage_options')) {
|
155 |
-
wp_die(
|
156 |
-
__('You do not have sufficient permissions to access this page.')
|
157 |
-
);
|
158 |
-
}
|
159 |
-
|
160 |
$updateResult = null;
|
161 |
|
162 |
if ($this->_checkAddPubid()) {
|
163 |
$updateResult = $this->updateSettings($this->_postVariables);
|
164 |
}
|
165 |
-
wp_enqueue_script(
|
166 |
-
'addThisScript',
|
167 |
-
plugins_url(ADDTHIS_JS_PATH, __FILE__)
|
168 |
-
);
|
169 |
-
wp_enqueue_script('atTabs',plugins_url('js/options-page.32.js', __FILE__));
|
170 |
-
wp_enqueue_script('jquery-ui-tabs');
|
171 |
-
wp_enqueue_style(
|
172 |
-
'addThisStylesheet',
|
173 |
-
plugins_url(ADDTHIS_CSS_PATH, __FILE__)
|
174 |
-
);
|
175 |
-
wp_enqueue_style('attabStyles',plugins_url('css/options-page.css', __FILE__));
|
176 |
echo $this->_getHTML($updateResult);
|
177 |
}
|
178 |
|
@@ -204,29 +166,11 @@ class Addthis_Wordpress
|
|
204 |
}
|
205 |
$this->_options = $this->addThisConfigs->saveConfigs($this->_options);
|
206 |
|
207 |
-
$this->_pubid = $this->_options['addthis_profile'];
|
208 |
-
|
209 |
return "<div class='addthis_updated wrap' style='margin-top:50px;width:95%'>".
|
210 |
"AddThis Profile Settings updated successfully!!!".
|
211 |
"</div>";
|
212 |
}
|
213 |
|
214 |
-
/**
|
215 |
-
* Get addthis profile id
|
216 |
-
*
|
217 |
-
* @return string
|
218 |
-
*/
|
219 |
-
public static function getPubid()
|
220 |
-
{
|
221 |
-
global $addThisConfigs;
|
222 |
-
$settings = $addThisConfigs->getConfigs();
|
223 |
-
if (!empty($settings['addthis_profile'])) {
|
224 |
-
return $settings['addthis_profile'];
|
225 |
-
} else {
|
226 |
-
return null;
|
227 |
-
}
|
228 |
-
}
|
229 |
-
|
230 |
/**
|
231 |
* Get referer url
|
232 |
*
|
@@ -323,9 +267,9 @@ class Addthis_Wordpress
|
|
323 |
$html = '
|
324 |
<div class="wrap">
|
325 |
<form
|
326 |
-
id="addthis-
|
327 |
method="post"
|
328 |
-
action="'
|
329 |
>
|
330 |
<div class="Header">
|
331 |
<h1><em>AddThis</em> Sharing Buttons</h1>';
|
@@ -335,7 +279,7 @@ class Addthis_Wordpress
|
|
335 |
|
336 |
$html .= '</div>';
|
337 |
|
338 |
-
if ($this->_upgrade && !$this->
|
339 |
$html .= $this->_getupdateSuccessMessage();
|
340 |
}
|
341 |
|
@@ -407,7 +351,7 @@ class Addthis_Wordpress
|
|
407 |
$pubIdCardTitle = 'Setup AddThis Tools';
|
408 |
$pubIdButtonText = "Configure AddThis Tools";
|
409 |
|
410 |
-
if (
|
411 |
// if they don't have a profile yet, default to setup
|
412 |
$tabOrder = array(
|
413 |
'tabs-1' => 'Setup',
|
@@ -444,7 +388,7 @@ class Addthis_Wordpress
|
|
444 |
' . $tabsHtml . '
|
445 |
</ul>
|
446 |
<div id="tabs-1">
|
447 |
-
<div class="Card" id="Card-side-sharing"
|
448 |
<div>
|
449 |
<h3 class="Card-hd-title">
|
450 |
' . $sharingToolsCardTitle . '
|
@@ -477,16 +421,6 @@ class Addthis_Wordpress
|
|
477 |
return $html;
|
478 |
}
|
479 |
|
480 |
-
/**
|
481 |
-
* Get the plugin's settings page url
|
482 |
-
*
|
483 |
-
* @return string
|
484 |
-
*/
|
485 |
-
public static function getSettingsPageUrl()
|
486 |
-
{
|
487 |
-
return admin_url("options-general.php?page=" . ADDTHIS_SETTINGS_PAGE_ID);
|
488 |
-
}
|
489 |
-
|
490 |
/**
|
491 |
* Get the wp domain
|
492 |
*
|
@@ -518,9 +452,10 @@ function Addthis_Wordpress_early()
|
|
518 |
{
|
519 |
global $addthis_addjs;
|
520 |
global $addThisConfigs;
|
|
|
521 |
|
522 |
if (!isset($addthis_addjs)) {
|
523 |
include 'includes/addthis_addjs_new.php';
|
524 |
-
$addthis_addjs = new AddThis_addjs($addThisConfigs);
|
525 |
}
|
526 |
}
|
27 |
define('ADDTHIS_ATVERSION', '300');
|
28 |
}
|
29 |
|
|
|
|
|
|
|
30 |
define('ADDTHIS_PLUGIN_FILE', $path.'/addthis_social_widget.php');
|
31 |
define('ADDTHIS_PUBNAME_LIMIT', 255);
|
32 |
|
34 |
|
35 |
class Addthis_Wordpress
|
36 |
{
|
|
|
|
|
|
|
|
|
37 |
const ADDTHIS_REFERER = 'www.addthis.com';
|
38 |
|
39 |
/** PHP $_GET Variables * */
|
45 |
/** check upgrade or fresh installation **/
|
46 |
private $_upgrade;
|
47 |
|
|
|
|
|
|
|
48 |
/** Addthis Settings **/
|
49 |
private $_options;
|
50 |
|
51 |
private $addThisConfigs;
|
52 |
+
private $cmsConnector;
|
53 |
|
54 |
/**
|
55 |
* Initializes the plugin.
|
58 |
*
|
59 |
* @return null
|
60 |
* */
|
61 |
+
public function __construct($upgrade, $addThisConfigs, $cmsConnector)
|
62 |
{
|
63 |
$this->addThisConfigs = $addThisConfigs;
|
64 |
+
$this->cmsConnector = $cmsConnector;
|
65 |
// Save async load settings via ajax request
|
66 |
add_action( 'wp_ajax_at_async_loading', array($this, 'addthisAsyncLoading'));
|
67 |
$this->_upgrade = $upgrade;
|
69 |
$this->_postVariables = $_POST;
|
70 |
$this->_options = $this->addThisConfigs->getConfigs();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
include_once 'addthis-toolbox.php';
|
73 |
+
new Addthis_ToolBox($addThisConfigs, $cmsConnector);
|
74 |
|
75 |
+
add_action('admin_menu', array($this, 'addToWordpressMenu'));
|
76 |
|
77 |
// Deactivation
|
78 |
register_deactivation_hook(
|
95 |
*/
|
96 |
public function addSettingsLink($links)
|
97 |
{
|
98 |
+
$settingsLink = '<a href="'.$this->cmsConnector->getSettingsPageUrl().'">Settings</a>';
|
99 |
array_push($links, $settingsLink);
|
100 |
return $links;
|
101 |
}
|
117 |
*
|
118 |
* @return null
|
119 |
*/
|
120 |
+
public function addToWordpressMenu()
|
121 |
{
|
122 |
+
$htmlGeneratingFunction = array($this, 'addthisWordpressOptions');
|
123 |
+
$this->cmsConnector->addSettingsPage($htmlGeneratingFunction);
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
/**
|
130 |
*/
|
131 |
public function addthisWordpressOptions()
|
132 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
$updateResult = null;
|
134 |
|
135 |
if ($this->_checkAddPubid()) {
|
136 |
$updateResult = $this->updateSettings($this->_postVariables);
|
137 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
echo $this->_getHTML($updateResult);
|
139 |
}
|
140 |
|
166 |
}
|
167 |
$this->_options = $this->addThisConfigs->saveConfigs($this->_options);
|
168 |
|
|
|
|
|
169 |
return "<div class='addthis_updated wrap' style='margin-top:50px;width:95%'>".
|
170 |
"AddThis Profile Settings updated successfully!!!".
|
171 |
"</div>";
|
172 |
}
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
/**
|
175 |
* Get referer url
|
176 |
*
|
267 |
$html = '
|
268 |
<div class="wrap">
|
269 |
<form
|
270 |
+
id="addthis-settings"
|
271 |
method="post"
|
272 |
+
action="'.$this->cmsConnector->getSettingsPageUrl().'"
|
273 |
>
|
274 |
<div class="Header">
|
275 |
<h1><em>AddThis</em> Sharing Buttons</h1>';
|
279 |
|
280 |
$html .= '</div>';
|
281 |
|
282 |
+
if ($this->_upgrade && !$this->addThisConfigs->getProfileId()) {
|
283 |
$html .= $this->_getupdateSuccessMessage();
|
284 |
}
|
285 |
|
351 |
$pubIdCardTitle = 'Setup AddThis Tools';
|
352 |
$pubIdButtonText = "Configure AddThis Tools";
|
353 |
|
354 |
+
if (!$this->addThisConfigs->getProfileId()) {
|
355 |
// if they don't have a profile yet, default to setup
|
356 |
$tabOrder = array(
|
357 |
'tabs-1' => 'Setup',
|
388 |
' . $tabsHtml . '
|
389 |
</ul>
|
390 |
<div id="tabs-1">
|
391 |
+
<div class="Card" id="Card-side-sharing">
|
392 |
<div>
|
393 |
<h3 class="Card-hd-title">
|
394 |
' . $sharingToolsCardTitle . '
|
421 |
return $html;
|
422 |
}
|
423 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
/**
|
425 |
* Get the wp domain
|
426 |
*
|
452 |
{
|
453 |
global $addthis_addjs;
|
454 |
global $addThisConfigs;
|
455 |
+
global $cmsConnector;
|
456 |
|
457 |
if (!isset($addthis_addjs)) {
|
458 |
include 'includes/addthis_addjs_new.php';
|
459 |
+
$addthis_addjs = new AddThis_addjs($addThisConfigs, $cmsConnector);
|
460 |
}
|
461 |
}
|
addthis-toolbox.php
CHANGED
@@ -47,12 +47,17 @@ class Addthis_ToolBox
|
|
47 |
const AT_CONTENT_ABOVE_POST = "at-above-post-recommended";
|
48 |
const AT_CONTENT_ABOVE_CAT_PAGE = "at-above-post-cat-page-recommended";
|
49 |
const AT_CONTENT_ABOVE_ARCH_PAGE = "at-above-post-arch-page-recommended";
|
|
|
|
|
50 |
|
51 |
/**
|
52 |
* Initializes the widget class.
|
53 |
* */
|
54 |
-
public function __construct()
|
55 |
{
|
|
|
|
|
|
|
56 |
add_filter('the_content', array($this, 'addWidget'));
|
57 |
if ( has_excerpt()) {
|
58 |
add_filter('the_excerpt', array($this, 'addWidget'));
|
@@ -68,7 +73,7 @@ class Addthis_ToolBox
|
|
68 |
*/
|
69 |
public function addWidget($content)
|
70 |
{
|
71 |
-
if (
|
72 |
global $post;
|
73 |
$postid = $post->ID;
|
74 |
$at_flag = get_post_meta( $postid, '_at_widget', TRUE );
|
@@ -130,11 +135,11 @@ class Addthis_ToolBox
|
|
130 |
$title = get_the_title();
|
131 |
$url = get_permalink();
|
132 |
if($inline_data == true){
|
133 |
-
return "<div class='".$class." addthis_default_style
|
134 |
" data-title='".$title."' data-url='".$url."'>".
|
135 |
"</div>";
|
136 |
} else {
|
137 |
-
return "<div class='".$class." addthis_default_style
|
138 |
}
|
139 |
}
|
140 |
|
@@ -146,7 +151,7 @@ class Addthis_ToolBox
|
|
146 |
public static function getUserTools()
|
147 |
{
|
148 |
$curl = curl_init();
|
149 |
-
$url = AT_API_URL . '?pub='.
|
150 |
$url .= '&dp=' . Addthis_Wordpress::getDomain();
|
151 |
|
152 |
curl_setopt($curl, CURLOPT_URL, $url);
|
47 |
const AT_CONTENT_ABOVE_POST = "at-above-post-recommended";
|
48 |
const AT_CONTENT_ABOVE_CAT_PAGE = "at-above-post-cat-page-recommended";
|
49 |
const AT_CONTENT_ABOVE_ARCH_PAGE = "at-above-post-arch-page-recommended";
|
50 |
+
protected $addThisConfigs;
|
51 |
+
protected $cmsConnector;
|
52 |
|
53 |
/**
|
54 |
* Initializes the widget class.
|
55 |
* */
|
56 |
+
public function __construct($addThisConfigs, $cmsConnector)
|
57 |
{
|
58 |
+
$this->addThisConfigs = $addThisConfigs;
|
59 |
+
$this->cmsConnector = $cmsConnector;
|
60 |
+
|
61 |
add_filter('the_content', array($this, 'addWidget'));
|
62 |
if ( has_excerpt()) {
|
63 |
add_filter('the_excerpt', array($this, 'addWidget'));
|
73 |
*/
|
74 |
public function addWidget($content)
|
75 |
{
|
76 |
+
if ($this->addThisConfigs->getProfileId() && !is_404() && !is_feed()) {
|
77 |
global $post;
|
78 |
$postid = $post->ID;
|
79 |
$at_flag = get_post_meta( $postid, '_at_widget', TRUE );
|
135 |
$title = get_the_title();
|
136 |
$url = get_permalink();
|
137 |
if($inline_data == true){
|
138 |
+
return "<div class='".$class." addthis_default_style addthis_toolbox at-wordpress-hide'".
|
139 |
" data-title='".$title."' data-url='".$url."'>".
|
140 |
"</div>";
|
141 |
} else {
|
142 |
+
return "<div class='".$class." addthis_default_style addthis_toolbox at-wordpress-hide'></div>";
|
143 |
}
|
144 |
}
|
145 |
|
151 |
public static function getUserTools()
|
152 |
{
|
153 |
$curl = curl_init();
|
154 |
+
$url = AT_API_URL . '?pub='. $this->addThisConfigs->getProfileId();
|
155 |
$url .= '&dp=' . Addthis_Wordpress::getDomain();
|
156 |
|
157 |
curl_setopt($curl, CURLOPT_URL, $url);
|
addthis_settings_functions.php
CHANGED
@@ -114,6 +114,8 @@ function addthis_kses($string, $customstyles)
|
|
114 |
*/
|
115 |
function _addthis_version_notification($atversion_update_status, $atversion)
|
116 |
{
|
|
|
|
|
117 |
//Fresh install Scenario. ie., atversion = 300 without reverting back.
|
118 |
if($atversion_update_status == ADDTHIS_ATVERSION_AUTO_UPDATE && $atversion >= ADDTHIS_ATVERSION) {
|
119 |
return;
|
@@ -136,7 +138,7 @@ function _addthis_version_notification($atversion_update_status, $atversion)
|
|
136 |
<div class="addthis-notification addthis-warning-message">
|
137 |
<div style="float:left">Update AddThis to activate new features that will make sharing even easier.</div>
|
138 |
<div style="float:right">
|
139 |
-
<a href="#" class="addthis-update-atversion"><img src="<?php echo
|
140 |
</div>
|
141 |
</div>
|
142 |
<?php
|
@@ -164,6 +166,8 @@ function _addthis_swap_first_two_elements (&$array, $key)
|
|
164 |
function _addthis_choose_icons($name, $options)
|
165 |
{
|
166 |
global $addThisConfigs;
|
|
|
|
|
167 |
$addthis_new_styles = _get_style_options();
|
168 |
$addthis_default_options = $addThisConfigs->getConfigs();
|
169 |
|
@@ -223,7 +227,9 @@ function _addthis_swap_first_two_elements (&$array, $key)
|
|
223 |
/>
|
224 |
</span>
|
225 |
<label for='{$k}_{$name}'>
|
226 |
-
<
|
|
|
|
|
227 |
</label>
|
228 |
</div>";
|
229 |
}
|
@@ -245,10 +251,14 @@ function _addthis_swap_first_two_elements (&$array, $key)
|
|
245 |
id='$name"."_custom_string'
|
246 |
/>
|
247 |
</span>
|
248 |
-
<label for='{$name}_custom_string'>
|
|
|
|
|
|
|
|
|
249 |
</div>";
|
250 |
_e( sprintf("<div style='max-width: 555px;margin-left:20px' class='%s_custom_string_input'> This text box allows you to enter any AddThis markup that you wish. To see examples of what you can do, visit <a href='https://www.addthis.com/get/sharing'>AddThis.com Sharing Tools</a> and select any sharing tool. You can also check out our <a href='http://support.addthis.com/customer/portal/articles/1365467-preferred-services-personalization'>Client API</a>. For any help you may need, please visit <a href='http://support.addthis.com'>AddThis Support</a></div>", $name ),'addthis_trans_domain');
|
251 |
-
echo "<textarea
|
252 |
|
253 |
$class = 'hidden';
|
254 |
$checked = '';
|
@@ -332,17 +342,23 @@ function _addthis_print_template_checkboxes($type) {
|
|
332 |
$checked = 'checked="checked"';
|
333 |
}
|
334 |
|
335 |
-
$listItemStart = "
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
|
347 |
echo $listItemStart;
|
348 |
_e($displayName, 'addthis_trans_domain');
|
@@ -369,12 +385,23 @@ function _addthis_print_services_picker($name, $options) {
|
|
369 |
each user based on their location and activity across the web.</p>
|
370 |
<div class="above_option select_row">
|
371 |
<span class="radio mt4">
|
372 |
-
<input
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
</span>
|
374 |
</div>
|
375 |
<div class="above_option select_row">
|
376 |
-
<span class="radio mt4">
|
377 |
-
<input type="radio" name="addthis_settings[<?php echo $name;?>_sharing]" id="<?php echo $name;?>-disable-smart-sharing" <?php $sharing_key = $name.'_sharing';echo ( $options[$sharing_key] == $name."-disable-smart-sharing" ? 'checked="checked"' : ''); ?> value="<?php echo $name;?>-disable-smart-sharing">
|
|
|
378 |
</span>
|
379 |
</div>
|
380 |
|
@@ -501,52 +528,4 @@ function _addthis_excerpt_buttons_enabled() {
|
|
501 |
$addthis_below_showon_excerpts = _addthis_excerpt_buttons_enabled_below();
|
502 |
$enabled = (boolean)($addthis_above_showon_excerpts || $addthis_below_showon_excerpts);
|
503 |
return $enabled;
|
504 |
-
}
|
505 |
-
|
506 |
-
/**
|
507 |
-
* the folder name for the AddThis plugin - OMG why is this hard coded?!?
|
508 |
-
* @return string
|
509 |
-
*/
|
510 |
-
function _addthis_plugin_folder(){
|
511 |
-
return 'addthis';
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* gives you the base URL for our plugin
|
516 |
-
* @return string
|
517 |
-
*/
|
518 |
-
function _addthis_plugin_base_url(){
|
519 |
-
$url = apply_filters(
|
520 |
-
'addthis_files_uri',
|
521 |
-
plugins_url('' , basename(dirname(__FILE__)))
|
522 |
-
);
|
523 |
-
$url .= '/' . _addthis_plugin_folder();
|
524 |
-
return $url;
|
525 |
-
}
|
526 |
-
|
527 |
-
/**
|
528 |
-
* gives you the base URL for our plugin's images
|
529 |
-
* @return string
|
530 |
-
*/
|
531 |
-
function _addthis_image_location_base(){
|
532 |
-
$url = _addthis_plugin_base_url() . '/img/';
|
533 |
-
return $url;
|
534 |
-
}
|
535 |
-
|
536 |
-
/**
|
537 |
-
* gives you the base URL for our plugin's JavaScript
|
538 |
-
* @return string
|
539 |
-
*/
|
540 |
-
function _addthis_js_location_base(){
|
541 |
-
$url = _addthis_plugin_base_url() . '/js/';
|
542 |
-
return $url;
|
543 |
-
}
|
544 |
-
|
545 |
-
/**
|
546 |
-
* gives you the base URL for our plugin's JavaScript
|
547 |
-
* @return string
|
548 |
-
*/
|
549 |
-
function _addthis_css_location_base(){
|
550 |
-
$url = _addthis_plugin_base_url() . '/css/';
|
551 |
-
return $url;
|
552 |
-
}
|
114 |
*/
|
115 |
function _addthis_version_notification($atversion_update_status, $atversion)
|
116 |
{
|
117 |
+
global $cmsConnector;
|
118 |
+
|
119 |
//Fresh install Scenario. ie., atversion = 300 without reverting back.
|
120 |
if($atversion_update_status == ADDTHIS_ATVERSION_AUTO_UPDATE && $atversion >= ADDTHIS_ATVERSION) {
|
121 |
return;
|
138 |
<div class="addthis-notification addthis-warning-message">
|
139 |
<div style="float:left">Update AddThis to activate new features that will make sharing even easier.</div>
|
140 |
<div style="float:right">
|
141 |
+
<a href="#" class="addthis-update-atversion"><img alt="update" src="<?php echo $cmsConnector->getPluginImageFolderUrl() . 'update.png';?>" /></a>
|
142 |
</div>
|
143 |
</div>
|
144 |
<?php
|
166 |
function _addthis_choose_icons($name, $options)
|
167 |
{
|
168 |
global $addThisConfigs;
|
169 |
+
global $cmsConnector;
|
170 |
+
|
171 |
$addthis_new_styles = _get_style_options();
|
172 |
$addthis_default_options = $addThisConfigs->getConfigs();
|
173 |
|
227 |
/>
|
228 |
</span>
|
229 |
<label for='{$k}_{$name}'>
|
230 |
+
<span class=\"addthis-checkbox-label\">
|
231 |
+
<img alt='".$k."' src='". $cmsConnector->getPluginImageFolderUrl() . $v['img'] ."' />
|
232 |
+
</span>
|
233 |
</label>
|
234 |
</div>";
|
235 |
}
|
251 |
id='$name"."_custom_string'
|
252 |
/>
|
253 |
</span>
|
254 |
+
<label for='{$name}_custom_string'>
|
255 |
+
<span class=\"addthis-checkbox-label\">
|
256 |
+
Advanced API button configuration
|
257 |
+
</span>
|
258 |
+
</label>
|
259 |
</div>";
|
260 |
_e( sprintf("<div style='max-width: 555px;margin-left:20px' class='%s_custom_string_input'> This text box allows you to enter any AddThis markup that you wish. To see examples of what you can do, visit <a href='https://www.addthis.com/get/sharing'>AddThis.com Sharing Tools</a> and select any sharing tool. You can also check out our <a href='http://support.addthis.com/customer/portal/articles/1365467-preferred-services-personalization'>Client API</a>. For any help you may need, please visit <a href='http://support.addthis.com'>AddThis Support</a></div>", $name ),'addthis_trans_domain');
|
261 |
+
echo "<textarea rows='5' name='addthis_settings[$name"."_custom_string]' class='$name"."_custom_string_input' />".esc_textarea($custom_string)."</textarea>";
|
262 |
|
263 |
$class = 'hidden';
|
264 |
$checked = '';
|
342 |
$checked = 'checked="checked"';
|
343 |
}
|
344 |
|
345 |
+
$listItemStart = "
|
346 |
+
<li>
|
347 |
+
<input
|
348 |
+
type=\"checkbox\"
|
349 |
+
id=\"$fieldName\"
|
350 |
+
name=\"addthis_settings[$fieldName]\"
|
351 |
+
value=\"true\" $checked
|
352 |
+
/>
|
353 |
+
<label for=\"$fieldName\">
|
354 |
+
<span class=\"addthis-checkbox-label\">
|
355 |
+
";
|
356 |
+
|
357 |
+
$listItemEnd = "
|
358 |
+
</span>
|
359 |
+
</label>
|
360 |
+
<span class=\"at-wp-tooltip\" tooltip=\"$explanation\">?</span>
|
361 |
+
</li>\n";
|
362 |
|
363 |
echo $listItemStart;
|
364 |
_e($displayName, 'addthis_trans_domain');
|
385 |
each user based on their location and activity across the web.</p>
|
386 |
<div class="above_option select_row">
|
387 |
<span class="radio mt4">
|
388 |
+
<input
|
389 |
+
type="radio"
|
390 |
+
checked="checked"
|
391 |
+
name="addthis_settings[<?php echo $name;?>_sharing]"
|
392 |
+
id="<?php echo $name;?>-enable-smart-sharing"
|
393 |
+
value="<?php echo $name;?>-enable-smart-sharing"
|
394 |
+
/>
|
395 |
+
<span class="addthis-checkbox-label">
|
396 |
+
<strong>Auto Personalization</strong>
|
397 |
+
<span> (recommended)</span>
|
398 |
+
</span>
|
399 |
</span>
|
400 |
</div>
|
401 |
<div class="above_option select_row">
|
402 |
+
<span class="radio mt4 addthis-checkbox-label">
|
403 |
+
<input type="radio" name="addthis_settings[<?php echo $name;?>_sharing]" id="<?php echo $name;?>-disable-smart-sharing" <?php $sharing_key = $name.'_sharing';echo ( $options[$sharing_key] == $name."-disable-smart-sharing" ? 'checked="checked"' : ''); ?> value="<?php echo $name;?>-disable-smart-sharing">
|
404 |
+
<strong>Select Your Own</strong>
|
405 |
</span>
|
406 |
</div>
|
407 |
|
528 |
$addthis_below_showon_excerpts = _addthis_excerpt_buttons_enabled_below();
|
529 |
$enabled = (boolean)($addthis_above_showon_excerpts || $addthis_below_showon_excerpts);
|
530 |
return $enabled;
|
531 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addthis_sidebar_widget.php
CHANGED
@@ -86,6 +86,8 @@ class AddThisSidebarWidget extends WP_Widget {
|
|
86 |
*/
|
87 |
function form($instance)
|
88 |
{
|
|
|
|
|
89 |
if (empty($instance)) {
|
90 |
$instance = array('style'=> '' , 'title' => '');
|
91 |
}
|
@@ -133,7 +135,7 @@ class AddThisSidebarWidget extends WP_Widget {
|
|
133 |
<img
|
134 |
align="middle"
|
135 |
style="padding:5px 0"
|
136 |
-
src="'.
|
137 |
/>
|
138 |
</div>';
|
139 |
}
|
86 |
*/
|
87 |
function form($instance)
|
88 |
{
|
89 |
+
global $cmsConnector;
|
90 |
+
|
91 |
if (empty($instance)) {
|
92 |
$instance = array('style'=> '' , 'title' => '');
|
93 |
}
|
135 |
<img
|
136 |
align="middle"
|
137 |
style="padding:5px 0"
|
138 |
+
src="'. $cmsConnector->getPluginImageFolderUrl() . $v['img'] .'"
|
139 |
/>
|
140 |
</div>';
|
141 |
}
|
addthis_social_widget.php
CHANGED
@@ -53,6 +53,7 @@ require_once('addthis_settings_functions.php');
|
|
53 |
function pluginActivationNotice()
|
54 |
{
|
55 |
$run_once = get_option('addthis_run_once');
|
|
|
56 |
|
57 |
if (!$run_once) {
|
58 |
wp_enqueue_style(
|
@@ -64,7 +65,7 @@ function pluginActivationNotice()
|
|
64 |
'Congrats! You\'ve Installed AddThis Sharing Buttons'.
|
65 |
'</span>';
|
66 |
$html .= '<span><a class="addthis_configure" href="'
|
67 |
-
.
|
68 |
'">Configure it now</a> >></span>';
|
69 |
$html .= '</div><!-- /.updated -->';
|
70 |
echo '<style>div#message.updated{ display: none; }</style>';
|
@@ -101,19 +102,21 @@ if ( isset($_POST['addthis_plugin_controls'])
|
|
101 |
|
102 |
add_action('wp_head', 'addthis_minimal_css');
|
103 |
function addthis_minimal_css() {
|
104 |
-
|
|
|
105 |
}
|
106 |
|
107 |
if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
108 |
require_once 'addthis-for-wordpress.php';
|
109 |
-
new Addthis_Wordpress(isset($upgraded), $addThisConfigs);
|
110 |
} else {
|
111 |
|
112 |
// Show old version of the plugin till upgrade button is clicked
|
113 |
|
114 |
// Add settings link on plugin page
|
115 |
function your_plugin_settings_link($links) {
|
116 |
-
$
|
|
|
117 |
array_push($links, $settings_link);
|
118 |
return $links;
|
119 |
}
|
@@ -128,9 +131,10 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
128 |
function addthis_early(){
|
129 |
global $addthis_addjs;
|
130 |
global $addThisConfigs;
|
|
|
131 |
if (!isset($addthis_addjs)){
|
132 |
require('includes/addthis_addjs_new.php');
|
133 |
-
$addthis_addjs = new AddThis_addjs($addThisConfigs);
|
134 |
}
|
135 |
}
|
136 |
|
@@ -395,12 +399,6 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
395 |
|
396 |
define('ADDTHIS_FALLBACK_USERNAME', 'wp-'.cuid() );
|
397 |
|
398 |
-
/**
|
399 |
-
* Returns major.minor WordPress version.
|
400 |
-
*/
|
401 |
-
function addthis_get_wp_version() {
|
402 |
-
return (float)substr(get_bloginfo('version'),0,3);
|
403 |
-
}
|
404 |
|
405 |
/**
|
406 |
* For templates, we need a wrapper for printing out the code on demand.
|
@@ -544,6 +542,7 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
544 |
function addthis_admin_notices(){
|
545 |
if (! current_user_can('manage_options') ||( defined('ADDTHIS_NO_NOTICES') && ADDTHIS_NO_NOTICES == true ) )
|
546 |
return;
|
|
|
547 |
|
548 |
global $current_user ;
|
549 |
$user_id = $current_user->ID;
|
@@ -552,13 +551,13 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
552 |
if (!$options && ! get_user_meta($user_id, 'addthis_ignore_notices')) {
|
553 |
echo '<div class="updated addthis_setup_nag"><p>';
|
554 |
printf(__('Configure the AddThis plugin to enable users to share your content around the web.<br /> <a href="%1$s">Configuration options</a> | <a href="%2$s" id="php_below_min_nag-no">Ignore this notice</a>'),
|
555 |
-
|
556 |
'?addthis_nag_ignore=0');
|
557 |
echo "</p></div>";
|
558 |
} elseif ((get_user_meta($user_id, 'addthis_nag_updated_options'))) {
|
559 |
echo '<div class="updated addthis_setup_nag"><p>';
|
560 |
printf( __('We have updated the options for the AddThis plugin. Check out the <a href="%1$s">AddThis settings page</a> to see the new styles and options.<br /> <a href="%1$s">See New Options</a> | <a href="%2$s">Ignore this notice</a>'),
|
561 |
-
|
562 |
'?addthis_nag_updated_ignore=0');
|
563 |
echo "</p></div>";
|
564 |
}
|
@@ -939,28 +938,23 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
939 |
function addthis_init()
|
940 |
{
|
941 |
global $addThisConfigs;
|
|
|
|
|
|
|
|
|
942 |
add_action('wp_head', 'addthis_add_content_filters');
|
943 |
|
944 |
-
if (
|
945 |
-
|
946 |
-
|
947 |
) {
|
948 |
-
|
949 |
-
add_action('admin_init', 'register_addthis_settings');
|
950 |
-
}
|
951 |
}
|
952 |
|
953 |
-
$options = $addThisConfigs->getConfigs();
|
954 |
-
$script_location = _addthis_js_location_base() . 'addthis.js' ;
|
955 |
-
$style_location = _addthis_css_location_base() . 'addthis.css' ;
|
956 |
-
|
957 |
-
wp_register_style('addthis', $style_location);
|
958 |
-
wp_register_script('addthis', $script_location, array('jquery-ui-tabs'));
|
959 |
-
|
960 |
add_action('admin_print_styles-index.php', 'addthis_print_style');
|
961 |
add_action('admin_print_scripts-index.php', 'addthis_print_script');
|
962 |
|
963 |
-
add_filter('admin_menu', '
|
964 |
|
965 |
if ( apply_filters( 'at_do_options_upgrades', '__return_true') || apply_filters( 'addthis_do_options_upgrades', '__return_true') )
|
966 |
{
|
@@ -1345,8 +1339,8 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
1345 |
."var addthis_product = '".ADDTHIS_PRODUCT_VERSION."';\n";
|
1346 |
|
1347 |
|
1348 |
-
$pub = $
|
1349 |
-
if (empty($
|
1350 |
$pub = 'wp-'.cuid();
|
1351 |
}
|
1352 |
$pub = urlencode($pub);
|
@@ -1537,6 +1531,7 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
1537 |
{
|
1538 |
addthis_set_addthis_settings();
|
1539 |
global $addthis_settings;
|
|
|
1540 |
|
1541 |
// add nothing to RSS feed or search results; control adding to static/archive/category pages
|
1542 |
if (!$onSidebar)
|
@@ -1553,8 +1548,8 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
1553 |
}
|
1554 |
}
|
1555 |
|
1556 |
-
$pub = $
|
1557 |
-
if (
|
1558 |
$pub = 'wp-'.cuid();
|
1559 |
}
|
1560 |
$pub = urlencode($pub);
|
@@ -1647,66 +1642,11 @@ EOF;
|
|
1647 |
EOF;
|
1648 |
}
|
1649 |
|
1650 |
-
function
|
1651 |
{
|
1652 |
-
$
|
1653 |
-
$
|
1654 |
-
|
1655 |
-
if ( addthis_get_wp_version() >= 3.2
|
1656 |
-
|| apply_filters('at_assume_latest', __return_false() )
|
1657 |
-
|| apply_filters('addthis_assume_latest', __return_false() )
|
1658 |
-
) {
|
1659 |
-
$optionsJsUrl = $jsRootUrl . 'options-page.32.js';
|
1660 |
-
} else {
|
1661 |
-
$optionsJsUrl = $jsRootUrl . 'options-page.js';
|
1662 |
-
}
|
1663 |
-
|
1664 |
-
wp_enqueue_script(
|
1665 |
-
'addthis_options_page_script',
|
1666 |
-
$optionsJsUrl,
|
1667 |
-
array('jquery-ui-tabs', 'thickbox')
|
1668 |
-
);
|
1669 |
-
wp_enqueue_script('addthis_core', $jsRootUrl . 'core-1.1.1.js');
|
1670 |
-
wp_enqueue_script('addthis_lr', $jsRootUrl . 'lr.js');
|
1671 |
-
wp_enqueue_script('addthis_qtip_script', $jsRootUrl . 'jquery.qtip.min.js');
|
1672 |
-
wp_enqueue_script('addthis_ui_script', $jsRootUrl . 'jqueryui.sortable.js');
|
1673 |
-
wp_enqueue_script('addthis_selectbox', $jsRootUrl . 'jquery.selectBoxIt.min.js');
|
1674 |
-
wp_enqueue_script('', $jsRootUrl . 'jquery.messagebox.js');
|
1675 |
-
wp_enqueue_script('', $jsRootUrl . 'jquery.atjax.js');
|
1676 |
-
wp_enqueue_script('addthis_lodash_script', $jsRootUrl . 'lodash-0.10.0.js');
|
1677 |
-
wp_enqueue_script('addthis_services_script', $jsRootUrl . 'gtc-sharing-personalize.js');
|
1678 |
-
wp_enqueue_script('addthis_service_script', $jsRootUrl . 'gtc.cover.js');
|
1679 |
-
wp_localize_script(
|
1680 |
-
'addthis_services_script',
|
1681 |
-
'addthis_params',
|
1682 |
-
array('img_base' => $imgRootUrl)
|
1683 |
-
);
|
1684 |
-
wp_localize_script(
|
1685 |
-
'addthis_options_page_script',
|
1686 |
-
'addthis_option_params',
|
1687 |
-
array('wp_ajax_url'=> admin_url('admin-ajax.php'),
|
1688 |
-
'addthis_validate_action' => 'validate_addthis_api_credentials',
|
1689 |
-
'img_base' => $imgRootUrl)
|
1690 |
-
);
|
1691 |
-
}
|
1692 |
-
|
1693 |
-
function addthis_options_page_style()
|
1694 |
-
{
|
1695 |
-
$cssRootUrl = _addthis_css_location_base();
|
1696 |
-
wp_enqueue_style('addthis_options_page_style', $cssRootUrl . 'options-page.css');
|
1697 |
-
wp_enqueue_style('addthis_general_style', $cssRootUrl . 'style.css');
|
1698 |
-
wp_enqueue_style('thickbox');
|
1699 |
-
wp_enqueue_style('addthis_services_style', $cssRootUrl . 'gtc.sharing-personalize.css');
|
1700 |
-
wp_enqueue_style('addthis_bootstrap_style', $cssRootUrl . 'bootstrap.css');
|
1701 |
-
wp_enqueue_style('addthis_widget', 'https://ct1.addthis.com/static/r07/widget114.css');
|
1702 |
-
wp_enqueue_style('addthis_widget_big', 'https://ct1.addthis.com/static/r07/widgetbig056.css');
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
function addthis_admin_menu()
|
1706 |
-
{
|
1707 |
-
$addthis = add_options_page('AddThis Plugin Options', 'AddThis Sharing Buttons', 'manage_options', basename(__FILE__), 'addthis_plugin_options_php4');
|
1708 |
-
add_action('admin_print_scripts-' . $addthis, 'addthis_options_page_scripts');
|
1709 |
-
add_action('admin_print_styles-' . $addthis, 'addthis_options_page_style');
|
1710 |
}
|
1711 |
|
1712 |
function addthis_plugin_options_php4() {
|
@@ -1714,6 +1654,7 @@ EOF;
|
|
1714 |
$user_id = $current_user->ID;
|
1715 |
global $addThisConfigs;
|
1716 |
$options = $addThisConfigs->getConfigs();
|
|
|
1717 |
|
1718 |
if (get_user_meta($user_id, 'addthis_nag_updated_options') )
|
1719 |
delete_user_meta($user_id, 'addthis_nag_updated_options', 'true');
|
@@ -1722,12 +1663,11 @@ EOF;
|
|
1722 |
<div class="wrap">
|
1723 |
<h2 class='placeholder'> </h2>
|
1724 |
|
1725 |
-
<form
|
1726 |
<?php
|
1727 |
// use the old-school settings style in older versions of wordpress
|
1728 |
-
if (
|
1729 |
-
||
|
1730 |
-
|| apply_filters('addthis_assume_latest', __return_false() )
|
1731 |
) {
|
1732 |
settings_fields('addthis');
|
1733 |
} else {
|
@@ -1766,6 +1706,8 @@ EOF;
|
|
1766 |
global $addthis_styles;
|
1767 |
global $addthis_languages;
|
1768 |
global $addThisConfigs;
|
|
|
|
|
1769 |
$options = $addThisConfigs->getConfigs();
|
1770 |
|
1771 |
$version_notification_content = _addthis_version_notification(
|
@@ -1810,7 +1752,7 @@ EOF;
|
|
1810 |
style="display:none;" <?php echo ( $options['addthis_above_enabled'] != false ? 'checked="checked"' : ''); ?>/>
|
1811 |
<div
|
1812 |
id="addthis_above_enabled_switch"
|
1813 |
-
class="switch <?php echo ( $options['addthis_above_enabled'] != false ? 'switchOn' : ''); ?>">
|
1814 |
</div>
|
1815 |
</div>
|
1816 |
<h3 class="Card-hd-title">Sharing Buttons Above Content</h3>
|
@@ -1844,7 +1786,7 @@ EOF;
|
|
1844 |
style="display:none;" <?php echo ( $options['addthis_below_enabled'] != false ? 'checked="checked"' : ''); ?>/>
|
1845 |
<div
|
1846 |
id="addthis_below_enabled_switch"
|
1847 |
-
class="switch <?php echo ( $options['addthis_below_enabled'] != false ? 'switchOn' : ''); ?>">
|
1848 |
</div>
|
1849 |
</div>
|
1850 |
<h3 class="Card-hd-title">Sharing Buttons Below Content</h3>
|
@@ -1877,7 +1819,7 @@ EOF;
|
|
1877 |
style="display:none;" <?php echo ( $options['addthis_sidebar_enabled'] != false ? 'checked="checked"' : ''); ?>/>
|
1878 |
<div
|
1879 |
id="addthis_sidebar_enabled_switch"
|
1880 |
-
class="switch <?php echo ( $options['addthis_sidebar_enabled'] != false ? 'switchOn' : ''); ?>">
|
1881 |
</div>
|
1882 |
</div>
|
1883 |
<h3 class="Card-hd-title">Sharing Sidebar</h3>
|
@@ -1890,23 +1832,26 @@ EOF;
|
|
1890 |
<div class="Card-bd">
|
1891 |
<div id="side-1">
|
1892 |
<p>These buttons will appear on the side of the page, along the edge.</p>
|
1893 |
-
<img src="<?php echo
|
1894 |
<ul>
|
1895 |
<li>
|
1896 |
-
<strong>Position</strong
|
1897 |
-
<label for="
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
<
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
|
|
|
|
|
|
1910 |
</li>
|
1911 |
</ul>
|
1912 |
</div>
|
@@ -1916,7 +1861,7 @@ EOF;
|
|
1916 |
<li>
|
1917 |
<label for="addthis_sidebar_count">
|
1918 |
<strong>Buttons</strong>
|
1919 |
-
<span class="at-wp-tooltip" tooltip="The number of social sharing buttons to show in the side sharing tool."
|
1920 |
</label>
|
1921 |
<select id="addthis_sidebar_count" name="addthis_settings[addthis_sidebar_count]">
|
1922 |
<?php
|
@@ -1929,7 +1874,7 @@ EOF;
|
|
1929 |
<li>
|
1930 |
<label for="addthis_sidebar_theme">
|
1931 |
<strong>Theme</strong>
|
1932 |
-
<span class="at-wp-tooltip" tooltip="You can select the background color that better matches the look of your site for the expand/minimize arrow on the side sharing tool."
|
1933 |
</label>
|
1934 |
<select id="addthis_sidebar_theme" name="addthis_settings[addthis_sidebar_theme]">
|
1935 |
<?php
|
@@ -1940,10 +1885,10 @@ EOF;
|
|
1940 |
?>
|
1941 |
</select>
|
1942 |
<br />
|
1943 |
-
<img src="<?php echo
|
1944 |
-
<img src="<?php echo
|
1945 |
-
<img src="<?php echo
|
1946 |
-
<img src="<?php echo
|
1947 |
</li>
|
1948 |
</ul>
|
1949 |
</div>
|
@@ -1969,9 +1914,12 @@ EOF;
|
|
1969 |
name="addthis_settings[addthis_append_data]"
|
1970 |
value="true" <?php echo $options['addthis_append_data'] == true ? 'checked="checked"' : ''; ?>/>
|
1971 |
<label for="addthis_append_data">
|
1972 |
-
<
|
|
|
|
|
|
|
1973 |
</label>
|
1974 |
-
<span class="at-wp-tooltip" tooltip="AddThis will use this to track how many people come back to your content via links shared with AddThis buttons. This data will be available to you at addthis.com."
|
1975 |
</li>
|
1976 |
<li>
|
1977 |
<input
|
@@ -1980,9 +1928,11 @@ EOF;
|
|
1980 |
name="addthis_settings[addthis_addressbar]"
|
1981 |
value="true" <?php echo ($options['addthis_addressbar'] == true ? 'checked="checked"' : ''); ?>/>
|
1982 |
<label for="addthis_addressbar">
|
1983 |
-
<
|
|
|
|
|
1984 |
</label>
|
1985 |
-
<span class="at-wp-tooltip" tooltip="AddThis will append a code to your site’s URLs (except for the homepage) to track when a visitor comes to your site from a link someone copied out of their browser's address bar."
|
1986 |
</li>
|
1987 |
<li>
|
1988 |
<input
|
@@ -1991,9 +1941,11 @@ EOF;
|
|
1991 |
name="addthis_settings[addthis_bitly]"
|
1992 |
value="true" <?php echo ($options['addthis_bitly'] == true ? 'checked="checked"' : ''); ?>/>
|
1993 |
<label for="addthis_bitly">
|
1994 |
-
<
|
|
|
|
|
1995 |
</label>
|
1996 |
-
<span class="at-wp-tooltip" tooltip="Your Bitly login and key will need to be setup with your profile on addthis.com before Bitly will begin working with WordPress."
|
1997 |
</li>
|
1998 |
</ul>
|
1999 |
</li>
|
@@ -2026,9 +1978,12 @@ EOF;
|
|
2026 |
name="addthis_settings[addthis_asynchronous_loading]"
|
2027 |
value="true" <?php echo ($options['addthis_asynchronous_loading'] == true ? 'checked="checked"' : ''); ?>/>
|
2028 |
<label for="addthis_asynchronous_loading">
|
2029 |
-
<
|
|
|
|
|
|
|
2030 |
</label>
|
2031 |
-
<span class="at-wp-tooltip" tooltip="When checked, your site will load before AddThis sharing buttons are added. If unchecked, your site will not load until AddThis buttons (and AddThis JavaScript) have been loaded by your vistors."
|
2032 |
</li>
|
2033 |
<li>
|
2034 |
<input
|
@@ -2037,16 +1992,18 @@ EOF;
|
|
2037 |
name="addthis_settings[addthis_508]" v
|
2038 |
alue="true" <?php echo ($options['addthis_508'] == true ? 'checked="checked"' : ''); ?>/>
|
2039 |
<label for="addthis_508">
|
2040 |
-
<
|
|
|
|
|
2041 |
</label>
|
2042 |
-
<span class="at-wp-tooltip" tooltip="Also known as 508 compliance. If checked, clicking an AddThis sharing button will open a new window to a page that is keyboard navigable for people with disabilities."
|
2043 |
</li>
|
2044 |
</ul>
|
2045 |
</li>
|
2046 |
<li>
|
2047 |
<label id="addthis_twitter_template">
|
2048 |
<strong><?php _e("Twitter via", 'addthis_trans_domain' ); ?></strong>
|
2049 |
-
<span class="at-wp-tooltip" tooltip="When a visitor uses an AddThis button to send a tweet about your page, this will be used within Twitter to identify through whom they found your page. You would usually enter a twitter handle here. For example, Twitter could show a tweet came from jsmith via AddThis."
|
2050 |
</label>
|
2051 |
<input
|
2052 |
id="addthis_twitter_template"
|
@@ -2098,7 +2055,6 @@ EOF;
|
|
2098 |
<textarea
|
2099 |
id="addthis_config_json"
|
2100 |
rows='3'
|
2101 |
-
cols='60'
|
2102 |
type="text"
|
2103 |
name="addthis_settings[addthis_config_json]"
|
2104 |
id="addthis-config-json"/><?php echo $options['addthis_config_json']; ?></textarea>
|
@@ -2114,7 +2070,6 @@ EOF;
|
|
2114 |
<textarea
|
2115 |
id="addthis_share_json"
|
2116 |
rows='3'
|
2117 |
-
cols='60'
|
2118 |
type="text"
|
2119 |
name="addthis_settings[addthis_share_json]"
|
2120 |
id="addthis-share-json"/><?php echo $options['addthis_share_json']; ?></textarea>
|
@@ -2226,10 +2181,9 @@ EOF;
|
|
2226 |
function at_share_is_pro_user() {
|
2227 |
global $addThisConfigs;
|
2228 |
$isPro = false;
|
2229 |
-
$options = $addThisConfigs->getConfigs();
|
2230 |
|
2231 |
-
if (
|
2232 |
-
$request = wp_remote_get( "http://q.addthis.com/feeds/1.0/config.json?pubid=" . $
|
2233 |
$server_output = wp_remote_retrieve_body( $request );
|
2234 |
$array = json_decode($server_output);
|
2235 |
// check for pro user
|
@@ -2257,6 +2211,7 @@ EOF;
|
|
2257 |
|
2258 |
function _addthis_profile_setup_url() {
|
2259 |
$pubName = get_bloginfo('name');
|
|
|
2260 |
|
2261 |
if (!preg_match('/^[A-Za-z0-9 _\-\(\)]*$/', $pubName)) {
|
2262 |
// if title not match, get domain
|
@@ -2289,7 +2244,7 @@ function _addthis_profile_setup_url() {
|
|
2289 |
. str_replace(
|
2290 |
'.',
|
2291 |
'%2E',
|
2292 |
-
urlencode(
|
2293 |
);
|
2294 |
|
2295 |
return $profileSetupUrl;
|
@@ -2297,15 +2252,14 @@ function _addthis_profile_setup_url() {
|
|
2297 |
|
2298 |
function _addthis_analytics_url() {
|
2299 |
global $addThisConfigs;
|
2300 |
-
$
|
2301 |
-
$analyticsUrl = 'https://www.addthis.com/dashboard#analytics/' . $addthis_options['addthis_profile'];
|
2302 |
return $analyticsUrl;
|
2303 |
}
|
2304 |
|
2305 |
function _addthis_tools_url() {
|
2306 |
global $addThisConfigs;
|
2307 |
$addthis_options = $addThisConfigs->getConfigs();
|
2308 |
-
$toolsUrl = 'https://www.addthis.com/settings/plugin-pubs?cms=wp&pubid=' . $
|
2309 |
return $toolsUrl;
|
2310 |
}
|
2311 |
|
@@ -2333,13 +2287,12 @@ function _addthis_profile_id_card($credential_validation_status = false) {
|
|
2333 |
$security = wp_nonce_field('update_' . $fieldName, $fieldName . '_nonce');
|
2334 |
}
|
2335 |
|
2336 |
-
if (
|
2337 |
$description = $noPubIdDescription;
|
2338 |
$buttonUrl = _addthis_profile_setup_url();
|
2339 |
$buttonText = $noPubIdButtonText;
|
2340 |
$alternatePath = '<p>Alternately, you can input your profile id manually below.</p>';
|
2341 |
$target = '';
|
2342 |
-
|
2343 |
} else {
|
2344 |
$description = $pubIdDescription;
|
2345 |
$buttonUrl = _addthis_analytics_url();
|
@@ -2374,7 +2327,7 @@ function _addthis_profile_id_card($credential_validation_status = false) {
|
|
2374 |
id="' . $fieldId . '"
|
2375 |
type="text"
|
2376 |
name="' . $fieldName . '"
|
2377 |
-
value="' . $
|
2378 |
autofill="off"
|
2379 |
autocomplete="off"
|
2380 |
/>
|
@@ -2586,7 +2539,7 @@ function _addthis_mode_card() {
|
|
2586 |
<th role="columnheader" scope="col">
|
2587 |
<input type="radio" id="addthis-option" name="' . $fieldName . '" value="AddThis"' . $addThisChecked . '/>
|
2588 |
<label for="addthis-option">
|
2589 |
-
<strong>AddThis.com
|
2590 |
</label>
|
2591 |
</th>
|
2592 |
</thead>
|
@@ -2601,11 +2554,10 @@ function _addthis_mode_card() {
|
|
2601 |
|
2602 |
function _addthis_is_csr_form() {
|
2603 |
global $addThisConfigs;
|
2604 |
-
$options = $addThisConfigs->getConfigs();
|
2605 |
|
2606 |
if ( isset($_GET['complete'], $_GET['pubid'])
|
2607 |
&& $_GET['complete'] == 'true'
|
2608 |
-
&& $_GET['pubid'] != $
|
2609 |
) {
|
2610 |
return true;
|
2611 |
}
|
@@ -2664,77 +2616,88 @@ function _addthis_settings_buttons($includePreview = true) {
|
|
2664 |
*/
|
2665 |
function addthis_profile_id_csr_confirmation($fieldName = 'addthis_settings[addthis_profile]')
|
2666 |
{
|
2667 |
-
|
2668 |
-
|
2669 |
-
<div>
|
2670 |
-
Here you can manually set your AddThis Profile ID - you can get this from your
|
2671 |
-
<a target="_blank" href="https://www.addthis.com/settings/publisher">
|
2672 |
-
Profile Settings
|
2673 |
-
</a>
|
2674 |
-
</div>';
|
2675 |
-
} else {
|
2676 |
-
$html = '
|
2677 |
-
<h2>You\'re almost done!</h2>
|
2678 |
-
<div>
|
2679 |
-
It\'s time to connect your AddThis account with Wordpress.
|
2680 |
-
</div>';
|
2681 |
-
}
|
2682 |
-
$html .= '
|
2683 |
-
<form id="addthis-form" method="post" action="'.admin_url("options-general.php?page=addthis_social_widget").'">
|
2684 |
-
<div class="addthis_pub_id">
|
2685 |
-
<div class="icons wp_div">
|
2686 |
-
<img src="'.plugins_url('images/wordpress.png', __FILE__).'">
|
2687 |
-
<span>Your WordPress Site:</span>
|
2688 |
-
<input
|
2689 |
-
type="text"
|
2690 |
-
value="' . get_bloginfo('name') . '"
|
2691 |
-
name="pub_id"
|
2692 |
-
readonly=true
|
2693 |
-
onfocus="this.blur()"/>
|
2694 |
-
</div>
|
2695 |
-
<div class="icons arrow_div">
|
2696 |
-
<img src="'.plugins_url('images/arrow_right.png', __FILE__).'">
|
2697 |
-
<img src="'.plugins_url('images/arrow_left.png', __FILE__).'">
|
2698 |
-
</div>
|
2699 |
-
<div class="icons addthis_div">
|
2700 |
-
<img src="'.plugins_url('images/addthis.png', __FILE__).'">
|
2701 |
-
<span>AddThis Profile ID:</span>';
|
2702 |
-
|
2703 |
if (isset($_GET['pubid'])) {
|
2704 |
$pubId = $_GET['pubid'];
|
2705 |
} else {
|
2706 |
-
$pubId = $
|
2707 |
}
|
2708 |
|
2709 |
-
$html .= '
|
2710 |
-
<input
|
2711 |
-
type="text"
|
2712 |
-
value="'.$pubId.'"
|
2713 |
-
name="'.$fieldName.'"
|
2714 |
-
id="addthis_profile" >
|
2715 |
-
<input
|
2716 |
-
type="hidden"
|
2717 |
-
value="true"
|
2718 |
-
name="addthis_settings[addthis_csr_confirmation]"
|
2719 |
-
</div>
|
2720 |
-
</div>';
|
2721 |
-
|
2722 |
$submitButtonValue = "Confirm and Save Changes";
|
2723 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2724 |
$html .= '
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2738 |
|
2739 |
-
|
2740 |
-
|
53 |
function pluginActivationNotice()
|
54 |
{
|
55 |
$run_once = get_option('addthis_run_once');
|
56 |
+
global $cmsConnector;
|
57 |
|
58 |
if (!$run_once) {
|
59 |
wp_enqueue_style(
|
65 |
'Congrats! You\'ve Installed AddThis Sharing Buttons'.
|
66 |
'</span>';
|
67 |
$html .= '<span><a class="addthis_configure" href="'
|
68 |
+
. $cmsConnector->getSettingsPageUrl() .
|
69 |
'">Configure it now</a> >></span>';
|
70 |
$html .= '</div><!-- /.updated -->';
|
71 |
echo '<style>div#message.updated{ display: none; }</style>';
|
102 |
|
103 |
add_action('wp_head', 'addthis_minimal_css');
|
104 |
function addthis_minimal_css() {
|
105 |
+
global $cmsConnector;
|
106 |
+
wp_enqueue_style( 'addthis_output', $cmsConnector->getPluginCssFolderUrl() . 'output.css' );
|
107 |
}
|
108 |
|
109 |
if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
110 |
require_once 'addthis-for-wordpress.php';
|
111 |
+
new Addthis_Wordpress(isset($upgraded), $addThisConfigs, $cmsConnector);
|
112 |
} else {
|
113 |
|
114 |
// Show old version of the plugin till upgrade button is clicked
|
115 |
|
116 |
// Add settings link on plugin page
|
117 |
function your_plugin_settings_link($links) {
|
118 |
+
global $cmsConnector;
|
119 |
+
$settings_link = '<a href="'.$cmsConnector->getSettingsPageUrl().'">Settings</a>';
|
120 |
array_push($links, $settings_link);
|
121 |
return $links;
|
122 |
}
|
131 |
function addthis_early(){
|
132 |
global $addthis_addjs;
|
133 |
global $addThisConfigs;
|
134 |
+
global $cmsConnector;
|
135 |
if (!isset($addthis_addjs)){
|
136 |
require('includes/addthis_addjs_new.php');
|
137 |
+
$addthis_addjs = new AddThis_addjs($addThisConfigs, $cmsConnector);
|
138 |
}
|
139 |
}
|
140 |
|
399 |
|
400 |
define('ADDTHIS_FALLBACK_USERNAME', 'wp-'.cuid() );
|
401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
|
403 |
/**
|
404 |
* For templates, we need a wrapper for printing out the code on demand.
|
542 |
function addthis_admin_notices(){
|
543 |
if (! current_user_can('manage_options') ||( defined('ADDTHIS_NO_NOTICES') && ADDTHIS_NO_NOTICES == true ) )
|
544 |
return;
|
545 |
+
global $cmsConnector;
|
546 |
|
547 |
global $current_user ;
|
548 |
$user_id = $current_user->ID;
|
551 |
if (!$options && ! get_user_meta($user_id, 'addthis_ignore_notices')) {
|
552 |
echo '<div class="updated addthis_setup_nag"><p>';
|
553 |
printf(__('Configure the AddThis plugin to enable users to share your content around the web.<br /> <a href="%1$s">Configuration options</a> | <a href="%2$s" id="php_below_min_nag-no">Ignore this notice</a>'),
|
554 |
+
$cmsConnector->getSettingsPageUrl(),
|
555 |
'?addthis_nag_ignore=0');
|
556 |
echo "</p></div>";
|
557 |
} elseif ((get_user_meta($user_id, 'addthis_nag_updated_options'))) {
|
558 |
echo '<div class="updated addthis_setup_nag"><p>';
|
559 |
printf( __('We have updated the options for the AddThis plugin. Check out the <a href="%1$s">AddThis settings page</a> to see the new styles and options.<br /> <a href="%1$s">See New Options</a> | <a href="%2$s">Ignore this notice</a>'),
|
560 |
+
$cmsConnector->getSettingsPageUrl(),
|
561 |
'?addthis_nag_updated_ignore=0');
|
562 |
echo "</p></div>";
|
563 |
}
|
938 |
function addthis_init()
|
939 |
{
|
940 |
global $addThisConfigs;
|
941 |
+
global $cmsConnector;
|
942 |
+
|
943 |
+
$options = $addThisConfigs->getConfigs();
|
944 |
+
|
945 |
add_action('wp_head', 'addthis_add_content_filters');
|
946 |
|
947 |
+
if ( ( $cmsConnector->getCmsMinorVersion() >= 2.7
|
948 |
+
|| $cmsConnector->assumeLatest())
|
949 |
+
&& is_admin()
|
950 |
) {
|
951 |
+
add_action('admin_init', 'register_addthis_settings');
|
|
|
|
|
952 |
}
|
953 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
954 |
add_action('admin_print_styles-index.php', 'addthis_print_style');
|
955 |
add_action('admin_print_scripts-index.php', 'addthis_print_script');
|
956 |
|
957 |
+
add_filter('admin_menu', 'addToWordpressMenu');
|
958 |
|
959 |
if ( apply_filters( 'at_do_options_upgrades', '__return_true') || apply_filters( 'addthis_do_options_upgrades', '__return_true') )
|
960 |
{
|
1339 |
."var addthis_product = '".ADDTHIS_PRODUCT_VERSION."';\n";
|
1340 |
|
1341 |
|
1342 |
+
$pub = $addThisConfigs->getProfileId();
|
1343 |
+
if (empty($pubid)) {
|
1344 |
$pub = 'wp-'.cuid();
|
1345 |
}
|
1346 |
$pub = urlencode($pub);
|
1531 |
{
|
1532 |
addthis_set_addthis_settings();
|
1533 |
global $addthis_settings;
|
1534 |
+
global $addThisConfigs;
|
1535 |
|
1536 |
// add nothing to RSS feed or search results; control adding to static/archive/category pages
|
1537 |
if (!$onSidebar)
|
1548 |
}
|
1549 |
}
|
1550 |
|
1551 |
+
$pub = $addThisConfigs->getProfileId();
|
1552 |
+
if (empty($pub)) {
|
1553 |
$pub = 'wp-'.cuid();
|
1554 |
}
|
1555 |
$pub = urlencode($pub);
|
1642 |
EOF;
|
1643 |
}
|
1644 |
|
1645 |
+
function addToWordpressMenu()
|
1646 |
{
|
1647 |
+
global $cmsConnector;
|
1648 |
+
$htmlGeneratingFunction = 'addthis_plugin_options_php4';
|
1649 |
+
$cmsConnector->addSettingsPage($htmlGeneratingFunction);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1650 |
}
|
1651 |
|
1652 |
function addthis_plugin_options_php4() {
|
1654 |
$user_id = $current_user->ID;
|
1655 |
global $addThisConfigs;
|
1656 |
$options = $addThisConfigs->getConfigs();
|
1657 |
+
global $cmsConnector;
|
1658 |
|
1659 |
if (get_user_meta($user_id, 'addthis_nag_updated_options') )
|
1660 |
delete_user_meta($user_id, 'addthis_nag_updated_options', 'true');
|
1663 |
<div class="wrap">
|
1664 |
<h2 class='placeholder'> </h2>
|
1665 |
|
1666 |
+
<form id="addthis-settings" method="post" action="options.php">
|
1667 |
<?php
|
1668 |
// use the old-school settings style in older versions of wordpress
|
1669 |
+
if ( $cmsConnector->getCmsMinorVersion() >= 2.7
|
1670 |
+
|| $cmsConnector->assumeLatest()
|
|
|
1671 |
) {
|
1672 |
settings_fields('addthis');
|
1673 |
} else {
|
1706 |
global $addthis_styles;
|
1707 |
global $addthis_languages;
|
1708 |
global $addThisConfigs;
|
1709 |
+
global $cmsConnector;
|
1710 |
+
|
1711 |
$options = $addThisConfigs->getConfigs();
|
1712 |
|
1713 |
$version_notification_content = _addthis_version_notification(
|
1752 |
style="display:none;" <?php echo ( $options['addthis_above_enabled'] != false ? 'checked="checked"' : ''); ?>/>
|
1753 |
<div
|
1754 |
id="addthis_above_enabled_switch"
|
1755 |
+
class="addthis-switch <?php echo ( $options['addthis_above_enabled'] != false ? 'addthis-switchOn' : ''); ?>">
|
1756 |
</div>
|
1757 |
</div>
|
1758 |
<h3 class="Card-hd-title">Sharing Buttons Above Content</h3>
|
1786 |
style="display:none;" <?php echo ( $options['addthis_below_enabled'] != false ? 'checked="checked"' : ''); ?>/>
|
1787 |
<div
|
1788 |
id="addthis_below_enabled_switch"
|
1789 |
+
class="addthis-switch <?php echo ( $options['addthis_below_enabled'] != false ? 'addthis-switchOn' : ''); ?>">
|
1790 |
</div>
|
1791 |
</div>
|
1792 |
<h3 class="Card-hd-title">Sharing Buttons Below Content</h3>
|
1819 |
style="display:none;" <?php echo ( $options['addthis_sidebar_enabled'] != false ? 'checked="checked"' : ''); ?>/>
|
1820 |
<div
|
1821 |
id="addthis_sidebar_enabled_switch"
|
1822 |
+
class="addthis-switch <?php echo ( $options['addthis_sidebar_enabled'] != false ? 'addthis-switchOn' : ''); ?>">
|
1823 |
</div>
|
1824 |
</div>
|
1825 |
<h3 class="Card-hd-title">Sharing Sidebar</h3>
|
1832 |
<div class="Card-bd">
|
1833 |
<div id="side-1">
|
1834 |
<p>These buttons will appear on the side of the page, along the edge.</p>
|
1835 |
+
<img src="<?php echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_light.png'; ?>" />
|
1836 |
<ul>
|
1837 |
<li>
|
1838 |
+
<strong>Position</strong>
|
1839 |
+
<label for="addthis_sidebar_position_left" class="addthis-sidebar-position-label">
|
1840 |
+
<input
|
1841 |
+
type="radio"
|
1842 |
+
id="addthis_sidebar_position_left"
|
1843 |
+
name="addthis_settings[addthis_sidebar_position]"
|
1844 |
+
value="left" <?php echo ( $options['addthis_sidebar_position'] == 'left' ? 'checked="checked"' : ''); ?>/>
|
1845 |
+
<span class="addthis-checkbox-label">Left</span>
|
1846 |
+
</label>
|
1847 |
+
<label for="addthis_sidebar_position_right" class="addthis-sidebar-position-label">
|
1848 |
+
<input
|
1849 |
+
type="radio"
|
1850 |
+
id="addthis_sidebar_position_right"
|
1851 |
+
name="addthis_settings[addthis_sidebar_position]"
|
1852 |
+
value="right" <?php echo ( $options['addthis_sidebar_position'] == 'right' ? 'checked="checked"' : ''); ?>/>
|
1853 |
+
<span class="addthis-checkbox-label">Right</span>
|
1854 |
+
</label>
|
1855 |
</li>
|
1856 |
</ul>
|
1857 |
</div>
|
1861 |
<li>
|
1862 |
<label for="addthis_sidebar_count">
|
1863 |
<strong>Buttons</strong>
|
1864 |
+
<span class="at-wp-tooltip" tooltip="The number of social sharing buttons to show in the side sharing tool.">?</span>
|
1865 |
</label>
|
1866 |
<select id="addthis_sidebar_count" name="addthis_settings[addthis_sidebar_count]">
|
1867 |
<?php
|
1874 |
<li>
|
1875 |
<label for="addthis_sidebar_theme">
|
1876 |
<strong>Theme</strong>
|
1877 |
+
<span class="at-wp-tooltip" tooltip="You can select the background color that better matches the look of your site for the expand/minimize arrow on the side sharing tool.">?</span>
|
1878 |
</label>
|
1879 |
<select id="addthis_sidebar_theme" name="addthis_settings[addthis_sidebar_theme]">
|
1880 |
<?php
|
1885 |
?>
|
1886 |
</select>
|
1887 |
<br />
|
1888 |
+
<img src="<?php echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_light.png'; ?>" id="sbpreview_Light"/>
|
1889 |
+
<img src="<?php echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_gray.png'; ?>" id="sbpreview_Gray"/>
|
1890 |
+
<img src="<?php echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_dark.png'; ?>" id="sbpreview_Dark"/>
|
1891 |
+
<img src="<?php echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_light.png'; ?>" id="sbpreview_Transparent"/>
|
1892 |
</li>
|
1893 |
</ul>
|
1894 |
</div>
|
1914 |
name="addthis_settings[addthis_append_data]"
|
1915 |
value="true" <?php echo $options['addthis_append_data'] == true ? 'checked="checked"' : ''; ?>/>
|
1916 |
<label for="addthis_append_data">
|
1917 |
+
<span class="addthis-checkbox-label">
|
1918 |
+
<strong><?php _e("Clickbacks", 'addthis_trans_domain' ); ?></strong>
|
1919 |
+
(Recommended)
|
1920 |
+
</span>
|
1921 |
</label>
|
1922 |
+
<span class="at-wp-tooltip" tooltip="AddThis will use this to track how many people come back to your content via links shared with AddThis buttons. This data will be available to you at addthis.com.">?</span>
|
1923 |
</li>
|
1924 |
<li>
|
1925 |
<input
|
1928 |
name="addthis_settings[addthis_addressbar]"
|
1929 |
value="true" <?php echo ($options['addthis_addressbar'] == true ? 'checked="checked"' : ''); ?>/>
|
1930 |
<label for="addthis_addressbar">
|
1931 |
+
<span class="addthis-checkbox-label">
|
1932 |
+
<strong><?php _e("Address bar shares", 'addthis_trans_domain' ); ?></strong>
|
1933 |
+
</span>
|
1934 |
</label>
|
1935 |
+
<span class="at-wp-tooltip" tooltip="AddThis will append a code to your site’s URLs (except for the homepage) to track when a visitor comes to your site from a link someone copied out of their browser's address bar.">?</span>
|
1936 |
</li>
|
1937 |
<li>
|
1938 |
<input
|
1941 |
name="addthis_settings[addthis_bitly]"
|
1942 |
value="true" <?php echo ($options['addthis_bitly'] == true ? 'checked="checked"' : ''); ?>/>
|
1943 |
<label for="addthis_bitly">
|
1944 |
+
<span class="addthis-checkbox-label">
|
1945 |
+
<strong><?php _e("Bitly URL shortening for Twitter", 'addthis_trans_domain' ); ?></strong>
|
1946 |
+
</span>
|
1947 |
</label>
|
1948 |
+
<span class="at-wp-tooltip" tooltip="Your Bitly login and key will need to be setup with your profile on addthis.com before Bitly will begin working with WordPress.">?</span>
|
1949 |
</li>
|
1950 |
</ul>
|
1951 |
</li>
|
1978 |
name="addthis_settings[addthis_asynchronous_loading]"
|
1979 |
value="true" <?php echo ($options['addthis_asynchronous_loading'] == true ? 'checked="checked"' : ''); ?>/>
|
1980 |
<label for="addthis_asynchronous_loading">
|
1981 |
+
<span class="addthis-checkbox-label">
|
1982 |
+
<strong><?php _e("Asynchronous loading", 'addthis_trans_domain' ); ?></strong>
|
1983 |
+
(Recommended)
|
1984 |
+
</span>
|
1985 |
</label>
|
1986 |
+
<span class="at-wp-tooltip" tooltip="When checked, your site will load before AddThis sharing buttons are added. If unchecked, your site will not load until AddThis buttons (and AddThis JavaScript) have been loaded by your vistors.">?</span>
|
1987 |
</li>
|
1988 |
<li>
|
1989 |
<input
|
1992 |
name="addthis_settings[addthis_508]" v
|
1993 |
alue="true" <?php echo ($options['addthis_508'] == true ? 'checked="checked"' : ''); ?>/>
|
1994 |
<label for="addthis_508">
|
1995 |
+
<span class="addthis-checkbox-label">
|
1996 |
+
<strong><?php _e("Enhanced accessibility", 'addthis_trans_domain' ); ?></strong>
|
1997 |
+
</span>
|
1998 |
</label>
|
1999 |
+
<span class="at-wp-tooltip" tooltip="Also known as 508 compliance. If checked, clicking an AddThis sharing button will open a new window to a page that is keyboard navigable for people with disabilities.">?</span>
|
2000 |
</li>
|
2001 |
</ul>
|
2002 |
</li>
|
2003 |
<li>
|
2004 |
<label id="addthis_twitter_template">
|
2005 |
<strong><?php _e("Twitter via", 'addthis_trans_domain' ); ?></strong>
|
2006 |
+
<span class="at-wp-tooltip" tooltip="When a visitor uses an AddThis button to send a tweet about your page, this will be used within Twitter to identify through whom they found your page. You would usually enter a twitter handle here. For example, Twitter could show a tweet came from jsmith via AddThis.">?</span>
|
2007 |
</label>
|
2008 |
<input
|
2009 |
id="addthis_twitter_template"
|
2055 |
<textarea
|
2056 |
id="addthis_config_json"
|
2057 |
rows='3'
|
|
|
2058 |
type="text"
|
2059 |
name="addthis_settings[addthis_config_json]"
|
2060 |
id="addthis-config-json"/><?php echo $options['addthis_config_json']; ?></textarea>
|
2070 |
<textarea
|
2071 |
id="addthis_share_json"
|
2072 |
rows='3'
|
|
|
2073 |
type="text"
|
2074 |
name="addthis_settings[addthis_share_json]"
|
2075 |
id="addthis-share-json"/><?php echo $options['addthis_share_json']; ?></textarea>
|
2181 |
function at_share_is_pro_user() {
|
2182 |
global $addThisConfigs;
|
2183 |
$isPro = false;
|
|
|
2184 |
|
2185 |
+
if ($addThisConfigs->getProfileId()) {
|
2186 |
+
$request = wp_remote_get( "http://q.addthis.com/feeds/1.0/config.json?pubid=" . $addThisConfigs->getProfileId() );
|
2187 |
$server_output = wp_remote_retrieve_body( $request );
|
2188 |
$array = json_decode($server_output);
|
2189 |
// check for pro user
|
2211 |
|
2212 |
function _addthis_profile_setup_url() {
|
2213 |
$pubName = get_bloginfo('name');
|
2214 |
+
global $cmsConnector;
|
2215 |
|
2216 |
if (!preg_match('/^[A-Za-z0-9 _\-\(\)]*$/', $pubName)) {
|
2217 |
// if title not match, get domain
|
2244 |
. str_replace(
|
2245 |
'.',
|
2246 |
'%2E',
|
2247 |
+
urlencode($cmsConnector->getSettingsPageUrl())
|
2248 |
);
|
2249 |
|
2250 |
return $profileSetupUrl;
|
2252 |
|
2253 |
function _addthis_analytics_url() {
|
2254 |
global $addThisConfigs;
|
2255 |
+
$analyticsUrl = 'https://www.addthis.com/dashboard#analytics/' . $addThisConfigs->getProfileId();
|
|
|
2256 |
return $analyticsUrl;
|
2257 |
}
|
2258 |
|
2259 |
function _addthis_tools_url() {
|
2260 |
global $addThisConfigs;
|
2261 |
$addthis_options = $addThisConfigs->getConfigs();
|
2262 |
+
$toolsUrl = 'https://www.addthis.com/settings/plugin-pubs?cms=wp&pubid=' . $addThisConfigs->getProfileId();
|
2263 |
return $toolsUrl;
|
2264 |
}
|
2265 |
|
2287 |
$security = wp_nonce_field('update_' . $fieldName, $fieldName . '_nonce');
|
2288 |
}
|
2289 |
|
2290 |
+
if (!$addThisConfigs->getProfileId()) {
|
2291 |
$description = $noPubIdDescription;
|
2292 |
$buttonUrl = _addthis_profile_setup_url();
|
2293 |
$buttonText = $noPubIdButtonText;
|
2294 |
$alternatePath = '<p>Alternately, you can input your profile id manually below.</p>';
|
2295 |
$target = '';
|
|
|
2296 |
} else {
|
2297 |
$description = $pubIdDescription;
|
2298 |
$buttonUrl = _addthis_analytics_url();
|
2327 |
id="' . $fieldId . '"
|
2328 |
type="text"
|
2329 |
name="' . $fieldName . '"
|
2330 |
+
value="' . $addThisConfigs->getProfileId() . '"
|
2331 |
autofill="off"
|
2332 |
autocomplete="off"
|
2333 |
/>
|
2539 |
<th role="columnheader" scope="col">
|
2540 |
<input type="radio" id="addthis-option" name="' . $fieldName . '" value="AddThis"' . $addThisChecked . '/>
|
2541 |
<label for="addthis-option">
|
2542 |
+
<strong>AddThis.com</strong>
|
2543 |
</label>
|
2544 |
</th>
|
2545 |
</thead>
|
2554 |
|
2555 |
function _addthis_is_csr_form() {
|
2556 |
global $addThisConfigs;
|
|
|
2557 |
|
2558 |
if ( isset($_GET['complete'], $_GET['pubid'])
|
2559 |
&& $_GET['complete'] == 'true'
|
2560 |
+
&& $_GET['pubid'] != $addThisConfigs->getProfileId()
|
2561 |
) {
|
2562 |
return true;
|
2563 |
}
|
2616 |
*/
|
2617 |
function addthis_profile_id_csr_confirmation($fieldName = 'addthis_settings[addthis_profile]')
|
2618 |
{
|
2619 |
+
global $cmsConnector;
|
2620 |
+
global $addThisConfigs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2621 |
if (isset($_GET['pubid'])) {
|
2622 |
$pubId = $_GET['pubid'];
|
2623 |
} else {
|
2624 |
+
$pubId = $addThisConfigs->getProfileId();
|
2625 |
}
|
2626 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2627 |
$submitButtonValue = "Confirm and Save Changes";
|
2628 |
|
2629 |
+
$html = '<div class="Card">';
|
2630 |
+
|
2631 |
+
if (isset($_GET['advanced_settings'])) {
|
2632 |
+
$html .= '
|
2633 |
+
<div class="Card-bd">
|
2634 |
+
<p>
|
2635 |
+
Here you can manually set your AddThis Profile ID - you can get this from your
|
2636 |
+
<a target="_blank" href="https://www.addthis.com/settings/publisher">Profile Settings</a>
|
2637 |
+
</p>
|
2638 |
+
';
|
2639 |
+
} else {
|
2640 |
+
$html .= '
|
2641 |
+
<div class="Card-hd">
|
2642 |
+
<h3 class="Card-hd-title">You\'re almost done!</h3>
|
2643 |
+
</div>
|
2644 |
+
<div class="Card-bd">
|
2645 |
+
<p>It\'s time to connect your AddThis account with Wordpress.</p>
|
2646 |
+
';
|
2647 |
+
}
|
2648 |
$html .= '
|
2649 |
+
<form id="addthis-settings" method="post" action="'.$cmsConnector->getSettingsPageUrl().'">
|
2650 |
+
<div class="addthis_pub_id">
|
2651 |
+
<ul class="addthis-csr-confirm-list">
|
2652 |
+
<li class="addthis-csr-item wp_div">
|
2653 |
+
<img src="'.plugins_url('images/wordpress.png', __FILE__).'">
|
2654 |
+
<span>Your WordPress Site:</span>
|
2655 |
+
<input
|
2656 |
+
type="text"
|
2657 |
+
value="' . get_bloginfo('name') . '"
|
2658 |
+
name="pub_id"
|
2659 |
+
readonly=true
|
2660 |
+
onfocus="this.blur()"/>
|
2661 |
+
</li>
|
2662 |
+
<li class="addthis-csr-item arrow_div">
|
2663 |
+
<img src="'.plugins_url('images/arrow_right.png', __FILE__).'">
|
2664 |
+
<img src="'.plugins_url('images/arrow_left.png', __FILE__).'">
|
2665 |
+
</li>
|
2666 |
+
<li class="addthis-csr-item addthis_div">
|
2667 |
+
<img src="'.plugins_url('images/addthis.png', __FILE__).'">
|
2668 |
+
<span>AddThis Profile ID:</span>
|
2669 |
+
<input
|
2670 |
+
type="text"
|
2671 |
+
value="'.$pubId.'"
|
2672 |
+
name="'.$fieldName.'"
|
2673 |
+
id="addthis_profile" >
|
2674 |
+
<input
|
2675 |
+
type="hidden"
|
2676 |
+
value="true"
|
2677 |
+
name="addthis_settings[addthis_csr_confirmation]"
|
2678 |
+
</li>
|
2679 |
+
</ul>
|
2680 |
+
<ul class="addthis-csr-button-list">
|
2681 |
+
<li class="addthis-csr-button-item">
|
2682 |
+
<button
|
2683 |
+
class="Btn Btn-cancel"
|
2684 |
+
type="button"
|
2685 |
+
onclick="window.location=\''.$cmsConnector->getSettingsPageUrl().'\';return false;">
|
2686 |
+
Cancel
|
2687 |
+
</button>
|
2688 |
+
' . wp_nonce_field( 'update_pubid', 'pubid_nonce' ) . '
|
2689 |
+
</li>
|
2690 |
+
<li class="addthis-csr-button-item">
|
2691 |
+
<input
|
2692 |
+
type="submit"
|
2693 |
+
value="'.$submitButtonValue.'"
|
2694 |
+
name="submit"
|
2695 |
+
class="Btn Btn-blue addthis-submit-button">
|
2696 |
+
</li>
|
2697 |
+
</ul>
|
2698 |
+
</div>
|
2699 |
+
</form>
|
2700 |
+
</div>';
|
2701 |
|
2702 |
+
return $html;
|
2703 |
+
}
|
css/addthis.css
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* +--------------------------------------------------------------------------+
|
3 |
-
* | Copyright (c) 2008-2015 AddThis, LLC |
|
4 |
-
* +--------------------------------------------------------------------------+
|
5 |
-
* | This program is free software; you can redistribute it and/or modify |
|
6 |
-
* | it under the terms of the GNU General Public License as published by |
|
7 |
-
* | the Free Software Foundation; either version 2 of the License, or |
|
8 |
-
* | (at your option) any later version. |
|
9 |
-
* | |
|
10 |
-
* | This program is distributed in the hope that it will be useful, |
|
11 |
-
* | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
* | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
* | GNU General Public License for more details. |
|
14 |
-
* | |
|
15 |
-
* | You should have received a copy of the GNU General Public License |
|
16 |
-
* | along with this program; if not, write to the Free Software |
|
17 |
-
* | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
18 |
-
* +--------------------------------------------------------------------------+
|
19 |
-
*/
|
20 |
-
|
21 |
-
#dashboard_addthis .addthis-tab {
|
22 |
-
display: block;
|
23 |
-
background: #fff;
|
24 |
-
padding: 5px 12px;
|
25 |
-
}
|
26 |
-
|
27 |
-
#dashboard_addthis .addthis_tab {
|
28 |
-
text-align:center;
|
29 |
-
}
|
30 |
-
#dashboard_addthis .atb-active {
|
31 |
-
display: block;
|
32 |
-
background: #666;
|
33 |
-
padding: 5px 12px;
|
34 |
-
text-decoration: none;
|
35 |
-
color: #fff;
|
36 |
-
margin-right:5px;
|
37 |
-
}
|
38 |
-
|
39 |
-
#dashboard_addthis p.sub, #dashboard_addthis .table, #dashboard_addthis .versions {
|
40 |
-
margin:-12px;
|
41 |
-
}
|
42 |
-
#dashboard_addthis .inside {
|
43 |
-
font-size:11px;
|
44 |
-
}
|
45 |
-
#dashboard_addthis p.sub {
|
46 |
-
color:#777777;
|
47 |
-
font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
48 |
-
font-size:13px;
|
49 |
-
font-style:italic;
|
50 |
-
padding:5px 10px 15px;
|
51 |
-
}
|
52 |
-
#dashboard_addthis .table {
|
53 |
-
-moz-background-clip:border;
|
54 |
-
-moz-background-inline-policy:continuous;
|
55 |
-
-moz-background-origin:padding;
|
56 |
-
background:#F9F9F9 none repeat scroll 0 0;
|
57 |
-
border-bottom:1px solid #ECECEC;
|
58 |
-
border-top:1px solid #ECECEC;
|
59 |
-
margin:0 -9px 10px;
|
60 |
-
padding:0 10px;
|
61 |
-
}
|
62 |
-
#dashboard_addthis table {
|
63 |
-
width:100%;
|
64 |
-
}
|
65 |
-
#dashboard_addthis .table td {
|
66 |
-
text-align: left;
|
67 |
-
}
|
68 |
-
|
69 |
-
#dashboard_addthis table td {
|
70 |
-
border-top:1px solid #ECECEC;
|
71 |
-
padding:3px 0 0 0;
|
72 |
-
white-space:nowrap;
|
73 |
-
}
|
74 |
-
#dashboard_addthis td.pp {
|
75 |
-
padding-right: 10px;
|
76 |
-
}
|
77 |
-
#dashboard_addthis table tr.first td {
|
78 |
-
border-top:medium none;
|
79 |
-
}
|
80 |
-
#dashboard_addthis table tr {
|
81 |
-
padding:0;
|
82 |
-
line-height: 1.25;
|
83 |
-
}
|
84 |
-
#dashboard_addthis .atb {
|
85 |
-
font-weight:bold;
|
86 |
-
}
|
87 |
-
|
88 |
-
#dashboard_addthis td.b {
|
89 |
-
font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
90 |
-
padding-right:6px;
|
91 |
-
}
|
92 |
-
#dashboard_addthis td.ll {
|
93 |
-
border-left:1px solid #cCcCcC!important;
|
94 |
-
padding-left:5px;
|
95 |
-
}
|
96 |
-
#dashboard_addthis .t {
|
97 |
-
color:#777777;
|
98 |
-
padding-right:12px;
|
99 |
-
padding-top:6px;
|
100 |
-
}
|
101 |
-
#dashboard_addthis td.first, #dashboard_addthis td.last {
|
102 |
-
width:1px;
|
103 |
-
}
|
104 |
-
|
105 |
-
#dashboard_addthis .analytics {
|
106 |
-
padding:6px 0px;
|
107 |
-
}
|
108 |
-
#dashboard_addthis .inside ul li span.b{
|
109 |
-
font-weight: bold;
|
110 |
-
}
|
111 |
-
.addthis_analytics thead tr th{
|
112 |
-
text-align:left;
|
113 |
-
}
|
114 |
-
.addthis_linkout{
|
115 |
-
float:right;
|
116 |
-
}
|
117 |
-
|
118 |
-
.atw-switch {
|
119 |
-
margin-bottom: 8px;
|
120 |
-
}
|
121 |
-
.atw-table {
|
122 |
-
margin-top: 5px;
|
123 |
-
border-collapse: collapse;
|
124 |
-
width: 100%;
|
125 |
-
}
|
126 |
-
.atw-table td {
|
127 |
-
background: #f5f5f5;
|
128 |
-
border: 1px solid #eee;
|
129 |
-
padding: 10px;
|
130 |
-
text-align: center;
|
131 |
-
color: #555;
|
132 |
-
border-radius: 4px;
|
133 |
-
-moz-border-radius: 4px;
|
134 |
-
-webkit-border-radius: 4px;
|
135 |
-
}
|
136 |
-
.atw-table h3 {
|
137 |
-
margin: 0 0 8px;
|
138 |
-
font-size: 20px;
|
139 |
-
font-weight: bold;
|
140 |
-
color: #000;
|
141 |
-
}
|
142 |
-
#at_tabs .ui-state-active, #at_services_tabs .ui-state-active {
|
143 |
-
font-weight: bold;
|
144 |
-
}
|
145 |
-
#at_tabs .at_time_period{
|
146 |
-
float:left;
|
147 |
-
padding: 0 7px;
|
148 |
-
width: 65px;
|
149 |
-
}
|
150 |
-
#tstab1{
|
151 |
-
width: 50%;
|
152 |
-
float: left;
|
153 |
-
}
|
154 |
-
#tstab2{
|
155 |
-
width: 50%;
|
156 |
-
float:left;
|
157 |
-
}
|
158 |
-
#at_tabs .clear{
|
159 |
-
height: 0;
|
160 |
-
margin: 0;
|
161 |
-
padding: 0;
|
162 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/gtc.sharing-personalize.css
CHANGED
@@ -20,28 +20,23 @@
|
|
20 |
|
21 |
.above-smart-sharing-container, .below-smart-sharing-container {
|
22 |
display: inline-block;
|
23 |
-
width:
|
24 |
}
|
|
|
25 |
.above-smart-sharing-container label:hover, .below-smart-sharing-container label:hover {
|
26 |
cursor: pointer;
|
27 |
}
|
|
|
28 |
.customize-buttons {
|
29 |
max-width: 540px;
|
30 |
-
}
|
31 |
-
#selected-services {
|
32 |
-
float: right;
|
33 |
-
}
|
34 |
-
#sharing-buttons {
|
35 |
-
float: left;
|
36 |
-
margin-left: 5px;
|
37 |
-
}
|
38 |
-
.customize-buttons {
|
39 |
display: none;
|
40 |
}
|
|
|
41 |
.sortable-heading {
|
42 |
color: #484848;
|
43 |
padding: 5px 0 0 0;
|
44 |
}
|
|
|
45 |
.sortable {
|
46 |
width: 230px;
|
47 |
-webkit-user-select: none;
|
@@ -63,10 +58,6 @@
|
|
63 |
float: left;
|
64 |
}
|
65 |
|
66 |
-
.sortable.grid {
|
67 |
-
overflow: hidden;
|
68 |
-
}
|
69 |
-
|
70 |
.sortable li {
|
71 |
list-style: none;
|
72 |
border-bottom: 1px solid #CCC;
|
@@ -109,14 +100,6 @@
|
|
109 |
margin-top:17px;
|
110 |
}
|
111 |
|
112 |
-
.sortable.grid li {
|
113 |
-
line-height: 80px;
|
114 |
-
float: left;
|
115 |
-
width: 80px;
|
116 |
-
height: 80px;
|
117 |
-
text-align: center;
|
118 |
-
}
|
119 |
-
|
120 |
.handle {
|
121 |
cursor: move;
|
122 |
}
|
@@ -140,10 +123,6 @@ li.sortable-placeholder {
|
|
140 |
background: none;
|
141 |
}
|
142 |
|
143 |
-
#atcode {
|
144 |
-
clear: both;
|
145 |
-
}
|
146 |
-
|
147 |
.sharing-buttons .sortable {
|
148 |
height: 205px;
|
149 |
overflow: auto;
|
@@ -166,7 +145,7 @@ li.sortable-placeholder {
|
|
166 |
background-position:190px 10px;
|
167 |
}
|
168 |
|
169 |
-
|
170 |
float: right;
|
171 |
display: none;
|
172 |
text-decoration: none;
|
@@ -174,17 +153,6 @@ li.sortable-placeholder {
|
|
174 |
line-height: 20px;
|
175 |
}
|
176 |
|
177 |
-
.previewbox {
|
178 |
-
overflow: auto;
|
179 |
-
}
|
180 |
-
|
181 |
-
.no-preview-available {
|
182 |
-
width: 300px;
|
183 |
-
font-size: 16px;
|
184 |
-
font-weight: lighter;
|
185 |
-
font-style: italic;
|
186 |
-
}
|
187 |
-
|
188 |
.add-buttons-msg {
|
189 |
font-size: 16px;
|
190 |
font-style: italic;
|
@@ -198,16 +166,24 @@ li.sortable-placeholder {
|
|
198 |
font-size: 12px !important;
|
199 |
line-height: 1.4 !important;
|
200 |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
|
201 |
-
max-width: 250px;
|
202 |
background: #FFFFFF;
|
203 |
border: 4px solid #ddd;
|
204 |
border-radius: 6px 6px 6px 6px;
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
|
208 |
.selected-services .ui-tooltip {
|
209 |
max-width: 40px !important;
|
210 |
}
|
|
|
211 |
.vertical-drag, .horizontal-drag {
|
212 |
display: none;
|
213 |
left: 255px;
|
@@ -216,44 +192,8 @@ li.sortable-placeholder {
|
|
216 |
bottom: 75px;
|
217 |
}
|
218 |
|
219 |
-
.smart-sharing-link {
|
220 |
-
display: none;
|
221 |
-
}
|
222 |
-
|
223 |
-
.customize-checkbox-paragraph {
|
224 |
-
margin: 10px 0;
|
225 |
-
}
|
226 |
-
|
227 |
.disabled {
|
228 |
-moz-opacity: 0.60;
|
229 |
opacity:.60;
|
230 |
filter: alpha(opacity=60);
|
231 |
-
}
|
232 |
-
|
233 |
-
.smart-radio-buttons {
|
234 |
-
float: left;
|
235 |
-
clear: both;
|
236 |
-
padding: 5px 0;
|
237 |
-
}
|
238 |
-
|
239 |
-
.smart-radio-container {
|
240 |
-
padding: 10px 0;
|
241 |
-
margin: 0;
|
242 |
-
display: inline-block;
|
243 |
-
}
|
244 |
-
|
245 |
-
.ui-tooltip {
|
246 |
-
max-width:200px!important;
|
247 |
-
}
|
248 |
-
|
249 |
-
.ui-tooltip {
|
250 |
-
padding: 8px;
|
251 |
-
position: absolute;
|
252 |
-
z-index: 9999;
|
253 |
-
max-width: 300px;
|
254 |
-
-webkit-box-shadow: 0 0 5px #aaa;
|
255 |
-
box-shadow: 0 0 5px #aaa;
|
256 |
-
}
|
257 |
-
body .ui-tooltip {
|
258 |
-
border-width: 2px;
|
259 |
}
|
20 |
|
21 |
.above-smart-sharing-container, .below-smart-sharing-container {
|
22 |
display: inline-block;
|
23 |
+
width: auto;
|
24 |
}
|
25 |
+
|
26 |
.above-smart-sharing-container label:hover, .below-smart-sharing-container label:hover {
|
27 |
cursor: pointer;
|
28 |
}
|
29 |
+
|
30 |
.customize-buttons {
|
31 |
max-width: 540px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
display: none;
|
33 |
}
|
34 |
+
|
35 |
.sortable-heading {
|
36 |
color: #484848;
|
37 |
padding: 5px 0 0 0;
|
38 |
}
|
39 |
+
|
40 |
.sortable {
|
41 |
width: 230px;
|
42 |
-webkit-user-select: none;
|
58 |
float: left;
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
61 |
.sortable li {
|
62 |
list-style: none;
|
63 |
border-bottom: 1px solid #CCC;
|
100 |
margin-top:17px;
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
.handle {
|
104 |
cursor: move;
|
105 |
}
|
123 |
background: none;
|
124 |
}
|
125 |
|
|
|
|
|
|
|
|
|
126 |
.sharing-buttons .sortable {
|
127 |
height: 205px;
|
128 |
overflow: auto;
|
145 |
background-position:190px 10px;
|
146 |
}
|
147 |
|
148 |
+
.restore-default-options {
|
149 |
float: right;
|
150 |
display: none;
|
151 |
text-decoration: none;
|
153 |
line-height: 20px;
|
154 |
}
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
.add-buttons-msg {
|
157 |
font-size: 16px;
|
158 |
font-style: italic;
|
166 |
font-size: 12px !important;
|
167 |
line-height: 1.4 !important;
|
168 |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
|
|
|
169 |
background: #FFFFFF;
|
170 |
border: 4px solid #ddd;
|
171 |
border-radius: 6px 6px 6px 6px;
|
172 |
+
max-width:200px!important;
|
173 |
+
padding: 8px;
|
174 |
+
position: absolute;
|
175 |
+
z-index: 9999;
|
176 |
+
max-width: 300px;
|
177 |
+
-webkit-box-shadow: 0 0 5px #aaa;
|
178 |
+
box-shadow: 0 0 5px #aaa;
|
179 |
+
border-width: 2px;
|
180 |
+
|
181 |
}
|
182 |
|
183 |
.selected-services .ui-tooltip {
|
184 |
max-width: 40px !important;
|
185 |
}
|
186 |
+
|
187 |
.vertical-drag, .horizontal-drag {
|
188 |
display: none;
|
189 |
left: 255px;
|
192 |
bottom: 75px;
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
.disabled {
|
196 |
-moz-opacity: 0.60;
|
197 |
opacity:.60;
|
198 |
filter: alpha(opacity=60);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
css/options-page.css
CHANGED
@@ -18,67 +18,75 @@
|
|
18 |
* +--------------------------------------------------------------------------+
|
19 |
*/
|
20 |
|
|
|
|
|
|
|
|
|
21 |
a,
|
22 |
a:hover,
|
23 |
a:visited {
|
24 |
-
|
25 |
-
|
26 |
}
|
|
|
27 |
ol {
|
28 |
-
|
29 |
}
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
}
|
34 |
|
35 |
.success_text {
|
36 |
-
|
37 |
}
|
|
|
38 |
.error_text {
|
39 |
-
|
40 |
}
|
|
|
41 |
.hidden {
|
42 |
-
|
43 |
-
}
|
44 |
-
.horizontal-list-item {
|
45 |
-
display: inline-block;
|
46 |
-
margin-right: 10px;
|
47 |
}
|
48 |
|
49 |
label + input,
|
50 |
label + select,
|
51 |
label + textarea {
|
52 |
-
|
53 |
-
|
54 |
}
|
|
|
55 |
textarea {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
-
|
60 |
/* Nav */
|
61 |
.Tabbed-nav {
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
}
|
|
|
68 |
.Tabbed-nav-item {
|
69 |
-
|
70 |
-
|
71 |
}
|
|
|
72 |
.Tabbed-nav-item a {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
}
|
|
|
78 |
.Tabbed-nav-item.ui-tabs-active a {
|
79 |
-
|
80 |
-
|
81 |
}
|
|
|
82 |
.ui-tabs-active:after {
|
83 |
content: '';
|
84 |
position: absolute;
|
@@ -92,128 +100,141 @@ textarea {
|
|
92 |
transition: all 0.3s ease;
|
93 |
}
|
94 |
|
95 |
-
.Tabbed-nav-item-end {
|
96 |
-
float: right;
|
97 |
-
}
|
98 |
-
.Tabbed-nav .ui-tabs-selected {
|
99 |
-
height: 29px;
|
100 |
-
padding-bottom: 13px;
|
101 |
-
border-radius: 5px 5px 0 0;
|
102 |
-
border: 1px solid #ccc;
|
103 |
-
border-bottom: 1px solid #fff;
|
104 |
-
}
|
105 |
-
|
106 |
/* Card */
|
107 |
.Card {
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
}
|
|
|
118 |
.Card-hd {
|
119 |
-
|
120 |
}
|
|
|
121 |
.Card-hd .Tabbed-nav {
|
122 |
-
|
123 |
}
|
124 |
|
125 |
.Card-hd-title {
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
131 |
}
|
|
|
132 |
.Card-bd {
|
133 |
-
|
134 |
}
|
135 |
|
136 |
-
.Card-
|
137 |
-
|
138 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
.Card-option-list > li {
|
140 |
-
|
141 |
}
|
|
|
142 |
.Sharing-Icons-options-container {
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
}
|
|
|
147 |
.Btn {
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
}
|
|
|
158 |
.Btn-blue,
|
159 |
.Btn-blue:visited,
|
160 |
.Btn-blue:hover {
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
}
|
|
|
166 |
.Btn-container-end {
|
167 |
-
|
168 |
-
|
169 |
}
|
|
|
170 |
.Btn-container-card {
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
}
|
|
|
175 |
.Header {
|
176 |
-
|
177 |
}
|
|
|
178 |
.Header .preview-save-btns {
|
179 |
position: absolute;
|
180 |
right: 20px;
|
181 |
bottom: -43px;
|
182 |
display: block;
|
183 |
}
|
|
|
184 |
.Header h1 {
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
}
|
|
|
195 |
.Header em {
|
196 |
-
|
197 |
-
|
198 |
}
|
|
|
199 |
.Profile-widget {
|
200 |
-
|
201 |
}
|
|
|
202 |
.Profile-widget li {
|
203 |
-
|
204 |
}
|
205 |
|
206 |
.select_row {
|
207 |
-
|
208 |
}
|
|
|
209 |
.select_row .radio {
|
210 |
-
|
211 |
}
|
|
|
212 |
.select_row label {
|
213 |
-
|
214 |
}
|
|
|
215 |
.radio input[type="radio"] {
|
216 |
-
|
217 |
}
|
218 |
|
219 |
.select_row img {
|
@@ -223,268 +244,195 @@ textarea {
|
|
223 |
.clear {
|
224 |
height: 1px;
|
225 |
}
|
226 |
-
|
|
|
|
|
|
|
227 |
|
228 |
.description {
|
229 |
-
|
230 |
}
|
|
|
231 |
.org {
|
232 |
-
|
233 |
-
}
|
234 |
-
.helv {
|
235 |
-
font-family: "Open Sans",Helvetica,arial,sans-serif;
|
236 |
-
font-style: normal;
|
237 |
-
font-weight: 300;
|
238 |
-
letter-spacing: -0.05em;
|
239 |
-
margin: 0px;
|
240 |
-
}
|
241 |
-
h3.helv {
|
242 |
-
font-size: 24px;
|
243 |
-
padding: 10px;
|
244 |
-
}
|
245 |
-
.more-info{
|
246 |
-
float: left;
|
247 |
-
width: 200px;
|
248 |
-
}
|
249 |
-
#tabs{
|
250 |
-
display:block;
|
251 |
-
height: 100%;
|
252 |
-
padding-bottom: 20px;
|
253 |
}
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
margin: 15px;
|
260 |
-
}
|
261 |
-
.get_the_code{
|
262 |
-
clear:both;
|
263 |
-
padding-bottom: 10px;
|
264 |
-
height: 40px;
|
265 |
}
|
266 |
-
|
267 |
-
|
|
|
268 |
}
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
|
|
274 |
}
|
275 |
|
276 |
/*AddThis Version Notification*/
|
277 |
.addthis-notification {
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
}
|
|
|
289 |
.addthis-notification a {
|
290 |
-
|
291 |
-
|
292 |
}
|
|
|
293 |
.addthis-warning-message {
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
}
|
|
|
298 |
.addthis-success-message {
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
}
|
303 |
-
.enable-sharing-tool {
|
304 |
-
padding-bottom: 12px;
|
305 |
}
|
306 |
-
#wpbody-content {
|
307 |
-
font-family: Arial;
|
308 |
|
309 |
-
}
|
310 |
table.preview_box {
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
}
|
|
|
315 |
.sharing-buttons-search {
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
}
|
322 |
-
.btn-search-rslt {
|
323 |
-
float: left;
|
324 |
-
width: 96%;
|
325 |
-
border-bottom: 1px solid #CCC;
|
326 |
-
height: 22px;
|
327 |
-
padding: 3px;
|
328 |
}
|
|
|
329 |
.service-name {
|
330 |
-
|
331 |
}
|
|
|
332 |
.at300bs {
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
}
|
|
|
342 |
.at300bs:hover {
|
343 |
-
|
344 |
}
|
345 |
-
|
346 |
-
opacity: .5;
|
347 |
-
cursor: default !important;
|
348 |
-
}
|
349 |
-
.personalizedMessage {
|
350 |
-
line-height: 20px;
|
351 |
-
}
|
352 |
-
.simple #personalizedMessage { left:627px; }
|
353 |
/*sortable*/
|
354 |
-
.connectedSortable {
|
355 |
-
height: 170px;
|
356 |
-
overflow: auto;
|
357 |
-
margin: 0;
|
358 |
-
padding: 10px 0 0 0;
|
359 |
-
}
|
360 |
-
.connectedSortable .ui-state-default, .connectedSortable .ui-state-highlight {
|
361 |
-
border-bottom: 1px solid #CCC;
|
362 |
-
padding-left: 10px;
|
363 |
-
height: 32px;
|
364 |
-
float: left;
|
365 |
-
width: 95%;
|
366 |
-
margin-bottom: 0;
|
367 |
-
padding-top: 10px;
|
368 |
-
cursor: move;
|
369 |
-
}
|
370 |
-
#above_sortable2, #below_sortable2 {
|
371 |
-
height: 215px;
|
372 |
-
}
|
373 |
-
.addthis_counter.addthis_bubble_style {
|
374 |
-
background: url(../../addthis/img/counters.gif) no-repeat!important;
|
375 |
-
}
|
376 |
.addthis_counter.addthis_bubble_style {
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
font-
|
382 |
-
|
383 |
-
|
384 |
-
background-
|
385 |
-
padding: 0 0 0 4px;
|
386 |
-
height: 16px;
|
387 |
-
width: 32px!important;
|
388 |
}
|
|
|
389 |
.addthis_32x32_style .addthis_counter.addthis_bubble_style {
|
390 |
-
|
391 |
-
width: 60px!important;
|
392 |
-
background-position: 0 -32px!important;
|
393 |
}
|
394 |
|
395 |
-
div#preview_floater {
|
396 |
-
|
397 |
-
}
|
398 |
.stick {
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
}
|
|
|
403 |
.above_button_set, .below_button_set {
|
404 |
-
|
405 |
}
|
|
|
406 |
.popover {
|
407 |
-
|
408 |
-
|
409 |
}
|
410 |
-
|
411 |
-
|
412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
}
|
414 |
|
415 |
-
.
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
}
|
422 |
|
423 |
-
.
|
424 |
-
|
425 |
-
color: #ffffff;
|
426 |
}
|
427 |
|
428 |
-
|
429 |
-
|
430 |
-
width: 62px;
|
431 |
-
height: 32px;
|
432 |
-
background: #E5E5E5;
|
433 |
-
z-index: 0;
|
434 |
-
margin: 0;
|
435 |
-
padding: 0;
|
436 |
-
appearance: none;
|
437 |
-
border: none;
|
438 |
-
cursor: pointer;
|
439 |
-
position: relative;
|
440 |
-
border-radius:16px; //IE 11
|
441 |
-
-moz-border-radius:16px; //Mozilla
|
442 |
-
-webkit-border-radius:16px; //Chrome and Safari
|
443 |
-
}
|
444 |
-
|
445 |
-
.switch:before {
|
446 |
-
content: ' ';
|
447 |
-
position: absolute;
|
448 |
-
left: 1px;
|
449 |
-
top: 1px;
|
450 |
-
width: 60px;
|
451 |
-
height: 30px;
|
452 |
-
background: #FF0000;
|
453 |
-
z-index: 1;
|
454 |
-
border-radius:16px; //IE 11
|
455 |
-
-moz-border-radius:16px; //Mozilla
|
456 |
-
-webkit-border-radius:16px; //Chrome and Safari
|
457 |
-
}
|
458 |
-
|
459 |
-
.switch:after {
|
460 |
-
content: ' ';
|
461 |
-
height: 29px;
|
462 |
-
width: 29px;
|
463 |
-
border-radius: 28px;
|
464 |
-
z-index: 2;
|
465 |
-
background: #FFFFFF;
|
466 |
-
position: absolute;
|
467 |
-
-webkit-transition-duration: 300ms;
|
468 |
-
transition-duration: 300ms;
|
469 |
-
top: 1px;
|
470 |
-
left: 1px;
|
471 |
-
-webkit-box-shadow: 0 2px 5px #999999;
|
472 |
-
box-shadow: 0 2px 5px #999999;
|
473 |
-
}
|
474 |
-
|
475 |
-
.switchOn, .switchOn:before {
|
476 |
-
background: #4cd964;
|
477 |
-
}
|
478 |
-
.switchOn:after {
|
479 |
-
left: 31px !important;
|
480 |
}
|
481 |
|
482 |
.at-tool-toggle {
|
483 |
-
|
484 |
-
|
485 |
}
|
486 |
|
487 |
-
.at-wp-tooltip{
|
488 |
display: inline-block;
|
489 |
position: relative;
|
490 |
padding: 1px 3px;
|
@@ -495,84 +443,160 @@ div#preview_floater {
|
|
495 |
line-height: 11px;
|
496 |
}
|
497 |
|
498 |
-
.at-wp-tooltip:hover:after{
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
}
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
|
|
522 |
}
|
523 |
|
524 |
a.addthis_button, a.addthis_button:hover, a.addthis_button:focus, a.addthis_button:visited {
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
}
|
537 |
|
538 |
|
539 |
/* Feature Comparison Table */
|
540 |
.at-comparison-table th,
|
541 |
.at-comparison-table td {
|
542 |
-
|
543 |
}
|
|
|
544 |
.at-comparison-table td {
|
545 |
-
|
546 |
}
|
547 |
-
|
548 |
-
|
549 |
-
|
|
|
550 |
}
|
|
|
551 |
.at-comparison-table thead th {
|
552 |
-
|
553 |
-
|
554 |
}
|
|
|
555 |
.at-comparison-table th[role="rowheader"] {
|
556 |
-
|
557 |
-
|
558 |
}
|
|
|
559 |
.at-comparison-table tr:nth-child(even) {
|
560 |
-
|
561 |
}
|
562 |
|
563 |
.at-icon-check {
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
}
|
570 |
|
571 |
.at-hidden-cell-content,
|
572 |
.at-icon-fallback-text {
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
578 |
}
|
18 |
* +--------------------------------------------------------------------------+
|
19 |
*/
|
20 |
|
21 |
+
#addthis-settings {
|
22 |
+
font-family: Arial;
|
23 |
+
}
|
24 |
+
|
25 |
a,
|
26 |
a:hover,
|
27 |
a:visited {
|
28 |
+
text-decoration: none;
|
29 |
+
color: #359af9;
|
30 |
}
|
31 |
+
|
32 |
ol {
|
33 |
+
margin-left: 1.5em;
|
34 |
}
|
35 |
+
|
36 |
+
.Main-content {
|
37 |
+
width: 98%;
|
38 |
+
border-bottom: 1px solid #CCCCCC;
|
39 |
}
|
40 |
|
41 |
.success_text {
|
42 |
+
color: #39C539;
|
43 |
}
|
44 |
+
|
45 |
.error_text {
|
46 |
+
color: #F00;
|
47 |
}
|
48 |
+
|
49 |
.hidden {
|
50 |
+
display: none;
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
label + input,
|
54 |
label + select,
|
55 |
label + textarea {
|
56 |
+
display: block;
|
57 |
+
margin-top: 10px;
|
58 |
}
|
59 |
+
|
60 |
textarea {
|
61 |
+
display: block;
|
62 |
}
|
63 |
|
|
|
64 |
/* Nav */
|
65 |
.Tabbed-nav {
|
66 |
+
overflow: hidden;
|
67 |
+
border-bottom: 1px solid #ccc;
|
68 |
+
margin: 0;
|
69 |
+
padding-left: 20px;
|
70 |
+
padding-top: 1px; /* so entire focus outline shows */
|
71 |
}
|
72 |
+
|
73 |
.Tabbed-nav-item {
|
74 |
+
display: inline-block;
|
75 |
+
position: relative;
|
76 |
}
|
77 |
+
|
78 |
.Tabbed-nav-item a {
|
79 |
+
padding: 15px 7px;
|
80 |
+
text-transform: uppercase;
|
81 |
+
color: #464646;
|
82 |
+
font-size: 13px;
|
83 |
}
|
84 |
+
|
85 |
.Tabbed-nav-item.ui-tabs-active a {
|
86 |
+
display: inline-block;
|
87 |
+
color: #f8694d;
|
88 |
}
|
89 |
+
|
90 |
.ui-tabs-active:after {
|
91 |
content: '';
|
92 |
position: absolute;
|
100 |
transition: all 0.3s ease;
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
/* Card */
|
104 |
.Card {
|
105 |
+
margin-top: 20px;
|
106 |
+
padding: 0;
|
107 |
+
background: #fff;
|
108 |
+
border: 1px solid #e2e5e8;
|
109 |
+
border-bottom-width: 2px;
|
110 |
+
border-radius: 3px;
|
111 |
+
color: #666;
|
112 |
+
font-size: 14px;
|
113 |
+
line-height: 1.4em;
|
114 |
}
|
115 |
+
|
116 |
.Card-hd {
|
117 |
+
border-bottom: 1px solid #ccc;
|
118 |
}
|
119 |
+
|
120 |
.Card-hd .Tabbed-nav {
|
121 |
+
border-bottom: 0;
|
122 |
}
|
123 |
|
124 |
.Card-hd-title {
|
125 |
+
margin: 20px 0 20px 25px;
|
126 |
+
padding: 0;
|
127 |
+
color: #333;
|
128 |
+
font-weight: normal;
|
129 |
+
font-size: 25px;
|
130 |
+
line-height: 1.3;
|
131 |
}
|
132 |
+
|
133 |
.Card-bd {
|
134 |
+
margin: 20px;
|
135 |
}
|
136 |
|
137 |
+
.Card-bd textarea {
|
138 |
+
width: 100%;
|
139 |
}
|
140 |
+
|
141 |
+
.Card-bd table textarea {
|
142 |
+
margin-left: 10px;
|
143 |
+
margin-top: 10px
|
144 |
+
}
|
145 |
+
|
146 |
.Card-option-list > li {
|
147 |
+
margin-bottom: 20px;
|
148 |
}
|
149 |
+
|
150 |
.Sharing-Icons-options-container {
|
151 |
+
display: block;
|
152 |
+
margin-right: 10px;
|
153 |
+
vertical-align: top;
|
154 |
}
|
155 |
+
|
156 |
.Btn {
|
157 |
+
cursor: pointer;
|
158 |
+
display: inline-block;
|
159 |
+
padding: 0 1.25em;
|
160 |
+
height: 36px;
|
161 |
+
border: 1px solid #0295ff;
|
162 |
+
border-radius: 3px;
|
163 |
+
font-size: 13px;
|
164 |
+
line-height: 36px;
|
165 |
+
text-decoration: none;
|
166 |
}
|
167 |
+
|
168 |
.Btn-blue,
|
169 |
.Btn-blue:visited,
|
170 |
.Btn-blue:hover {
|
171 |
+
background: #0d99fc;
|
172 |
+
border: 1px solid #0d99fc;
|
173 |
+
border: none;
|
174 |
+
color: #fff;
|
175 |
}
|
176 |
+
|
177 |
.Btn-container-end {
|
178 |
+
padding: 20px;
|
179 |
+
text-align: right;
|
180 |
}
|
181 |
+
|
182 |
.Btn-container-card {
|
183 |
+
padding-bottom: 20px;
|
184 |
+
padding-top: 20px;
|
185 |
+
text-align: left;
|
186 |
}
|
187 |
+
|
188 |
.Header {
|
189 |
+
position: relative;
|
190 |
}
|
191 |
+
|
192 |
.Header .preview-save-btns {
|
193 |
position: absolute;
|
194 |
right: 20px;
|
195 |
bottom: -43px;
|
196 |
display: block;
|
197 |
}
|
198 |
+
|
199 |
.Header h1 {
|
200 |
+
padding: 0 0 0 40px;
|
201 |
+
margin: 0 0 0 25px;
|
202 |
+
line-height: 34px;
|
203 |
+
min-height: 40px;
|
204 |
+
background: url(//cache.addthis.com/icons/v1/thumbs/32x32/more.png) no-repeat 0px 0px;
|
205 |
+
color: #666;
|
206 |
+
font-style: normal;
|
207 |
+
font-weight: normal;
|
208 |
+
vertical-align: middle;
|
209 |
}
|
210 |
+
|
211 |
.Header em {
|
212 |
+
font-style: normal;
|
213 |
+
color: #000;
|
214 |
}
|
215 |
+
|
216 |
.Profile-widget {
|
217 |
+
margin: 0;
|
218 |
}
|
219 |
+
|
220 |
.Profile-widget li {
|
221 |
+
display: inline-block;
|
222 |
}
|
223 |
|
224 |
.select_row {
|
225 |
+
margin-bottom: 10px;
|
226 |
}
|
227 |
+
|
228 |
.select_row .radio {
|
229 |
+
display: inline-block;
|
230 |
}
|
231 |
+
|
232 |
.select_row label {
|
233 |
+
display: inline-block;
|
234 |
}
|
235 |
+
|
236 |
.radio input[type="radio"] {
|
237 |
+
cursor: pointer;
|
238 |
}
|
239 |
|
240 |
.select_row img {
|
244 |
.clear {
|
245 |
height: 1px;
|
246 |
}
|
247 |
+
|
248 |
+
.mt20 {
|
249 |
+
margin-top: 20px !important;
|
250 |
+
}
|
251 |
|
252 |
.description {
|
253 |
+
margin-bottom: 20px;
|
254 |
}
|
255 |
+
|
256 |
.org {
|
257 |
+
color: #FE6D4C !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
259 |
+
|
260 |
+
#tabs {
|
261 |
+
display:block;
|
262 |
+
height: 100%;
|
263 |
+
padding-bottom: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
}
|
265 |
+
|
266 |
+
.wrap {
|
267 |
+
width: 100%;
|
268 |
}
|
269 |
+
|
270 |
+
h2.placeholder {
|
271 |
+
font-size: 1px;
|
272 |
+
padding: 1px;
|
273 |
+
margin: 0px;
|
274 |
+
height: 2px;
|
275 |
}
|
276 |
|
277 |
/*AddThis Version Notification*/
|
278 |
.addthis-notification {
|
279 |
+
border-radius: 3px 3px 3px 3px;
|
280 |
+
border-style: solid;
|
281 |
+
border-width: 1px;
|
282 |
+
margin: 5px 0 15px;
|
283 |
+
padding: 1em 0.6em 1em 0.6em;
|
284 |
+
font-size: 16px;
|
285 |
+
float:left;
|
286 |
+
width:97%;
|
287 |
+
height: 30px;
|
288 |
+
line-height: 30px;
|
289 |
}
|
290 |
+
|
291 |
.addthis-notification a {
|
292 |
+
color: #45B3EF;
|
293 |
+
font-size: 12px;
|
294 |
}
|
295 |
+
|
296 |
.addthis-warning-message {
|
297 |
+
background-color: #FDF7E2;
|
298 |
+
border-color: #EFE9D5;
|
299 |
+
color: #C49855;
|
300 |
}
|
301 |
+
|
302 |
.addthis-success-message {
|
303 |
+
background-color: #DDEFD7;
|
304 |
+
border-color: #D0E2C9;
|
305 |
+
color: #6A9B58;
|
|
|
|
|
|
|
306 |
}
|
|
|
|
|
307 |
|
|
|
308 |
table.preview_box {
|
309 |
+
margin-top: 15px;
|
310 |
+
width: 550px;
|
311 |
+
float: left;
|
312 |
}
|
313 |
+
|
314 |
.sharing-buttons-search {
|
315 |
+
float: left;
|
316 |
+
width: 100%;
|
317 |
+
margin-top: 10px;
|
318 |
+
border: 1px solid #CCC;
|
319 |
+
border-radius: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
}
|
321 |
+
|
322 |
.service-name {
|
323 |
+
font-size: 13px;
|
324 |
}
|
325 |
+
|
326 |
.at300bs {
|
327 |
+
background: url(//ct1.addthis.com/static/r07/widget056.gif) no-repeat left;
|
328 |
+
overflow: hidden;
|
329 |
+
display: block;
|
330 |
+
background-position: 0 0;
|
331 |
+
height: 16px;
|
332 |
+
width: 16px;
|
333 |
+
line-height: 16px!important;
|
334 |
+
float: left;
|
335 |
}
|
336 |
+
|
337 |
.at300bs:hover {
|
338 |
+
opacity: .8;
|
339 |
}
|
340 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
/*sortable*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
.addthis_counter.addthis_bubble_style {
|
343 |
+
background: url(../../addthis/img/counters.gif) no-repeat!important;
|
344 |
+
display: block;
|
345 |
+
margin: 0 0 0 -2px;
|
346 |
+
text-align: center;
|
347 |
+
font-weight: bold;
|
348 |
+
font-family: arial,helvetica,sans-serif;
|
349 |
+
color: #000;
|
350 |
+
background-repeat: no-repeat;
|
351 |
+
padding: 0 0 0 4px;
|
|
|
|
|
352 |
}
|
353 |
+
|
354 |
.addthis_32x32_style .addthis_counter.addthis_bubble_style {
|
355 |
+
height: 32px;
|
356 |
+
width: 60px!important;
|
357 |
+
background-position: 0 -32px!important;
|
358 |
}
|
359 |
|
|
|
|
|
|
|
360 |
.stick {
|
361 |
+
position: fixed;
|
362 |
+
top: 50px;
|
363 |
+
width: 500px;
|
364 |
}
|
365 |
+
|
366 |
.above_button_set, .below_button_set {
|
367 |
+
position: relative;
|
368 |
}
|
369 |
+
|
370 |
.popover {
|
371 |
+
width: 375px;
|
372 |
+
line-height: 20px;
|
373 |
}
|
374 |
+
|
375 |
+
/*Toggle Tool*/
|
376 |
+
.addthis-switch {
|
377 |
+
width: 62px;
|
378 |
+
height: 32px;
|
379 |
+
background: #E5E5E5;
|
380 |
+
z-index: 0;
|
381 |
+
margin: 0;
|
382 |
+
padding: 0;
|
383 |
+
appearance: none;
|
384 |
+
border: none;
|
385 |
+
cursor: pointer;
|
386 |
+
position: relative;
|
387 |
+
border-radius:16px; //IE 11
|
388 |
+
-moz-border-radius:16px; //Mozilla
|
389 |
+
-webkit-border-radius:16px; //Chrome and Safari
|
390 |
}
|
391 |
|
392 |
+
.addthis-switch:before {
|
393 |
+
content: ' ';
|
394 |
+
position: absolute;
|
395 |
+
left: 1px;
|
396 |
+
top: 1px;
|
397 |
+
width: 60px;
|
398 |
+
height: 30px;
|
399 |
+
background: #FF0000;
|
400 |
+
z-index: 1;
|
401 |
+
border-radius:16px; //IE 11
|
402 |
+
-moz-border-radius:16px; //Mozilla
|
403 |
+
-webkit-border-radius:16px; //Chrome and Safari
|
404 |
+
}
|
405 |
+
|
406 |
+
.addthis-switch:after {
|
407 |
+
content: ' ';
|
408 |
+
height: 29px;
|
409 |
+
width: 29px;
|
410 |
+
border-radius: 28px;
|
411 |
+
z-index: 2;
|
412 |
+
background: #FFFFFF;
|
413 |
+
position: absolute;
|
414 |
+
-webkit-transition-duration: 300ms;
|
415 |
+
transition-duration: 300ms;
|
416 |
+
top: 1px;
|
417 |
+
left: 1px;
|
418 |
+
-webkit-box-shadow: 0 2px 5px #999999;
|
419 |
+
box-shadow: 0 2px 5px #999999;
|
420 |
}
|
421 |
|
422 |
+
.addthis-switchOn, .addthis-switchOn:before {
|
423 |
+
background: #4cd964;
|
|
|
424 |
}
|
425 |
|
426 |
+
.addthis-switchOn:after {
|
427 |
+
left: 31px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
}
|
429 |
|
430 |
.at-tool-toggle {
|
431 |
+
float:right;
|
432 |
+
padding-right: 40px;
|
433 |
}
|
434 |
|
435 |
+
.at-wp-tooltip {
|
436 |
display: inline-block;
|
437 |
position: relative;
|
438 |
padding: 1px 3px;
|
443 |
line-height: 11px;
|
444 |
}
|
445 |
|
446 |
+
.at-wp-tooltip:hover:after {
|
447 |
+
position: absolute;
|
448 |
+
padding: 5px 15px;
|
449 |
+
left: 20%;
|
450 |
+
width: 320px;
|
451 |
+
background: #333;
|
452 |
+
background: rgba(0,0,0,.9);
|
453 |
+
border-radius: 5px;
|
454 |
+
bottom: 26px;
|
455 |
+
color: #fff;
|
456 |
+
content: attr(tooltip);
|
457 |
+
font-size: 13px;
|
458 |
+
line-height: 15px;
|
459 |
+
z-index: 98;
|
460 |
+
}
|
461 |
+
|
462 |
+
.at-wp-tooltip:hover:before {
|
463 |
+
position: absolute;
|
464 |
+
left: 50%;
|
465 |
+
border: solid;
|
466 |
+
border-color: #333 transparent;
|
467 |
+
border-width: 6px 6px 0 6px;
|
468 |
+
bottom: 20px;
|
469 |
+
content: "";
|
470 |
+
z-index: 99;
|
471 |
}
|
472 |
|
473 |
a.addthis_button, a.addthis_button:hover, a.addthis_button:focus, a.addthis_button:visited {
|
474 |
+
background-color: #279AF9;
|
475 |
+
color: white;
|
476 |
+
font-size: 24px;
|
477 |
+
text-decoration: none;
|
478 |
+
display: block;
|
479 |
+
width: 560px;
|
480 |
+
text-align: center;
|
481 |
+
border-radius: 3px;
|
482 |
+
margin-top: 20px;
|
483 |
+
height:62px;
|
484 |
+
padding-top: 38px;
|
485 |
}
|
486 |
|
487 |
|
488 |
/* Feature Comparison Table */
|
489 |
.at-comparison-table th,
|
490 |
.at-comparison-table td {
|
491 |
+
padding: 5px 10px;
|
492 |
}
|
493 |
+
|
494 |
.at-comparison-table td {
|
495 |
+
text-align: center;
|
496 |
}
|
497 |
+
|
498 |
+
.at-comparison-table input[type="radio"]:checked+label {
|
499 |
+
color: #FF6E41;
|
500 |
+
font-weight: bold;
|
501 |
}
|
502 |
+
|
503 |
.at-comparison-table thead th {
|
504 |
+
background-color: #FFF;
|
505 |
+
color: #666;
|
506 |
}
|
507 |
+
|
508 |
.at-comparison-table th[role="rowheader"] {
|
509 |
+
font-weight: normal;
|
510 |
+
text-align: left;
|
511 |
}
|
512 |
+
|
513 |
.at-comparison-table tr:nth-child(even) {
|
514 |
+
background-color: #F1F1F1;
|
515 |
}
|
516 |
|
517 |
.at-icon-check {
|
518 |
+
display: inline-block;
|
519 |
+
width: 16px;
|
520 |
+
height: 15px;
|
521 |
+
text-indent: -99999px;
|
522 |
+
background: url(http://cache.addthiscdn.com/www/15043058b529a/style/images/common/icon-check-blue.png) no-repeat 0 -1px;
|
523 |
}
|
524 |
|
525 |
.at-hidden-cell-content,
|
526 |
.at-icon-fallback-text {
|
527 |
+
position: absolute;
|
528 |
+
overflow: hidden;
|
529 |
+
height: 1px;
|
530 |
+
width: 1px;
|
531 |
+
clip: rect(0 0 0 0);
|
532 |
+
}
|
533 |
+
|
534 |
+
.addthis-sidebar-position-label {
|
535 |
+
display: block;
|
536 |
+
min-height: 25px;
|
537 |
+
margin-top: 5px;
|
538 |
+
}
|
539 |
+
|
540 |
+
@media screen and (max-width: 599px) {
|
541 |
+
.Header .preview-save-btns {
|
542 |
+
position: static;
|
543 |
+
right: auto;
|
544 |
+
bottom: auto;
|
545 |
+
text-align: left;
|
546 |
+
margin-left: 20px;
|
547 |
+
margin-top: 10px;
|
548 |
+
}
|
549 |
+
|
550 |
+
.Card-bd {
|
551 |
+
margin-left: 2%;
|
552 |
+
margin-right: 2%;
|
553 |
+
}
|
554 |
+
|
555 |
+
.Card-bd table label {
|
556 |
+
width: 85%;
|
557 |
+
max-width: 85%;
|
558 |
+
}
|
559 |
+
|
560 |
+
.Card-bd table label img {
|
561 |
+
max-width: 100%;
|
562 |
+
}
|
563 |
+
|
564 |
+
.at-tool-toggle {
|
565 |
+
padding-right: 15px;
|
566 |
+
}
|
567 |
+
|
568 |
+
.addthis-checkbox-label {
|
569 |
+
display: inline-block;
|
570 |
+
width: 80%;
|
571 |
+
vertical-align: top;
|
572 |
+
}
|
573 |
+
|
574 |
+
.Card-hd h3.Card-hd-title {
|
575 |
+
margin-left: 20px;
|
576 |
+
}
|
577 |
+
|
578 |
+
.Card-hd .at-tool-toggle + h3.Card-hd-title {
|
579 |
+
max-width: 65%;
|
580 |
+
}
|
581 |
+
|
582 |
+
.Card-bd select, .Card-bd input[type="text"] {
|
583 |
+
width: 100%;
|
584 |
+
}
|
585 |
+
|
586 |
+
.Card-bd input[type="text"] {
|
587 |
+
padding-right: 0;
|
588 |
+
}
|
589 |
+
|
590 |
+
.Profile-widget li {
|
591 |
+
display: block;
|
592 |
+
}
|
593 |
+
|
594 |
+
.at-comparison-table label {
|
595 |
+
font-size: 12px;
|
596 |
+
}
|
597 |
+
|
598 |
+
a.Btn-blue {
|
599 |
+
text-align: center;
|
600 |
+
display: block;
|
601 |
+
}
|
602 |
}
|
css/output.css
CHANGED
@@ -18,7 +18,10 @@
|
|
18 |
* +--------------------------------------------------------------------------+
|
19 |
*/
|
20 |
|
21 |
-
.entry-content .addthis_toolbox,
|
|
|
|
|
|
|
22 |
margin:10px 0 10px 0;
|
23 |
}
|
24 |
.addthis_button_tweet {
|
@@ -28,6 +31,7 @@
|
|
28 |
.atwidget iframe {
|
29 |
max-width:none;
|
30 |
}
|
31 |
-
div.addthis_toolbox a,
|
|
|
32 |
border: 0;
|
33 |
}
|
18 |
* +--------------------------------------------------------------------------+
|
19 |
*/
|
20 |
|
21 |
+
.entry-content .addthis_toolbox,
|
22 |
+
.entry-content .addthis_button,
|
23 |
+
.entry-header .addthis_toolbox,
|
24 |
+
.entry-header .addthis_button {
|
25 |
margin:10px 0 10px 0;
|
26 |
}
|
27 |
.addthis_button_tweet {
|
31 |
.atwidget iframe {
|
32 |
max-width:none;
|
33 |
}
|
34 |
+
div.addthis_toolbox a,
|
35 |
+
a.at-share-btn {
|
36 |
border: 0;
|
37 |
}
|
css/style.css
CHANGED
@@ -154,7 +154,10 @@ button.addthis_cancel_button:focus {
|
|
154 |
float: left;
|
155 |
margin-left: 15px;
|
156 |
}
|
157 |
-
|
|
|
|
|
|
|
158 |
.addthis_confirm_button a {
|
159 |
text-decoration: none;
|
160 |
font-size: 12px;
|
@@ -174,12 +177,12 @@ button.addthis_cancel_button:focus {
|
|
174 |
background-color: #F2EDD9;
|
175 |
border: 2px solid #EEE4B5;
|
176 |
display: block;
|
177 |
-
float: left;
|
178 |
margin: 15px 0;
|
179 |
padding: 15px;
|
180 |
text-align: center;
|
181 |
font-weight: bold;
|
182 |
width:408px;
|
|
|
183 |
}
|
184 |
|
185 |
.addthis_updated {
|
@@ -213,7 +216,21 @@ a.addthis_configure, a.addthis_configure:hover {
|
|
213 |
.icons {
|
214 |
float: left;
|
215 |
}
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
.wp_div, .addthis_div {
|
218 |
width: 160px;
|
219 |
text-align: center;
|
@@ -243,12 +260,16 @@ a.addthis_configure, a.addthis_configure:hover {
|
|
243 |
}
|
244 |
|
245 |
.arrow_div{
|
246 |
-
|
247 |
-
|
248 |
}
|
249 |
.arrow_div img{
|
250 |
-
|
251 |
}
|
|
|
|
|
|
|
|
|
252 |
|
253 |
.addthis_reset_button{
|
254 |
border: 1px solid gray;
|
154 |
float: left;
|
155 |
margin-left: 15px;
|
156 |
}
|
157 |
+
.Btn-cancel {
|
158 |
+
background-color: #fff;
|
159 |
+
color: #359af9;
|
160 |
+
}
|
161 |
.addthis_confirm_button a {
|
162 |
text-decoration: none;
|
163 |
font-size: 12px;
|
177 |
background-color: #F2EDD9;
|
178 |
border: 2px solid #EEE4B5;
|
179 |
display: block;
|
|
|
180 |
margin: 15px 0;
|
181 |
padding: 15px;
|
182 |
text-align: center;
|
183 |
font-weight: bold;
|
184 |
width:408px;
|
185 |
+
overflow: hidden;
|
186 |
}
|
187 |
|
188 |
.addthis_updated {
|
216 |
.icons {
|
217 |
float: left;
|
218 |
}
|
219 |
+
.addthis-csr-confirm-list,
|
220 |
+
.addthis-csr-button-list {
|
221 |
+
display: inline-block;
|
222 |
+
margin: 10px auto;
|
223 |
+
}
|
224 |
+
.addthis-csr-button-item {
|
225 |
+
display: inline-block;
|
226 |
+
}
|
227 |
+
.addthis-csr-button-item:first-child {
|
228 |
+
margin-right: 10px;
|
229 |
+
}
|
230 |
+
.addthis-csr-item {
|
231 |
+
display: table-cell;
|
232 |
+
vertical-align: top;
|
233 |
+
}
|
234 |
.wp_div, .addthis_div {
|
235 |
width: 160px;
|
236 |
text-align: center;
|
260 |
}
|
261 |
|
262 |
.arrow_div{
|
263 |
+
width: 50px;
|
264 |
+
|
265 |
}
|
266 |
.arrow_div img{
|
267 |
+
margin: auto;
|
268 |
}
|
269 |
+
.arrow_div img:first-child {
|
270 |
+
margin-top: 20px;
|
271 |
+
}
|
272 |
+
|
273 |
|
274 |
.addthis_reset_button{
|
275 |
border: 1px solid gray;
|
includes/addthis_addjs_new.php
CHANGED
@@ -33,8 +33,6 @@ Class AddThis_addjs{
|
|
33 |
private $_cuid;
|
34 |
private $addThisConfigs;
|
35 |
|
36 |
-
var $pubid;
|
37 |
-
|
38 |
var $jsToAdd;
|
39 |
|
40 |
var $jsAfterAdd;
|
@@ -48,8 +46,9 @@ Class AddThis_addjs{
|
|
48 |
/**
|
49 |
*
|
50 |
*/
|
51 |
-
public function __construct ($addThisConfigs){
|
52 |
$this->addThisConfigs = $addThisConfigs;
|
|
|
53 |
|
54 |
if ( did_action('addthis_addjs_created') !== 0){
|
55 |
_doing_it_wrong( 'addthis_addjs', 'Only one instance of this class should be initialized. Look for the $addthis_addjs global first',1 );
|
@@ -77,8 +76,6 @@ Class AddThis_addjs{
|
|
77 |
add_action('admin_init',array($this, 'update_wpfooter'));
|
78 |
}
|
79 |
|
80 |
-
$this->pubid = $this->getProfileId();
|
81 |
-
|
82 |
// on theme swich, check for footer again
|
83 |
add_action('switch_theme', array($this, 'switch_theme'),15);
|
84 |
|
@@ -211,11 +208,11 @@ Class AddThis_addjs{
|
|
211 |
$this->jsToAdd .= '
|
212 |
<script>
|
213 |
var wp_product_version = "' . ADDTHIS_PRODUCT_VERSION . '";
|
214 |
-
var wp_blog_version = "' .
|
215 |
' . $addthis_share_js . '
|
216 |
</script>';
|
217 |
|
218 |
-
$this->jsToAdd .= $firstScriptHalf . $this->atversion.'/addthis_widget.js#pubid='. urlencode( $this->
|
219 |
}
|
220 |
}
|
221 |
|
@@ -226,12 +223,6 @@ Class AddThis_addjs{
|
|
226 |
}
|
227 |
}
|
228 |
|
229 |
-
function getProfileId(){
|
230 |
-
if (!empty($this->_options['addthis_profile'])) {
|
231 |
-
return $this->_options['addthis_profile'];
|
232 |
-
}
|
233 |
-
}
|
234 |
-
|
235 |
function setProfileId($profile){
|
236 |
$this->_options['addthis_profile'] = sanitize_text_field($profile);
|
237 |
$this->_options = $this->addThisConfigs->saveConfigs($this->_options);
|
33 |
private $_cuid;
|
34 |
private $addThisConfigs;
|
35 |
|
|
|
|
|
36 |
var $jsToAdd;
|
37 |
|
38 |
var $jsAfterAdd;
|
46 |
/**
|
47 |
*
|
48 |
*/
|
49 |
+
public function __construct ($addThisConfigs, $cmsConnector){
|
50 |
$this->addThisConfigs = $addThisConfigs;
|
51 |
+
$this->cmsConnector = $cmsConnector;
|
52 |
|
53 |
if ( did_action('addthis_addjs_created') !== 0){
|
54 |
_doing_it_wrong( 'addthis_addjs', 'Only one instance of this class should be initialized. Look for the $addthis_addjs global first',1 );
|
76 |
add_action('admin_init',array($this, 'update_wpfooter'));
|
77 |
}
|
78 |
|
|
|
|
|
79 |
// on theme swich, check for footer again
|
80 |
add_action('switch_theme', array($this, 'switch_theme'),15);
|
81 |
|
208 |
$this->jsToAdd .= '
|
209 |
<script>
|
210 |
var wp_product_version = "' . ADDTHIS_PRODUCT_VERSION . '";
|
211 |
+
var wp_blog_version = "' . $this->cmsConnector->getCmsVersion() . '";
|
212 |
' . $addthis_share_js . '
|
213 |
</script>';
|
214 |
|
215 |
+
$this->jsToAdd .= $firstScriptHalf . $this->atversion.'/addthis_widget.js#pubid='. urlencode( $this->addThisConfigs->getProfileId() ).'" ' . $async. '></script>';
|
216 |
}
|
217 |
}
|
218 |
|
223 |
}
|
224 |
}
|
225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
function setProfileId($profile){
|
227 |
$this->_options['addthis_profile'] = sanitize_text_field($profile);
|
228 |
$this->_options = $this->addThisConfigs->saveConfigs($this->_options);
|
js/addthis.js
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* +--------------------------------------------------------------------------+
|
3 |
-
* | Copyright (c) 2008-2015 AddThis, LLC |
|
4 |
-
* +--------------------------------------------------------------------------+
|
5 |
-
* | This program is free software; you can redistribute it and/or modify |
|
6 |
-
* | it under the terms of the GNU General Public License as published by |
|
7 |
-
* | the Free Software Foundation; either version 2 of the License, or |
|
8 |
-
* | (at your option) any later version. |
|
9 |
-
* | |
|
10 |
-
* | This program is distributed in the hope that it will be useful, |
|
11 |
-
* | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
* | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
* | GNU General Public License for more details. |
|
14 |
-
* | |
|
15 |
-
* | You should have received a copy of the GNU General Public License |
|
16 |
-
* | along with this program; if not, write to the Free Software |
|
17 |
-
* | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
18 |
-
* +--------------------------------------------------------------------------+
|
19 |
-
*/
|
20 |
-
|
21 |
-
jQuery(document).ready(function($) {
|
22 |
-
|
23 |
-
var data = {action: "at_show_dashboard_widget"};
|
24 |
-
|
25 |
-
$.post(ajaxurl, data, function(response){
|
26 |
-
$( "#dashboard_addthis > .inside > .widget-loading").replaceWith(response);
|
27 |
-
$( "#at_tabs").tabs();
|
28 |
-
});
|
29 |
-
|
30 |
-
|
31 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/gtc-sharing-personalize.js
CHANGED
@@ -800,7 +800,6 @@
|
|
800 |
});
|
801 |
}
|
802 |
|
803 |
-
$('#above_previewContainer').html(buttons);
|
804 |
},
|
805 |
|
806 |
|
@@ -852,7 +851,6 @@
|
|
852 |
});
|
853 |
});
|
854 |
}
|
855 |
-
$('#below_previewContainer').html(buttons);
|
856 |
},
|
857 |
|
858 |
'events': function() {
|
@@ -892,7 +890,6 @@
|
|
892 |
sortableListItemsCloseIcons = sortableSelectedListItems.find('.close'),
|
893 |
aboveRestoreDefaultOptions = $('.above-smart-sharing-container .restore-default-options'),
|
894 |
belowRestoreDefaultOptions = $('.below-smart-sharing-container .restore-default-options'),
|
895 |
-
previewBox = $('#previewBox'),
|
896 |
aboverestoreToDefault = _.debounce(function() {
|
897 |
// Updates the personalization UI
|
898 |
self.abovepopulateSharingServices(true);
|
@@ -915,19 +912,6 @@
|
|
915 |
trackPageView('/tracker/gtc/' + (window.page || '') + '/event/disable_customization');
|
916 |
}, 1000, true);
|
917 |
|
918 |
-
//to show options upon save
|
919 |
-
if($('#above-chosen-list').val() != "") {
|
920 |
-
$('.above-smart-sharing-container #customizedMessage').show();
|
921 |
-
$('.above-smart-sharing-container #personalizedMessage').hide();
|
922 |
-
// $('.above-smart-sharing-container .customize-your-buttons').html('Your buttons are currently customized. <a href="#" class="above-customize-sharing-link customize-your-buttons">Show customization</a>.');
|
923 |
-
}
|
924 |
-
|
925 |
-
if($('#below-chosen-list').val() != "") {
|
926 |
-
$('.below-smart-sharing-container #customizedMessage').show();
|
927 |
-
$('.below-smart-sharing-container #personalizedMessage').hide();
|
928 |
-
// $('.below-smart-sharing-container .customize-your-buttons').html('Your buttons are currently customized. <a href="#" class="below-customize-sharing-link customize-your-buttons">Show customization</a>.');
|
929 |
-
}
|
930 |
-
|
931 |
aboveDisableSmartSharing.add(aboveradioInputs).not('#button_above').bind('click', function() {
|
932 |
|
933 |
abovecurrentRadioInput = $('input[name="addthis_settings[above]"]:checked');
|
@@ -979,12 +963,7 @@
|
|
979 |
|
980 |
}
|
981 |
|
982 |
-
if(abovecurrentStyle === 'horizontal' && $('#above_previewContainer').width() < 380) {
|
983 |
-
$('#above_previewContainer').css({ 'width': '380px' });
|
984 |
-
}
|
985 |
-
|
986 |
aboveSmartSharingInnerContainer.show();
|
987 |
-
$('.above-customize-sharing-link, .customize-sharing-checkbox').show();
|
988 |
|
989 |
});
|
990 |
|
@@ -1039,39 +1018,21 @@
|
|
1039 |
|
1040 |
}
|
1041 |
|
1042 |
-
if(belowcurrentStyle === 'horizontal' && $('#below_previewContainer').width() < 380) {
|
1043 |
-
$('#below_previewContainer').css({ 'width': '380px' });
|
1044 |
-
}
|
1045 |
-
|
1046 |
belowSmartSharingInnerContainer.show();
|
1047 |
-
$('.below-customize-sharing-link, .customize-sharing-checkbox').show();
|
1048 |
|
1049 |
});
|
1050 |
|
1051 |
$('#button_above').click(function() {
|
1052 |
var self = $(this);
|
1053 |
-
$('.previewbox').removeClass('previewboxbg');
|
1054 |
aboveSmartSharingInnerContainer.hide();
|
1055 |
-
$('.above-customize-sharing-link, .customize-sharing-checkbox').hide();
|
1056 |
-
$('#above_previewContainer').css({ 'width': '100%', 'margin-right': 'auto' });
|
1057 |
});
|
1058 |
|
1059 |
$('#button_below').click(function() {
|
1060 |
var self = $(this);
|
1061 |
-
$('.previewbox').removeClass('previewboxbg');
|
1062 |
belowSmartSharingInnerContainer.hide();
|
1063 |
-
$('.below-customize-sharing-link, .customize-sharing-checkbox').hide();
|
1064 |
-
$('#below_previewContainer').css({ 'width': '100%', 'margin-right': 'auto' });
|
1065 |
});
|
1066 |
|
1067 |
aboveEnableSmartSharing.bind('click', function() {
|
1068 |
-
if($('#above-chosen-list').val() != "") {
|
1069 |
-
$('.above-smart-sharing-container #customizedMessage').hide();
|
1070 |
-
$('#above-chosen-list').val('');
|
1071 |
-
}
|
1072 |
-
else {
|
1073 |
-
$('.above-smart-sharing-container #customizedMessage').hide();
|
1074 |
-
}
|
1075 |
|
1076 |
currentRadioInput = $('input[name="addthis_settings[above]"]:checked');
|
1077 |
|
@@ -1089,13 +1050,8 @@
|
|
1089 |
|
1090 |
belowEnableSmartSharing.bind('click', function() {
|
1091 |
|
1092 |
-
|
1093 |
-
|
1094 |
-
$('#below-chosen-list').val('');
|
1095 |
-
}
|
1096 |
-
else {
|
1097 |
-
$('.below-smart-sharing-container #customizedMessage').hide();
|
1098 |
-
}
|
1099 |
|
1100 |
currentRadioInput = $('input[name="addthis_settings[below]"]:checked');
|
1101 |
|
@@ -1488,56 +1444,6 @@
|
|
1488 |
|
1489 |
});
|
1490 |
|
1491 |
-
$('.above-customize-sharing-link').bind('click', function(ev) {
|
1492 |
-
|
1493 |
-
var aboveSmartSharingLink = $('.above-smart-sharing-container .smart-sharing-link'),
|
1494 |
-
customizeButtonLink = $('.above-smart-sharing-container .customize-your-buttons');
|
1495 |
-
|
1496 |
-
ev.preventDefault();
|
1497 |
-
|
1498 |
-
if($(this).is(customizeButtonLink)) {
|
1499 |
-
customizeButtonLink.hide();
|
1500 |
-
aboveSmartSharingLink.show();
|
1501 |
-
if(!aboveDisableSmartSharing.is(':checked')) {
|
1502 |
-
aboveDisableSmartSharing.prop('checked', true).trigger('click');
|
1503 |
-
}
|
1504 |
-
}
|
1505 |
-
|
1506 |
-
else if($(this).is(aboveSmartSharingLink)) {
|
1507 |
-
aboveSmartSharingLink.hide();
|
1508 |
-
customizeButtonLink.show();
|
1509 |
-
if(!aboveEnableSmartSharing.is(':checked')) {
|
1510 |
-
aboveEnableSmartSharing.prop('checked', true).trigger('click');
|
1511 |
-
}
|
1512 |
-
}
|
1513 |
-
|
1514 |
-
});
|
1515 |
-
|
1516 |
-
$('.below-customize-sharing-link').bind('click', function(ev) {
|
1517 |
-
|
1518 |
-
var belowSmartSharingLink = $('.below-smart-sharing-container .smart-sharing-link'),
|
1519 |
-
customizeButtonLink = $('.below-smart-sharing-container .customize-your-buttons');
|
1520 |
-
|
1521 |
-
ev.preventDefault();
|
1522 |
-
|
1523 |
-
if($(this).is(customizeButtonLink)) {
|
1524 |
-
customizeButtonLink.hide();
|
1525 |
-
belowSmartSharingLink.show();
|
1526 |
-
if(!belowDisableSmartSharing.is(':checked')) {
|
1527 |
-
belowDisableSmartSharing.prop('checked', true).trigger('click');
|
1528 |
-
}
|
1529 |
-
}
|
1530 |
-
|
1531 |
-
else if($(this).is(belowSmartSharingLink)) {
|
1532 |
-
belowSmartSharingLink.hide();
|
1533 |
-
customizeButtonLink.show();
|
1534 |
-
if(!belowEnableSmartSharing.is(':checked')) {
|
1535 |
-
belowEnableSmartSharing.prop('checked', true).trigger('click');
|
1536 |
-
}
|
1537 |
-
}
|
1538 |
-
|
1539 |
-
});
|
1540 |
-
|
1541 |
$('body').bind({
|
1542 |
|
1543 |
'populatedList': function() {
|
@@ -1662,8 +1568,8 @@
|
|
1662 |
// Makes the new list sortable
|
1663 |
$('.below-smart-sharing-container .sortable').sortable().disableSelection().sortable('option', 'connectWith', '.sortable');
|
1664 |
}, 0);
|
1665 |
-
}
|
1666 |
-
});
|
1667 |
|
1668 |
}(window.jQuery, window, document));
|
1669 |
|
800 |
});
|
801 |
}
|
802 |
|
|
|
803 |
},
|
804 |
|
805 |
|
851 |
});
|
852 |
});
|
853 |
}
|
|
|
854 |
},
|
855 |
|
856 |
'events': function() {
|
890 |
sortableListItemsCloseIcons = sortableSelectedListItems.find('.close'),
|
891 |
aboveRestoreDefaultOptions = $('.above-smart-sharing-container .restore-default-options'),
|
892 |
belowRestoreDefaultOptions = $('.below-smart-sharing-container .restore-default-options'),
|
|
|
893 |
aboverestoreToDefault = _.debounce(function() {
|
894 |
// Updates the personalization UI
|
895 |
self.abovepopulateSharingServices(true);
|
912 |
trackPageView('/tracker/gtc/' + (window.page || '') + '/event/disable_customization');
|
913 |
}, 1000, true);
|
914 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
915 |
aboveDisableSmartSharing.add(aboveradioInputs).not('#button_above').bind('click', function() {
|
916 |
|
917 |
abovecurrentRadioInput = $('input[name="addthis_settings[above]"]:checked');
|
963 |
|
964 |
}
|
965 |
|
|
|
|
|
|
|
|
|
966 |
aboveSmartSharingInnerContainer.show();
|
|
|
967 |
|
968 |
});
|
969 |
|
1018 |
|
1019 |
}
|
1020 |
|
|
|
|
|
|
|
|
|
1021 |
belowSmartSharingInnerContainer.show();
|
|
|
1022 |
|
1023 |
});
|
1024 |
|
1025 |
$('#button_above').click(function() {
|
1026 |
var self = $(this);
|
|
|
1027 |
aboveSmartSharingInnerContainer.hide();
|
|
|
|
|
1028 |
});
|
1029 |
|
1030 |
$('#button_below').click(function() {
|
1031 |
var self = $(this);
|
|
|
1032 |
belowSmartSharingInnerContainer.hide();
|
|
|
|
|
1033 |
});
|
1034 |
|
1035 |
aboveEnableSmartSharing.bind('click', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1036 |
|
1037 |
currentRadioInput = $('input[name="addthis_settings[above]"]:checked');
|
1038 |
|
1050 |
|
1051 |
belowEnableSmartSharing.bind('click', function() {
|
1052 |
|
1053 |
+
|
1054 |
+
|
|
|
|
|
|
|
|
|
|
|
1055 |
|
1056 |
currentRadioInput = $('input[name="addthis_settings[below]"]:checked');
|
1057 |
|
1444 |
|
1445 |
});
|
1446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1447 |
$('body').bind({
|
1448 |
|
1449 |
'populatedList': function() {
|
1568 |
// Makes the new list sortable
|
1569 |
$('.below-smart-sharing-container .sortable').sortable().disableSelection().sortable('option', 'connectWith', '.sortable');
|
1570 |
}, 0);
|
1571 |
+
}
|
1572 |
+
});
|
1573 |
|
1574 |
}(window.jQuery, window, document));
|
1575 |
|
js/options-page.32.js
CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
|
|
26 |
$( "#Card-below-post" ).tabs();
|
27 |
$( "#Card-side-sharing" ).tabs();
|
28 |
|
29 |
-
var thickDims, tbWidth, tbHeight, img =
|
30 |
|
31 |
thickDims = function() {
|
32 |
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
@@ -47,10 +47,8 @@ jQuery(document).ready(function($) {
|
|
47 |
|
48 |
var previewLink = this;
|
49 |
|
50 |
-
var $inputs = $('#addthis_settings :input');
|
51 |
-
|
52 |
var values = {};
|
53 |
-
$.each($('#
|
54 |
|
55 |
var thisName = field.name
|
56 |
if (thisName.indexOf("addthis_settings[") != -1 )
|
@@ -106,12 +104,10 @@ jQuery(document).ready(function($) {
|
|
106 |
if ( aboveCustom.is(':checked'))
|
107 |
{
|
108 |
$('.above_option_custom').removeClass('hidden');
|
109 |
-
$('#above .personalizedMessage').addClass('hidden');
|
110 |
}
|
111 |
else
|
112 |
{
|
113 |
$('.above_option_custom').addClass('hidden');
|
114 |
-
$('#above .personalizedMessage').removeClass('hidden');
|
115 |
}
|
116 |
};
|
117 |
|
@@ -120,12 +116,10 @@ jQuery(document).ready(function($) {
|
|
120 |
if ( belowCustom.is(':checked'))
|
121 |
{
|
122 |
$('.below_option_custom').removeClass('hidden');
|
123 |
-
$('#below .personalizedMessage').addClass('hidden');
|
124 |
}
|
125 |
else
|
126 |
{
|
127 |
$('.below_option_custom').addClass('hidden');
|
128 |
-
$('#below .personalizedMessage').removeClass('hidden');
|
129 |
}
|
130 |
};
|
131 |
|
@@ -154,12 +148,10 @@ jQuery(document).ready(function($) {
|
|
154 |
if ( aboveCustomString.is(':checked'))
|
155 |
{
|
156 |
$('.above_custom_string_input').removeClass('hidden');
|
157 |
-
$('#above .personalizedMessage').addClass('hidden');
|
158 |
}
|
159 |
else
|
160 |
{
|
161 |
$('.above_custom_string_input').addClass('hidden');
|
162 |
-
$('#above .personalizedMessage').removeClass('hidden');
|
163 |
}
|
164 |
};
|
165 |
|
@@ -168,12 +160,10 @@ jQuery(document).ready(function($) {
|
|
168 |
if ( belowCustomString.is(':checked'))
|
169 |
{
|
170 |
$('.below_custom_string_input').removeClass('hidden');
|
171 |
-
$('#below .personalizedMessage').addClass('hidden');
|
172 |
}
|
173 |
else
|
174 |
{
|
175 |
$('.below_custom_string_input').addClass('hidden');
|
176 |
-
$('#below .personalizedMessage').removeClass('hidden');
|
177 |
}
|
178 |
};
|
179 |
|
@@ -247,7 +237,7 @@ jQuery(document).ready(function($) {
|
|
247 |
} else {
|
248 |
window.skipValidationInternalError = true;
|
249 |
}
|
250 |
-
$("#
|
251 |
} else {
|
252 |
addthis_validation_message.html(data.credentialmessage);
|
253 |
addthis_profile_validation_message.html(data.profilemessage);
|
@@ -408,336 +398,99 @@ jQuery(document).ready(function($) {
|
|
408 |
return newservices;
|
409 |
}
|
410 |
|
411 |
-
function updatePreview(posn, style, option) {
|
412 |
-
var preview = '';
|
413 |
-
var service = option.split(', ');
|
414 |
-
var i;
|
415 |
-
|
416 |
-
if(style == 'large_toolbox') {
|
417 |
-
preview += '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">';
|
418 |
-
for (i = 0; i < (service.length); ++i) {
|
419 |
-
if(service[i] == 'counter') {
|
420 |
-
preview += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
421 |
-
} else {
|
422 |
-
preview += '<span class="at300bs at15nc at15t_'+service[i]+' at16t_'+service[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
423 |
-
}
|
424 |
-
}
|
425 |
-
preview += '</div>';
|
426 |
-
}
|
427 |
-
else if(style == 'fb_tw_p1_sc') {
|
428 |
-
for (i = 0; i < (service.length); ++i) {
|
429 |
-
if(service[i] == 'compact') {
|
430 |
-
preview += '<img src="'+addthis_option_params.img_base+'addthis_pill_style.png">';
|
431 |
-
}
|
432 |
-
else if(service[i] != 'counter') {
|
433 |
-
preview += '<img src="'+addthis_option_params.img_base+service[i]+'.png">';
|
434 |
-
}
|
435 |
-
}
|
436 |
-
}
|
437 |
-
else if(style == 'small_toolbox') {
|
438 |
-
for (i = 0; i < (service.length); ++i) {
|
439 |
-
if(service[i] == 'counter') {
|
440 |
-
preview += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float:left;" href="#" tabindex="0"></a>';
|
441 |
-
} else {
|
442 |
-
preview += '<span class="at300bs at15nc at15t_'+service[i]+' at16t_'+service[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
443 |
-
}
|
444 |
-
}
|
445 |
-
}
|
446 |
-
$('#'+posn+'_previewContainer').html(preview);
|
447 |
-
}
|
448 |
if($('#large_toolbox_above').is(':checked')) {
|
449 |
-
|
450 |
-
abvimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">';
|
451 |
-
} else {
|
452 |
-
abvimg += '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">';
|
453 |
-
var aboveserv = $('#above-chosen-list').val();
|
454 |
-
var aservice = aboveserv.split(', ');
|
455 |
-
var i;
|
456 |
-
for (i = 0; i < (aservice.length); ++i) {
|
457 |
-
if(aservice[i] == 'counter') {
|
458 |
-
abvimg += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
459 |
-
} else {
|
460 |
-
abvimg += '<span class="at300bs at15nc at15t_'+aservice[i]+' at16t_'+aservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
461 |
-
}
|
462 |
-
}
|
463 |
-
abvimg += '</div>';
|
464 |
-
}
|
465 |
-
$('.above_button_set').css('opacity', 1);
|
466 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
467 |
-
$('.above-smart-sharing-container').show();
|
468 |
-
$('#above_previewContainer').html(abvimg);
|
469 |
} else if($('#fb_tw_p1_sc_above').is(':checked')) {
|
470 |
-
|
471 |
-
abvimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">';
|
472 |
-
} else {
|
473 |
-
var aboveserv = $('#above-chosen-list').val();
|
474 |
-
var aservice = aboveserv.split(', ');
|
475 |
-
var i;
|
476 |
-
for (i = 0; i < (aservice.length); ++i) {
|
477 |
-
if(aservice[i] == 'compact') {
|
478 |
-
abvimg += '<img src="'+addthis_option_params.img_base+'addthis_pill_style.png">';
|
479 |
-
}
|
480 |
-
else if(aservice[i] != 'counter') {
|
481 |
-
abvimg += '<img src="'+addthis_option_params.img_base+aservice[i]+'.png">';
|
482 |
-
}
|
483 |
-
}
|
484 |
-
}
|
485 |
-
$('.above_button_set').css('opacity', 1);
|
486 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
487 |
-
$('.above-smart-sharing-container').show();
|
488 |
-
$('#above_previewContainer').html(abvimg);
|
489 |
} else if($('#small_toolbox_above').is(':checked')) {
|
490 |
-
|
491 |
-
abvimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">';
|
492 |
-
} else {
|
493 |
-
var aboveserv = $('#above-chosen-list').val();
|
494 |
-
var aservice = aboveserv.split(', ');
|
495 |
-
var i;
|
496 |
-
for (i = 0; i < (aservice.length); ++i) {
|
497 |
-
if(aservice[i] == 'counter') {
|
498 |
-
abvimg += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float:left;" href="#" tabindex="0"></a>';
|
499 |
-
} else {
|
500 |
-
abvimg += '<span class="at300bs at15nc at15t_'+aservice[i]+' at16t_'+aservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
501 |
-
}
|
502 |
-
}
|
503 |
-
}
|
504 |
-
$('.above_button_set').css('opacity', 1);
|
505 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
506 |
-
$('.above-smart-sharing-container').show();
|
507 |
-
$('#above_previewContainer').html(abvimg);
|
508 |
} else if($('#button_above').is(':checked')) {
|
509 |
-
|
510 |
-
$('.above_button_set').css('opacity', 1);
|
511 |
-
$('.above-customize-sharing-link').css('opacity', 0);
|
512 |
-
$('.above-smart-sharing-container').hide();
|
513 |
-
$('#above_previewContainer').html(abvimg);
|
514 |
} else if($('#above_custom_string').is(':checked')) {
|
515 |
-
$('.above_button_set').
|
516 |
-
$('.above-smart-sharing-container').hide();
|
517 |
-
} else if($('#disable_above').is(':checked')) {
|
518 |
-
abvimg = '';
|
519 |
-
$('.above_button_set').css('opacity', 0.4);
|
520 |
-
$('.above-customize-sharing-link').css('opacity', 0);
|
521 |
-
$('.above-smart-sharing-container').hide();
|
522 |
-
$('#above_previewContainer').html(abvimg);
|
523 |
}
|
524 |
|
525 |
if($('#large_toolbox_below').is(':checked')) {
|
526 |
-
|
527 |
-
belimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">';
|
528 |
-
} else {
|
529 |
-
belimg += '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">';
|
530 |
-
var belowserv = $('#below-chosen-list').val();
|
531 |
-
var bservice = belowserv.split(', ');
|
532 |
-
var i;
|
533 |
-
for (i = 0; i < (bservice.length); ++i) {
|
534 |
-
if(bservice[i] == 'counter') {
|
535 |
-
belimg +='<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
536 |
-
} else {
|
537 |
-
belimg += '<span class="at300bs at15nc at15t_'+bservice[i]+' at16t_'+bservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
538 |
-
}
|
539 |
-
}
|
540 |
-
belimg += '</div>';
|
541 |
-
|
542 |
-
}
|
543 |
-
$('.below_button_set').css('opacity', 1);
|
544 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
545 |
-
$('.below-smart-sharing-container').show();
|
546 |
-
$('#below_previewContainer').html(belimg);
|
547 |
} else if($('#fb_tw_p1_sc_below').is(':checked')) {
|
548 |
-
|
549 |
-
belimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">';
|
550 |
-
} else {
|
551 |
-
var belowserv = $('#below-chosen-list').val();
|
552 |
-
var bservice = belowserv.split(', ');
|
553 |
-
var i;
|
554 |
-
for (i = 0; i < (bservice.length-1); ++i) {
|
555 |
-
if(bservice[i] == 'compact') {
|
556 |
-
belimg += '<img src="'+addthis_option_params.img_base+'addthis_pill_style.png">';
|
557 |
-
} else if(bservice[i] != 'counter') {
|
558 |
-
belimg += '<img src="'+addthis_option_params.img_base+bservice[i]+'.png">';
|
559 |
-
}
|
560 |
-
}
|
561 |
-
}
|
562 |
-
$('.below_button_set').css('opacity', 1);
|
563 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
564 |
-
$('.below-smart-sharing-container').show();
|
565 |
-
$('#below_previewContainer').html(belimg);
|
566 |
} else if($('#small_toolbox_below').is(':checked')) {
|
567 |
-
|
568 |
-
belimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">';
|
569 |
-
} else {
|
570 |
-
var belowserv = $('#below-chosen-list').val();
|
571 |
-
var bservice = belowserv.split(', ');
|
572 |
-
var i;
|
573 |
-
for (i = 0; i < (bservice.length); ++i) {
|
574 |
-
if(bservice[i] == 'counter') {
|
575 |
-
belimg += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
576 |
-
} else {
|
577 |
-
belimg += '<span class="at300bs at15nc at15t_'+bservice[i]+' at16t_'+bservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
578 |
-
}
|
579 |
-
}
|
580 |
-
}
|
581 |
-
$('.below_button_set').css('opacity', 1);
|
582 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
583 |
-
$('.below-smart-sharing-container').show();
|
584 |
-
$('#below_previewContainer').html(belimg);
|
585 |
} else if($('#button_below').is(':checked')) {
|
586 |
-
|
587 |
-
$('.below_button_set').css('opacity', 1);
|
588 |
-
$('.below-customize-sharing-link').css('opacity', 0);
|
589 |
-
$('.below-smart-sharing-container').hide();
|
590 |
-
$('#below_previewContainer').html(belimg);
|
591 |
} else if($('#below_custom_string').is(':checked')) {
|
592 |
-
$('.below_button_set').
|
593 |
-
$('.below-smart-sharing-container').hide();
|
594 |
-
} else if($('#disable_below').is(':checked')) {
|
595 |
-
belimg = '';
|
596 |
-
$('.below_button_set').css('opacity', 0.4);
|
597 |
-
$('.below-customize-sharing-link').css('opacity', 0);
|
598 |
-
$('.below-smart-sharing-container').hide();
|
599 |
-
$('#below_previewContainer').html(belimg);
|
600 |
}
|
601 |
|
602 |
$("#large_toolbox_above").click( function() {
|
603 |
if($('#above-chosen-list').val() != '') {
|
604 |
var newserv = revertServices('above');
|
605 |
-
updatePreview('above', 'large_toolbox', newserv);
|
606 |
$('#above-chosen-list').val(newserv);
|
607 |
}
|
608 |
-
|
609 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">');
|
610 |
-
}
|
611 |
-
$('.above_button_set').css('opacity', 1);
|
612 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
613 |
-
$('.above-smart-sharing-container').show();
|
614 |
});
|
615 |
|
616 |
$("#large_toolbox_below").click( function() {
|
617 |
if($('#below-chosen-list').val() != '') {
|
618 |
var newserv = revertServices('below');
|
619 |
-
updatePreview('below', 'large_toolbox', newserv);
|
620 |
$('#below-chosen-list').val(newserv);
|
621 |
}
|
622 |
-
|
623 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">');
|
624 |
-
}
|
625 |
-
$('.below_button_set').css('opacity', 1);
|
626 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
627 |
-
$('.below-smart-sharing-container').show();
|
628 |
});
|
629 |
|
630 |
$("#fb_tw_p1_sc_above").click( function() {
|
631 |
if($('#above-chosen-list').val() != '') {
|
632 |
var newserv = rewriteServices('above');
|
633 |
-
updatePreview('above', 'fb_tw_p1_sc', newserv);
|
634 |
$('#above-chosen-list').val(newserv);
|
635 |
}
|
636 |
-
|
637 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">');
|
638 |
-
}
|
639 |
-
$('.above_button_set').css('opacity', 1);
|
640 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
641 |
-
$('.above-smart-sharing-container').show();
|
642 |
});
|
643 |
|
644 |
$("#fb_tw_p1_sc_below").click( function() {
|
645 |
if($('#below-chosen-list').val() != '') {
|
646 |
var newserv = rewriteServices('below');
|
647 |
-
updatePreview('below', 'fb_tw_p1_sc', newserv);
|
648 |
$('#below-chosen-list').val(newserv);
|
649 |
}
|
650 |
-
|
651 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">');
|
652 |
-
}
|
653 |
-
$('.below_button_set').css('opacity', 1);
|
654 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
655 |
-
$('.below-smart-sharing-container').show();
|
656 |
});
|
657 |
|
658 |
$("#small_toolbox_above").click( function() {
|
659 |
if($('#above-chosen-list').val() != '') {
|
660 |
var newserv = revertServices('above');
|
661 |
-
updatePreview('above', 'small_toolbox', newserv);
|
662 |
$('#above-chosen-list').val(newserv);
|
663 |
}
|
664 |
-
|
665 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">');
|
666 |
-
}
|
667 |
-
$('.above_button_set').css('opacity', 1);
|
668 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
669 |
-
$('.above-smart-sharing-container').show();
|
670 |
});
|
671 |
|
672 |
$("#small_toolbox_below").click( function() {
|
673 |
if($('#below-chosen-list').val() != '') {
|
674 |
var newserv = revertServices('below');
|
675 |
-
updatePreview('below', 'small_toolbox', newserv);
|
676 |
$('#below-chosen-list').val(newserv);
|
677 |
}
|
678 |
-
|
679 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">');
|
680 |
-
}
|
681 |
-
$('.below_button_set').css('opacity', 1);
|
682 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
683 |
-
$('.below-smart-sharing-container').show();
|
684 |
});
|
685 |
|
686 |
$("#button_above").click( function() {
|
687 |
-
|
688 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share.png">');
|
689 |
-
}
|
690 |
-
$('.above_button_set').css('opacity', 1);
|
691 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
692 |
-
$('.above-smart-sharing-container').show();
|
693 |
});
|
694 |
|
695 |
$("#above_custom_string").click( function() {
|
696 |
if($(this).is(':checked')){
|
697 |
-
$('.above_button_set').
|
698 |
-
$('.above-smart-sharing-container').hide();
|
699 |
} else {
|
700 |
-
$('.above_button_set').
|
701 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
702 |
-
$('.above-smart-sharing-container').show();
|
703 |
}
|
704 |
});
|
705 |
|
706 |
$("#button_below").click( function() {
|
707 |
-
|
708 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share.png">');
|
709 |
-
}
|
710 |
-
$('.below_button_set').css('opacity', 1);
|
711 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
712 |
-
$('.below-smart-sharing-container').show();
|
713 |
});
|
714 |
|
715 |
$("#below_custom_string").click( function() {
|
716 |
if($(this).is(':checked')){
|
717 |
-
$('.below_button_set').
|
718 |
-
$('.below-smart-sharing-container').hide();
|
719 |
} else {
|
720 |
-
$('.below_button_set').
|
721 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
722 |
-
$('.below-smart-sharing-container').show();
|
723 |
-
}
|
724 |
-
});
|
725 |
-
|
726 |
-
$("#disable_above").click( function() {
|
727 |
-
if($(this).is(':checked')){
|
728 |
-
$('#above_previewContainer').html('');
|
729 |
-
$('.above_button_set').css('opacity', 0.4);
|
730 |
-
$('.above-customize-sharing-link').css('opacity', 0);
|
731 |
-
$('.above-smart-sharing-container').hide();
|
732 |
-
}
|
733 |
-
});
|
734 |
-
|
735 |
-
$("#disable_below").click( function() {
|
736 |
-
if($(this).is(':checked')){
|
737 |
-
$('#below_previewContainer').html('');
|
738 |
-
$('.below_button_set').css('opacity', 0.4);
|
739 |
-
$('.below-customize-sharing-link').css('opacity', 0);
|
740 |
-
$('.below-smart-sharing-container').hide();
|
741 |
}
|
742 |
});
|
743 |
|
@@ -745,8 +498,6 @@ jQuery(document).ready(function($) {
|
|
745 |
if($('#above-disable-smart-sharing').is(':checked')) {
|
746 |
if($('#button_above').is(':checked')) {
|
747 |
$('#above-chosen-list').val('');
|
748 |
-
} else if($('#disable_above').is(':checked')) {
|
749 |
-
$('#above-chosen-list').val('');
|
750 |
} else {
|
751 |
var list = [];
|
752 |
$('.above-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
@@ -767,15 +518,10 @@ jQuery(document).ready(function($) {
|
|
767 |
if($('#button_above').is(':checked')) {
|
768 |
$('#above-chosen-list').val('');
|
769 |
}
|
770 |
-
if($('#disable_above').is(':checked')) {
|
771 |
-
$('#above-chosen-list').val('');
|
772 |
-
}
|
773 |
|
774 |
if($('#below-disable-smart-sharing').is(':checked')) {
|
775 |
if($('#button_below').is(':checked')) {
|
776 |
$('#below-chosen-list').val('');
|
777 |
-
} else if($('#disable_below').is(':checked')) {
|
778 |
-
$('#below-chosen-list').val('');
|
779 |
} else {
|
780 |
var list = [];
|
781 |
$('.below-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
@@ -796,9 +542,6 @@ jQuery(document).ready(function($) {
|
|
796 |
if($('#button_below').is(':checked')) {
|
797 |
$('#below-chosen-list').val('');
|
798 |
}
|
799 |
-
if($('#disable_below').is(':checked')) {
|
800 |
-
$('#below-chosen-list').val('');
|
801 |
-
}
|
802 |
|
803 |
if($("#tabs .ui-state-active > a").html() == "Mode") {
|
804 |
$( "#tabs" ).tabs("option", "active", 0);
|
@@ -806,19 +549,6 @@ jQuery(document).ready(function($) {
|
|
806 |
|
807 |
});
|
808 |
|
809 |
-
$('.folded #collapse-menu').click(function(){
|
810 |
-
$('#preview_floater').removeClass();
|
811 |
-
var s = $("#preview_floater");
|
812 |
-
var pos = s.position();
|
813 |
-
$(window).scroll(function() {
|
814 |
-
var windowpos = $(window).scrollTop();
|
815 |
-
|
816 |
-
if (windowpos >= pos.top) {
|
817 |
-
setTimeout(function(){$('#preview_floater').addClass('stick');},1);
|
818 |
-
}
|
819 |
-
});
|
820 |
-
});
|
821 |
-
|
822 |
var dataContent = '';
|
823 |
var dataTitle = '';
|
824 |
var innerContent = '';
|
@@ -872,9 +602,9 @@ jQuery(document).ready(function($) {
|
|
872 |
});
|
873 |
|
874 |
//Setting checkbox checked
|
875 |
-
$('.switch').click(function()
|
876 |
{
|
877 |
-
$(this).toggleClass("switchOn");
|
878 |
var id = $(this).attr('id').replace('_switch','');
|
879 |
if($('#'+id).attr('checked')){
|
880 |
$('#'+id).prop('checked', false);
|
26 |
$( "#Card-below-post" ).tabs();
|
27 |
$( "#Card-side-sharing" ).tabs();
|
28 |
|
29 |
+
var thickDims, tbWidth, tbHeight, img = '';
|
30 |
|
31 |
thickDims = function() {
|
32 |
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
47 |
|
48 |
var previewLink = this;
|
49 |
|
|
|
|
|
50 |
var values = {};
|
51 |
+
$.each($('#addthis-settings').serializeArray(), function(i, field) {
|
52 |
|
53 |
var thisName = field.name
|
54 |
if (thisName.indexOf("addthis_settings[") != -1 )
|
104 |
if ( aboveCustom.is(':checked'))
|
105 |
{
|
106 |
$('.above_option_custom').removeClass('hidden');
|
|
|
107 |
}
|
108 |
else
|
109 |
{
|
110 |
$('.above_option_custom').addClass('hidden');
|
|
|
111 |
}
|
112 |
};
|
113 |
|
116 |
if ( belowCustom.is(':checked'))
|
117 |
{
|
118 |
$('.below_option_custom').removeClass('hidden');
|
|
|
119 |
}
|
120 |
else
|
121 |
{
|
122 |
$('.below_option_custom').addClass('hidden');
|
|
|
123 |
}
|
124 |
};
|
125 |
|
148 |
if ( aboveCustomString.is(':checked'))
|
149 |
{
|
150 |
$('.above_custom_string_input').removeClass('hidden');
|
|
|
151 |
}
|
152 |
else
|
153 |
{
|
154 |
$('.above_custom_string_input').addClass('hidden');
|
|
|
155 |
}
|
156 |
};
|
157 |
|
160 |
if ( belowCustomString.is(':checked'))
|
161 |
{
|
162 |
$('.below_custom_string_input').removeClass('hidden');
|
|
|
163 |
}
|
164 |
else
|
165 |
{
|
166 |
$('.below_custom_string_input').addClass('hidden');
|
|
|
167 |
}
|
168 |
};
|
169 |
|
237 |
} else {
|
238 |
window.skipValidationInternalError = true;
|
239 |
}
|
240 |
+
$("#addthis-settings").submit();
|
241 |
} else {
|
242 |
addthis_validation_message.html(data.credentialmessage);
|
243 |
addthis_profile_validation_message.html(data.profilemessage);
|
398 |
return newservices;
|
399 |
}
|
400 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
if($('#large_toolbox_above').is(':checked')) {
|
402 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
} else if($('#fb_tw_p1_sc_above').is(':checked')) {
|
404 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
} else if($('#small_toolbox_above').is(':checked')) {
|
406 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
} else if($('#button_above').is(':checked')) {
|
408 |
+
$('.above_button_set').hide();
|
|
|
|
|
|
|
|
|
409 |
} else if($('#above_custom_string').is(':checked')) {
|
410 |
+
$('.above_button_set').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
}
|
412 |
|
413 |
if($('#large_toolbox_below').is(':checked')) {
|
414 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
} else if($('#fb_tw_p1_sc_below').is(':checked')) {
|
416 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
} else if($('#small_toolbox_below').is(':checked')) {
|
418 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
} else if($('#button_below').is(':checked')) {
|
420 |
+
$('.below_button_set').hide();
|
|
|
|
|
|
|
|
|
421 |
} else if($('#below_custom_string').is(':checked')) {
|
422 |
+
$('.below_button_set').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
}
|
424 |
|
425 |
$("#large_toolbox_above").click( function() {
|
426 |
if($('#above-chosen-list').val() != '') {
|
427 |
var newserv = revertServices('above');
|
|
|
428 |
$('#above-chosen-list').val(newserv);
|
429 |
}
|
430 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
431 |
});
|
432 |
|
433 |
$("#large_toolbox_below").click( function() {
|
434 |
if($('#below-chosen-list').val() != '') {
|
435 |
var newserv = revertServices('below');
|
|
|
436 |
$('#below-chosen-list').val(newserv);
|
437 |
}
|
438 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
439 |
});
|
440 |
|
441 |
$("#fb_tw_p1_sc_above").click( function() {
|
442 |
if($('#above-chosen-list').val() != '') {
|
443 |
var newserv = rewriteServices('above');
|
|
|
444 |
$('#above-chosen-list').val(newserv);
|
445 |
}
|
446 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
447 |
});
|
448 |
|
449 |
$("#fb_tw_p1_sc_below").click( function() {
|
450 |
if($('#below-chosen-list').val() != '') {
|
451 |
var newserv = rewriteServices('below');
|
|
|
452 |
$('#below-chosen-list').val(newserv);
|
453 |
}
|
454 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
455 |
});
|
456 |
|
457 |
$("#small_toolbox_above").click( function() {
|
458 |
if($('#above-chosen-list').val() != '') {
|
459 |
var newserv = revertServices('above');
|
|
|
460 |
$('#above-chosen-list').val(newserv);
|
461 |
}
|
462 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
463 |
});
|
464 |
|
465 |
$("#small_toolbox_below").click( function() {
|
466 |
if($('#below-chosen-list').val() != '') {
|
467 |
var newserv = revertServices('below');
|
|
|
468 |
$('#below-chosen-list').val(newserv);
|
469 |
}
|
470 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
471 |
});
|
472 |
|
473 |
$("#button_above").click( function() {
|
474 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
475 |
});
|
476 |
|
477 |
$("#above_custom_string").click( function() {
|
478 |
if($(this).is(':checked')){
|
479 |
+
$('.above_button_set').hide();
|
|
|
480 |
} else {
|
481 |
+
$('.above_button_set').show();
|
|
|
|
|
482 |
}
|
483 |
});
|
484 |
|
485 |
$("#button_below").click( function() {
|
486 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
487 |
});
|
488 |
|
489 |
$("#below_custom_string").click( function() {
|
490 |
if($(this).is(':checked')){
|
491 |
+
$('.below_button_set').hide();
|
|
|
492 |
} else {
|
493 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
}
|
495 |
});
|
496 |
|
498 |
if($('#above-disable-smart-sharing').is(':checked')) {
|
499 |
if($('#button_above').is(':checked')) {
|
500 |
$('#above-chosen-list').val('');
|
|
|
|
|
501 |
} else {
|
502 |
var list = [];
|
503 |
$('.above-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
518 |
if($('#button_above').is(':checked')) {
|
519 |
$('#above-chosen-list').val('');
|
520 |
}
|
|
|
|
|
|
|
521 |
|
522 |
if($('#below-disable-smart-sharing').is(':checked')) {
|
523 |
if($('#button_below').is(':checked')) {
|
524 |
$('#below-chosen-list').val('');
|
|
|
|
|
525 |
} else {
|
526 |
var list = [];
|
527 |
$('.below-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
542 |
if($('#button_below').is(':checked')) {
|
543 |
$('#below-chosen-list').val('');
|
544 |
}
|
|
|
|
|
|
|
545 |
|
546 |
if($("#tabs .ui-state-active > a").html() == "Mode") {
|
547 |
$( "#tabs" ).tabs("option", "active", 0);
|
549 |
|
550 |
});
|
551 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
var dataContent = '';
|
553 |
var dataTitle = '';
|
554 |
var innerContent = '';
|
602 |
});
|
603 |
|
604 |
//Setting checkbox checked
|
605 |
+
$('.addthis-switch').click(function()
|
606 |
{
|
607 |
+
$(this).toggleClass("addthis-switchOn");
|
608 |
var id = $(this).attr('id').replace('_switch','');
|
609 |
if($('#'+id).attr('checked')){
|
610 |
$('#'+id).prop('checked', false);
|
js/options-page.js
CHANGED
@@ -23,7 +23,7 @@ jQuery(document).ready(function($) {
|
|
23 |
$( "#share-error" ).hide();
|
24 |
$( "#tabs" ).tabs();
|
25 |
|
26 |
-
var thickDims, tbWidth, tbHeight, img =
|
27 |
|
28 |
thickDims = function() {
|
29 |
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
@@ -44,10 +44,8 @@ jQuery(document).ready(function($) {
|
|
44 |
|
45 |
var previewLink = this;
|
46 |
|
47 |
-
var $inputs = $('#addthis_settings :input');
|
48 |
-
|
49 |
var values = {};
|
50 |
-
$.each($('#
|
51 |
|
52 |
var thisName = field.name
|
53 |
if (thisName.indexOf("addthis_settings[") != -1 )
|
@@ -91,9 +89,7 @@ jQuery(document).ready(function($) {
|
|
91 |
$('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
92 |
$('#TB_closeAjaxWindow').css({'float':'left'});
|
93 |
$('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
94 |
-
|
95 |
$('#TB_iframeContent').width('100%');
|
96 |
-
|
97 |
thickDims();
|
98 |
|
99 |
});
|
@@ -105,12 +101,10 @@ jQuery(document).ready(function($) {
|
|
105 |
if ( aboveCustom.is(':checked'))
|
106 |
{
|
107 |
$('.above_option_custom').removeClass('hidden');
|
108 |
-
$('#above .personalizedMessage').addClass('hidden');
|
109 |
}
|
110 |
else
|
111 |
{
|
112 |
$('.above_option_custom').addClass('hidden');
|
113 |
-
$('#above .personalizedMessage').removeClass('hidden');
|
114 |
}
|
115 |
};
|
116 |
|
@@ -119,12 +113,10 @@ jQuery(document).ready(function($) {
|
|
119 |
if ( belowCustom.is(':checked'))
|
120 |
{
|
121 |
$('.below_option_custom').removeClass('hidden');
|
122 |
-
$('#below .personalizedMessage').addClass('hidden');
|
123 |
}
|
124 |
else
|
125 |
{
|
126 |
$('.below_option_custom').addClass('hidden');
|
127 |
-
$('#below .personalizedMessage').removeClass('hidden');
|
128 |
}
|
129 |
};
|
130 |
|
@@ -153,12 +145,10 @@ jQuery(document).ready(function($) {
|
|
153 |
if ( aboveCustomString.is(':checked'))
|
154 |
{
|
155 |
$('.above_custom_string_input').removeClass('hidden');
|
156 |
-
$('#above .personalizedMessage').addClass('hidden');
|
157 |
}
|
158 |
else
|
159 |
{
|
160 |
$('.above_custom_string_input').addClass('hidden');
|
161 |
-
$('#above .personalizedMessage').removeClass('hidden');
|
162 |
}
|
163 |
};
|
164 |
|
@@ -167,12 +157,10 @@ jQuery(document).ready(function($) {
|
|
167 |
if ( belowCustomString.is(':checked'))
|
168 |
{
|
169 |
$('.below_custom_string_input').removeClass('hidden');
|
170 |
-
$('#below .personalizedMessage').addClass('hidden');
|
171 |
}
|
172 |
else
|
173 |
{
|
174 |
$('.below_custom_string_input').addClass('hidden');
|
175 |
-
$('#below .personalizedMessage').removeClass('hidden');
|
176 |
}
|
177 |
};
|
178 |
|
@@ -246,7 +234,7 @@ jQuery(document).ready(function($) {
|
|
246 |
} else {
|
247 |
window.skipValidationInternalError = true;
|
248 |
}
|
249 |
-
$("#
|
250 |
} else {
|
251 |
addthis_validation_message.html(data.credentialmessage);
|
252 |
addthis_profile_validation_message.html(data.profilemessage);
|
@@ -407,335 +395,99 @@ jQuery(document).ready(function($) {
|
|
407 |
return newservices;
|
408 |
}
|
409 |
|
410 |
-
function updatePreview(posn, style, option) {
|
411 |
-
var preview = '';
|
412 |
-
var service = option.split(', ');
|
413 |
-
var i;
|
414 |
-
if(style == 'large_toolbox') {
|
415 |
-
preview += '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">';
|
416 |
-
for (i = 0; i < (service.length); ++i) {
|
417 |
-
if(service[i] == 'counter') {
|
418 |
-
preview += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
419 |
-
} else {
|
420 |
-
preview += '<span class="at300bs at15nc at15t_'+service[i]+' at16t_'+service[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
421 |
-
}
|
422 |
-
}
|
423 |
-
preview += '</div>';
|
424 |
-
}
|
425 |
-
else if(style == 'fb_tw_p1_sc') {
|
426 |
-
for (i = 0; i < (service.length); ++i) {
|
427 |
-
if(service[i] == 'compact') {
|
428 |
-
preview += '<img src="'+addthis_option_params.img_base+'addthis_pill_style.png">';
|
429 |
-
}
|
430 |
-
else if(service[i] != 'counter') {
|
431 |
-
preview += '<img src="'+addthis_option_params.img_base+service[i]+'.png">';
|
432 |
-
}
|
433 |
-
}
|
434 |
-
}
|
435 |
-
else if(style == 'small_toolbox') {
|
436 |
-
for (i = 0; i < (service.length); ++i) {
|
437 |
-
if(service[i] == 'counter') {
|
438 |
-
preview += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float:left;" href="#" tabindex="0"></a>';
|
439 |
-
} else {
|
440 |
-
preview += '<span class="at300bs at15nc at15t_'+service[i]+' at16t_'+service[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
441 |
-
}
|
442 |
-
}
|
443 |
-
}
|
444 |
-
$('#'+posn+'_previewContainer').html(preview);
|
445 |
-
}
|
446 |
if($('#large_toolbox_above').is(':checked')) {
|
447 |
-
|
448 |
-
abvimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">';
|
449 |
-
} else {
|
450 |
-
abvimg += '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">';
|
451 |
-
var aboveserv = $('#above-chosen-list').val();
|
452 |
-
var aservice = aboveserv.split(', ');
|
453 |
-
var i;
|
454 |
-
for (i = 0; i < (aservice.length); ++i) {
|
455 |
-
if(aservice[i] == 'counter') {
|
456 |
-
abvimg += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
457 |
-
} else {
|
458 |
-
abvimg += '<span class="at300bs at15nc at15t_'+aservice[i]+' at16t_'+aservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
459 |
-
}
|
460 |
-
}
|
461 |
-
abvimg += '</div>';
|
462 |
-
}
|
463 |
-
$('.above_button_set').css('opacity', 1);
|
464 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
465 |
-
$('.above-smart-sharing-container').show();
|
466 |
-
$('#above_previewContainer').html(abvimg);
|
467 |
} else if($('#fb_tw_p1_sc_above').is(':checked')) {
|
468 |
-
|
469 |
-
abvimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">';
|
470 |
-
} else {
|
471 |
-
var aboveserv = $('#above-chosen-list').val();
|
472 |
-
var aservice = aboveserv.split(', ');
|
473 |
-
var i;
|
474 |
-
for (i = 0; i < (aservice.length); ++i) {
|
475 |
-
if(aservice[i] == 'compact') {
|
476 |
-
abvimg += '<img src="'+addthis_option_params.img_base+'addthis_pill_style.png">';
|
477 |
-
}
|
478 |
-
else if(aservice[i] != 'counter') {
|
479 |
-
abvimg += '<img src="'+addthis_option_params.img_base+aservice[i]+'.png">';
|
480 |
-
}
|
481 |
-
}
|
482 |
-
}
|
483 |
-
$('.above_button_set').css('opacity', 1);
|
484 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
485 |
-
$('.above-smart-sharing-container').show();
|
486 |
-
$('#above_previewContainer').html(abvimg);
|
487 |
} else if($('#small_toolbox_above').is(':checked')) {
|
488 |
-
|
489 |
-
abvimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">';
|
490 |
-
} else {
|
491 |
-
var aboveserv = $('#above-chosen-list').val();
|
492 |
-
var aservice = aboveserv.split(', ');
|
493 |
-
var i;
|
494 |
-
for (i = 0; i < (aservice.length); ++i) {
|
495 |
-
if(aservice[i] == 'counter') {
|
496 |
-
abvimg += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float:left;" href="#" tabindex="0"></a>';
|
497 |
-
} else {
|
498 |
-
abvimg += '<span class="at300bs at15nc at15t_'+aservice[i]+' at16t_'+aservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
499 |
-
}
|
500 |
-
}
|
501 |
-
}
|
502 |
-
$('.above_button_set').css('opacity', 1);
|
503 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
504 |
-
$('.above-smart-sharing-container').show();
|
505 |
-
$('#above_previewContainer').html(abvimg);
|
506 |
} else if($('#button_above').is(':checked')) {
|
507 |
-
|
508 |
-
$('.above_button_set').css('opacity', 1);
|
509 |
-
$('.above-customize-sharing-link').css('opacity', 0);
|
510 |
-
$('.above-smart-sharing-container').hide();
|
511 |
-
$('#above_previewContainer').html(abvimg);
|
512 |
} else if($('#above_custom_string').is(':checked')) {
|
513 |
-
$('.above_button_set').
|
514 |
-
$('.above-smart-sharing-container').hide();
|
515 |
-
} else if($('#disable_above').is(':checked')) {
|
516 |
-
abvimg = '';
|
517 |
-
$('.above_button_set').css('opacity', 0.4);
|
518 |
-
$('.above-customize-sharing-link').css('opacity', 0);
|
519 |
-
$('.above-smart-sharing-container').hide();
|
520 |
-
$('#above_previewContainer').html(abvimg);
|
521 |
}
|
522 |
|
523 |
if($('#large_toolbox_below').is(':checked')) {
|
524 |
-
|
525 |
-
belimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">';
|
526 |
-
} else {
|
527 |
-
belimg += '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">';
|
528 |
-
var belowserv = $('#below-chosen-list').val();
|
529 |
-
var bservice = belowserv.split(', ');
|
530 |
-
var i;
|
531 |
-
for (i = 0; i < (bservice.length); ++i) {
|
532 |
-
if(bservice[i] == 'counter') {
|
533 |
-
belimg +='<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
534 |
-
} else {
|
535 |
-
belimg += '<span class="at300bs at15nc at15t_'+bservice[i]+' at16t_'+bservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
536 |
-
}
|
537 |
-
}
|
538 |
-
belimg += '</div>';
|
539 |
-
|
540 |
-
}
|
541 |
-
$('.below_button_set').css('opacity', 1);
|
542 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
543 |
-
$('.below-smart-sharing-container').show();
|
544 |
-
$('#below_previewContainer').html(belimg);
|
545 |
} else if($('#fb_tw_p1_sc_below').is(':checked')) {
|
546 |
-
|
547 |
-
belimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">';
|
548 |
-
} else {
|
549 |
-
var belowserv = $('#below-chosen-list').val();
|
550 |
-
var bservice = belowserv.split(', ');
|
551 |
-
var i;
|
552 |
-
for (i = 0; i < (bservice.length-1); ++i) {
|
553 |
-
if(bservice[i] == 'compact') {
|
554 |
-
belimg += '<img src="'+addthis_option_params.img_base+'addthis_pill_style.png">';
|
555 |
-
} else if(bservice[i] != 'counter') {
|
556 |
-
belimg += '<img src="'+addthis_option_params.img_base+bservice[i]+'.png">';
|
557 |
-
}
|
558 |
-
}
|
559 |
-
}
|
560 |
-
$('.below_button_set').css('opacity', 1);
|
561 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
562 |
-
$('.below-smart-sharing-container').show();
|
563 |
-
$('#below_previewContainer').html(belimg);
|
564 |
} else if($('#small_toolbox_below').is(':checked')) {
|
565 |
-
|
566 |
-
belimg = '<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">';
|
567 |
-
} else {
|
568 |
-
var belowserv = $('#below-chosen-list').val();
|
569 |
-
var bservice = belowserv.split(', ');
|
570 |
-
var i;
|
571 |
-
for (i = 0; i < (bservice.length); ++i) {
|
572 |
-
if(bservice[i] == 'counter') {
|
573 |
-
belimg += '<a class="addthis_counter addthis_bubble_style" style="display: inline-block; float: left;" href="#" tabindex="0"></a>';
|
574 |
-
} else {
|
575 |
-
belimg += '<span class="at300bs at15nc at15t_'+bservice[i]+' at16t_'+bservice[i]+'" style="display:inline-block;padding-right:4px;vertical-align:middle;"></span>';
|
576 |
-
}
|
577 |
-
}
|
578 |
-
}
|
579 |
-
$('.below_button_set').css('opacity', 1);
|
580 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
581 |
-
$('.below-smart-sharing-container').show();
|
582 |
-
$('#below_previewContainer').html(belimg);
|
583 |
} else if($('#button_below').is(':checked')) {
|
584 |
-
|
585 |
-
$('.below_button_set').css('opacity', 1);
|
586 |
-
$('.below-customize-sharing-link').css('opacity', 0);
|
587 |
-
$('.below-smart-sharing-container').hide();
|
588 |
-
$('#below_previewContainer').html(belimg);
|
589 |
} else if($('#below_custom_string').is(':checked')) {
|
590 |
-
$('.below_button_set').
|
591 |
-
$('.below-smart-sharing-container').hide();
|
592 |
-
} else if($('#disable_below').is(':checked')) {
|
593 |
-
belimg = '';
|
594 |
-
$('.below_button_set').css('opacity', 0.4);
|
595 |
-
$('.below-customize-sharing-link').css('opacity', 0);
|
596 |
-
$('.below-smart-sharing-container').hide();
|
597 |
-
$('#below_previewContainer').html(belimg);
|
598 |
}
|
599 |
|
600 |
$("#large_toolbox_above").click( function() {
|
601 |
if($('#above-chosen-list').val() != '') {
|
602 |
var newserv = revertServices('above');
|
603 |
-
updatePreview('above', 'large_toolbox', newserv);
|
604 |
$('#above-chosen-list').val(newserv);
|
605 |
}
|
606 |
-
|
607 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">');
|
608 |
-
}
|
609 |
-
$('.above_button_set').css('opacity', 1);
|
610 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
611 |
-
$('.above-smart-sharing-container').show();
|
612 |
});
|
613 |
|
614 |
$("#large_toolbox_below").click( function() {
|
615 |
if($('#below-chosen-list').val() != '') {
|
616 |
var newserv = revertServices('below');
|
617 |
-
updatePreview('below', 'large_toolbox', newserv);
|
618 |
$('#below-chosen-list').val(newserv);
|
619 |
}
|
620 |
-
|
621 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-large.png">');
|
622 |
-
}
|
623 |
-
$('.below_button_set').css('opacity', 1);
|
624 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
625 |
-
$('.below-smart-sharing-container').show();
|
626 |
});
|
627 |
|
628 |
$("#fb_tw_p1_sc_above").click( function() {
|
629 |
if($('#above-chosen-list').val() != '') {
|
630 |
var newserv = rewriteServices('above');
|
631 |
-
updatePreview('above', 'fb_tw_p1_sc', newserv);
|
632 |
$('#above-chosen-list').val(newserv);
|
633 |
}
|
634 |
-
|
635 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">');
|
636 |
-
}
|
637 |
-
$('.above_button_set').css('opacity', 1);
|
638 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
639 |
-
$('.above-smart-sharing-container').show();
|
640 |
});
|
641 |
|
642 |
$("#fb_tw_p1_sc_below").click( function() {
|
643 |
if($('#below-chosen-list').val() != '') {
|
644 |
var newserv = rewriteServices('below');
|
645 |
-
updatePreview('below', 'fb_tw_p1_sc', newserv);
|
646 |
$('#below-chosen-list').val(newserv);
|
647 |
}
|
648 |
-
|
649 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share_rect.png">');
|
650 |
-
}
|
651 |
-
$('.below_button_set').css('opacity', 1);
|
652 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
653 |
-
$('.below-smart-sharing-container').show();
|
654 |
});
|
655 |
|
656 |
$("#small_toolbox_above").click( function() {
|
657 |
if($('#above-chosen-list').val() != '') {
|
658 |
var newserv = revertServices('above');
|
659 |
-
updatePreview('above', 'small_toolbox', newserv);
|
660 |
$('#above-chosen-list').val(newserv);
|
661 |
}
|
662 |
-
|
663 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">');
|
664 |
-
}
|
665 |
-
$('.above_button_set').css('opacity', 1);
|
666 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
667 |
-
$('.above-smart-sharing-container').show();
|
668 |
});
|
669 |
|
670 |
$("#small_toolbox_below").click( function() {
|
671 |
if($('#below-chosen-list').val() != '') {
|
672 |
var newserv = revertServices('below');
|
673 |
-
updatePreview('below', 'small_toolbox', newserv);
|
674 |
$('#below-chosen-list').val(newserv);
|
675 |
}
|
676 |
-
|
677 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'toolbox-small.png">');
|
678 |
-
}
|
679 |
-
$('.below_button_set').css('opacity', 1);
|
680 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
681 |
-
$('.below-smart-sharing-container').show();
|
682 |
});
|
683 |
|
684 |
$("#button_above").click( function() {
|
685 |
-
|
686 |
-
$('#above_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share.png">');
|
687 |
-
}
|
688 |
-
$('.above_button_set').css('opacity', 1);
|
689 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
690 |
-
$('.above-smart-sharing-container').show();
|
691 |
});
|
692 |
|
693 |
$("#above_custom_string").click( function() {
|
694 |
if($(this).is(':checked')){
|
695 |
-
$('.above_button_set').
|
696 |
-
$('.above-smart-sharing-container').hide();
|
697 |
} else {
|
698 |
-
$('.above_button_set').
|
699 |
-
$('.above-customize-sharing-link').css('opacity', 1);
|
700 |
-
$('.above-smart-sharing-container').show();
|
701 |
}
|
702 |
});
|
703 |
|
704 |
$("#button_below").click( function() {
|
705 |
-
|
706 |
-
$('#below_previewContainer').html('<img alt="large_toolbox" src="'+addthis_option_params.img_base+'horizontal_share.png">');
|
707 |
-
}
|
708 |
-
$('.below_button_set').css('opacity', 1);
|
709 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
710 |
-
$('.below-smart-sharing-container').show();
|
711 |
});
|
712 |
|
713 |
$("#below_custom_string").click( function() {
|
714 |
if($(this).is(':checked')){
|
715 |
-
$('.below_button_set').
|
716 |
-
$('.below-smart-sharing-container').hide();
|
717 |
} else {
|
718 |
-
$('.below_button_set').
|
719 |
-
$('.below-customize-sharing-link').css('opacity', 1);
|
720 |
-
$('.below-smart-sharing-container').show();
|
721 |
-
}
|
722 |
-
});
|
723 |
-
|
724 |
-
$("#disable_above").click( function() {
|
725 |
-
if($(this).is(':checked')){
|
726 |
-
$('#above_previewContainer').html('');
|
727 |
-
$('.above_button_set').css('opacity', 0.4);
|
728 |
-
$('.above-customize-sharing-link').css('opacity', 0);
|
729 |
-
$('.above-smart-sharing-container').hide();
|
730 |
-
}
|
731 |
-
});
|
732 |
-
|
733 |
-
$("#disable_below").click( function() {
|
734 |
-
if($(this).is(':checked')){
|
735 |
-
$('#below_previewContainer').html('');
|
736 |
-
$('.below_button_set').css('opacity', 0.4);
|
737 |
-
$('.below-customize-sharing-link').css('opacity', 0);
|
738 |
-
$('.below-smart-sharing-container').hide();
|
739 |
}
|
740 |
});
|
741 |
|
@@ -743,8 +495,6 @@ jQuery(document).ready(function($) {
|
|
743 |
if($('#above-disable-smart-sharing').is(':checked')) {
|
744 |
if($('#button_above').is(':checked')) {
|
745 |
$('#above-chosen-list').val('');
|
746 |
-
} else if($('#disable_above').is(':checked')) {
|
747 |
-
$('#above-chosen-list').val('');
|
748 |
} else {
|
749 |
var list = [];
|
750 |
$('.above-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
@@ -765,15 +515,10 @@ jQuery(document).ready(function($) {
|
|
765 |
if($('#button_above').is(':checked')) {
|
766 |
$('#above-chosen-list').val('');
|
767 |
}
|
768 |
-
if($('#disable_above').is(':checked')) {
|
769 |
-
$('#above-chosen-list').val('');
|
770 |
-
}
|
771 |
|
772 |
if($('#below-disable-smart-sharing').is(':checked')) {
|
773 |
if($('#button_below').is(':checked')) {
|
774 |
$('#below-chosen-list').val('');
|
775 |
-
} else if($('#disable_below').is(':checked')) {
|
776 |
-
$('#below-chosen-list').val('');
|
777 |
} else {
|
778 |
var list = [];
|
779 |
$('.below-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
@@ -794,35 +539,7 @@ jQuery(document).ready(function($) {
|
|
794 |
if($('#button_below').is(':checked')) {
|
795 |
$('#below-chosen-list').val('');
|
796 |
}
|
797 |
-
if($('#disable_below').is(':checked')) {
|
798 |
-
$('#below-chosen-list').val('');
|
799 |
-
}
|
800 |
-
|
801 |
-
});
|
802 |
-
|
803 |
-
var s = $("#preview_floater");
|
804 |
-
var pos = s.position();
|
805 |
-
$(window).scroll(function() {
|
806 |
-
var windowpos = $(window).scrollTop();
|
807 |
-
|
808 |
-
if (windowpos >= pos.top) {
|
809 |
-
s.addClass("stick");
|
810 |
-
} else {
|
811 |
-
s.removeClass("stick");
|
812 |
-
}
|
813 |
-
});
|
814 |
|
815 |
-
$('.folded #collapse-menu').click(function(){
|
816 |
-
$('#preview_floater').removeClass();
|
817 |
-
var s = $("#preview_floater");
|
818 |
-
var pos = s.position();
|
819 |
-
$(window).scroll(function() {
|
820 |
-
var windowpos = $(window).scrollTop();
|
821 |
-
|
822 |
-
if (windowpos >= pos.top) {
|
823 |
-
setTimeout(function(){$('#preview_floater').addClass('stick');},1);
|
824 |
-
}
|
825 |
-
});
|
826 |
});
|
827 |
|
828 |
var dataContent = '';
|
23 |
$( "#share-error" ).hide();
|
24 |
$( "#tabs" ).tabs();
|
25 |
|
26 |
+
var thickDims, tbWidth, tbHeight, img = '';
|
27 |
|
28 |
thickDims = function() {
|
29 |
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
44 |
|
45 |
var previewLink = this;
|
46 |
|
|
|
|
|
47 |
var values = {};
|
48 |
+
$.each($('#addthis-settings').serializeArray(), function(i, field) {
|
49 |
|
50 |
var thisName = field.name
|
51 |
if (thisName.indexOf("addthis_settings[") != -1 )
|
89 |
$('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
90 |
$('#TB_closeAjaxWindow').css({'float':'left'});
|
91 |
$('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
|
|
92 |
$('#TB_iframeContent').width('100%');
|
|
|
93 |
thickDims();
|
94 |
|
95 |
});
|
101 |
if ( aboveCustom.is(':checked'))
|
102 |
{
|
103 |
$('.above_option_custom').removeClass('hidden');
|
|
|
104 |
}
|
105 |
else
|
106 |
{
|
107 |
$('.above_option_custom').addClass('hidden');
|
|
|
108 |
}
|
109 |
};
|
110 |
|
113 |
if ( belowCustom.is(':checked'))
|
114 |
{
|
115 |
$('.below_option_custom').removeClass('hidden');
|
|
|
116 |
}
|
117 |
else
|
118 |
{
|
119 |
$('.below_option_custom').addClass('hidden');
|
|
|
120 |
}
|
121 |
};
|
122 |
|
145 |
if ( aboveCustomString.is(':checked'))
|
146 |
{
|
147 |
$('.above_custom_string_input').removeClass('hidden');
|
|
|
148 |
}
|
149 |
else
|
150 |
{
|
151 |
$('.above_custom_string_input').addClass('hidden');
|
|
|
152 |
}
|
153 |
};
|
154 |
|
157 |
if ( belowCustomString.is(':checked'))
|
158 |
{
|
159 |
$('.below_custom_string_input').removeClass('hidden');
|
|
|
160 |
}
|
161 |
else
|
162 |
{
|
163 |
$('.below_custom_string_input').addClass('hidden');
|
|
|
164 |
}
|
165 |
};
|
166 |
|
234 |
} else {
|
235 |
window.skipValidationInternalError = true;
|
236 |
}
|
237 |
+
$("#addthis-settings").submit();
|
238 |
} else {
|
239 |
addthis_validation_message.html(data.credentialmessage);
|
240 |
addthis_profile_validation_message.html(data.profilemessage);
|
395 |
return newservices;
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
if($('#large_toolbox_above').is(':checked')) {
|
399 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
} else if($('#fb_tw_p1_sc_above').is(':checked')) {
|
401 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
} else if($('#small_toolbox_above').is(':checked')) {
|
403 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
} else if($('#button_above').is(':checked')) {
|
405 |
+
$('.above_button_set').hide();
|
|
|
|
|
|
|
|
|
406 |
} else if($('#above_custom_string').is(':checked')) {
|
407 |
+
$('.above_button_set').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
}
|
409 |
|
410 |
if($('#large_toolbox_below').is(':checked')) {
|
411 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
} else if($('#fb_tw_p1_sc_below').is(':checked')) {
|
413 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
} else if($('#small_toolbox_below').is(':checked')) {
|
415 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
} else if($('#button_below').is(':checked')) {
|
417 |
+
$('.below_button_set').hide();
|
|
|
|
|
|
|
|
|
418 |
} else if($('#below_custom_string').is(':checked')) {
|
419 |
+
$('.below_button_set').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
}
|
421 |
|
422 |
$("#large_toolbox_above").click( function() {
|
423 |
if($('#above-chosen-list').val() != '') {
|
424 |
var newserv = revertServices('above');
|
|
|
425 |
$('#above-chosen-list').val(newserv);
|
426 |
}
|
427 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
428 |
});
|
429 |
|
430 |
$("#large_toolbox_below").click( function() {
|
431 |
if($('#below-chosen-list').val() != '') {
|
432 |
var newserv = revertServices('below');
|
|
|
433 |
$('#below-chosen-list').val(newserv);
|
434 |
}
|
435 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
436 |
});
|
437 |
|
438 |
$("#fb_tw_p1_sc_above").click( function() {
|
439 |
if($('#above-chosen-list').val() != '') {
|
440 |
var newserv = rewriteServices('above');
|
|
|
441 |
$('#above-chosen-list').val(newserv);
|
442 |
}
|
443 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
444 |
});
|
445 |
|
446 |
$("#fb_tw_p1_sc_below").click( function() {
|
447 |
if($('#below-chosen-list').val() != '') {
|
448 |
var newserv = rewriteServices('below');
|
|
|
449 |
$('#below-chosen-list').val(newserv);
|
450 |
}
|
451 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
452 |
});
|
453 |
|
454 |
$("#small_toolbox_above").click( function() {
|
455 |
if($('#above-chosen-list').val() != '') {
|
456 |
var newserv = revertServices('above');
|
|
|
457 |
$('#above-chosen-list').val(newserv);
|
458 |
}
|
459 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
460 |
});
|
461 |
|
462 |
$("#small_toolbox_below").click( function() {
|
463 |
if($('#below-chosen-list').val() != '') {
|
464 |
var newserv = revertServices('below');
|
|
|
465 |
$('#below-chosen-list').val(newserv);
|
466 |
}
|
467 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
468 |
});
|
469 |
|
470 |
$("#button_above").click( function() {
|
471 |
+
$('.above_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
472 |
});
|
473 |
|
474 |
$("#above_custom_string").click( function() {
|
475 |
if($(this).is(':checked')){
|
476 |
+
$('.above_button_set').hide();
|
|
|
477 |
} else {
|
478 |
+
$('.above_button_set').show();
|
|
|
|
|
479 |
}
|
480 |
});
|
481 |
|
482 |
$("#button_below").click( function() {
|
483 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
484 |
});
|
485 |
|
486 |
$("#below_custom_string").click( function() {
|
487 |
if($(this).is(':checked')){
|
488 |
+
$('.below_button_set').hide();
|
|
|
489 |
} else {
|
490 |
+
$('.below_button_set').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
}
|
492 |
});
|
493 |
|
495 |
if($('#above-disable-smart-sharing').is(':checked')) {
|
496 |
if($('#button_above').is(':checked')) {
|
497 |
$('#above-chosen-list').val('');
|
|
|
|
|
498 |
} else {
|
499 |
var list = [];
|
500 |
$('.above-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
515 |
if($('#button_above').is(':checked')) {
|
516 |
$('#above-chosen-list').val('');
|
517 |
}
|
|
|
|
|
|
|
518 |
|
519 |
if($('#below-disable-smart-sharing').is(':checked')) {
|
520 |
if($('#button_below').is(':checked')) {
|
521 |
$('#below-chosen-list').val('');
|
|
|
|
|
522 |
} else {
|
523 |
var list = [];
|
524 |
$('.below-smart-sharing-container .selected-services .ui-sortable').each(function(){
|
539 |
if($('#button_below').is(':checked')) {
|
540 |
$('#below-chosen-list').val('');
|
541 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
});
|
544 |
|
545 |
var dataContent = '';
|
readme.txt
CHANGED
@@ -86,6 +86,13 @@ PHP 5+ is preferred; PHP 4 is supported.
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
= 5.0 =
|
90 |
* Two functional modes allowing users to choose whether to control sharing buttons from within the WordPress admin area (with limited features), or through the AddThis Dashboard at addthis.com.
|
91 |
* Sharing sidebar configuration available within WordPress (in addition to the previously available sharing buttons above and below content).
|
@@ -320,7 +327,7 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
|
|
320 |
|
321 |
== Upgrade Notice ==
|
322 |
|
323 |
-
= 5.0 =
|
324 |
* Two functional modes allowing users to choose whether to control sharing buttons from within the WordPress admin area (with limited features), or through the AddThis Dashboard at addthis.com.
|
325 |
* Sharing sidebar configuration available within WordPress (in addition to the previously available sharing buttons above and below content).
|
326 |
* Seperate preferences for what sharing buttons appear on what templates.
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 5.0.1 =
|
90 |
+
* Improved migration of checkbox settings from 4.0 plugin
|
91 |
+
* Improved settings page layout on mobile devices and small screens
|
92 |
+
* Improved CSS class naming around red/green enable sliders on the settings page, to reduce CSS conflicts
|
93 |
+
* Proactively removing all other CSS and JavaScript files from other plugins when on our settings page to reduce conflicts with other active plugins
|
94 |
+
* Removing unused CSS
|
95 |
+
|
96 |
= 5.0 =
|
97 |
* Two functional modes allowing users to choose whether to control sharing buttons from within the WordPress admin area (with limited features), or through the AddThis Dashboard at addthis.com.
|
98 |
* Sharing sidebar configuration available within WordPress (in addition to the previously available sharing buttons above and below content).
|
327 |
|
328 |
== Upgrade Notice ==
|
329 |
|
330 |
+
= 5.0.1 =
|
331 |
* Two functional modes allowing users to choose whether to control sharing buttons from within the WordPress admin area (with limited features), or through the AddThis Dashboard at addthis.com.
|
332 |
* Sharing sidebar configuration available within WordPress (in addition to the previously available sharing buttons above and below content).
|
333 |
* Seperate preferences for what sharing buttons appear on what templates.
|