| 1 |
<?php |
| 2 |
/** |
| 3 |
* Add new Element |
| 4 |
* |
| 5 |
* @package Wow_Plugin |
| 6 |
* @subpackage Admin/Add_Item |
| 7 |
* @author Wow-Company <yoda@wow-company.com> |
| 8 |
* @copyright 2019 Wow-Company |
| 9 |
* @license GNU Public License |
| 10 |
* @version 1.0 |
| 11 |
*/ |
| 12 |
|
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit; |
| 15 |
} |
| 16 |
|
| 17 |
// include the database params for item |
| 18 |
include_once( 'settings/database.php' ); |
| 19 |
|
| 20 |
// include the options param |
| 21 |
include_once( 'settings/options/general.php' ); |
| 22 |
|
| 23 |
$url_form = admin_url() . 'admin.php?page=' . $this->plugin['slug']; |
| 24 |
?> |
| 25 |
<form action="<?php echo esc_url($url_form); ?>" method="post" name="post" class="wow-plugin" id="wow-plugin"> |
| 26 |
<div id="poststuff"> |
| 27 |
<div id="post-body" class="metabox-holder columns-2"> |
| 28 |
<div id="post-body-content" style="position: relative;"> |
| 29 |
|
| 30 |
<div id="titlediv"> |
| 31 |
|
| 32 |
<div id="titlewrap"> |
| 33 |
<label class="screen-reader-text" id="title-prompt-text" for="title">Enter title |
| 34 |
here</label> |
| 35 |
<input type="text" class="input" name="title" size="30" value="<?php echo esc_attr($title); ?>" id="title" |
| 36 |
placeholder="<?php esc_attr_e( 'Register an menu name', $this->plugin['text'] ); ?>" autocomplete="off"> |
| 37 |
</div> |
| 38 |
|
| 39 |
</div> |
| 40 |
</div> |
| 41 |
|
| 42 |
<!-- Sidebar with the setting--> |
| 43 |
<div id="postbox-container-1" class="postbox-container"> |
| 44 |
|
| 45 |
<div id="submitdiv" class="box"> |
| 46 |
<h2 class="has-border-bottom"> |
| 47 |
<?php esc_html_e( 'Publish', $this->plugin['text'] ); ?> |
| 48 |
</h2> |
| 49 |
|
| 50 |
<div class="inside"> |
| 51 |
<div class="columns is-multiline"> |
| 52 |
<div class="column is-12"> |
| 53 |
<div class="field"> |
| 54 |
<label class="checkbox label"> |
| 55 |
<?php self::option( $menu_status ); ?><?php esc_attr_e( "Activated", $this->plugin['text'] ); ?><?php self::tooltip( $menu_status_help ); ?> |
| 56 |
</label> |
| 57 |
</div> |
| 58 |
<div class="field"> |
| 59 |
<label class="checkbox label"> |
| 60 |
<?php self::option( $test_mode ); ?><?php esc_attr_e( "Test mode", $this->plugin['text'] ); ?><?php self::tooltip( $test_mode_help ); ?> |
| 61 |
</label> |
| 62 |
</div> |
| 63 |
|
| 64 |
</div> |
| 65 |
<div class="column is-12"> |
| 66 |
<div class="field"> |
| 67 |
<?php self::option( $show ); ?> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
|
| 72 |
<div class="submitbox has-border-top" id="submitpost"> |
| 73 |
<div id="delete-action"> |
| 74 |
<?php if ( ! empty( $id ) ) : ?><?php $delete_url = admin_url() . 'admin.php?page=' . $this->plugin['slug'] . '&info=delete&did=' . absint( $id ); ?> |
| 75 |
<a class="submitdelete deletion" |
| 76 |
href="<?php echo esc_url( $delete_url ); ?>"><?php esc_attr_e( 'Delete', $this->plugin['text'] ); ?></a> |
| 77 |
<?php endif; ?> |
| 78 |
</div> |
| 79 |
|
| 80 |
<div id="publishing-action"> |
| 81 |
<span class="saving"><?php esc_html_e( 'Saving', $this->plugin['text'] ); ?></span> |
| 82 |
<input name="submit" id="submit" class="button button-primary button-large" |
| 83 |
value="<?php echo esc_attr( $btn ); ?>" type="submit"> |
| 84 |
</div> |
| 85 |
|
| 86 |
<div class="clear"></div> |
| 87 |
|
| 88 |
|
| 89 |
</div> |
| 90 |
</div> |
| 91 |
</div> |
| 92 |
<div class="ribbon"> |
| 93 |
UPGRADE PRO |
| 94 |
<i></i> |
| 95 |
<i></i> |
| 96 |
<i></i> |
| 97 |
<i></i> |
| 98 |
</div> |
| 99 |
<div class="upgrade-box"> |
| 100 |
<a class="button is-demo" href="https://wow-company.com/wp-float-menu-pro/" target="_blank">Demo</a> |
| 101 |
<a class="button is-upgrade" href="https://wow-estore.com/item/float-menu-pro/" target="_blank">Upgrade</a> |
| 102 |
|
| 103 |
</div> |
| 104 |
|
| 105 |
</div> |
| 106 |
|
| 107 |
<!-- Block for main options pages--> |
| 108 |
<div id="postbox-container-2" class="postbox-container"> |
| 109 |
<div id="postoptions" class="box"> |
| 110 |
|
| 111 |
<div class="columns"> |
| 112 |
<div class="column has-tabs"> |
| 113 |
<div class="tabs is-vertical" id="tab"> |
| 114 |
<ul> |
| 115 |
<li class="is-active" data-tab="1"> |
| 116 |
<a><?php esc_html_e( 'Menu', $this->plugin['text'] ); ?></a> |
| 117 |
</li> |
| 118 |
<li data-tab="2"> |
| 119 |
<a><?php esc_html_e( 'Settings', $this->plugin['text'] ); ?></a> |
| 120 |
</li> |
| 121 |
<li data-tab="4"> |
| 122 |
<a><?php esc_html_e( 'Display', $this->plugin['text'] ); ?></a> |
| 123 |
</li> |
| 124 |
</ul> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
<div class="column has-border-left"> |
| 128 |
|
| 129 |
<div id="tab-content" class="inside"> |
| 130 |
<div class="tab-content" data-content="1"> |
| 131 |
<?php include_once( 'settings/menu.php' ); ?> |
| 132 |
</div> |
| 133 |
|
| 134 |
<div class="tab-content is-hidden" data-content="2"> |
| 135 |
<?php include_once( 'settings/main.php' ); ?> |
| 136 |
</div> |
| 137 |
<div class="tab-content is-hidden is-zebra" data-content="4"> |
| 138 |
<?php include_once( 'settings/display.php' ); ?> |
| 139 |
</div> |
| 140 |
</div> |
| 141 |
</div> |
| 142 |
</div> |
| 143 |
|
| 144 |
|
| 145 |
</div> |
| 146 |
</div> |
| 147 |
|
| 148 |
</div> |
| 149 |
</div> |
| 150 |
|
| 151 |
<!-- main param for adding in database--> |
| 152 |
<input type="hidden" name="tool_id" value="<?php echo absint( $tool_id ); ?>" id="tool_id"/> |
| 153 |
<input type="hidden" name="add" id="add_action" value="<?php echo absint( $add_action ); ?>"/> |
| 154 |
<input type="hidden" name="prefix" value="<?php echo esc_attr( $this->plugin['prefix'] ); ?>" id="prefix"/> |
| 155 |
<?php wp_nonce_field( $this->plugin['slug'] . '_action', $this->plugin['slug'] . '_nonce' ); ?> |
| 156 |
</form> |
| 157 |
|
| 158 |
<template id="clone"> |
| 159 |
<?php include_once( 'settings/clone.php' ); ?> |
| 160 |
</template> |
| 161 |
|
| 162 |
<?php |
| 163 |
|