Plugin Directory

Changeset 872892


Ignore:
Timestamp:
03/10/2014 05:19:40 PM (12 years ago)
Author:
niccolo_tapparo
Message:

fixed "output characters error on activation"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-social-ring/trunk/wp-social-ring.php

    r872879 r872892  
    33
    44/*
    5 
    6 
    75Plugin Name: WordPress Social Ring
    8 
    9 
    106Description: Let visitors share posts/pages on Social Networks.
    11 
    12 
    137Author: Niccolò Tapparo
    14 
    15 
    168Version: 1.2.6
    17 
    18 
    199Author URI: http://wordpress.altervista.org/
    20 
    21 
    2210Plugin URI: http://wordpress.altervista.org/wordpress-social-ring/
    23 
    24 
    2511*/
    2612
    27 
    28 
    29 
    30 
    3113define( 'WP_SOCIAL_RING', 'wp_social_ring' );
    32 
    33 
    3414define( 'WP_SOCIAL_RING_PATH', plugin_dir_path(__FILE__) );
    35 
    36 
    3715define( 'WP_SOCIAL_RING_URL', plugin_dir_url(__FILE__) );
    38 
    39 
    40 
    41 
    42 
    4316register_activation_hook(__FILE__,'social_ring_install');
    44 
    45 
    46 
    47 
    48 
    4917load_plugin_textdomain(WP_SOCIAL_RING, false, dirname(plugin_basename(__FILE__)).'/langs/');
    5018
    5119
    52 
    53 
    54 
    5520//Set defaults if not defined
    56 
    57 
    5821$wp_social_ring_options = get_option(WP_SOCIAL_RING.'_options');
    5922
    6023
    61 
    62 
    63 
    6424include WP_SOCIAL_RING_PATH.'/includes/library.php';
    65 
    66 
    6725include WP_SOCIAL_RING_PATH.'/includes/widgets.php';
    6826
    69 
    70 
    71 
    72 
    7327if(is_admin()) {
    74 
    75 
    7628    include WP_SOCIAL_RING_PATH.'/admin/admin.php';
    77 
    78 
    7929}
    80 
    81 
    82 
    83 
    8430
    8531function social_ring_install() {
    8632
     33    $wp_social_ring_options = get_option(WP_SOCIAL_RING.'_options');
    8734
     35    if(empty($wp_social_ring_options)) {
    8836
     37        $wp_social_ring_options = array (
     38            'social_visible_buttons_list' => 'social_facebook_like_button|social_facebook_share_button|social_twitter_button|social_google_button|social_pin_it_button|',
     39            'social_available_buttons_list' => 'social_google_share_button|social_linkedin_button|social_stumble_button|social_print_pdf_email_button|',                'social_retrocompatibility' => 1,
     40            'social_facebook_like_button' => 1,
     41            'social_facebook_share_button' => 1,
     42            'social_twitter_button' => 1,
     43            'social_google_button' => 1,
     44            'social_google_share_button' => 0,
     45            'social_pin_it_button' => 1,
     46            'social_linkedin_button' => 0,
     47            'social_stumble_button' => 0,
     48            'social_print_pdf_email_button' => 0,
     49            'social_print_button' => 0,
     50            'social_create_pdf_button' => 0,
     51            'social_send_email_button' => 0,
     52            'social_on_home' => 0,
     53            'social_on_pages' => 0,
     54            'social_on_posts' => 1,
     55            'social_on_category' => 0,
     56            'social_on_archive' => 0,
     57            'social_before_content' => 1,
     58            'social_after_content' => 0,
     59            'language' => 'Englsh',
     60            'facebook_language' => 'en_US',
     61            'google_language' => 'en-US',
     62            'twitter_language' => 'en',
     63            'button_counter' => 'horizontal'
    8964
    90 
    91     if(version_compare(get_bloginfo('version'), '3.3', '<')) {
    92 
    93 
    94         deactivate_plugins(basename(__FILE__));
    95 
    96 
    97     } else {
    98 
    99 
    100         $wp_social_ring_options = get_option(WP_SOCIAL_RING.'_options');
    101 
    102 
    103         if(empty($wp_social_ring_options)) {
    104 
    105 
    106             $wp_social_ring_options = array (
    107 
    108 
    109                 'social_visible_buttons_list' => 'social_facebook_like_button|social_facebook_share_button|social_twitter_button|social_google_button|social_pin_it_button|',
    110 
    111 
    112                 'social_available_buttons_list' => 'social_google_share_button|social_linkedin_button|social_stumble_button|social_print_pdf_email_button|',                'social_retrocompatibility' => 1,
    113 
    114 
    115                 'social_facebook_like_button' => 1,
    116 
    117 
    118                 'social_facebook_share_button' => 1,
    119 
    120 
    121                 'social_twitter_button' => 1,
    122 
    123 
    124                 'social_google_button' => 1,
    125 
    126 
    127                 'social_google_share_button' => 0,
    128 
    129 
    130                 'social_pin_it_button' => 1,
    131 
    132 
    133                 'social_linkedin_button' => 0,
    134 
    135 
    136                 'social_stumble_button' => 0,
    137 
    138 
    139                 'social_print_pdf_email_button' => 0,
    140 
    141 
    142                 'social_print_button' => 0,
    143 
    144 
    145                 'social_create_pdf_button' => 0,
    146 
    147 
    148                 'social_send_email_button' => 0,
    149 
    150 
    151                 'social_on_home' => 0,
    152 
    153 
    154                 'social_on_pages' => 0,
    155 
    156 
    157                 'social_on_posts' => 1,
    158 
    159 
    160                 'social_on_category' => 0,
    161 
    162 
    163                 'social_on_archive' => 0,
    164 
    165 
    166                 'social_before_content' => 1,
    167 
    168 
    169                 'social_after_content' => 0,
    170 
    171 
    172                 'language' => 'Englsh',
    173 
    174 
    175                 'facebook_language' => 'en_US',
    176 
    177 
    178                 'google_language' => 'en-US',
    179 
    180 
    181                 'twitter_language' => 'en',
    182 
    183 
    184                 'button_counter' => 'horizontal'
    185 
    186 
    187             );
    188 
    189 
    190             update_option(WP_SOCIAL_RING.'_options', $wp_social_ring_options);
    191 
    192 
    193             update_option(WP_SOCIAL_RING.'_retrocompatibility', 1);
    194 
    195 
    196         }
    197 
    198 
    199        
    200 
    201 
     65        );
     66        update_option(WP_SOCIAL_RING.'_options', $wp_social_ring_options);
     67        update_option(WP_SOCIAL_RING.'_retrocompatibility', 1);
    20268    }
    203 
    204 
    20569}
    20670
Note: See TracChangeset for help on using the changeset viewer.