| @@ -17,44 +17,42 @@ | ||
| 17 | 17 | $js_link = FolderManager::path_upload_url() . 'script-' . $default['id'] . '.js'; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | ?> |
| 21 | - <h4> | |
| 22 | - <span class="codericon codericon-filetype-js"></span> | |
| 23 | - <?php esc_html_e( 'JavaScript Code', 'wpcoder' ); ?> | |
| 24 | - </h4> | |
| 25 | 21 | |
| 26 | - <fieldset> | |
| 27 | - <legend><?php esc_html_e( 'Settings', 'wpcoder' ); ?></legend> | |
| 22 | + <div class="wowp-settings__page"> | |
| 23 | + <div class="wowp-settings__page-sidebar"> | |
| 28 | 24 | |
| 29 | - <?php Option::init( [ | |
| 30 | - $opt['jquery'], | |
| 31 | - $opt['inline'], | |
| 32 | - $opt['minified'], | |
| 33 | - $opt['attributes'], | |
| 34 | - ] ); ?> | |
| 25 | + <?php Option::init( [ | |
| 26 | + $opt['jquery'], | |
| 27 | + $opt['inline'], | |
| 28 | + $opt['minified'], | |
| 29 | + $opt['attributes'], | |
| 30 | + ] ); ?> | |
| 35 | 31 | |
| 36 | - </fieldset> | |
| 32 | + <button class="button-editor button" id="jsnav"><?php esc_html_e( 'Add NAV Comment', 'wp-coder' ); ?></button> | |
| 33 | + <ol id="jsNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 37 | 34 | |
| 38 | - <div class="wowp-field is-full wowp-code-nav "> | |
| 39 | - <ol id="jsNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 40 | - <span class="button-editor" id="jsnav">Add NAV Comment</span> | |
| 41 | - </div> | |
| 35 | + </div> | |
| 36 | + <div class="wowp-settings__page-content"> | |
| 37 | + <?php Field::textarea( 'js_code' ); ?> | |
| 42 | 38 | |
| 43 | -<?php Option::init( [ $opt['js_code'] ] ); ?> | |
| 39 | + <div class="wowp-notification notification-info"> | |
| 40 | + Just enter the JavaScript content. You don’t need to include <code><script></code> — it's already on the page. | |
| 41 | + </div> | |
| 44 | 42 | |
| 45 | - <div class="wowp-notification -warning"> | |
| 46 | - Please input only the JavaScript content, omitting the <code>script</code> tag | |
| 47 | - </div> | |
| 43 | + <?php if ( ! empty( $js_link ) ): ?> | |
| 44 | + <div class="wowp-field has-addon"> | |
| 45 | + <span class="label"><?php esc_html_e( 'JS File URL', 'wp-coder' ); ?></span> | |
| 46 | + <label for="tag" class="label is-addon"><span | |
| 47 | + class="dashicons dashicons-admin-links"></span></label> | |
| 48 | + <input type="url" id="url-js-file" readonly="readonly" value="<?php echo esc_url( $js_link ); ?>"> | |
| 49 | + </div> | |
| 50 | + <?php endif; ?> | |
| 48 | 51 | |
| 49 | -<?php if ( ! empty( $js_link ) ): ?> | |
| 50 | - <div class="wowp-fields-group has-mt"> | |
| 51 | - <div class="wowp-field is-full has-addon border-default"> | |
| 52 | - <label for="url-css-file" class="is-addon"> | |
| 53 | - <span class="dashicons dashicons-admin-links"></span> | |
| 54 | - </label> | |
| 55 | - <input type="url" id="url-css-file" readonly="readonly" value="<?php echo esc_url( $js_link ); ?>"> | |
| 56 | - <span class="label"><?php esc_html_e( 'URL to the JS file', 'wpcoder' ); ?></span> | |
| 52 | + | |
| 57 | 53 | </div> |
| 58 | 54 | </div> |
| 59 | -<?php endif; | |
| 55 | + | |
| 56 | +<?php | |
| 57 | + | |
| 60 | 58 | |