Plugin Directory

Changeset 1074931


Ignore:
Timestamp:
01/24/2015 05:28:51 PM (11 years ago)
Author:
osdwebdev
Message:

Upgrade 3.0 bug fixes. YOU MUST DE-ACTIVATE AND RE_ACTIVATE THE PLUGIN AFTER UPGRADE

Location:
osd-social-media-sharing
Files:
16 added
5 edited

Legend:

Unmodified
Added
Removed
  • osd-social-media-sharing/trunk/includes/OSDSocialShare.php

    r1074385 r1074931  
    4040    }
    4141
    42     private function share_link($platform, $button_title) {
     42    private function share_link($platform, $button_title, $custom_url) {
    4343        $target = ($this->user_settings['target'] == 'new' && $platform != "email") ? "_blank" : "_self";
    44         $custom_url = (isset($atts['url'])) ? $atts['url'] : '';
    4544
    4645        switch ($platform) {
     
    6463                break;
    6564            default:
    66                 $url = $atts['url'];
     65                $url = $custom_url;
    6766                break;
    6867        }
    69         return "<a class='osd-sms-link{$class}' data-platform='{$platform}' target='{$target}' title='{$button_title}' href='{$url}' rel='nofollow'>";
     68        return "<a class='osd-sms-link' data-platform='{$platform}' target='{$target}' title='{$button_title}' href='{$url}' rel='nofollow'>";
    7069    }
    7170
     
    9493            $button_title = (isset($option['service-name'])) ? $option['service-name'] : ucfirst($platform);
    9594            $button_title = "Click to share on ".$button_title;
     95            $custom_url = (isset($option['url'])) ? $option['url'] : '';
     96
    9697            if (isset($option['enabled']) && $option['enabled'] == 1) {
    9798                if (isset($option['button-type']) && $option['button-type'] == 'icon') {
    9899                    if (isset($option['icon']) && $option['icon'] != '') {
    99                         $html .= "<div class='osd-sms-icon-button'>".$this->share_link($platform, $button_title)."<img src='".wp_get_attachment_url($option['icon'])."' /></a></div>";
     100                        $html .= "<div class='osd-sms-icon-button'>".$this->share_link($platform, $button_title, $custom_url)."<img src='".wp_get_attachment_url($option['icon'])."' /></a></div>";
    100101                    } else {
    101                         $html .= "<div class='osd-sms-icon-button osd-no-custom-icon'>".$this->share_link($platform, $button_title)."</a></div>";
     102                        $html .= "<div class='osd-sms-icon-button osd-no-custom-icon'>".$this->share_link($platform, $button_title, $custom_url)."</a></div>";
    102103                    }
    103104                } else {
    104105                    if (isset($option['service-name'])) {
    105                         $html .= "<div class='osd-sms-text-button'>".$this->share_link($platform, $button_title).$option['service-name']."</a></div>";
     106                        $html .= "<div class='osd-sms-text-button'>".$this->share_link($platform, $button_title, $custom_url).$option['service-name']."</a></div>";
    106107                    } else {
    107                         $html .= "<div class='osd-sms-text-button'>".$this->share_link($platform, $button_title).ucfirst($platform)."</a></div>";
     108                        $html .= "<div class='osd-sms-text-button'>".$this->share_link($platform, $button_title, $custom_url).ucfirst($platform)."</a></div>";
    108109                    }
    109110                }
  • osd-social-media-sharing/trunk/includes/admin_js.js

    r1074385 r1074931  
    7575        new_row += "<td>";
    7676        new_row += "<div class='text-preview' style='display: none;'></div>";
    77         new_row += "<div class='icon-preview'></div>";
     77        new_row += "<div class='icon-preview'><div class='osd-sms-icon-button osd-no-custom-icon'><div class='osd-sms-link'></div></div></div>";
    7878        new_row += "<input class='icon-id' name='osd_social_share_options[services]["+new_id+"][icon]' type='hidden' value='' />";
    7979        new_row += "<input class='platform' type='hidden' value='"+new_id+"' />";
  • osd-social-media-sharing/trunk/includes/installation_actions.php

    r1074385 r1074931  
    33defined('ABSPATH') or die("No script kiddies please!");
    44
    5 if (get_option('osd_social_share_options') === false) {
     5$options = get_option('osd_social_share_options');
     6if ($options === false || !isset($options['services']['email'])) {
    67    $default_options = array(
    78        'label' => 'Share this:',
     
    4950    );
    5051
    51     add_option('osd_social_share_options', $default_options, '', 'yes');
     52    if ($options === false) {
     53        add_option('osd_social_share_options', $default_options, '', 'yes');
     54    } else {
     55        update_option('osd_social_share_options', $default_options);
     56    }
    5257}
  • osd-social-media-sharing/trunk/osd_social_media_sharing.php

    r1074385 r1074931  
    44Plugin URI: http://outsidesource.com
    55Description: Add buttons to share any of your content on facebook, twitter, google plus, pinterest, email and more.
    6 Version: 3.0
     6Version: 3.0.1
    77Author: OSD Web Development Team
    88Author URI: http://outsidesource.com
  • osd-social-media-sharing/trunk/readme.txt

    r1074385 r1074931  
    44Requires at least: 3.4
    55Tested up to: 4.1
    6 Stable tag: 3.0
     6Stable tag: 3.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9191== Upgrade Notice ==
    9292
     93= 3.0.1 =
     94* Upgrade bug fixes
     95* YOU MUST DE-ACTIVATE AND THEN ACTIVATE THE PLUGIN TO HAVE A SUCCESSFUL UPGRAGE TO 3.0
     96
    9397= 3.0 =
    9498* THIS UPGRADE WILL REQUIRE YOU TO RESET YOUR SETTINGS!!!!
Note: See TracChangeset for help on using the changeset viewer.