| @@ -1,7 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | +namespace MaxButtons; | |
| 2 | 3 | defined('ABSPATH') or die('No direct access permitted'); |
| 3 | 4 | |
| 5 | +use \simple_html_dom as simple_html_dom; | |
| 6 | + | |
| 4 | 7 | class maxCollection |
| 5 | 8 | { |
| 6 | 9 | protected $collection_type = 'none'; |
| 7 | 10 | protected $uses_blocks = array(); |
| @@ -494,13 +497,10 @@ | ||
| 494 | 497 | return; // no output, holiday |
| 495 | 498 | |
| 496 | 499 | if ($args["js_tag"]) |
| 497 | 500 | { |
| 498 | - $output .= "<script type='text/javascript'> "; | |
| 499 | -// $output .= " if (typeof MBcollection" . $this->collection_id . " == 'undefined') { "; | |
| 500 | -// $output .= " function MBcollection" . $this->collection_id . "() { "; | |
| 501 | + $output .= "<script type='text/javascript'> "; | |
| 501 | 502 | |
| 502 | - | |
| 503 | 503 | } |
| 504 | 504 | |
| 505 | 505 | foreach($js as $index => $code) |
| 506 | 506 | { |
| @@ -701,9 +701,9 @@ | ||
| 701 | 701 | $button_id = $button->getID(); |
| 702 | 702 | $name = $button->getName(); |
| 703 | 703 | |
| 704 | 704 | $meta = isset($button_data["meta"]) ? $button_data["meta"] : array(); |
| 705 | - do_action('mb-data-load',$button_data); // weakness of the bubbling filter model | |
| 705 | + //do_action('mb-data-load',$button_data); // weakness of the bubbling filter model | |
| 706 | 706 | |
| 707 | 707 | $output .= "<div class='item shortcode-container' data-id='$button_id'> "; |
| 708 | 708 | $output .= $button->display(array("mode" => "preview", 'echo' => false, 'load_css' => 'inline') ); //"mode" => "preview", "compile" => true, |
| 709 | 709 | $output .= "<span class='button_data'>" . base64_encode(json_encode($button_data)) . "</span>"; |