$lacands_eget, 'url'=>$lacands_uget, 'name'=>$lacands_nget, 'desc'=>$lacands_dget, 'charset'=>$lacands_cget, 'version'=>$lacands_vget, 'lang'=>$lacands_lget); lacands_http_post($link, $lacands_bloginfo); add_option('lacands-html-widget-counters-location', 'beforeAndafter'); add_option('lacands-html-widget-margin-top', '5'); add_option('lacands-html-widget-margin-right', '0'); add_option('lacands-html-widget-margin-bottom', '5'); add_option('lacands-html-widget-margin-left', '0'); add_option('lacands-html-widget-margin-top-after', '0'); add_option('lacands-html-widget-margin-right-after', '0'); add_option('lacands-html-widget-margin-bottom-after', '0'); add_option('lacands-html-widget-margin-left-after', '0'); add_option('lacands-html-widget-disable-cntr-display-after', '0'); } else if ($option == 'update') { if(!empty($_POST['lacands-html-widget-counters-location'])) { update_option('lacands-html-widget-counters-location', $_POST['lacands-html-widget-counters-location']); } if($_POST['lacands-html-widget-margin-top'] != NULL) { update_option('lacands-html-widget-margin-top', (string)$_POST['lacands-html-widget-margin-top']); } else { update_option('lacands-html-widget-margin-top', '0'); } if($_POST['lacands-html-widget-margin-right'] != NULL) { update_option('lacands-html-widget-margin-right', (string)$_POST['lacands-html-widget-margin-right']); } else { update_option('lacands-html-widget-margin-right', '0'); } if($_POST['lacands-html-widget-margin-bottom'] != NULL) { update_option('lacands-html-widget-margin-bottom', (string)$_POST['lacands-html-widget-margin-bottom']); } else { update_option('lacands-html-widget-margin-bottom', '0'); } if($_POST['lacands-html-widget-margin-left'] != NULL) { update_option('lacands-html-widget-margin-left', (string)$_POST['lacands-html-widget-margin-left']); } else { update_option('lacands-html-widget-margin-left', '0'); } if($_POST['lacands-html-widget-margin-top-after'] != NULL) { update_option('lacands-html-widget-margin-top-after', (string)$_POST['lacands-html-widget-margin-top-after']); } else { update_option('lacands-html-widget-margin-top-after', '0'); } if($_POST['lacands-html-widget-margin-right-after'] != NULL) { update_option('lacands-html-widget-margin-right-after', (string)$_POST['lacands-html-widget-margin-right-after']); } else { update_option('lacands-html-widget-margin-right-after', '0'); } if($_POST['lacands-html-widget-margin-bottom-after'] != NULL) { update_option('lacands-html-widget-margin-bottom-after', (string)$_POST['lacands-html-widget-margin-bottom-after']); } else { update_option('lacands-html-widget-margin-bottom-after', '0'); } if($_POST['lacands-html-widget-margin-left-after'] != NULL) { update_option('lacands-html-widget-margin-left-after', (string)$_POST['lacands-html-widget-margin-left-after']); } else { update_option('lacands-html-widget-margin-left-after', '0'); } if(!empty($_POST['lacands-html-widget-disable-cntr-display'])) { update_option('lacands-html-widget-disable-cntr-display', (string)$_POST['lacands-html-widget-disable-cntr-display']); } else { update_option('lacands-html-widget-disable-cntr-display', '0'); } } else { /* delete_option('lacands-html-widget-counters-location'); delete_option('lacands-html-widget-margin-top'); delete_option('lacands-html-widget-margin-right'); delete_option('lacands-html-widget-margin-bottom'); delete_option('lacands-html-widget-margin-left'); delete_option('lacands-html-widget-margin-top-after'); delete_option('lacands-html-widget-margin-right-after'); delete_option('lacands-html-widget-margin-bottom-after'); delete_option('lacands-html-widget-margin-left-after'); delete_option('lacands-html-widget-disable-cntr-display-after'); */ } } function lacands_wp_filter_post_content ( $related_content ) { global $lacands_opt_widget_counters_location; global $lacands_widget_disable_cntr_display; $lacands_widget_disable_cntr_display = get_option('lacands-html-widget-disable-cntr-display'); $lacands_opt_widget_counters_location = get_option('lacands-html-widget-counters-location'); if($lacands_widget_disable_cntr_display == '0') { if($lacands_opt_widget_counters_location == "beforeAndafter") { $related_content = lacands_wp_filter_content_widget(FALSE).$related_content; $related_content = $related_content.lacands_wp_filter_content_widget(FALSE); } if($lacands_opt_widget_counters_location == "before") { $related_content = lacands_wp_filter_content_widget(FALSE).$related_content; } else if($lacands_opt_widget_counters_location == "after") { $related_content = $related_content.lacands_wp_filter_content_widget(FALSE); } } return ($related_content); } function lacands_wp_filter_content_widget ($show=TRUE) { global $lacands_opt_widget_counters_location, $lacands_opt_widget_float, $lacands_widget_disable_cntr_display; global $lacands_opt_widget_margin_top, $lacands_opt_widget_margin_right, $lacands_opt_widget_margin_bottom, $lacands_opt_widget_margin_left; global $lacands_opt_widget_margin_top_after, $lacands_opt_widget_margin_right_after, $lacands_opt_widget_margin_bottom_after, $lacands_opt_widget_margin_left_after; global $lacands_opt_display_index_posts, $lacands_opt_display_archive_posts, $lacands_opt_display_page_posts; global $post; $p = $post; $link1 = get_permalink($p); lacands_readOptionsValuesFromWPDatabase(); $position = ''; if( $lacands_widget_disable_cntr_display == '0') { $position = 'padding-top:'.$lacands_opt_widget_margin_top.'px;padding-right:'.$lacands_opt_widget_margin_right.'px;padding-bottom:'.$lacands_opt_widget_margin_bottom.'px;padding-left:'.$lacands_opt_widget_margin_left.'px;'; $position_after = 'padding-top:'.$lacands_opt_widget_margin_top_after.'px;padding-right:'.$lacands_opt_widget_margin_right_after.'px;padding-bottom:'.$lacands_opt_widget_margin_bottom_after.'px;padding-left:'.$lacands_opt_widget_margin_left_after.'px;'; } if (is_single() || (is_home()) || (is_archive()) ) { $link1 = urlencode(get_permalink($p)); $lacands_widget_display_cntrs = '
Settings saved for 1-click Retweet/Share/Like.