| 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.0.0 |
| 15 |
* @version 1.8.8.6 |
| 16 |
*/ |
| 17 |
|
| 18 |
global $post; |
| 19 |
|
| 20 |
if ( ! isset( $view_args['meta_boxes'] ) || empty( $view_args['meta_boxes'] ) ) { |
| 21 |
return; |
| 22 |
} |
| 23 |
?> |
| 24 |
<div id="charitable-campaign-advanced-metabox" class="charitable-metabox"> |
| 25 |
<ul class="charitable-tabs"> |
| 26 |
<?php foreach ( $view_args['meta_boxes'] as $charitable_meta_box ) : ?> |
| 27 |
<li><a href="<?php printf( '#%s', esc_attr( $charitable_meta_box['id'] ) ); ?>"><?php echo esc_html( $charitable_meta_box['title'] ); ?></a></li> |
| 28 |
<?php endforeach ?> |
| 29 |
</ul> |
| 30 |
<?php foreach ( $view_args['meta_boxes'] as $charitable_meta_box ) : ?> |
| 31 |
<div id="<?php echo esc_attr( $charitable_meta_box['id'] ); ?>" class="postbox <?php echo esc_attr( postbox_classes( $charitable_meta_box['id'], 'campaign' ) ); ?>"> |
| 32 |
<div class="inside"> |
| 33 |
<?php call_user_func( $charitable_meta_box['callback'], $post, $charitable_meta_box ); ?> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
<?php |
| 37 |
endforeach; |
| 38 |
?> |
| 39 |
</div> |