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