Changeset 2149035
- Timestamp:
- 08/31/2019 08:21:30 PM (7 years ago)
- Location:
- orders-table/trunk
- Files:
-
- 7 edited
-
Readme.txt (modified) (3 diffs)
-
add/css/ot-style-admin.css (modified) (1 diff)
-
add/css/ot-style.css (modified) (1 diff)
-
add/js/ot-admin-script.js (modified) (1 diff)
-
inc/functions.php (modified) (6 diffs)
-
lang/orders-table.pot (modified) (11 diffs)
-
orders-table.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
orders-table/trunk/Readme.txt
r2015672 r2149035 12 12 13 13 == Installation == 14 1. Install this plugin .14 1. Install this plugin 15 15 2. Add shortcode in tour page ([orders-table]) 16 3. Configure the plugin and fields as you need 17 3. Well done! 16 3. Configure the plugin and fields as you need 18 17 19 18 == Frequently Asked Questions == … … 25 24 26 25 == Screenshots == 27 1. Orders28 26 1. Options plugin 29 27 2. View orders table … … 32 30 1.0 Release 33 31 1.1 Completely rewritten code, add options page, add configure access for form table for guest, add extra fields, add manage main and extra fileds. 32 1.2 New settings page, new types fileds for extra fields. -
orders-table/trunk/add/css/ot-style-admin.css
r2015673 r2149035 1 .form-table:last-of-type tr.delete:not(:last-child) td:after { 2 content: ''; 3 background: #23282d; 1 /** 2 * The plugin "Orders Table" styles for admin panel. 3 */ 4 5 .ot { 6 max-width: 1200px; 7 margin: 0 auto; 8 position: relative; 9 } 10 .ot * { 11 box-sizing: border-box; 12 } 13 14 .ot .row { 4 15 width: 100%; 5 height: 3px; 6 margin-top: 15px; 16 display: flex; 17 flex-flow: row wrap; 18 position: relative; 19 } 20 .ot .row .col { 21 width: calc(100%/4); 22 } 23 24 .ot .tabs-buttons { 25 flex-wrap: nowrap; 26 overflow-x: auto; 27 } 28 .ot .tabs-buttons .tabs-button { 29 background: #f1f1f1; 30 border: 1px solid #ddd; 31 border-radius: 3px 3px 0 0; 32 font-weight: 600; 33 color: #aaa; 34 text-align: center; 35 padding: 15px 25px; 36 margin: 0 0 -1px; 37 } 38 .ot .tabs-buttons .tabs-button.active { 39 background: #fff; 40 border-top: 1px solid #23282d; 41 border-bottom: 1px solid #fff; 42 color: #555; 43 } 44 .ot .tabs-buttons .tabs-button:hover { 45 color: #888; 46 cursor: pointer; 47 } 48 49 .ot .tabs-content { 50 background: #fff; 51 border: 1px solid #ddd; 52 min-height: 64vh; 53 color: #383838; 54 line-height: 1.5; 55 display: none; 56 padding: 15px 15px 70px 15px; 57 margin: 0 0 5px; 58 animation: fadeIn 1s both; 59 } 60 .ot .tabs-content.active { 7 61 display: block; 62 } 63 64 .ot .option { 65 padding: 15px 0; 66 } 67 .ot .option:not(:last-child) { 68 border-bottom: 2px solid #f1f1f1; 69 } 70 .ot .option > span, 71 .ot .extra-fields .col span:nth-child(1) { 72 font-size: 14px; 73 font-weight: 600; 74 color: #23282d; 75 margin-right: 5px; 76 } 77 .ot label { 78 display: inline-block; 79 } 80 81 .ot .extra-fields fieldset { 82 border: 2px groove threedface; 83 padding: 0.35em 0.75em 0.625em 0.75em; 84 margin: 2px 5px 10px 2px; 85 position: relative; 86 } 87 .ot .extra-fields .move-field { 88 font-size: 20px; 8 89 position: absolute; 9 left: 0; 90 top: 0; 91 right: 3%; 92 cursor: move; 10 93 } 94 .ot .extra-fields .delete-field { 95 font-size: 25px; 96 position: absolute; 97 top: 0; 98 right: 1%; 99 cursor: pointer; 100 } 101 .ot .extra-fields .move-field :hover, 102 .ot .extra-fields .delete-field:hover { 103 color: #00b9eb; 104 } 105 .ot .extra-fields .portret-placeholder { 106 border: 1px dashed threedface; 107 margin: 2px 5px 10px 2px; 108 } 109 110 .ot .submit { 111 position: absolute; 112 right: 1%; 113 bottom: -1%; 114 } 115 116 117 @keyframes fadeIn { 118 from { 119 opacity: 0; 120 } to { 121 opacity: 1; 122 } 123 } 124 125 @media all and (max-width: 1000px) and (min-width: 600px) { 126 .ot .extra .row { 127 align-items: center; 128 } 129 .ot .extra .row .col { 130 width: calc(100%/2); 131 padding: 15px 3px; 132 position: relative; 133 } 134 .ot .extra .row .col:nth-child(1):after { 135 content: ''; 136 background: #f1f1f1; 137 width: 200%; 138 height: 2px; 139 display: block; 140 position: absolute; 141 right: -100%; 142 bottom: -5px; 143 } 144 } 145 @media all and (max-width: 600px) { 146 .ot .extra .row .col { 147 width: 100%; 148 padding: 15px 0; 149 } 150 .ot .extra .row .col:not(.required) { 151 border-bottom: 2px solid #f1f1f1; 152 } 153 } -
orders-table/trunk/add/css/ot-style.css
r2015673 r2149035 1 /** 2 * The plugin "Orders Table" styles. 3 */ 4 1 5 .ot { 2 6 max-width: 1200px; -
orders-table/trunk/add/js/ot-admin-script.js
r2015673 r2149035 1 /** 2 * The plugin "Orders Table" scripts for admin panel. 3 */ 4 1 5 jQuery(function($){ 2 var $ table = $('.form-table').eq(-1);3 var block;6 var $wrap = $('.ot'), 7 $extra = $wrap.find('.extra'); 4 8 5 $(function() { 6 $table.find('tr:nth-child(4n)').after('\ 7 <tr class="delete"> \ 8 <td><button class="button show-settings delete-field">' + lang_text.delete_field + '</button></td> \ 9 </tr> \ 10 '); 9 $('.tabs-buttons').on('click', '.tabs-button:not(.active)', function() { 10 $(this) 11 .addClass('active').siblings().removeClass('active') 12 .closest('.tabs').find('.tabs-content').removeClass('active').eq($(this).index()).addClass('active'); 11 13 }); 12 14 13 15 $(function() { 14 $table.after('<button class="button action add-field">' + lang_text.add_field + '</button>'); 15 }); 16 17 $table.delegate('input[name*="field-name-"]', 'ready input keyup', function(e) { 18 var tr = $(this).parents().closest('tr').next(); 19 var select = tr.find('select'); 20 21 if(!$(this).val() == '') { 22 select.attr('required', 'required'); 23 } else { 24 select.removeAttr('required'); 16 if ($(window).width() > 1000) { 17 $extra.find('.extra-fields').sortable({ 18 handle: '.move-field', 19 placeholder: 'portret-placeholder', 20 sort: function(event, ui) { 21 var h = $(ui.item).height(); 22 $(ui.placeholder).css('height', h); 23 }, 24 beforeStop: function() { 25 census(); 26 } 27 }); 25 28 } 26 29 }); 27 30 28 $table.delegate('select', 'ready input keyup', function(e) { 29 var name = $(this).attr('name'); 30 var tr = $(this).parents().closest('tr').prev(); 31 var input = tr.find('input'); 31 function census() { 32 $extra.find('fieldset:not(.ui-sortable-placeholder)').each(function(index) { 33 var num = +index + 1, 34 rename_class = $(this).attr('class').replace(/\d+/, num), 35 replace_legend = $(this).find('legend').text().replace(/\d+/, num); 36 37 $(this).attr('class', rename_class); 38 $(this).find('legend').text(replace_legend); 39 40 $(this).find('*[name]').each(function() { 41 var replace_name = $(this).attr('name').replace(/\d+/, num); 42 43 $(this).attr('name', replace_name); 44 }); 45 }); 46 } 47 48 function sortable_on() { 49 if ($(window).width() > 1000) { 50 if ($extra.find('fieldset').length > 1) { 51 $extra.find('.extra-fields').sortable('enable'); 52 } else { 53 if ($extra.find('.extra-fields').hasClass('ui-sortable')) { 54 $extra.find('.extra-fields').sortable('disable'); 55 } 56 } 57 } 58 } 59 60 function view_manage() { 61 if ($extra.find('fieldset').length <= 1) { 62 $extra.find('.delete-field').hide(); 63 $extra.find('.move-field').hide(); 64 } else { 65 if ($(window).width() > 1000) { 66 $extra.find('.move-field').show(); 67 } 68 69 $extra.find('.delete-field').show(); 70 } 71 } 32 72 33 if($('option:nth-child(1)').index($('select[name="' + name + '"] option:selected')) < 0) { 34 input.attr('required', 'required'); 35 } else { 36 input.removeAttr('required'); 37 } 73 74 $(function() { 75 sortable_on(); 76 view_manage(); 38 77 }); 39 78 40 $ (document).delegate('.delete-field', 'click', function(e) {79 $wrap.delegate('.add-field', 'click', function(e) { 41 80 e.preventDefault(); 42 81 43 var tr = $(this).parents().closest('tr'); 44 var opt = tr.prevAll().slice(0, 4); 45 var rev = Array.prototype.reverse.call(opt); 46 var un = $.merge(rev, tr); 47 48 $table.find('tr:nth-child(1) input', 'tr:nth-child(5n) input').each(function(index) { 49 var num = +index + 1; 50 $(this).attr('name', 'field-name-' + num); 51 }); 52 53 $table.find('tr:nth-child(2) select', 'tr:nth-child(6n) select').each(function(index) { 54 var num = +index + 1; 55 $(this).attr('name', 'field-type-' + num); 56 }); 57 58 $table.find('tr:nth-child(3) input', 'tr:nth-child(7n) input').each(function(index) { 59 var num = +index + 1; 60 $(this).attr('name', 'field-front-' + num); 61 }); 62 63 $table.find('tr:nth-child(4) input', 'tr:nth-child(8n) input').each(function(index) { 64 var num = +index + 1; 65 $(this).attr('name', 'field-required-' + num); 66 }); 82 var block = $extra.find('fieldset').eq(-1).clone(); 67 83 68 block = un.detach();69 });70 71 $(document).delegate('.add-field', 'click', function(e) {72 e.preventDefault();73 74 if($table.find('tr').length > 0) {75 block = $table.find('tbody > tr:nth-last-child(-n + 5)').clone();76 77 block.find('*[name]').each(function() {78 var name = $(this).attr('name');79 var replace_name = name.replace(/\d+/, function(val) { return parseInt(val)+1; });80 $(block).find('[name="' + name + '"]').attr('name', replace_name);81 });82 }83 84 84 block.find('input[type="text"]').val(''); 85 block.find('select option'). removeAttr('checked').first().attr('selected', 'selected');85 block.find('select option').first().attr('selected', 'selected'); 86 86 block.find('input[type="checkbox"]').removeAttr('checked'); 87 87 88 $table.append(block); 88 $(this).before(block); 89 90 census(); 91 sortable_on(); 92 view_manage(); 89 93 }); 90 } ); 94 95 $wrap.delegate('.delete-field', 'click', function(e) { 96 e.preventDefault(); 97 98 $(this).parents().closest('fieldset').remove(); 99 100 census(); 101 sortable_on(); 102 view_manage(); 103 }); 104 105 106 function input_to_select_required() { 107 var select = $(this).parents().closest('fieldset').find('select'); 108 109 !$(this).val() == ''?select.attr('required', 'required'):select.removeAttr('required'); 110 } 111 112 function select_to_input_required() { 113 var name = $(this).attr('name'), 114 input = $(this).parents().closest('fieldset').find('input[name*="field-name"]'); 115 116 $('option:nth-child(1)').index($('select[name="' + name + '"] option:selected')) < 0?input.attr('required', 'required'):input.removeAttr('required'); 117 } 118 119 function change_text_checkbox() { 120 var label = $(this).siblings().closest('span'), 121 text = $(this).is(':checked')?change_text.enable:change_text.disable; 122 123 label.text(text); 124 } 125 126 $extra.find('fieldset input[name*="field-name"]').each(input_to_select_required); 127 $extra.delegate('input[name*="field-name"]', 'input keyup', input_to_select_required); 128 129 $extra.find('fieldset select').each(select_to_input_required); 130 $extra.delegate('select', 'input keyup', select_to_input_required); 131 132 $wrap.find('input[type="checkbox"]').each(change_text_checkbox); 133 $wrap.delegate('input[type="checkbox"]', 'onload change', change_text_checkbox); 134 135 136 $(document).delegate('input[name="submit"]', 'click', function() { 137 var $form = $(this).parents().closest('form'); 138 139 $form.find('input[required]').each(function() { 140 if (!$(this)[0].checkValidity()) { 141 $(this)[0].reportValidity(); 142 } 143 }); 144 }); 145 }); -
orders-table/trunk/inc/functions.php
r2015673 r2149035 162 162 ?> 163 163 <div class="wrap"> 164 <h2><?php echo get_admin_page_title() ?></h2> 165 166 <form action="options.php" method="POST"> 167 <?php 168 settings_fields('option_group'); 169 170 do_settings_sections('ot_options'); 171 172 submit_button(); 173 ?> 174 </form> 164 <?php require_once('options-page.php'); ?> 175 165 </div> 176 166 <?php … … 178 168 179 169 public function plugin_settings() { 180 register_setting('option_group', 'ot_main_options', array($this, 'sanitize_callback')); 181 182 183 add_settings_section('main_options', __('Main options', 'orders-table'), '', 'ot_options'); 184 185 $opt_name = 'form-enabled'; 186 add_settings_field($opt_name, __('Enanle form add', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'main_options', $opt_name); 187 188 $opt_name = 'guest-add'; 189 add_settings_field($opt_name, __('Guests can add orders', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'main_options', $opt_name); 190 191 $opt_name = 'nubmer-orders'; 192 add_settings_field($opt_name, __('Number posts on page', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'main_options', $opt_name); 193 194 195 add_settings_section('manage_main_input', __('Manage main field', 'orders-table'), '', 'ot_options'); 196 197 $opt_name = 'order-status'; 198 add_settings_field($opt_name, __('Order status', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'manage_main_input', $opt_name); 199 200 $opt_name = 'order-description'; 201 add_settings_field($opt_name, __('Order description', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'manage_main_input', $opt_name); 202 203 $opt_name = 'order-category'; 204 add_settings_field($opt_name, __('Order category', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'manage_main_input', $opt_name); 205 206 $opt_name = 'order-author'; 207 add_settings_field($opt_name, __('Order author', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'manage_main_input', $opt_name); 208 209 210 add_settings_section('add_new_input', __('Extra fields', 'orders-table'), '', 'ot_options'); 211 212 // Вывод созданных скриптом на клиенте полей 213 if (!isset($this->options['extra']) || count($this->options['extra']) == 1) { 214 $opt_name = 'field-name-1'; 215 add_settings_field($opt_name, __('Field name', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 216 217 $opt_name = 'field-type-1'; 218 add_settings_field($opt_name, __('Field type', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 219 220 $opt_name = 'field-front-1'; 221 add_settings_field($opt_name, __('Field front', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 222 223 $opt_name = 'field-required-1'; 224 add_settings_field($opt_name, __('Required?', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 225 } else { 226 for ($i = 1; $i <= count($this->options['extra']); $i++) { 227 foreach ($this->options['extra']['extra-field-' . $i] as $name => & $val) { 228 $opt_name = $name . '-' . $i; 229 if ($name == 'field-name') { 230 add_settings_field($opt_name, __('Field name', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 231 } else if ($name == 'field-type') { 232 add_settings_field($opt_name, __('Field type', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 233 } else if ($name == 'field-front') { 234 add_settings_field($opt_name, __('Field front', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 235 } else if ($name == 'field-required') { 236 add_settings_field($opt_name, __('Required?', 'orders-table'), array($this, 'fill_field') , 'ot_options', 'add_new_input', $opt_name); 237 } 238 } 239 } 240 } 241 } 242 243 public function fill_field($opt_name) { 244 $name_attr = "ot_main_options[$opt_name]"; 245 246 // Выборка ответов с массива по виду 247 if (preg_match('/field-name/ui', $opt_name) || preg_match('/field-type/ui', $opt_name) || preg_match('/field-front/ui', $opt_name) || preg_match('/field-required/ui', $opt_name)) { 248 $i = intval(preg_replace('/[^0-9]+/', '', $opt_name), 10); 249 $new_name = substr($opt_name, 0, -2); 250 $val = isset($this->options['extra']['extra-field-' . $i][$new_name])?$this->options['extra']['extra-field-' . $i][$new_name]:null; 251 } else { 252 $val = isset($this->options[ $opt_name ])?$this->options[$opt_name]:null; 253 } 254 255 if ($opt_name == 'form-enabled' || $opt_name == 'guest-add' || $opt_name == 'order-status' || $opt_name == 'order-name' || $opt_name == 'order-description' || $opt_name == 'order-category' || $opt_name == 'order-author' || preg_match('/field-required/ui', $opt_name)) { 256 echo '<label><input type="checkbox" name="'. $name_attr .'" value="1" '. checked(1, $val, 0) .' /> ' . __('On or off', 'orders-table') . '</label>'; 257 } else if ($opt_name === 'nubmer-orders') { 258 echo '<input type="number" min="1" name="'. $name_attr .'" value="'. esc_attr( $val ) .'" />'; 259 } else if (preg_match('/field-name/ui', $opt_name) || preg_match('/field-front/ui', $opt_name)) { 260 echo '<input type="text" name="'. $name_attr .'" value="'. esc_attr( $val ) .'" />'; 261 } else if (preg_match('/field-type/ui', $opt_name)) { 262 ?> 263 <select class="field-type" name="<?php echo $name_attr ?>"> 264 <option value=""><?php echo __('Not selected', 'orders-table') ?></option> 265 <option value="text" <?php selected($val, 'text') ?>><?php echo __('Text', 'orders-table') ?></option> 266 <option value="number" <?php selected($val, 'number') ?>><?php echo __('Number', 'orders-table') ?></option> 267 <option value="date" <?php selected($val, 'date') ?>><?php echo __('Data', 'orders-table') ?></option> 268 </select> 269 <?php 270 } 271 } 170 register_setting('ot_option_group', 'ot_main_options', array($this, 'sanitize_callback')); 171 } 172 173 public function get_extra_html($i = 1) { 174 $field_name = @ $this->options['extra']['extra-field-' . $i]['field-name']?:null; 175 $field_type = @ $this->options['extra']['extra-field-' . $i]['field-type']?:null; 176 $field_front = @ $this->options['extra']['extra-field-' . $i]['field-front']?:null; 177 $field_required = @ $this->options['extra']['extra-field-' . $i]['field-required']?:null; 178 ?> 179 <fieldset class="extra-field-<?php echo $i ?>"> 180 <legend><?php echo __('Extra Field', 'orders-table'); ?> <?php echo $i ?></legend> 181 <div class="row"> 182 <div class="col name"> 183 <label><span><?php echo __('Field name:', 'orders-table'); ?></span> 184 <input type="text" name="ot_main_options[extra][extra-field-<?php echo $i ?>][field-name]" value="<?php echo $field_name ?>"> 185 </label> 186 </div> 187 <div class="col type"> 188 <label><span><?php echo __('Field type:', 'orders-table'); ?></span> 189 <select name="ot_main_options[extra][extra-field-<?php echo $i ?>][field-type]"> 190 <option value=""><?php echo __('Not selected', 'orders-table'); ?></option> 191 <option value="text" <?php selected($field_type, 'text') ?>><?php echo __('Text', 'orders-table'); ?></option> 192 <option value="number" <?php selected($field_type, 'number') ?>><?php echo __('Number', 'orders-table'); ?></option> 193 <option value="date" <?php selected($field_type, 'date') ?>><?php echo __('Data', 'orders-table'); ?></option> 194 <option value="email" <?php selected($field_type, 'email') ?>><?php echo __('E-mail', 'orders-table'); ?></option> 195 <option value="checkbox" <?php selected($field_type, 'checkbox') ?>><?php echo __('Checkbox', 'orders-table'); ?></option> 196 <option value="range" <?php selected($field_type, 'range') ?>><?php echo __('Range', 'orders-table'); ?></option> 197 </select> 198 </label> 199 </div> 200 <div class="col front"> 201 <label><span><?php echo __('Field front:', 'orders-table'); ?></span> 202 <input type="text" name="ot_main_options[extra][extra-field-<?php echo $i ?>][field-front]" value="<?php echo $field_front ?>"> 203 </label class=""> 204 </div> 205 <div class="col required"> 206 <span><?php echo __('Required?', 'orders-table'); ?></span> 207 <label> 208 <input type="checkbox" name="ot_main_options[extra][extra-field-<?php echo $i ?>][field-required]" value="1" <?php echo checked(1, $field_required, 0) ?>> 209 <span><?php echo __('on/off', 'orders-table'); ?></span> 210 </label> 211 </div> 212 <div class="dashicons dashicons-no-alt delete-field"></div> 213 <div class="dashicons dashicons-move move-field"></div> 214 </div> 215 </fieldset> 216 <?php 217 } 272 218 273 219 public function sanitize_callback($options) { 274 // Формирование удобного массива для работы 275 foreach ($options as $name => & $val) { 276 if (preg_match('/field-name/ui', $name) || preg_match('/field-type/ui', $name) || preg_match('/field-front/ui', $name) || preg_match('/field-required/ui', $name)) { 277 $i = intval(preg_replace('/[^0-9]+/', '', $name), 10); 278 $new_name = substr($name, 0, -2); 279 $options['extra']['extra-field-' . $i][$new_name] = $val; 280 unset($options[$name]); 281 282 if (preg_match('/field-front/ui', $name) && !isset($options['extra']['extra-field-' . $i]['field-required'])) { 283 $options['extra']['extra-field-' . $i]['field-required'] = ''; 284 } 285 } 286 } 287 288 if (isset($options['extra']) && count($options['extra']) > 1) { 220 if (isset($options['extra']) && count($options['extra']) == 1) { 289 221 if (empty($options['extra']['extra-field-1']['field-name'])) { 290 222 unset($options['extra']); 291 223 } 292 224 } 293 225 294 226 return $options; 295 227 } … … 350 282 $this->options = get_option('ot_main_options'); 351 283 $this->data = $post; 284 285 $this->first_step(); 352 286 } 353 287 … … 356 290 'post_type' => 'orders-table', 357 291 'post_title' => $this->data['title'], 292 'post_status' => 'publish' 358 293 ); 359 294 … … 411 346 if ($page == 'settings_page_ot_options') { 412 347 wp_enqueue_style('ot-style-admin', plugin_dir_url(dirname(__FILE__)). 'add/css/ot-style-admin.css'); 348 wp_enqueue_script('jquery-ui-sortable'); 413 349 wp_enqueue_script('ot-admin-script', plugin_dir_url(dirname(__FILE__)). 'add/js/ot-admin-script.js', array('jquery')); 414 wp_localize_script( 'ot-admin-script', ' lang_text', array(415 ' delete_field' => __('Delete field', 'orders-table'),416 ' add_field' => __('Add field', 'orders-table')417 ) );350 wp_localize_script( 'ot-admin-script', 'change_text', array( 351 'enable' => __('On', 'orders-table'), 352 'disable' => __('Off', 'orders-table') 353 )); 418 354 } 419 355 } … … 432 368 public function shortcode_show_table() { 433 369 ob_start(); 434 require_once(' ot-view.php');370 require_once('frontend.php'); 435 371 $content = ob_get_clean(); 436 372 -
orders-table/trunk/lang/orders-table.pot
r2015673 r2149035 4 4 "Project-Id-Version: Orders Table\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 2019-01- 11 12:12+0000\n"6 "POT-Creation-Date: 2019-01-31 19:02+0000\n" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 16 16 "X-Loco-Version: 2.2.0; wp-4.9.9" 17 17 18 #: inc/ ot-view.php:5718 #: inc/frontend.php:56 19 19 msgid "Add" 20 20 msgstr "" 21 21 22 #: inc/ functions.php:41622 #: inc/options-page.php:76 23 23 msgid "Add field" 24 24 msgstr "" … … 36 36 msgstr "" 37 37 38 #: inc/ ot-view.php:9138 #: inc/frontend.php:90 39 39 msgid "Author" 40 40 msgstr "" 41 41 42 #: inc/ ot-view.php:11442 #: inc/frontend.php:113 43 43 msgid "Awaiting Verification" 44 44 msgstr "" … … 49 49 msgstr "" 50 50 51 #: inc/functions.php:58 inc/ ot-view.php:8751 #: inc/functions.php:58 inc/frontend.php:86 52 52 msgid "Category" 53 53 msgstr "" 54 54 55 #: inc/ot-view.php:35 55 #: inc/functions.php:195 56 msgid "Checkbox" 57 msgstr "" 58 59 #: inc/frontend.php:34 56 60 msgid "Content:" 57 61 msgstr "" 58 62 59 #: inc/functions.php: 26763 #: inc/functions.php:193 60 64 msgid "Data" 61 msgstr ""62 63 #: inc/functions.php:41564 msgid "Delete field"65 65 msgstr "" 66 66 … … 73 73 msgstr "" 74 74 75 #: inc/functions.php:194 76 msgid "E-mail" 77 msgstr "" 78 75 79 #: inc/functions.php:36 76 80 msgid "Edit order" 77 81 msgstr "" 78 82 79 #: inc/ functions.php:18683 #: inc/options-page.php:14 80 84 msgid "Enanle form add" 81 85 msgstr "" 82 86 83 #: inc/ ot-view.php:3687 #: inc/frontend.php:35 84 88 msgid "Enter a order content" 85 89 msgstr "" 86 90 87 #: inc/ ot-view.php:1791 #: inc/frontend.php:16 88 92 msgid "Enter a title" 89 93 msgstr "" 90 94 91 #: inc/functions.php:210 92 msgid "Extra fields" 93 msgstr "" 94 95 #: inc/functions.php:221 inc/functions.php:234 96 msgid "Field front" 97 msgstr "" 98 99 #: inc/functions.php:215 inc/functions.php:230 100 msgid "Field name" 101 msgstr "" 102 103 #: inc/functions.php:218 inc/functions.php:232 104 msgid "Field type" 105 msgstr "" 106 107 #: inc/ot-view.php:138 95 #: inc/functions.php:180 96 msgid "Extra Field" 97 msgstr "" 98 99 #: inc/options-page.php:8 inc/options-page.php:64 100 msgid "Extra Fields" 101 msgstr "" 102 103 #: inc/functions.php:201 104 msgid "Field front:" 105 msgstr "" 106 107 #: inc/functions.php:183 108 msgid "Field name:" 109 msgstr "" 110 111 #: inc/functions.php:188 112 msgid "Field type:" 113 msgstr "" 114 115 #: inc/frontend.php:137 108 116 msgid "Guest" 109 117 msgstr "" 110 118 111 #: inc/ functions.php:189119 #: inc/options-page.php:21 112 120 msgid "Guests can add orders" 113 121 msgstr "" 114 122 115 #: inc/ functions.php:183123 #: inc/options-page.php:6 inc/options-page.php:12 116 124 msgid "Main options" 117 125 msgstr "" 118 126 119 #: inc/ functions.php:195127 #: inc/options-page.php:7 inc/options-page.php:33 120 128 msgid "Manage main field" 121 129 msgstr "" … … 125 133 msgstr "" 126 134 127 #: inc/ot-view.php:162 135 #: inc/frontend.php:173 136 msgid "Next »" 137 msgstr "" 138 139 #: inc/frontend.php:161 128 140 msgid "No orders yet ..." 129 141 msgstr "" 130 142 131 #: inc/functions.php: 264143 #: inc/functions.php:190 132 144 msgid "Not selected" 133 145 msgstr "" 134 146 135 #: inc/functions.php: 266147 #: inc/functions.php:192 136 148 msgid "Number" 137 149 msgstr "" 138 150 139 #: inc/ functions.php:192151 #: inc/options-page.php:28 140 152 msgid "Number posts on page" 141 153 msgstr "" 142 154 143 #: inc/functions.php:256 144 msgid "On or off" 155 #: inc/functions.php:352 156 msgid "Off" 157 msgstr "" 158 159 #: inc/functions.php:351 160 msgid "On" 161 msgstr "" 162 163 #: inc/functions.php:209 inc/options-page.php:17 inc/options-page.php:24 164 #: inc/options-page.php:38 inc/options-page.php:45 inc/options-page.php:52 165 #: inc/options-page.php:59 166 msgid "on/off" 145 167 msgstr "" 146 168 … … 149 171 msgstr "" 150 172 151 #: inc/ functions.php:207173 #: inc/options-page.php:56 152 174 msgid "Order author" 153 175 msgstr "" 154 176 155 #: inc/ functions.php:204177 #: inc/options-page.php:49 156 178 msgid "Order category" 157 179 msgstr "" 158 180 159 #: inc/ ot-view.php:83181 #: inc/frontend.php:82 160 182 msgid "Order content" 161 183 msgstr "" 162 184 163 #: inc/ functions.php:201185 #: inc/options-page.php:42 164 186 msgid "Order description" 165 187 msgstr "" … … 178 200 msgstr "" 179 201 180 #: inc/f unctions.php:198 inc/ot-view.php:112 inc/ot-view.php:114202 #: inc/frontend.php:111 inc/frontend.php:113 inc/options-page.php:35 181 203 msgid "Order status" 182 204 msgstr "" … … 203 225 msgstr "" 204 226 205 #: inc/functions.php:224 inc/functions.php:236 227 #: inc/functions.php:196 228 msgid "Range" 229 msgstr "" 230 231 #: inc/functions.php:206 206 232 msgid "Required?" 207 233 msgstr "" … … 216 242 msgstr "" 217 243 218 #: inc/ ot-view.php:112244 #: inc/frontend.php:111 219 245 msgid "Success" 220 246 msgstr "" 221 247 222 #: inc/functions.php: 265248 #: inc/functions.php:191 223 249 msgid "Text" 224 250 msgstr "" … … 243 269 msgstr "" 244 270 245 #: inc/ ot-view.php:80271 #: inc/frontend.php:79 246 272 msgid "Title" 247 273 msgstr "" 248 274 249 #: inc/ ot-view.php:16275 #: inc/frontend.php:15 250 276 msgid "Title:" 251 277 msgstr "" 252 278 253 #: inc/ ot-view.php:21279 #: inc/frontend.php:20 254 280 msgid "What do we order?" 255 281 msgstr "" 282 283 #: inc/frontend.php:172 284 msgid "« Previous" 285 msgstr "" -
orders-table/trunk/orders-table.php
r2015672 r2149035 4 4 Plugin URI: 5 5 Description: The plugin allows you to make a convenient order page for your site. It is perfect for a store, hotel or a simple master of billets. Adjust it as it should and achieve the desired result. 6 Version: 1. 16 Version: 1.2 7 7 Author: Somonator 8 8 Author URI:
Note: See TracChangeset
for help on using the changeset viewer.