| 1 |
<?php |
| 2 |
/** |
| 3 |
* Render the settings page |
| 4 |
* |
| 5 |
* @var string $page The settings page. |
| 6 |
* @var array $settings_section The settings section. |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
<div class="wrap metabox-holder"> |
| 11 |
<form id="isc-section-wrapper" method="post" action="options.php"> |
| 12 |
<?php |
| 13 |
foreach ( (array) $settings_section as $section ) { |
| 14 |
|
| 15 |
?> |
| 16 |
<div class="postbox <?php echo esc_attr( $section['id'] ); ?>" id="<?php echo esc_attr( $section['id'] ); ?>"> |
| 17 |
<?php |
| 18 |
if ( $section['title'] ) { |
| 19 |
?> |
| 20 |
<div class="postbox-header"><h2 class="hndle"><?php echo esc_html( $section['title'] ); ?></h2> |
| 21 |
<?php if ( ! empty( $section['close_button'] ) ) : ?> |
| 22 |
<span class="dashicons dashicons-no-alt"></span> |
| 23 |
<?php endif; ?> |
| 24 |
</div> |
| 25 |
<?php |
| 26 |
} |
| 27 |
?> |
| 28 |
<div class="inside"> |
| 29 |
<div class="submitbox"> |
| 30 |
<?php |
| 31 |
if ( $section['callback'] ) { |
| 32 |
call_user_func( $section['callback'], $section ); |
| 33 |
} |
| 34 |
?> |
| 35 |
<table class="form-table" role="presentation"> |
| 36 |
<?php |
| 37 |
do_settings_fields( $page, $section['id'] ); |
| 38 |
?> |
| 39 |
</table> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
<?php |
| 44 |
} |
| 45 |
|
| 46 |
settings_fields( 'isc_options_group' ); |
| 47 |
?> |
| 48 |
<p class="submit"> |
| 49 |
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_html_e( 'Save Changes', 'image-source-control-isc' ); ?>"> |
| 50 |
</p> |
| 51 |
</form> |
| 52 |
</div> |
| 53 |
|