| 1 |
<?php |
| 2 |
/** |
| 3 |
* Loops over the meta boxes inside the advanced settings area of the Campaign post type. |
| 4 |
* |
| 5 |
* @author Studio 164a |
| 6 |
* @package Charitable/Admin Views/Metaboxes |
| 7 |
* @copyright Copyright (c) 2019, Studio 164a |
| 8 |
* @since 1.6.0 |
| 9 |
* @version 1.6.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
global $post; |
| 13 |
|
| 14 |
$helper = charitable()->registry()->get( 'campaign_meta_boxes' ); |
| 15 |
$panels = $helper->get_campaign_settings_panels(); |
| 16 |
|
| 17 |
?> |
| 18 |
<div id="charitable-campaign-advanced-metabox" class="charitable-metabox charitable-campaign-settings"> |
| 19 |
<ul class="charitable-tabs"> |
| 20 |
<?php foreach ( $panels as $id => $panel ) : ?> |
| 21 |
<li><a href="<?php echo esc_attr( sprintf( '#%s', $id ) ); ?>"><?php echo $panel['title']; ?></a></li> |
| 22 |
<?php endforeach ?> |
| 23 |
</ul> |
| 24 |
<?php foreach ( $panels as $id => $panel ) : ?> |
| 25 |
<div id="<?php echo esc_attr( $id ); ?>" class="charitable-campaign-settings-panel"> |
| 26 |
<?php |
| 27 |
if ( ! array_key_exists( 'view', $panel ) ) : |
| 28 |
$panel['view'] = 'metaboxes/campaign-settings/panel'; |
| 29 |
endif; |
| 30 |
|
| 31 |
$helper->get_meta_box_helper()->metabox_display( $post, array( 'args' => $panel ) ); |
| 32 |
?> |
| 33 |
</div><!-- #<?php echo esc_attr( $id ); ?> --> |
| 34 |
<?php endforeach ?> |
| 35 |
</div><!-- #charitable-campaign-advanced-metabox --> |
| 36 |
|