| 1 |
<?php |
| 2 |
/* |
| 3 |
* Page Name: Include files |
| 4 |
*/ |
| 5 |
|
| 6 |
use WPCoder\Dashboard\Field; |
| 7 |
use WPCoder\Dashboard\Option; |
| 8 |
|
| 9 |
defined( 'ABSPATH' ) || exit; |
| 10 |
|
| 11 |
$default = Field::getDefault(); |
| 12 |
$opt = include( 'options/includes.php' ); |
| 13 |
$count = ! empty( $default['param']['include'] ) ? count( $default['param']['include'] ) : 0; |
| 14 |
?> |
| 15 |
|
| 16 |
<h4> |
| 17 |
<span class="codericon codericon-toggles"></span> |
| 18 |
<?php esc_html_e( 'Assets', 'wpcoder' ); ?> |
| 19 |
</h4> |
| 20 |
|
| 21 |
<fieldset id="includes-files"> |
| 22 |
<legend><?php esc_html_e( 'Adding', 'wpcoder' ); ?></legend> |
| 23 |
|
| 24 |
<?php if ( $count > 0 ) : |
| 25 |
for ( $i = 0; $i < $count; $i ++ ): |
| 26 |
?> |
| 27 |
|
| 28 |
<div class="wowp-fields-group has-padding has-shadow has-radius"> |
| 29 |
<span class="dashicons dashicons-trash"></span> |
| 30 |
<?php Option::init( [ |
| 31 |
$opt['include'], |
| 32 |
$opt['include_file'], |
| 33 |
$opt['js_attr'], |
| 34 |
], $i ); ?> |
| 35 |
</div> |
| 36 |
|
| 37 |
<?php |
| 38 |
endfor; |
| 39 |
endif; ?> |
| 40 |
|
| 41 |
<div class="btn-add-display"> |
| 42 |
<a class="button button-primary button-large" id="add-include"><?php esc_html_e( 'Add New' ); ?></a> |
| 43 |
</div> |
| 44 |
</fieldset> |
| 45 |
|
| 46 |
|
| 47 |
<template id="clone-includes"> |
| 48 |
<div class="wowp-fields-group has-padding has-shadow has-radius"> |
| 49 |
<span class="dashicons dashicons-trash"></span> |
| 50 |
<?php Option::init( [ |
| 51 |
$opt['include'], |
| 52 |
$opt['include_file'], |
| 53 |
$opt['js_attr'], |
| 54 |
], -1 ); ?> |
| 55 |
</div> |
| 56 |
|
| 57 |
</template> |
| 58 |
|
| 59 |
<?php |
| 60 |
|