| 1 |
<?php |
| 2 |
/* |
| 3 |
* Page Name: Add New |
| 4 |
*/ |
| 5 |
|
| 6 |
use BubbleMenu\Admin\CreateFields; |
| 7 |
use BubbleMenu\Admin\Settings; |
| 8 |
use BubbleMenu\WOWP_Plugin; |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
$options = Settings::get_options(); |
| 13 |
|
| 14 |
$title = $options['title'] ?? ''; |
| 15 |
$id = $options['id'] ?? ''; |
| 16 |
|
| 17 |
if ( ! isset( $options['live_preview'] ) ) { |
| 18 |
$builder_open = ' open'; |
| 19 |
} elseif ( ! empty( $options['live_preview'] ) ) { |
| 20 |
$builder_open = ' open'; |
| 21 |
} else { |
| 22 |
$builder_open = ''; |
| 23 |
} |
| 24 |
|
| 25 |
?> |
| 26 |
<form action="" id="wpie-settings" class="wpie-settings__wrapper" method="post"> |
| 27 |
|
| 28 |
<div class="wpie-settings__main"> |
| 29 |
|
| 30 |
<div class="wpie-field title"> |
| 31 |
<label class="wpie-field__label"> |
| 32 |
<span class="screen-reader-text"> |
| 33 |
<?php esc_html_e( 'Enter title here', 'bubble-menu' ); ?></span> |
| 34 |
<input type="text" name="title" size="30" value="<?php echo esc_attr( $title ); ?>" id="title" |
| 35 |
placeholder="<?php esc_attr_e( 'Add title', 'bubble-menu' ); ?>"> |
| 36 |
</label> |
| 37 |
</div> |
| 38 |
|
| 39 |
<?php Settings::init(); ?> |
| 40 |
|
| 41 |
</div> |
| 42 |
|
| 43 |
<div class="wpie-settings__sidebar"> |
| 44 |
<?php require_once WOWP_Plugin::dir() . 'admin/settings/sidebar.php'; ?> |
| 45 |
</div> |
| 46 |
|
| 47 |
<input type="hidden" name="tool_id" value="<?php echo absint( $id ); ?>" id="tool_id"/> |
| 48 |
<input type="hidden" name="item_time" value="<?php echo esc_attr( time() ); ?>"/> |
| 49 |
<?php wp_nonce_field( WOWP_Plugin::PREFIX . '_nonce', WOWP_Plugin::PREFIX . '_settings' ); ?> |
| 50 |
</form> |
| 51 |
|
| 52 |
<?php |
| 53 |
|