PluginProbe
Social Share Buttons / 1.5
Social Share Buttons v1.5
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 +4 -43 1.151.5 View file →
@@ -59,9 +59,9 @@
59 59 $block = collections::getBlock($block_name);
60 60 if ($block)
61 61 {
62 62 $block->setCollection($this);
63 - $default_data = $block->save_fields($default_data, array() ); // force the fields to set a default pos.
63 + $default_data = $block->save_fields($default_data, null ); // force the fields to set a default pos.
64 64
65 65 $this->blocks[$block_name] = $block;
66 66
67 67 }
@@ -296,21 +296,8 @@
296 296 elseif (isset($meta['general']['active']) && $is_old_active === 0) // backward for 0.9.5 . Can go at some point
297 297 $this->is_showable = false;
298 298 }
299 299
300 - if ( Install::isPRO() ) {
301 - $show_mobile = (isset($data['display']['show_mobile']) && $data['display']['show_mobile'] == 0) ? false: true;
302 - $show_desktop = (isset($data['display']['show_desktop']) && $data['display']['show_desktop'] == 0) ? false: true;
303 -
304 - if ($this->is_mobile && ! $show_mobile)
305 - {
306 - $this->is_showable = false;
307 - }
308 - if ($this->is_desktop && ! $show_desktop)
309 - {
310 - $this->is_showable = false;
311 - }
312 - }
313 300 // new method of getting data around
314 301 $w->tell('display/env/hook', $hook);
315 302 $w->tell('display/env/post_id', $this->post_id);
316 303 $w->tell('display/env/is_static', $this->is_static );
@@ -622,14 +609,14 @@
622 609 {
623 610 if (! $this->is_showable)
624 611 return;
625 612
626 - /* 1.8 Deprecated. Not included in MB() anymore, using svg method.
613 +
627 614 if (method_exists(MB(), 'load_library'))
628 615 {
629 616 MB()->load_library('fontawesome'); // always load lib since change is about 100% this includes FA.
630 617 }
631 - */
618 +
632 619 maxUtils::startTime('collection-display-' . self::$count);
633 620
634 621 $w = MBSocial()->whistle();
635 622
@@ -689,23 +676,8 @@
689 676 }
690 677
691 678 }
692 679
693 - public function getDisplayCSS($doc_id = false) // For file output
694 - {
695 - $key = '_parsed_css';
696 -
697 - if ($doc_id)
698 - $key .= '_' . $doc_id;
699 -
700 - $meta = $this->get_meta($key);
701 - if (is_array($meta))
702 - return array_shift($meta);
703 - else
704 - return false;
705 -
706 - }
707 -
708 680 public function displayCSS($css, $args = array() ) // $echo = true, $style_tag = true)
709 681 {
710 682
711 683 $default = array(
@@ -717,14 +689,13 @@
717 689 if ($args['load_type'] == 'inline')
718 690 $args['style_tag'] =true;
719 691
720 692 $output = '';
721 - $css = apply_filters('mbsocial/displaycss/', $css);
722 693
723 694 if ($args["style_tag"])
724 695 $output .= "<style type='text/css'>";
725 696
726 - $output .= $css;
697 + $output .= apply_filters('mbsocial/displaycss/', $css);
727 698
728 699 if ($args["style_tag"])
729 700 $output .= "</style>";
730 701
@@ -732,22 +703,13 @@
732 703 if ($args["load_type"] == 'footer')
733 704 {
734 705 $load_id = 'collection-' . $this->collection_id; // must be unique for unique items, otherwise css won't be output
735 706
736 - $use_file = get_option('maxbuttons_usecssfile', false);
737 - if ($use_file)
738 - {
739 -
740 - wp_enqueue_style('maxbuttons-social-front-' . self::$count, admin_url('admin-ajax.php').'?action=maxbuttons_social_css&id=' . $this->collection_id . '&doc=' . self::$count) ;
741 - $this->update_meta($this->collection_id, '_parsed_css_' . self::$count, $css);
742 - }
743 -
744 707 if (self::$count > 1)
745 708 {
746 709 $load_id .= "-" . self::$count;
747 710 }
748 711
749 -
750 712 do_action('mb-footer',$load_id, $output);
751 713 }
752 714 elseif ($args["load_type"] == 'inline')
753 715 {
@@ -982,9 +944,8 @@
982 944 $css = $this->styleObj->preParse($css);
983 945 $css = apply_filters('mbsocial/parsecss/', $css); // anybody else
984 946
985 947 $css = $this->getCSSParser()->parse($css);
986 -
987 948 maxUtils::endTime('collection-parseCSS-'. self::$count);
988 949 return $css;
989 950 }
990 951