| @@ -5,44 +5,24 @@ | ||
| 5 | 5 | |
| 6 | 6 | use WPCoder\Dashboard\Field; |
| 7 | 7 | |
| 8 | 8 | defined( 'ABSPATH' ) || exit; |
| 9 | - | |
| 10 | -$php_include = [ | |
| 11 | - 0 => __( 'Run where inserted', 'wp-coder' ), | |
| 12 | - 1 => __( 'Run only in admin area', 'wp-coder' ), | |
| 13 | - 2 => __( 'Run only on front-end', 'wp-coder' ), | |
| 14 | - 3 => __( 'Run everywhere', 'wp-coder' ), | |
| 15 | -] | |
| 16 | 9 | ?> |
| 17 | 10 | |
| 18 | - <div class="wowp-settings__page"> | |
| 19 | - <div class="wowp-settings__page-sidebar"> | |
| 11 | + <h4> | |
| 12 | + <span class="codericon codericon-filetype-php"></span> | |
| 13 | + <?php esc_html_e( 'PHP Code', 'wpcoder' ); ?> | |
| 14 | + </h4> | |
| 20 | 15 | |
| 21 | - <div class="wowp-field" data-option="php_include"> | |
| 22 | - <label> | |
| 23 | - <span class="label"> | |
| 24 | - <?php esc_html_e( 'Include PHP', 'wp-coder' ); ?> | |
| 25 | - <sup class="wowp-tooltip" data-tooltip="Define where this PHP code should run: by shortcode, in admin, front-end, or everywhere.">ℹ</sup> | |
| 26 | - </span> | |
| 27 | - <?php Field::select( 'php_include', null, $php_include ); ?> | |
| 28 | - </label> | |
| 29 | - </div> | |
| 16 | + <div class="wowp-field is-full wowp-code-nav"> | |
| 17 | + <ol id="phpNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 18 | + <span class="button-editor" id="phpnav">Add NAV Comment</span> | |
| 19 | + </div> | |
| 30 | 20 | |
| 31 | - <button class="button-editor button" id="phpnav"><?php esc_html_e( 'Add NAV Comment', 'wp-coder' ); ?></button> | |
| 32 | - <ol id="phpNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 21 | +<?php Field::textarea( 'php_code' ); ?> | |
| 33 | 22 | |
| 34 | - | |
| 35 | - </div> | |
| 36 | - <div class="wowp-settings__page-content"> | |
| 37 | - | |
| 38 | - <?php Field::textarea( 'php_code' ); ?> | |
| 39 | - | |
| 40 | - <div class="wowp-notification notification-info"> | |
| 41 | - Just enter the PHP content. You don’t need to include <code><?php></code> — it’s already handled. | |
| 42 | - </div> | |
| 43 | - | |
| 44 | - </div> | |
| 23 | + <div class="wowp-notification -warning"> | |
| 24 | + Please input only the PHP content, omitting the <code>php</code> tag | |
| 45 | 25 | </div> |
| 46 | 26 | |
| 47 | 27 | <?php |
| 48 | 28 | |