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