PluginProbe
Social Share Buttons / 1.2
Social Share Buttons v1.2
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
← All changes | classes/class-collection.php +8 -16 1.71.2 View file →
@@ -31,10 +31,8 @@
31 31 public $is_static = false;
32 32 public $is_post = false; // embedded in a post situation
33 33 public $is_mobile = false;
34 34 public $is_tablet = false;
35 - public $is_desktop = false;
36 -
37 35 public $orientation = 'horizontal';
38 36 public $display_mode = 'hidden';
39 37 public $post_id;
40 38
@@ -59,9 +57,9 @@
59 57 $block = collections::getBlock($block_name);
60 58 if ($block)
61 59 {
62 60 $block->setCollection($this);
63 - $default_data = $block->save_fields($default_data, array() ); // force the fields to set a default pos.
61 + $default_data = $block->save_fields($default_data, null ); // force the fields to set a default pos.
64 62
65 63 $this->blocks[$block_name] = $block;
66 64
67 65 }
@@ -80,9 +78,9 @@
80 78 }
81 79
82 80 if ($collection_id > 0)
83 81 {
84 - $this->set($collection_id); // set function loads the block values
82 + $this->set($collection_id);
85 83 }
86 84 }
87 85 /* Get all buttons that are currently loaded */
88 86 /*public function getLoadedButtons()
@@ -244,9 +242,8 @@
244 242 // check if on some mobile
245 243 $mobileDetect = new Mobile_Detect;
246 244 $this->is_mobile = $mobileDetect->isMobile();
247 245 $this->is_tablet = $mobileDetect->isTablet();
248 - $this->is_desktop = ($this->is_mobile) ? false : true;
249 246
250 247 $options = isset($data['display'][$hook . '_options']) ? $data['display'][$hook . '_options'] : array();
251 248
252 249 $orientation = isset($options['orientation']) ? $options['orientation'] : 'auto';
@@ -610,12 +607,12 @@
610 607 if (! $this->is_showable)
611 608 return;
612 609
613 610
614 - if (method_exists(MB(), 'load_library'))
611 + /*if (method_exists(MB(), 'load_library'))
615 612 {
616 613 MB()->load_library('fontawesome'); // always load lib since change is about 100% this includes FA.
617 - }
614 + } */
618 615
619 616 maxUtils::startTime('collection-display-' . self::$count);
620 617
621 618 $w = MBSocial()->whistle();
@@ -693,9 +690,9 @@
693 690
694 691 if ($args["style_tag"])
695 692 $output .= "<style type='text/css'>";
696 693
697 - $output .= apply_filters('mbsocial/displaycss/', $css);
694 + $output .= $css;
698 695
699 696 if ($args["style_tag"])
700 697 $output .= "</style>";
701 698
@@ -742,9 +739,12 @@
742 739
743 740 if ($args["js_tag"])
744 741 {
745 742 $output .= "<script type='text/javascript'> ";
743 +// $output .= " if (typeof MBcollection" . $this->collection_id . " == 'undefined') { ";
744 +// $output .= " function MBcollection" . $this->collection_id . "() { ";
746 745
746 +
747 747 }
748 748
749 749 foreach($js as $index => $code)
750 750 {
@@ -804,9 +804,8 @@
804 804
805 805 $collectionObj->load($node);
806 806
807 807 $active = ( isset($this->data['network']['network_active']) && is_array($this->data['network']['network_active']) ) ? $this->data['network']['network_active'] : array();
808 -
809 808 if (count($active) == 0 && $args['preview'] == true)
810 809 {
811 810 $networks = $admin->get_default_networks();
812 811 $use_networks = $networks['unselected'];
@@ -826,15 +825,8 @@
826 825 {
827 826 if (! is_object($network))
828 827 {
829 828 continue;
830 - }
831 - if (! $is_preview)
832 - {
833 - if ( ($this->is_mobile && ! $network->forMobile() ) || $this->is_desktop && ! $network->forDesktop() )
834 - {
835 - continue;
836 - }
837 829 }
838 830 $w->tell('display/parse/network', $network);
839 831
840 832 $button_args = array('link' => $network->get_url(),