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