first commit

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-08 12:19:53 -04:00
commit 7c8c8b1c76
4586 changed files with 2050693 additions and 0 deletions
@@ -0,0 +1,777 @@
<?php
/**
* Contains functions responsible for functionality at admin side
*
* @since 1.0.0
*
*/
/**
* This class defines all code necessary for functionality at admin side
*
* @since 1.0.0
*
*/
class Sassy_Social_Share_Admin {
/**
* Options saved in database.
*
* @since 1.0.0
*/
private $options;
/**
* Current version of the plugin.
*
* @since 1.0.0
*/
private $version;
/**
* Flag to check if BuddyPress is active.
*
* @since 1.0.0
*/
private $is_bp_active = false;
/**
* Get saved options.
*
* @since 1.0.0
* @param array $options Plugin options saved in database
*/
public function __construct( $options, $version ) {
$this->options = $options;
$this->version = $version;
}
/**
* Creates plugin menu in admin area
*
* @since 1.0.0
*/
public function create_admin_menu() {
$page = add_menu_page( __( 'Sassy Social Share by Heateor', 'sassy-social-share' ), 'Sassy Social Share', 'manage_options', 'heateor-sss-options', array( $this, 'options_page' ), plugins_url( '../images/logo.png', __FILE__ ) );
// options
$options_page = add_submenu_page( 'heateor-sss-options', __( "Sassy Social Share - General Options", 'sassy-social-share' ), __( "Sassy Social Share", 'sassy-social-share' ), 'manage_options', 'heateor-sss-options', array( $this, 'options_page' ) );
add_action( 'admin_print_scripts-' . $page, array( $this, 'admin_scripts' ) );
add_action( 'admin_print_scripts-' . $page, array( $this, 'admin_style' ) );
add_action( 'admin_print_scripts-' . $page, array( $this, 'fb_sdk_script' ) );
add_action( 'admin_print_scripts-' . $options_page, array( $this, 'admin_scripts' ) );
add_action( 'admin_print_scripts-' . $options_page, array( $this, 'fb_sdk_script' ) );
add_action( 'admin_print_styles-' . $options_page, array( $this, 'admin_style' ) );
add_action( 'admin_print_scripts-' . $options_page, array( $this, 'admin_options_scripts' ) );
add_action( 'admin_print_styles-' . $options_page, array( $this, 'admin_options_style' ) );
}
/**
* Register plugin settings and its sanitization callback.
*
* @since 1.0.0
*/
public function options_init() {
register_setting( 'heateor_sss_options', 'heateor_sss', array( $this, 'validate_options' ) );
if ( current_user_can( 'manage_options' ) ) {
// show option to disable sharing on particular page/post
$post_types = get_post_types( array( 'public' => true ), 'names', 'and' );
$post_types = array_unique( array_merge( $post_types, array( 'post', 'page' ) ) );
foreach ( $post_types as $type ) {
add_meta_box( 'heateor_sss_meta', 'Sassy Social Share', array( $this, 'sharing_meta_setup' ), $type );
}
// save sharing meta on post/page save
add_action( 'save_post', array( $this, 'save_sharing_meta' ) );
}
}
/**
* Update options in all the old blogs.
*
* @since 1.0.0
*/
public function update_old_blogs( $old_config ) {
$option_parts = explode( '_', current_filter() );
$option = $option_parts[2] . '_' . $option_parts[3] . '_' . $option_parts[4];
$new_config = get_option( $option );
if ( isset( $new_config['config_multisite'] ) && $new_config['config_multisite'] == 1 ) {
$blogs = get_blog_list( 0, 'all' );
foreach ( $blogs as $blog ) {
update_blog_option( $blog['blog_id'], $option, $new_config );
}
}
}
/**
* Replicate the options to the new blog created.
*
* @since 1.0.0
*/
public function replicate_settings( $blog_id ) {
add_blog_option( $blog_id, 'heateor_sss', $this->options );
}
/**
* Show sharing meta options
*
* @since 1.0.0
*/
public function sharing_meta_setup() {
global $post;
$postType = $post->post_type;
$sharing_meta = get_post_meta( $post->ID, '_heateor_sss_meta', true );
?>
<p>
<label for="heateor_sss_sharing">
<input type="checkbox" name="_heateor_sss_meta[sharing]" id="heateor_sss_sharing" value="1" <?php checked( '1', @$sharing_meta['sharing'] ); ?> />
<?php _e( 'Disable Standard Sharing interface on this ' . $postType, 'sassy-social-share' ) ?>
</label>
<br/>
<label for="heateor_sss_vertical_sharing">
<input type="checkbox" name="_heateor_sss_meta[vertical_sharing]" id="heateor_sss_vertical_sharing" value="1" <?php checked( '1', @$sharing_meta['vertical_sharing'] ); ?> />
<?php _e( 'Disable Floating Sharing interface on this ' . $postType, 'sassy-social-share' ) ?>
</label>
<?php
$valid_networks = array( 'facebook', 'twitter', 'linkedin', 'buffer', 'reddit', 'pinterest', 'vkontakte', 'Odnoklassniki', 'Fintel' );
if ( isset( $this->options['hor_enable'] ) && isset( $this->options['horizontal_counts'] ) && isset( $this->options['horizontal_re_providers'] ) && count( $this->options['horizontal_re_providers'] ) > 0 ) {
?>
<p>
<strong style="font-weight: bold"><?php _e( 'Standard sharing', 'sassy-social-share' ) ?></strong>
<?php
foreach ( array_intersect( $this->options['horizontal_re_providers'], $valid_networks ) as $network ) {
?>
<br/>
<label for="heateor_sss_<?php echo $network ?>_horizontal_sharing_count">
<span style="width: 242px; float:left"><?php _e( 'Starting share count for ' . ucfirst( str_replace ( '_', ' ', $network ) ), 'sassy-social-share' ) ?></span>
<input type="text" name="_heateor_sss_meta[<?php echo $network ?>_horizontal_count]" id="heateor_sss_<?php echo $network ?>_horizontal_sharing_count" value="<?php echo isset( $sharing_meta[$network . '_horizontal_count'] ) ? $sharing_meta[$network . '_horizontal_count'] : '' ?>" />
</label>
<?php
}
?>
</p>
<?php
}
if ( isset( $this->options['vertical_enable'] ) && isset( $this->options['vertical_counts'] ) && isset( $this->options['vertical_re_providers'] ) && count( $this->options['vertical_re_providers'] ) > 0 ) {
?>
<p>
<strong style="font-weight: bold"><?php _e( 'Floating sharing', 'sassy-social-share' ) ?></strong>
<?php
foreach ( array_intersect( $this->options['vertical_re_providers'], $valid_networks ) as $network ) {
?>
<br/>
<label for="heateor_sss_<?php echo $network ?>_vertical_sharing_count">
<span style="width: 242px; float:left"><?php _e( 'Starting share count for ' . ucfirst( str_replace ( '_', ' ', $network ) ), 'sassy-social-share' ) ?></span>
<input type="text" name="_heateor_sss_meta[<?php echo $network ?>_vertical_count]" id="heateor_sss_<?php echo $network ?>_vertical_sharing_count" value="<?php echo isset( $sharing_meta[$network . '_vertical_count'] ) ? $sharing_meta[$network . '_vertical_count'] : '' ?>" />
</label>
<?php
}
?>
</p>
<?php
}
?>
</p>
<?php
echo '<input type="hidden" name="heateor_sss_meta_nonce" value="' . wp_create_nonce( __FILE__ ) . '" />';
}
/**
* Save sharing meta fields.
*
* @since 1.0.0
*/
public function save_sharing_meta( $post_id ) {
// make sure data came from our meta box
if ( ! isset( $_POST['heateor_sss_meta_nonce'] ) || ! wp_verify_nonce( $_POST['heateor_sss_meta_nonce'], __FILE__ ) ) {
return $post_id;
}
// check user permissions
if ( $_POST['post_type'] == 'page' ) {
if ( ! current_user_can( 'edit_page', $post_id ) ) {
return $post_id;
}
} else {
if ( ! current_user_can( 'edit_post', $post_id ) ) {
return $post_id;
}
}
if ( isset( $_POST['_heateor_sss_meta'] ) ) {
$newData = $_POST['_heateor_sss_meta'];
} else {
$newData = array( 'sharing' => 0, 'vertical_sharing' => 0 );
}
update_post_meta( $post_id, '_heateor_sss_meta', $newData );
return $post_id;
}
/**
* Sanitization callback for plugin options.
*
* IMPROVEMENT: complexity can be reduced (this function is called on each option page validation and "if ( $k == 'providers' ) {"
* condition is being checked every time)
* @since 1.0.0
*/
public function validate_options( $heateorSssOptions ) {
foreach ( $heateorSssOptions as $k => $v ) {
if ( is_string( $v ) ) {
$heateorSssOptions[$k] = esc_attr( trim( $v ) );
}
}
return $heateorSssOptions;
}
/**
* Include Javascript at plugin options page in admin area
*
* @since 1.0.0
*/
public function admin_options_scripts() {
wp_enqueue_script( 'heateor_sss_admin_options_script', plugins_url( 'js/sassy-social-share-options.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable' ), $this->version );
}
/**
* Include Javascript SDK in admin.
*
* @since 1.0.0
*/
public function fb_sdk_script() {
wp_enqueue_script( 'heateor_sss_fb_sdk_script', plugins_url( 'js/sassy-social-share-fb-sdk.js', __FILE__ ), false, $this->version );
}
/**
* Include CSS files in admin.
*
* @since 1.0.0
*/
public function admin_style() {
wp_enqueue_style( 'heateor_sss_admin_style', plugins_url( 'css/sassy-social-share-admin.css', __FILE__ ), false, $this->version );
}
/**
* Include CSS files at plugin options page in admin area.
*
* @since 1.0.0
*/
public function admin_options_style() {
wp_enqueue_style( 'heateor_sss_admin_svg', plugins_url( 'css/sassy-social-share-svg.css', __FILE__ ), false, $this->version );
if ( $this->options['horizontal_font_color_default'] != '' ) {
$updated = $this->update_css( 'horizontal_sharing_replace_color', 'horizontal_font_color_default', 'sassy-social-share-default-svg-horizontal' );
wp_enqueue_style( 'heateor_sss_admin_svg_horizontal', plugins_url( 'css/sassy-social-share-default-svg-horizontal.css', __FILE__ ), false, ( $updated === true ? rand() : $this->version ) );
}
if ( $this->options['horizontal_font_color_hover'] != '' ) {
$updated = $this->update_css( 'horizontal_sharing_replace_color_hover', 'horizontal_font_color_hover', 'sassy-social-share-hover-svg-horizontal' );
wp_enqueue_style( 'heateor_sss_admin_svg_horizontal_hover', plugins_url( 'css/sassy-social-share-hover-svg-horizontal.css', __FILE__ ), false, ( $updated === true ? rand() : $this->version ) );
}
if ( $this->options['vertical_font_color_default'] != '' ) {
$updated = $this->update_css( 'vertical_sharing_replace_color', 'vertical_font_color_default', 'sassy-social-share-default-svg-vertical' );
wp_enqueue_style( 'heateor_sss_admin_svg_vertical', plugins_url( 'css/sassy-social-share-default-svg-vertical.css', __FILE__ ), false, ( $updated === true ? rand() : $this->version ) );
}
if ( $this->options['vertical_font_color_hover'] != '' ) {
$updated = $this->update_css( 'vertical_sharing_replace_color_hover', 'vertical_font_color_hover', 'sassy-social-share-hover-svg-vertical' );
wp_enqueue_style( 'heateor_sss_admin_svg_vertical_hover', plugins_url( 'css/sassy-social-share-hover-svg-vertical.css', __FILE__ ), false, ( $updated === true ? rand() : $this->version ) );
}
}
/**
* Update CSS file
*
* @since 1.0.0
*/
private function update_css( $replace_color_option, $logo_color_option, $css_file ) {
if ( $this->options[$replace_color_option] != $this->options[$logo_color_option] ) {
$path = plugin_dir_url( __FILE__ ) . 'css/' . $css_file . '.css';
try {
$content = file( $path );
if ( $content !== false ) {
$handle = fopen( dirname( __FILE__ ) . '/css/' . $css_file . '.css','w' );
if ( $handle !== false ) {
foreach ( $content as $value ) {
fwrite( $handle, str_replace( str_replace( '#', '%23', $this->options[$replace_color_option] ), str_replace( '#', '%23', $this->options[$logo_color_option] ), $value ) );
}
fclose( $handle );
$this->options[$replace_color_option] = $this->options[$logo_color_option];
update_option( 'heateor_sss', $this->options );
return true;
}
}
} catch ( Exception $e ) { }
}
return false;
}
/**
* Include javascript files in admin.
*
* @since 1.0.0
*/
public function admin_scripts() {
?>
<script type="text/javascript">var heateorSssWebsiteUrl = '<?php echo home_url() ?>', heateorSssHelpBubbleTitle = "<?php echo __( 'Click to show help', 'sassy-social-share' ) ?>", heateorSssHelpBubbleCollapseTitle = "<?php echo __( 'Click to hide help', 'sassy-social-share' ) ?>", heateorSssSharingAjaxUrl = '<?php echo get_admin_url() ?>admin-ajax.php';</script>
<?php
wp_enqueue_script( 'heateor_sss_admin_script', plugins_url( 'js/sassy-social-share-admin.js', __FILE__ ), array( 'jquery', 'jquery-ui-tabs' ), $this->version );
}
/**
* Renders options page
*
* @since 1.0.0
*/
public function options_page() {
// message on saving options
echo $this->settings_saved_notification();
$options = $this->options;
/**
* The file rendering options page
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/partials/sassy-social-share-options-page.php';
}
/**
* Display notification message when plugin options are saved
*
* @since 1.0.0
* @return string Notification after saving options
*/
private function settings_saved_notification() {
if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] == 'true' ) {
return '<div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible below-h2">
<p><strong>' . __( 'Settings saved', 'sassy-social-share' ) . '</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice', 'sassy-social-share' ) . '</span></button></div>';
}
}
/**
* Check if plugin is active
*
* @since 1.0.0
*/
private function is_plugin_active( $plugin_file ) {
return in_array( $plugin_file, apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
}
/**
* Set BuddyPress active flag to true
*
* @since 1.0.0
*/
public function is_bp_loaded() {
$this->is_bp_active = true;
}
/**
* Clear Bitly shorturl cache
*
* @since 1.7
*/
public function clear_shorturl_cache() {
global $wpdb;
$wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_heateor_sss_bitly_url'" );
die;
}
/**
* Clear share counts cache
*
* @since 1.7
*/
public function clear_share_count_cache() {
global $wpdb;
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_heateor_sss_share_count_%'" );
die;
}
/**
* Save Twitter share count notification flag in DB
*
* @since 3.2.5
*/
public function twitter_share_notification_read() {
update_option( 'heateor_sss_twitter_share_notification_read', '1' );
die;
}
/**
* Save Twitcount notification flag in DB
*
* @since 3.2.9
*/
public function twitcount_notification_read() {
update_option( 'heateor_sss_twitcount_notification_read', '1' );
die;
}
/**
* Save GDPR notification flag in DB
*
* @since 3.2.1
*/
public function gdpr_notification_read() {
update_option( 'heateor_sss_gdpr_notification_read', '1' );
die;
}
/**
* Save Facebook share count notification flag in DB
*
* @since 3.2.20
*/
public function fb_count_notification_read() {
update_option( 'heateor_sss_fb_count_notification_read', '1' );
die;
}
/**
* Show notices in admin area
*
* @since 2.4
*/
public function show_notices() {
if ( current_user_can( 'manage_options' ) ) {
if( get_transient( 'heateor-sss-admin-notice-on-activation' ) ) { ?>
<div class="sassy-social-share-message notice notice-success is-dismissible">
<p><strong><?php printf( __( 'Thanks for installing Sassy Social Share plugin', 'sassy-social-share' ), 'http://support.heateor.com/configure-sassy-social-share' ); ?></strong></p>
<p>
<a href="http://support.heateor.com/configure-sassy-social-share" target="_blank" class="button button-primary"><?php _e( 'Configure the Plugin', 'sassy-social-share' ); ?></a>
</p>
</div> <?php
/* Delete transient, only display this notice once. */
delete_transient( 'heateor-sss-admin-notice-on-activation' );
}
if ( defined( 'HEATEOR_SOCIAL_SHARE_MYCRED_INTEGRATION_VERSION' ) && version_compare( '1.3.3', HEATEOR_SOCIAL_SHARE_MYCRED_INTEGRATION_VERSION ) > 0 ) {
?>
<div class="error notice">
<h3>Social Share - myCRED Integration</h3>
<p><?php _e( 'Update "Social Share myCRED Integration" add-on for maximum compatibility with current version of Sassy Social Share', 'sassy-social-share' ) ?></p>
</div>
<?php
}
if ( version_compare( '3.2.20', $this->version ) <= 0 ) {
if ( ( ( isset( $this->options['horizontal_re_providers'] ) && in_array( 'facebook', $this->options['horizontal_re_providers'] ) && ( isset( $this->options['horizontal_counts'] ) || isset( $this->options['horizontal_total_shares'] ) ) ) || ( isset( $this->options['vertical_re_providers'] ) && in_array( 'facebook', $this->options['vertical_re_providers'] ) && ( isset( $this->options['vertical_counts'] ) || isset( $this->options['vertical_total_shares'] ) ) ) ) && ! get_option( 'heateor_sss_fb_count_notification_read' ) ) {
?>
<script type="text/javascript">
function heateorSssFBCountNotificationRead(){
jQuery.ajax({
type: 'GET',
url: '<?php echo get_admin_url() ?>admin-ajax.php',
data: {
action: 'heateor_sss_fb_count_notification_read'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#heateor_sss_fb_count_notification').fadeOut();
}
});
}
</script>
<div id="heateor_sss_fb_count_notification" class="update-nag">
<h3>Sassy Social Share</h3>
<p>
<?php _e( 'Save Facebook App ID and Secret keys in "Standard Interface" and/or "Floating Interface" section(s) to fix the issue with Facebook share count. After that, clear share counts cache from "Miscellaneous" section.', 'sassy-social-share' ); ?>
<p><input type="button" onclick="heateorSssFBCountNotificationRead()" style="margin-left: 5px;" class="button button-primary" value="<?php _e( 'Okay', 'sassy-social-share' ) ?>" /></p>
</p>
</div>
<?php
}
}
if ( version_compare( '3.2.1', $this->version ) <= 0 ) {
if ( ! get_option( 'heateor_sss_gdpr_notification_read' ) ) {
?>
<script type="text/javascript">
function heateorSssGDPRNotificationRead(){
jQuery.ajax({
type: 'GET',
url: '<?php echo get_admin_url() ?>admin-ajax.php',
data: {
action: 'heateor_sss_gdpr_notification_read'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#heateor_sss_gdpr_notification').fadeOut();
}
});
}
</script>
<div id="heateor_sss_gdpr_notification" class="update-nag">
<h3>Sassy Social Share</h3>
<p><?php echo sprintf( __( 'This plugin is GDPR compliant. You need to update the privacy policy of your website regarding the personal data this plugin saves, as mentioned <a href="%s" target="_blank">here</a>', 'sassy-social-share' ), 'http://support.heateor.com/gdpr-and-our-plugins' ); ?><input type="button" onclick="heateorSssGDPRNotificationRead()" style="margin-left: 5px;" class="button button-primary" value="<?php _e( 'Okay', 'sassy-social-share' ) ?>" /></p>
</div>
<?php
}
}
if ( version_compare( '3.2.5', $this->version ) <= 0 ) {
if ( (isset( $this->options['hor_enable'] ) && isset( $this->options['horizontal_re_providers'] ) && in_array( 'twitter', $this->options['horizontal_re_providers'] ) && ( isset( $this->options['horizontal_counts'] ) || isset( $this->options['horizontal_total_shares'] ) ) ) || ( isset( $this->options['vertical_enable'] ) && isset( $this->options['vertical_re_providers'] ) && in_array( 'twitter', $this->options['vertical_re_providers'] ) && ( isset($this->options['vertical_counts'] ) || isset( $this->options['vertical_total_shares'] ) ) ) ) {
if ( ! get_option( 'heateor_sss_twitter_share_notification_read' ) ) {
?>
<script type="text/javascript">
function heateorSssTwitterShareNotificationRead(){
jQuery.ajax({
type: 'GET',
url: '<?php echo get_admin_url() ?>admin-ajax.php',
data: {
action: 'heateor_sss_twitter_share_notification_read'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#heateor_sss_twitter_share_notification').fadeOut();
}
});
}
</script>
<div id="heateor_sss_twitter_share_notification" class="update-nag">
<h3>Sassy Social Share</h3>
<p><?php echo sprintf( __( 'Twitter share counts are no longer working as newsharecounts.com is down. To continue showing the Twitter shares, just sign up <a href="%s" target="_blank">here</a> with this domain. No other steps needed.', 'sassy-social-share' ), 'https://opensharecount.com' ); ?><input type="button" onclick="heateorSssTwitterShareNotificationRead()" style="margin-left: 5px;" class="button button-primary" value="<?php _e( 'Okay', 'sassy-social-share' ) ?>" /></p>
</div>
<?php
}
if ( ! get_option( 'heateor_sss_twitcount_notification_read' ) ) {
?>
<script type="text/javascript">
function heateorSssTwitcountNotificationRead(){
jQuery.ajax({
type: 'GET',
url: '<?php echo get_admin_url() ?>admin-ajax.php',
data: {
action: 'heateor_sss_twitcount_notification_read'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#heateor_sss_twitcount_notification').fadeOut();
}
});
}
</script>
<div id="heateor_sss_twitcount_notification" class="update-nag">
<h3>Sassy Social Share</h3>
<p><?php echo sprintf( __( 'Now plugin supports a new service Twitcount.com to show Twitter shares. To continue showing the Twitter shares, click "Give me my Twitter counts back" button at <a href="%s" target="_blank">their website</a> and register your website %s with them. No need to copy-paste any code from their website.', 'sassy-social-share' ), 'http://twitcount.com', home_url() ); ?><input type="button" onclick="heateorSssTwitcountNotificationRead()" style="margin-left: 5px;" class="button button-primary" value="<?php _e( 'Okay', 'sassy-social-share' ) ?>" /></p>
</div>
<?php
}
}
if ( ! get_option( 'heateor_sss_gdpr_notification_read' ) ) {
?>
<script type="text/javascript">
function heateorSssGDPRNotificationRead(){
jQuery.ajax({
type: 'GET',
url: '<?php echo get_admin_url() ?>admin-ajax.php',
data: {
action: 'heateor_sss_gdpr_notification_read'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#heateor_sss_gdpr_notification').fadeOut();
}
});
}
</script>
<div id="heateor_sss_gdpr_notification" class="update-nag">
<h3>Sassy Social Share</h3>
<p><?php echo sprintf( __( 'This plugin is GDPR compliant. You need to update the privacy policy of your website regarding the personal data this plugin saves, as mentioned <a href="%s" target="_blank">here</a>', 'sassy-social-share' ), 'http://support.heateor.com/gdpr-and-our-plugins' ); ?><input type="button" onclick="heateorSssGDPRNotificationRead()" style="margin-left: 5px;" class="button button-primary" value="<?php _e( 'Okay', 'sassy-social-share' ) ?>" /></p>
</div>
<?php
}
}
}
}
/**
* Show links at "Plugins" page in admin area
*
* @since 2.5.1
*/
public function add_links( $links ) {
if ( is_array( $links ) ) {
$addons_link = '<a href="https://www.heateor.com/add-ons" target="_blank">' . __( 'Add-Ons', 'sassy-social-share' ) . '</a>';
$support_link = '<br/><a href="http://support.heateor.com" target="_blank">' . __( 'Support Documentation', 'sassy-social-share' ) . '</a>';
$settings_link = '<a href="admin.php?page=heateor-sss-options">' . __( 'Settings', 'sassy-social-share' ) . '</a>';
// place it before other links
array_unshift( $links, $settings_link );
$links[] = $addons_link;
$links[] = $support_link;
}
return $links;
}
/**
* Update options based on plugin version
*
* @since 2.5.8
*/
public function update_db_check() {
$current_version = get_option( 'heateor_sss_version' );
if ( $current_version != $this->version ) {
if ( $this->options['horizontal_sharing_replace_color'] != '#fff' ) {
heateor_sss_update_svg_css( $this->options['horizontal_sharing_replace_color'], 'sassy-social-share-default-svg-horizontal' );
}
if ( $this->options['horizontal_font_color_hover'] != '#fff' ) {
heateor_sss_update_svg_css( $this->options['horizontal_font_color_hover'], 'sassy-social-share-hover-svg-horizontal' );
}
if ( $this->options['vertical_font_color_default'] != '#fff' ) {
heateor_sss_update_svg_css( $this->options['vertical_font_color_default'], 'sassy-social-share-default-svg-vertical' );
}
if ( $this->options['vertical_font_color_hover'] != '#fff' ) {
heateor_sss_update_svg_css( $this->options['vertical_font_color_hover'], 'sassy-social-share-hover-svg-vertical' );
}
if ( version_compare( '3.3', $current_version ) > 0 ) {
$this->options['youtube_username'] = '';
$this->options['vertical_youtube_username'] = '';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '3.2.24', $current_version ) > 0 ) {
if ( ! $this->options['fb_key'] && ! $this->options['fb_secret'] && $this->options['vertical_fb_key'] && $this->options['vertical_fb_secret'] ) {
$this->options['fb_key'] = $this->options['vertical_fb_key'];
$this->options['fb_secret'] = $this->options['vertical_fb_secret'];
}
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '3.2.20', $current_version ) > 0 ) {
$this->options['fb_key'] = '';
$this->options['fb_secret'] = '';
$this->options['vertical_fb_key'] = '';
$this->options['vertical_fb_secret'] = '';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '3.2.18', $current_version ) > 0 ) {
$networks_to_remove = array( 'google_plus', 'google_plusone', 'google_plus_share' );
if ( $this->options['vertical_re_providers'] ) {
$this->options['vertical_re_providers'] = array_diff( $this->options['vertical_re_providers'], $networks_to_remove );
}
if ( $this->options['horizontal_re_providers'] ) {
$this->options['horizontal_re_providers'] = array_diff( $this->options['horizontal_re_providers'], $networks_to_remove );
}
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '3.2.6', $current_version ) > 0 ) {
$networks_to_remove = array( 'yahoo', 'Yahoo_Messenger', 'delicious', 'Polyvore', 'Oknotizie', 'Baidu', 'diHITT', 'Netlog', 'NewsVine', 'NUjij', 'Segnalo', 'Stumpedia', 'YouMob' );
if ( $this->options['vertical_re_providers'] ) {
$this->options['vertical_re_providers'] = array_diff( $this->options['vertical_re_providers'], $networks_to_remove );
}
if ( $this->options['horizontal_re_providers'] ) {
$this->options['horizontal_re_providers'] = array_diff( $this->options['horizontal_re_providers'], $networks_to_remove );
}
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '3.2.5', $current_version ) > 0 ) {
$this->options['tweet_count_service'] = 'opensharecount';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( "3.2.4", $current_version ) > 0 ) {
if ( isset( $this->options['horizontal_re_providers'] ) ) {
foreach( $this->options['horizontal_re_providers'] as $key => $social_network ) {
if ( $social_network == 'stumbleupon_badge' ) {
unset( $this->options['horizontal_re_providers'][$key] );
} elseif ( $social_network == 'stumbleupon' ) {
$this->options['horizontal_re_providers'][$key] = 'mix';
}
}
}
if ( isset( $this->options['vertical_re_providers'] ) ) {
foreach ( $this->options['vertical_re_providers'] as $key => $social_network ) {
if ( $social_network == 'stumbleupon_badge' ) {
unset( $this->options['vertical_re_providers'][$key] );
} elseif ( $social_network == 'stumbleupon' ) {
$this->options['vertical_re_providers'][$key] = 'mix';
}
}
}
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '1.7', $current_version ) > 0 ) {
$this->options['share_count_cache_refresh_count'] = '10';
$this->options['share_count_cache_refresh_unit'] = 'minutes';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '2.3', $current_version ) > 0 ) {
$this->options['amp_enable'] = '1';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '2.4', $current_version ) > 0 ) {
$this->options['instagram_username'] = '';
$this->options['vertical_instagram_username'] = '';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '2.5.8', $current_version ) > 0 ) {
$this->options['bottom_sharing_position_radio'] = 'responsive';
update_option( 'heateor_sss', $this->options );
}
if ( version_compare( '3.0', $current_version ) > 0 ) {
$this->options['comment_container_id'] = 'respond';
$this->options['vertical_comment_container_id'] = 'respond';
update_option( 'heateor_sss', $this->options );
}
// update plugin version in database
update_option( 'heateor_sss_version', $this->version );
}
}
}
@@ -0,0 +1 @@
<?php // Silence is golden
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php // Silence is golden
@@ -0,0 +1 @@
<?php // Silence is golden
@@ -0,0 +1,19 @@
var heateorSssReferrer = null, heateorSssReferrerVal = '', heateorSssReferrerTabId = '';
jQuery(document).ready(function() {
heateorSssReferrer = jQuery('input[name=_wp_http_referer]'), heateorSssReferrerVal = jQuery('input[name=_wp_http_referer]').val(), heateorSssReferrerTabId = location.href.indexOf('#') > 0 ? location.href.substring(location.href.indexOf('#'), location.href.length) : '';
if(heateorSssReferrerTabId){heateorSssSetReferrer(heateorSssReferrerTabId) }
jQuery("#tabs").tabs(), jQuery("#heateor_sss_login_redirection_column").find("input[type=radio]").click(function() {
jQuery(this).attr("id") && "heateor_sss_login_redirection_custom" == jQuery(this).attr("id") ? jQuery("#heateor_sss_login_redirection_url").css("display", "block") : jQuery("#heateor_sss_login_redirection_url").css("display", "none")
}), jQuery(".heateor_sss_help_bubble").attr("title", heateorSssHelpBubbleTitle), jQuery(".heateor_sss_help_bubble").toggle(function() {
jQuery("#" + jQuery(this).attr("id") + "_cont").show(), jQuery(this).attr("title", heateorSssHelpBubbleCollapseTitle)
}, function() {
jQuery("#" + jQuery(this).attr("id") + "_cont").hide(), jQuery(this).attr("title", heateorSssHelpBubbleTitle)
})
jQuery('#tabs ul a').click(function(){
heateorSssSetReferrer(jQuery(this).attr('href'));
});
});
function heateorSssSetReferrer(href){
jQuery(heateorSssReferrer).val( heateorSssReferrerVal.substring(0, heateorSssReferrerVal.indexOf('#') > 0 ? heateorSssReferrerVal.indexOf('#') : heateorSssReferrerVal.length) + href );
}
jQuery("html, body").animate({ scrollTop: 0 });
@@ -0,0 +1 @@
!function(e,n,t){var o,c=e.getElementsByTagName(n)[0];e.getElementById(t)||(o=e.createElement(n),o.id=t,o.src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0",c.parentNode.insertBefore(o,c))}(document,"script","facebook-jssdk");
@@ -0,0 +1,402 @@
"function" != typeof String.prototype.trim && (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "")
})
function heateorSssCapitaliseFirstLetter(e) {
return e.charAt(0).toUpperCase() + e.slice(1)
}
/**
* Search sharing services
*/
function heateorSssSearchSharingNetworks(val) {
jQuery('td.selectSharingNetworks label.lblSocialNetwork').each(function(){
if (jQuery(this).text().toLowerCase().indexOf(val.toLowerCase()) != -1) {
jQuery(this).parent().css('display', 'block');
} else {
jQuery(this).parent().css('display', 'none');
}
});
}
function heateorSssUpdateSharingPreview(e, property, defaultVal, targetId) {
if(!e){
e = defaultVal;
}
jQuery('#' + targetId).css(property, e);
}
function heateorSssUpdateSharingPreviewHover(e, property, targetId) {
var val = jQuery(e).val().trim();
if(!val){
jQuery('#' + targetId).hover(function(){
jQuery(this).css(property, val);
});
}
}
function heateorSssClearShorturlCache(){
jQuery('#shorturl_cache_loading').css('display', 'block');
jQuery.ajax({
type: 'GET',
dataType: 'json',
url: heateorSssSharingAjaxUrl,
data: {
action: 'heateor_sss_clear_shorturl_cache'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#shorturl_cache_loading').css('display', 'none');
jQuery('#heateor_sss_cache_clear_message').css('display', 'block');
}
});
}
function heateorSssClearShareCountCache(){
jQuery('#share_count_cache_loading').css('display', 'block');
jQuery.ajax({
type: 'GET',
dataType: 'json',
url: heateorSssSharingAjaxUrl,
data: {
action: 'heateor_sss_clear_share_count_cache'
},
success: function(data, textStatus, XMLHttpRequest){
jQuery('#share_count_cache_loading').css('display', 'none');
jQuery('#heateor_sss_share_count_cache_clear_message').css('display', 'block');
}
});
}
function heateorSssHorizontalSharingOptionsToggle(e) {
jQuery(e).is(":checked") ? jQuery("#heateor_sss_horizontal_sharing_options").css("display", "table-row-group") : jQuery("#heateor_sss_horizontal_sharing_options").css("display", "none")
}
function heateorSssVerticalSharingOptionsToggle(e) {
jQuery(e).is(":checked") ? jQuery("#heateor_sss_vertical_sharing_options").css("display", "table-row-group") : jQuery("#heateor_sss_vertical_sharing_options").css("display", "none")
}
function heateorSssToggleOffset(e) {
var t = "left" == e ? "right" : "left";
jQuery("#heateor_sss_" + e + "_offset_rows").css("display", "table-row-group"), jQuery("#heateor_sss_" + t + "_offset_rows").css("display", "none")
}
function heateorSssIncrement(e, t, r, a, i) {
var h, s, c = !1,
_ = a;
s = function() {
"add" == t ? r.value++ : "subtract" == t && r.value > 16 && r.value--, h = setTimeout(s, _), _ > 20 && (_ *= i), c || (document.onmouseup = function() {
clearTimeout(h), document.onmouseup = null, c = !1, _ = a
}, c = !0)
}, e.onmousedown = s
}
function heateorSssSharingHorizontalPreview() {
var tempBorderWidth = heateorSssBorderWidth ? heateorSssBorderWidth : '0px';
if("rectangle" != tempHorShape){
jQuery("#heateor_sss_preview").css({
borderRadius: "round" == tempHorShape ? "999px" : heateorSssSharingBorderRadius ? heateorSssSharingBorderRadius : '0px',
height: tempHorSize,
width: tempHorSize,
backgroundColor: heateorSssSharingBg,
borderWidth: tempBorderWidth,
borderColor: heateorSssBorderColor ? heateorSssBorderColor : 'transparent',
borderStyle: 'solid',
});
tempHorSize = parseInt(tempHorSize);
jQuery('.heateorSssCounterPreviewRight,.heateorSssCounterPreviewLeft').css({
height: ( tempHorSize + 2*parseInt(tempBorderWidth) ) + 'px',
lineHeight: ( tempHorSize + 2*parseInt(tempBorderWidth) ) + 'px'
});
jQuery('.heateorSssCounterPreviewInnerright,.heateorSssCounterPreviewInnerleft').css("lineHeight", tempHorSize + 'px');
jQuery('.heateorSssCounterPreviewInnertop').css("lineHeight", (tempHorSize*38/100) + "px");
jQuery('.heateorSssCounterPreviewInnerbottom').css("lineHeight", (tempHorSize*19/100) + "px");
jQuery('.heateorSssCounterPreviewTop,.heateorSssCounterPreviewBottom').css({
width: 60 + 2*parseInt(tempBorderWidth) + tempHorSize,
});
}else{
jQuery("#heateor_sss_preview").css({
borderRadius: heateorSssSharingBorderRadius ? heateorSssSharingBorderRadius : '0px',
height: tempHorHeight,
width: tempHorWidth,
backgroundColor: heateorSssSharingBg,
borderWidth: tempBorderWidth,
borderColor: heateorSssBorderColor ? heateorSssBorderColor : 'transparent',
borderStyle: 'solid'
});
jQuery('.heateorSssCounterPreviewRight,.heateorSssCounterPreviewLeft').css({
height: ( parseInt(tempHorHeight) + 2*parseInt(tempBorderWidth) ) + 'px',
lineHeight: ( parseInt(tempHorHeight) + 2*parseInt(tempBorderWidth) ) + 'px',
});
jQuery('.heateorSssCounterPreviewInnerright,.heateorSssCounterPreviewInnerleft').css('lineHeight', tempHorHeight + 'px');
jQuery('.heateorSssCounterPreviewInnertop').css('lineHeight', (tempHorHeight*38/100) + 'px');
jQuery('.heateorSssCounterPreviewInnerbottom').css('lineHeight', (tempHorHeight*19/100) + 'px');
jQuery('.heateorSssCounterPreviewTop,.heateorSssCounterPreviewBottom').css({
width: 60 + 2*parseInt(tempBorderWidth) + parseInt(tempHorWidth),
});
}
jQuery("#heateor_sss_preview_message").css("display", "block")
}
function heateorSssSharingVerticalPreview() {
var tempVerticalBorderWidth = heateorSssVerticalBorderWidth ? heateorSssVerticalBorderWidth : '0px';
if("rectangle" != tempVerticalShape){
jQuery("#heateor_sss_vertical_preview").css({
borderRadius: "round" == tempVerticalShape ? "999px" : heateorSssVerticalBorderRadius ? heateorSssVerticalBorderRadius : '0px',
height: tempVerticalSize,
width: tempVerticalSize,
backgroundColor: heateorSssVerticalSharingBg,
borderWidth: tempVerticalBorderWidth,
borderColor: heateorSssVerticalBorderColor ? heateorSssVerticalBorderColor : 'transparent',
borderStyle: 'solid',
});
jQuery('.heateorSssCounterVerticalPreviewRight,.heateorSssCounterVerticalPreviewLeft').css({
height: ( parseInt(tempVerticalSize) + 2*parseInt(tempVerticalBorderWidth) ) + 'px',
lineHeight: ( parseInt(tempVerticalSize) + 2*parseInt(tempVerticalBorderWidth) ) + 'px',
});
jQuery('.heateorSssCounterVerticalPreviewInnerright,.heateorSssCounterVerticalPreviewInnerleft').css('lineHeight', tempVerticalSize + 'px');
jQuery('.heateorSssCounterVerticalPreviewInnertop').css('lineHeight', (tempVerticalSize*38/100) + 'px');
jQuery('.heateorSssCounterVerticalPreviewInnerbottom').css('lineHeight', (tempVerticalSize*19/100) + 'px');
jQuery('.heateorSssCounterVerticalPreviewTop,.heateorSssCounterVerticalPreviewBottom').css({
width: 60 + 2*parseInt(tempVerticalBorderWidth) + parseInt(tempVerticalSize)
});
}else{
jQuery("#heateor_sss_vertical_preview").css({
borderRadius: heateorSssVerticalBorderRadius ? heateorSssVerticalBorderRadius : '0px',
height: tempVerticalHeight,
width: tempVerticalWidth,
backgroundColor: heateorSssVerticalSharingBg,
borderWidth: tempVerticalBorderWidth,
borderColor: heateorSssVerticalBorderColor ? heateorSssVerticalBorderColor : 'transparent',
borderStyle: 'solid'
});
jQuery('.heateorSssCounterVerticalPreviewRight,.heateorSssCounterVerticalPreviewLeft').css({
height: ( parseInt(tempVerticalHeight) + 2*parseInt(tempVerticalBorderWidth) ) + 'px',
lineHeight: ( parseInt(tempVerticalHeight) + 2*parseInt(tempVerticalBorderWidth) ) + 'px',
});
jQuery('.heateorSssCounterVerticalPreviewInnerright,.heateorSssCounterVerticalPreviewInnerleft').css('lineHeight', tempVerticalHeight + 'px');
jQuery('.heateorSssCounterVerticalPreviewInnertop').css('lineHeight', (tempVerticalHeight*38/100) + 'px');
jQuery('.heateorSssCounterVerticalPreviewInnerbottom').css('lineHeight', (tempVerticalHeight*19/100) + 'px');
jQuery('.heateorSssCounterVerticalPreviewTop,.heateorSssCounterVerticalPreviewBottom').css({
width: 60 + 2*parseInt(tempVerticalBorderWidth) + parseInt(tempVerticalWidth),
});
}
jQuery("#heateor_sss_vertical_preview_message").css("display", "block")
}
function heateorSssCounterPreview(val){
if(val){
jQuery('input[name="heateor_sss[horizontal_counter_position]"]').each(function(){
if(jQuery(this).val().indexOf('inner') == -1){
var property = 'visibility', value = 'visible', inverseValue = 'hidden';
jQuery('#horizontal_svg').css({
'width': '100%',
'height':'100%'
});
}else{
var property = 'display', value = 'block', inverseValue = 'none';
}
if(jQuery(this).val() == val){
jQuery('.heateorSssCounterPreview' + heateorSssCapitaliseFirstLetter(val.replace('_',''))).css(property, value);
}else{
jQuery('.heateorSssCounterPreview' + heateorSssCapitaliseFirstLetter(jQuery(this).val().replace('_',''))).css(property, inverseValue);
}
});
if(val == 'inner_left' || val == 'inner_right'){
jQuery('#horizontal_svg').css({
'width': '50%',
'height':'100%'
});
}else if(val == 'inner_top' || val == 'inner_bottom'){
jQuery('#horizontal_svg').css({
'width': '100%',
'height':'70%'
});
}
}
}
function heateorSssVerticalCounterPreview(val){
if(val){
jQuery('input[name="heateor_sss[vertical_counter_position]"]').each(function(){
if(jQuery(this).val().indexOf('inner') == -1){
var property = 'visibility', value = 'visible', inverseValue = 'hidden';
jQuery('#vertical_svg').css({
'width': '100%',
'height':'100%'
});
}else{
var property = 'display', value = 'block', inverseValue = 'none';
}
if(jQuery(this).val() == val){
jQuery('.heateorSssCounterVerticalPreview' + heateorSssCapitaliseFirstLetter(val.replace('_',''))).css(property, value);
}else{
jQuery('.heateorSssCounterVerticalPreview' + heateorSssCapitaliseFirstLetter(jQuery(this).val().replace('_',''))).css(property, inverseValue);
}
if(val == 'inner_left' || val == 'inner_right'){
jQuery('#vertical_svg').css({
'width': '50%',
'height':'100%'
});
}else if(val == 'inner_top' || val == 'inner_bottom'){
jQuery('#vertical_svg').css({
'width': '100%',
'height':'70%'
});
}
});
}
}
function heateor_sss_toggle_fb_share_count_options() {
if(heateorSssHorizontalFacebookShareEnabled || heateorSssVerticalFacebookShareEnabled){
jQuery('#heateor_sss_fb_share_count_options').css('display', 'block');
}else{
jQuery('#heateor_sss_fb_share_count_options').css('display', 'none');
}
if(((heateorSssHorizontalFacebookShareEnabled && (heateorSssHorizontalShares || heateorSssHorizontalTotalShares)) || (heateorSssVerticalFacebookShareEnabled && (heateorSssVerticalShares || heateorSssVerticalTotalShares))) && heateorSssFacebookIDSecretNotSaved){
jQuery('.heateor_sss_fb_share_count_msg').css('display', 'table-row-group');
}else{
jQuery('.heateor_sss_fb_share_count_msg').css('display', 'none');
}
}
jQuery(document).ready(function() {
// instagram username option
jQuery('input#heateor_sss_instagram').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_instagram_options').css('display', 'table-row-group');
}else{
jQuery('#heateor_sss_instagram_options').css('display', 'none');
}
});
jQuery('input#heateor_sss_vertical_sharing_instagram').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_vertical_instagram_options').css('display', 'table-row-group');
}else{
jQuery('#heateor_sss_vertical_instagram_options').css('display', 'none');
}
});
// youtube url option
jQuery('input#heateor_sss_youtube').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_youtube_options').css('display', 'table-row-group');
}else{
jQuery('#heateor_sss_youtube_options').css('display', 'none');
}
});
jQuery('input#heateor_sss_vertical_sharing_youtube').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_vertical_youtube_options').css('display', 'table-row-group');
}else{
jQuery('#heateor_sss_vertical_youtube_options').css('display', 'none');
}
});
// facebook share count option
jQuery('input#heateor_sss_facebook').click(function(){
if(jQuery(this).is(':checked')){
heateorSssHorizontalFacebookShareEnabled = true;
}else{
heateorSssHorizontalFacebookShareEnabled = false;
}
heateor_sss_toggle_fb_share_count_options();
});
jQuery('input#heateor_sss_vertical_sharing_facebook').click(function(){
if(jQuery(this).is(':checked')){
heateorSssVerticalFacebookShareEnabled = true;
}else{
heateorSssVerticalFacebookShareEnabled = false;
}
heateor_sss_toggle_fb_share_count_options();
});
jQuery('input#heateor_sss_vertical_instagram_username').keyup(function(){
jQuery('#heateor_sss_instagram_username').val(jQuery(this).val().trim());
});
jQuery('input#heateor_sss_instagram_username').keyup(function(){
jQuery('#heateor_sss_vertical_instagram_username').val(jQuery(this).val().trim());
});
jQuery('input#heateor_sss_vertical_youtube_username').keyup(function(){
jQuery('#heateor_sss_youtube_username').val(jQuery(this).val().trim());
});
jQuery('input#heateor_sss_youtube_username').keyup(function(){
jQuery('#heateor_sss_vertical_youtube_username').val(jQuery(this).val().trim());
});
// Twitter share count options
jQuery('input#heateor_sss_vertical_newsharecounts').click(function(){
jQuery('#heateor_sss_newsharecounts').attr('checked', 'checked');
});
jQuery('input#heateor_sss_vertical_opensharecount').click(function(){
jQuery('#heateor_sss_opensharecount').attr('checked', 'checked');
});
jQuery('input#heateor_sss_newsharecounts').click(function(){
jQuery('#heateor_sss_vertical_newsharecounts').attr('checked', 'checked');
});
jQuery('input#heateor_sss_opensharecount').click(function(){
jQuery('#heateor_sss_vertical_opensharecount').attr('checked', 'checked');
});
jQuery('input#heateor_sss_counts').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_twitter_share_count').css('display', 'table-row');
}else{
jQuery('#heateor_sss_twitter_share_count').css('display', 'none');
}
});
jQuery('input#heateor_sss_vertical_counts').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_twitter_vertical_share_count').css('display', 'table-row');
}else{
jQuery('#heateor_sss_twitter_vertical_share_count').css('display', 'none');
}
});
jQuery('input[name="heateor_sss[horizontal_sharing_shape]"]').click(function(){
// toggle height, width options
if(jQuery(this).val() == 'rectangle'){
jQuery('#heateor_sss_rectangle_options').css('display', 'table-row-group');
jQuery('#heateor_sss_size_options').css('display', 'none');
}else{
jQuery('#heateor_sss_rectangle_options').css('display', 'none');
jQuery('#heateor_sss_size_options').css('display', 'table-row-group');
}
// toggle border radius option
if(jQuery(this).val() == 'round'){
jQuery('#heateor_sss_border_radius_options').css('display', 'none');
}else{
jQuery('#heateor_sss_border_radius_options').css('display', 'table-row-group');
}
});
jQuery('input#heateor_sss_mobile_sharing_bottom').click(function(){
if(jQuery(this).is(':checked')){
jQuery('#heateor_sss_bottom_sharing_options').css('display', 'table-row-group');
}else{
jQuery('#heateor_sss_bottom_sharing_options').css('display', 'none');
}
});
jQuery('input[name="heateor_sss[vertical_sharing_shape]"]').click(function(){
// toggle height, width options
if(jQuery(this).val() == 'rectangle'){
jQuery('#heateor_sss_vertical_rectangle_options').css('display', 'table-row-group');
jQuery('#heateor_sss_vertical_size_options').css('display', 'none');
}else{
jQuery('#heateor_sss_vertical_rectangle_options').css('display', 'none');
jQuery('#heateor_sss_vertical_size_options').css('display', 'table-row-group');
}
// toggle border radius option
if(jQuery(this).val() == 'round'){
jQuery('#heateor_sss_vertical_border_radius_options').css('display', 'none');
}else{
jQuery('#heateor_sss_vertical_border_radius_options').css('display', 'table-row-group');
}
});
jQuery("#heateor_sss_rearrange, #heateor_sss_vertical_rearrange").sortable(), jQuery(".heateorSssHorizontalSharingProviderContainer input").click(function() {
jQuery(this).is(":checked") ? jQuery("#heateor_sss_rearrange").append('<li title="' + jQuery(this).val().replace(/_/g, " ") + '" id="heateor_sss_re_horizontal_' + jQuery(this).val().replace(/[. ]/g, "_") + '" ><i style="display:block;' + heateorSssHorSharingStyle + '" class="' + ( jQuery.inArray(jQuery(this).val(), heateorSssLikeButtons) != -1 ? '' : 'heateorSssSharingBackground ' ) + 'heateorSss' + heateorSssCapitaliseFirstLetter(jQuery(this).val().replace(/[_. ]/g, "")) + 'Background"><div class="heateorSssSharingSvg heateorSss' + heateorSssCapitaliseFirstLetter(jQuery(this).val().replace(/[_. ]/g, "")) + 'Svg" style="' + heateorSssHorDeliciousRadius + '"></div></i><input type="hidden" name="heateor_sss[horizontal_re_providers][]" value="' + jQuery(this).val() + '"></li>') : jQuery("#heateor_sss_re_horizontal_" + jQuery(this).val().replace(/[. ]/g, "_")).remove()
}), jQuery(".heateorSssVerticalSharingProviderContainer input").click(function() {
jQuery(this).is(":checked") ? jQuery("#heateor_sss_vertical_rearrange").append('<li title="' + jQuery(this).val().replace(/_/g, " ") + '" id="heateor_sss_re_vertical_' + jQuery(this).val().replace(/[. ]/g, "_") + '" ><i style="display:block;' + heateorSssVerticalSharingStyle + '" class="' + ( jQuery.inArray(jQuery(this).val(), heateorSssLikeButtons) != -1 ? '' : 'heateorSssVerticalSharingBackground ' ) + 'heateorSss' + heateorSssCapitaliseFirstLetter(jQuery(this).val().replace(/[_. ]/g, "")) + 'Background"><div class="heateorSssSharingSvg heateorSss' + heateorSssCapitaliseFirstLetter(jQuery(this).val().replace(/[_. ]/g, "")) + 'Svg" style="' + heateorSssVerticalDeliciousRadius + '"></div></i><input type="hidden" name="heateor_sss[vertical_re_providers][]" value="' + jQuery(this).val() + '"></li>') : jQuery("#heateor_sss_re_vertical_" + jQuery(this).val().replace(/[. ]/g, "_")).remove()
}), jQuery("#heateor_sss_target_url_column").find("input[type=radio]").click(function() {
jQuery(this).attr("id") && "heateor_sss_target_url_custom" == jQuery(this).attr("id") ? jQuery("#heateor_sss_target_url_custom_url").css("display", "block") : jQuery("#heateor_sss_target_url_custom_url").css("display", "none")
}), jQuery("#heateor_sss_vertical_target_url_column").find("input[type=radio]").click(function() {
jQuery(this).attr("id") && "heateor_sss_vertical_target_url_custom" == jQuery(this).attr("id") ? jQuery("#heateor_sss_vertical_target_url_custom_url").css("display", "block") : jQuery("#heateor_sss_vertical_target_url_custom_url").css("display", "none")
}), jQuery("#heateor_sss_target_url_custom").is(":checked") ? jQuery("#heateor_sss_target_url_custom_url").css("display", "block") : jQuery("#heateor_sss_target_url_custom_url").css("display", "none"), jQuery("#heateor_sss_vertical_target_url_custom").is(":checked") ? jQuery("#heateor_sss_vertical_target_url_custom_url").css("display", "block") : jQuery("#heateor_sss_vertical_target_url_custom_url").css("display", "none")
})
@@ -0,0 +1 @@
<?php // Silence is golden
@@ -0,0 +1,100 @@
<?php defined( 'ABSPATH' ) or die("Cheating........Uh!!"); ?>
<div class="heateor_sss_right_column">
<div class="stuffbox">
<h3><label><?php _e( 'About', 'sassy-social-share' );?></label><label style="float:right"><?php _e( 'Version', 'sassy-social-share' );?> <?php echo $this->version; ?></label></h3>
<div class="inside">
<p><strong>Sassy Social Share</strong> <?php _e( 'by', 'sassy-social-share' ) ?> <strong><a href="//www.heateor.com" target="_blank">Heateor</a></strong></p>
<div style="height:32px">
<a href="//www.facebook.com/heateor" target="_blank" title="Facebook"><img style="box-shadow:1px 1px 10px 1px #888888" class="heateorSssLoginButton heateorSssFacebookButton" /></a>
<a href="//twitter.com/heateor" target="_blank" title="Twitter"><img style="box-shadow:1px 1px 10px 1px #888888" class="heateorSssLoginButton heateorSssTwitterButton" ></a>
<a href="https://www.instagram.com/Heateor" title="Instagram" target="_blank"><div style="display:block;width:32px;height:32px;box-shadow:1px 1px 10px 1px #888888;float:left;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)"><div class="heateorSssSharingSvg heateorSssInstagramSvg"></div></div></a>
</div>
</div>
</div>
<div style="margin-bottom: 21px">
<div class="inside" style="padding-top:10px">
<a target="_blank" style="text-decoration:none;" href="https://www.heateor.com/donate/?action=Sassy+Social+Share"><input type="button" style="background-color:#D51F1F;background: linear-gradient(#2e9fff, #2481d0);" class="ss_demo" value="<?php _e( 'Donate', 'sassy-social-share' ) ?>" /></a>
</div>
</div>
<div style="margin-bottom: 21px">
<div class="inside" style="padding-top:10px">
<a target="_blank" style="text-decoration:none" href="https://www.heateor.com/sassy-social-share-demo/"><input type="button" class="ss_demo" value="<?php _e( 'Plugin Demo', 'sassy-social-share' ) ?>" /></a>
</div>
</div>
<div style="margin-bottom: 21px">
<div class="inside" style="padding-top:10px">
<a target="_blank" style="text-decoration:none" href="https://translate.wordpress.org/projects/wp-plugins/sassy-social-share"><input type="button" class="ss_demo" value="<?php _e( 'Translate Plugin', 'sassy-social-share' ) ?>" /></a>
</div>
</div>
<div style="margin-bottom: 21px">
<div class="inside" style="padding-top:10px">
<a target="_blank" style="text-decoration:none" href="http://support.heateor.com/category/sassy-social-share"><input type="button" class="ss_demo" value="<?php _e( 'Customization Options', 'sassy-social-share' ) ?>" /></a>
</div>
</div>
<div style="margin-bottom: 21px">
<div class="inside" style="padding-top:10px">
<a target="_blank" style="text-decoration:none" href="https://www.heateor.com/add-ons"><input type="button" class="ss_demo" value="<?php _e( 'Add-ons', 'sassy-social-share' ) ?>" /></a>
</div>
</div>
<div style="margin-bottom: 21px">
<div class="inside" style="padding-top:10px">
<a target="_blank" style="text-decoration:none" href="https://wordpress.org/support/plugin/sassy-social-share"><input type="button" class="ss_demo" value="<?php _e( 'Support Forum', 'sassy-social-share' ) ?>" /></a>
</div>
</div>
<div class="stuffbox">
<h3><label><?php _e( 'Need Quick Help?', 'sassy-social-share' );?></label></h3>
<div class="inside">
<p><?php _e( 'If you <strong>have any query</strong>, need help regarding <strong>plugin setup</strong>, want <strong>custom features</strong> in the plugin or <strong>have any suggestion</strong> to improve the plugin, just drop an email at <a href="mailto:support@heateor.com">support@heateor.com</a>', 'sassy-social-share' ); ?></p>
</div>
</div>
<div class="stuffbox">
<h3><label><?php _e( 'Testimonial', 'sassy-social-share' );?></label></h3>
<div class="inside">
<p><?php _e( 'You can send us testimonial at <a href="mailto:testimonials@heateor.com">testimonials@heateor.com</a>', 'sassy-social-share' ); ?></p>
</div>
</div>
<div class="stuffbox">
<h3><label><?php _e( 'Support Us', 'sassy-social-share' );?></label></h3>
<div class="inside" style="padding-top: 10px">
<div style="height: 24px;">
<div style="float: left;"><strong><?php _e( 'Rate 5-star', 'sassy-social-share' ); ?></strong></div>
<div style="float: left; margin-left: 28px;">
<a style="text-decoration: none" href="//wordpress.org/support/view/plugin-reviews/sassy-social-share" target="_blank">
<img title="<?php _e( 'Rate 5-star', 'sassy-social-share' ); ?>" src="<?php echo plugins_url( '../../images/star.png', __FILE__ ) ?>" />
<img title="<?php _e( 'Rate 5-star', 'sassy-social-share' ); ?>" src="<?php echo plugins_url( '../../images/star.png', __FILE__ ) ?>" />
<img title="<?php _e( 'Rate 5-star', 'sassy-social-share' ); ?>" src="<?php echo plugins_url( '../../images/star.png', __FILE__ ) ?>" />
<img title="<?php _e( 'Rate 5-star', 'sassy-social-share' ); ?>" src="<?php echo plugins_url( '../../images/star.png', __FILE__ ) ?>" />
<img title="<?php _e( 'Rate 5-star', 'sassy-social-share' ); ?>" src="<?php echo plugins_url( '../../images/star.png', __FILE__ ) ?>" />
</a>
</div>
</div>
<div class="heateor_sss_clear"></div>
<div style="height: 24px;">
<div style="float: left; width: 40px;">
<div class="fb-like" data-href="https://facebook.com/heateor" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
</div>
</div>
<div class="heateor_sss_clear"></div>
<div style="height: 24px;">
<div style="float: left; width: 40px;">
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=heateor" style="width:250px; height:20px;"></iframe>
</div>
</div>
</div>
</div>
</div>