| 1 |
<?php |
| 2 |
/* |
| 3 |
* Page Name: CSS |
| 4 |
*/ |
| 5 |
|
| 6 |
use WPCoder\Dashboard\Field; |
| 7 |
use WPCoder\Dashboard\FolderManager; |
| 8 |
use WPCoder\Dashboard\Option; |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
$default = Field::getDefault(); |
| 13 |
$opt = include( 'options/css-code.php' ); |
| 14 |
|
| 15 |
$css_link = ''; |
| 16 |
if ( ! empty( $default['css_code'] ) ) { |
| 17 |
$css_link = FolderManager::path_upload_url() . 'style-' . $default['id'] . '.css'; |
| 18 |
} |
| 19 |
|
| 20 |
?> |
| 21 |
|
| 22 |
<h4> |
| 23 |
<span class="codericon codericon-filetype-css"></span> |
| 24 |
<?php esc_html_e( 'CSS Code', 'wpcoder' ); ?> |
| 25 |
</h4> |
| 26 |
|
| 27 |
<fieldset> |
| 28 |
<legend><?php esc_html_e( 'Settings', 'wpcoder' ); ?></legend> |
| 29 |
<?php Option::init( [ |
| 30 |
$opt['inline'], |
| 31 |
$opt['minified'], |
| 32 |
] ); ?> |
| 33 |
</fieldset> |
| 34 |
|
| 35 |
<div class="wowp-field is-full wowp-code-nav"> |
| 36 |
<ol id="cssNavigationMenu" class="wowp-php-nav-menu"></ol> |
| 37 |
<span class="button-editor" id="cssnav">Add NAV Comment</span> |
| 38 |
</div> |
| 39 |
|
| 40 |
<?php Option::init( [ $opt['css_code'] ] ); ?> |
| 41 |
|
| 42 |
<div class="wowp-notification -warning"> |
| 43 |
Please input just the CSS content, leaving out the <code>style</code> tag. |
| 44 |
</div> |
| 45 |
|
| 46 |
<?php if ( ! empty( $css_link ) ): ?> |
| 47 |
<div class="wowp-fields-group has-mt"> |
| 48 |
<div class="wowp-field is-full has-addon border-default"> |
| 49 |
<label for="url-css-file" class="is-addon"> |
| 50 |
<span class="dashicons dashicons-admin-links"></span> |
| 51 |
</label> |
| 52 |
<input type="url" id="url-css-file" readonly="readonly" value="<?php echo esc_url( $css_link ); ?>"> |
| 53 |
<span class="label"><?php esc_html_e( 'URL to the CSS file', 'wpcoder' ); ?></span> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
|
| 57 |
<?php endif; |
| 58 |
|
| 59 |
|