| @@ -1,21 +1,23 @@ | ||
| 1 | -<?php | |
| 2 | -namespace MBSocial; | |
| 1 | +<?php | |
| 2 | +namespace MBSocial; | |
| 3 | 3 | defined('ABSPATH') or die('No direct access permitted'); |
| 4 | 4 | |
| 5 | -// defined $post_type and $post in function | |
| 5 | +// defined $post_type and $post in function | |
| 6 | 6 | use MaxButtons\maxButton as maxButton; |
| 7 | -$button = MB()->getClass('button'); // this loads the maxblocks template files | |
| 7 | +$button = new maxButton(); // this loads the maxblocks template files | |
| 8 | 8 | |
| 9 | 9 | $collection_ids = collections::getCollections(); |
| 10 | 10 | |
| 11 | 11 | if (count($collection_ids) == 0) |
| 12 | 12 | return; // no collection no meta |
| 13 | - | |
| 13 | + | |
| 14 | 14 | foreach ($collection_ids as $collection_id) |
| 15 | 15 | { |
| 16 | - $collection = new collection($collection_id); | |
| 16 | + $collection = new collection($collection_id); | |
| 17 | + | |
| 18 | + $collection->save_meta_boxes($post_id, $_POST); | |
| 19 | + | |
| 17 | 20 | |
| 18 | - $collection->save_meta_boxes($post_id, $_POST); | |
| 21 | +} | |
| 19 | 22 | |
| 20 | 23 | |
| 21 | -} | |