| 1 |
<?php if (!defined('ABSPATH')) exit; |
| 2 |
/** |
| 3 |
* Add new Element |
| 4 |
* |
| 5 |
* @package Wow_Plugin |
| 6 |
* @copyright Copyright (c) 2018, Dmytro Lobov |
| 7 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 8 |
* @since 1.0 |
| 9 |
*/ |
| 10 |
include_once('include-data.php'); |
| 11 |
include_once('add-new/settings/add-new.php'); |
| 12 |
?> |
| 13 |
|
| 14 |
<form action="admin.php?page=<?php echo $this->plugin_slug; ?>" method="post" name="post" class="wow-plugin"> |
| 15 |
<div id="poststuff"> |
| 16 |
<div id="post-body" class="metabox-holder columns-2"> |
| 17 |
<div id="post-body-content" style="position: relative;"> |
| 18 |
<div id="titlediv"> |
| 19 |
<div id="titlewrap"> |
| 20 |
<label class="screen-reader-text" id="title-prompt-text" for="title">Enter title here</label> |
| 21 |
<input type="text" name="title" size="30" value="<?php echo $title; ?>" id="title" |
| 22 |
placeholder="<?php _e('Register an item name', $this->text_domain); ?>"> |
| 23 |
|
| 24 |
</div> |
| 25 |
</div> |
| 26 |
</div> |
| 27 |
<div id="postbox-container-1" class="postbox-container"> |
| 28 |
<?php include_once('add-new/targeting.php'); ?> |
| 29 |
<div id="submitdiv" class="postbox "> |
| 30 |
<h2 class="hndle ui-sortable-handle"><span><?php _e('Publish', $this->text_domain); ?> |
| 31 |
<?php echo self::pro(); ?></span></h2> |
| 32 |
|
| 33 |
<div class="inside"> |
| 34 |
<div class="container"> |
| 35 |
<div class="element"> |
| 36 |
<?php echo self::option($show); ?> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
<div class="submitbox" id="submitpost"> |
| 40 |
<div id="major-publishing-actions"> |
| 41 |
<div id="delete-action"> |
| 42 |
<?php if (!empty($id)) { |
| 43 |
echo '<a class="submitdelete deletion" href="admin.php?page=' . $this->plugin_slug . '&info=delete&did=' . $id . '">' . __('Delete', $this->text_domain) . '</a>'; |
| 44 |
}; ?> |
| 45 |
</div> |
| 46 |
|
| 47 |
<div id="publishing-action"> |
| 48 |
<span class="spinner"></span> |
| 49 |
<input name="submit" id="submit" class="button button-primary button-large" |
| 50 |
value="<?php echo $btn; ?>" type="submit"> |
| 51 |
</div> |
| 52 |
<div class="clear"></div> |
| 53 |
</div> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
|
| 58 |
</div> |
| 59 |
|
| 60 |
<div id="postbox-container-2" class="postbox-container"> |
| 61 |
<div id="postoptions" class="postbox "> |
| 62 |
<div class="inside"> |
| 63 |
<div class="tab-box"> |
| 64 |
<ul class="tab-nav"> |
| 65 |
<?php |
| 66 |
$tab_menu = array( |
| 67 |
'main' => __( 'Settings', $this->text_domain ), |
| 68 |
'menu' => __( 'Menu', $this->text_domain ), |
| 69 |
); |
| 70 |
$i = 1; |
| 71 |
foreach ($tab_menu as $menu => $val) { |
| 72 |
echo '<li><a href="#t' . $i . '">' . $val . '</a></li>'; |
| 73 |
$i++; |
| 74 |
} |
| 75 |
?> |
| 76 |
</ul> |
| 77 |
<div class="tab-panels"> |
| 78 |
<?php |
| 79 |
$t = 1; |
| 80 |
foreach ($tab_menu as $menu => $val) { |
| 81 |
echo '<div id="t' . $t . '">'; |
| 82 |
include_once('add-new/' . $menu . '.php'); |
| 83 |
echo '</div>'; |
| 84 |
$t++; |
| 85 |
} |
| 86 |
?> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
</div> |
| 90 |
</div> |
| 91 |
</div> |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
<input type="hidden" name="tool_id" value="<?php echo $tool_id; ?>" id="tool_id"/> |
| 95 |
<input type="hidden" name="param[time]" value="<?php echo time(); ?>"/> |
| 96 |
<input type="hidden" name="add" value="<?php echo $hidval; ?>"/> |
| 97 |
<input type="hidden" name="id" value="<?php echo $id; ?>"/> |
| 98 |
<input type="hidden" name="data" value="<?php echo $data; ?>"/> |
| 99 |
<input type="hidden" name="page" value="<?php echo $this->plugin_slug; ?>"/> |
| 100 |
<input type="hidden" name="plugdir" value="<?php echo $this->plugin_slug; ?>"/> |
| 101 |
<?php wp_nonce_field($this->plugin_slug . '_action', $this->plugin_slug . '_nonce'); ?> |
| 102 |
</form> |
| 103 |
|
| 104 |
<div id="clone" style="display: none;"> |
| 105 |
<?php include_once('add-new/clone.php'); ?> |
| 106 |
</div> |