| @@ -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 ); |
| @@ -623,14 +610,13 @@ | ||
| 623 | 610 | if (! $this->is_showable) |
| 624 | 611 | return; |
| 625 | 612 | |
| 626 | 613 | |
| 627 | - /* 1.8 Deprecated. Not included in MB() anymore, using svg method. | |
| 628 | 614 | if (method_exists(MB(), 'load_library')) |
| 629 | 615 | { |
| 630 | 616 | MB()->load_library('fontawesome'); // always load lib since change is about 100% this includes FA. |
| 631 | 617 | } |
| 632 | - */ | |
| 618 | + | |
| 633 | 619 | maxUtils::startTime('collection-display-' . self::$count); |
| 634 | 620 | |
| 635 | 621 | $w = MBSocial()->whistle(); |
| 636 | 622 | |
| @@ -690,18 +676,8 @@ | ||
| 690 | 676 | } |
| 691 | 677 | |
| 692 | 678 | } |
| 693 | 679 | |
| 694 | - public function getDisplayCSS() // For file output | |
| 695 | - { | |
| 696 | - $meta = $this->get_meta('_parsed_css'); | |
| 697 | - if (is_array($meta)) | |
| 698 | - return array_shift($meta); | |
| 699 | - else | |
| 700 | - return false; | |
| 701 | - | |
| 702 | - } | |
| 703 | - | |
| 704 | 680 | public function displayCSS($css, $args = array() ) // $echo = true, $style_tag = true) |
| 705 | 681 | { |
| 706 | 682 | |
| 707 | 683 | $default = array( |
| @@ -727,20 +703,12 @@ | ||
| 727 | 703 | if ($args["load_type"] == 'footer') |
| 728 | 704 | { |
| 729 | 705 | $load_id = 'collection-' . $this->collection_id; // must be unique for unique items, otherwise css won't be output |
| 730 | 706 | |
| 731 | - $use_file = get_option('maxbuttons_usecssfile', false); | |
| 732 | - if ($use_file) | |
| 733 | - { | |
| 734 | - wp_enqueue_style('maxbuttons-social-front', admin_url('admin-ajax.php').'?action=maxbuttons_social_css&id=' . $this->collection_id); | |
| 735 | - $this->update_meta($this->collection_id, '_parsed_css', $css); | |
| 736 | - } | |
| 737 | - | |
| 738 | 707 | if (self::$count > 1) |
| 739 | 708 | { |
| 740 | 709 | $load_id .= "-" . self::$count; |
| 741 | 710 | } |
| 742 | - | |
| 743 | 711 | |
| 744 | 712 | do_action('mb-footer',$load_id, $output); |
| 745 | 713 | } |
| 746 | 714 | elseif ($args["load_type"] == 'inline') |