| @@ -12,44 +12,49 @@ | ||
| 12 | 12 | self::send(); |
| 13 | 13 | $content = self::get_content(); |
| 14 | 14 | $enabled = get_option( '_wpcoder_enable_php' ); |
| 15 | 15 | ?> |
| 16 | - <div class="wrap wowp-wrap wpcoder-global-php"> | |
| 17 | 16 | |
| 17 | + | |
| 18 | 18 | <form method="post"> |
| 19 | - <fieldset> | |
| 20 | - <legend> | |
| 21 | - <?php | |
| 22 | - esc_html_e( 'PHP code', 'wpcoder' ); ?> | |
| 23 | - </legend> | |
| 24 | - <div class="wowp-field is-full"> | |
| 25 | - <ol id="phpNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 26 | - <span class="button-editor button" id="phpglobalnav">Add NAV Comment</span> | |
| 27 | - </div> | |
| 19 | + <div class="wowp-settings"> | |
| 28 | 20 | |
| 29 | - <div class="wowp-field is-full"> | |
| 30 | - <textarea name="wp_coder_global_php" id="wpcoder-global-php" cols="40" rows="5"><?php | |
| 31 | - echo esc_textarea( $content ); ?></textarea> | |
| 21 | + <div class="wowp-settings__page"> | |
| 22 | + | |
| 23 | + | |
| 24 | + <div class="wowp-settings__page-sidebar"> | |
| 25 | + | |
| 26 | + <div class="wowp-field has-checkbox is-reverse"> | |
| 27 | + <span class="label"> | |
| 28 | + <?php esc_html_e( 'Enable PHP code', 'wp-coder' ); ?> | |
| 29 | + <sup class="wowp-tooltip" data-tooltip="Enable execution of this PHP code globally. Be careful: errors may affect your site.">ℹ</sup> | |
| 30 | + </span> | |
| 31 | + <label class="switch"> | |
| 32 | + <input type="checkbox" value="1" name="wp_coder_global_php_enable" id="wpcoder-global-php-enable"<?php checked( $enabled ); ?>> | |
| 33 | + <span class="slider"></span> | |
| 34 | + </label> | |
| 35 | + </div> | |
| 36 | + | |
| 37 | + <?php submit_button( __( 'Save', 'wp-coder' ), 'wowp-button button button-dark', 'submit', false ); ?> | |
| 38 | + | |
| 39 | + | |
| 40 | + <button class="button-editor button" id="phpglobalnav"><?php esc_html_e( 'Add NAV Comment', 'wp-coder' ); ?></button> | |
| 41 | + <ol id="phpNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 42 | + | |
| 43 | + </div> | |
| 44 | + | |
| 45 | + <div class="wowp-settings__page-content"> | |
| 46 | + <textarea name="wp_coder_global_php" id="wpcoder-global-php" cols="40" rows="5"><?php | |
| 47 | + echo esc_textarea( $content ); ?></textarea> | |
| 48 | + </div> | |
| 49 | + | |
| 50 | + | |
| 32 | 51 | </div> |
| 33 | - <div class="wowp-field"> | |
| 34 | - <label> | |
| 35 | - <input type="checkbox" value="1" name="wp_coder_global_php_enable" | |
| 36 | - id="wpcoder-global-php-enable"<?php | |
| 37 | - checked( $enabled ); ?>> | |
| 38 | - <?php | |
| 39 | - esc_html_e( 'Enable PHP code', 'wpcoder' ); ?> | |
| 40 | - </label> | |
| 41 | - </div> | |
| 42 | - <div class="wowp-field is-full"> | |
| 43 | - <?php | |
| 44 | - submit_button( __( 'Save', 'wpcoder' ), 'primary large', 'submit', false ); ?> | |
| 45 | - </div> | |
| 46 | 52 | |
| 47 | - <?php | |
| 48 | - wp_nonce_field( WPCoder::PREFIX . '_global_action', WPCoder::PREFIX . '_save_name' ); ?> | |
| 49 | - </fieldset> | |
| 53 | + <?php wp_nonce_field( WPCoder::PREFIX . '_global_action', WPCoder::PREFIX . '_save_name' ); ?> | |
| 54 | + </div> | |
| 50 | 55 | </form> |
| 51 | - </div> | |
| 56 | + | |
| 52 | 57 | |
| 53 | 58 | <?php |
| 54 | 59 | } |
| 55 | 60 | |