Changeset 2594450
- Timestamp:
- 09/06/2021 04:58:17 PM (5 years ago)
- Location:
- polylang-supertext/trunk
- Files:
-
- 6 edited
-
plugin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
resources/scripts/settings-library.js (modified) (15 diffs)
-
resources/scripts/settings-library.min.js (modified) (1 diff)
-
views/backend/settings-custom-fields.php (modified) (4 diffs)
-
views/backend/settings-elementor.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
polylang-supertext/trunk/plugin.php
r2572857 r2594450 7 7 Domain Path: /resources/languages 8 8 Author: Supertext AG 9 Version: 4.0 59 Version: 4.06 10 10 Author URI: http://www.supertext.ch 11 11 License: GPLv2 or later 12 12 */ 13 13 14 define('SUPERTEXT_PLUGIN_VERSION', '4.0 5');15 define('SUPERTEXT_PLUGIN_REVISION', 4 4);14 define('SUPERTEXT_PLUGIN_VERSION', '4.06'); 15 define('SUPERTEXT_PLUGIN_REVISION', 45); 16 16 define('SUPERTEXT_BASE_PATH', __DIR__); 17 17 define('SUPERTEXT_VIEW_PATH', __DIR__ . '/views/'); -
polylang-supertext/trunk/readme.txt
r2572857 r2594450 110 110 == Changelog == 111 111 112 = 4.06 = 113 * Fix bug with Custom vs. Elementor settings that saved the entered custom fields as Elementor field 114 112 115 = 4.05 = 113 116 * Expose startTranslationOrderProcess and startProofreadOrderProcess on Supertext.Interface to be able to start either of the two order processes -
polylang-supertext/trunk/resources/scripts/settings-library.js
r2426422 r2594450 7 7 'use strict'; 8 8 9 var $tableBody, 10 $rowTemplate; 9 var $tableBody, $rowTemplate; 11 10 12 11 function addUserField() { … … 28 27 options = options || {}; 29 28 30 $tableBody = $( "#tblStFields tbody");29 $tableBody = $('#tblStFields tbody'); 31 30 $tableBody.find('tr .saved-user-id-hidden'); 32 31 $tableBody.find('tr .remove-user-button').click(removeUserField); … … 49 48 'use strict'; 50 49 var customFieldsSettings = (function () { 51 var $customFieldInputCopy;50 var inputListsInputElements = {}; 52 51 53 52 function addCustomFieldInput() { 54 53 var $this = $(this); 55 var $newCustomFieldInput = $customFieldInputCopy.clone(); 56 57 $newCustomFieldInput.children('.custom-field-remove-input') 58 .click(removeCustomFieldInput); 54 55 var $newCustomFieldInput = inputListsInputElements[$this.data('input-name')].clone(); 56 $newCustomFieldInput.children('.field-remove-input').click(removeCustomFieldInput); 57 58 $newCustomFieldInput.children('.custom-field-remove-input').click(removeCustomFieldInput); 59 59 60 60 $newCustomFieldInput.insertBefore($this).show(); … … 67 67 return { 68 68 initialize: function (options) { 69 70 $customFieldInputCopy = $('#translatablefieldsSettingsForm .custom-field-input').last().clone(); 71 72 $('#translatablefieldsSettingsForm .custom-field-remove-input') 73 .click(removeCustomFieldInput); 74 75 $('#translatablefieldsSettingsForm .custom-field-add-input') 76 .click(addCustomFieldInput); 69 $('#translatablefieldsSettingsForm .field-remove-input').click(removeCustomFieldInput); 70 $('#translatablefieldsSettingsForm .field-add-input').click(addCustomFieldInput); 71 72 var $inputLists = $('#translatablefieldsSettingsForm .settings-input-list'); 73 74 $inputLists.each(function (_index, inputList) { 75 var $inputList = $(inputList); 76 var $inputElement = $inputList.children('.settings-input-element').last().clone(); 77 var inputListName = $inputList.children('.field-add-input').first().data('input-name'); 78 inputListsInputElements[inputListName] = $inputElement; 79 }); 77 80 } 78 81 }; 79 80 }()); 82 })(); 81 83 82 84 var pluginCustomFieldsSettings = (function () { 83 var 84 fieldDefinitionsTrees = {}, 85 var fieldDefinitionsTrees = {}, 85 86 checkedFieldsInputs = {}; 86 87 87 88 function setCheckedFields() { 88 $.each(fieldDefinitionsTrees, function (pluginId, tree){89 var checkedNodes = tree.jstree( "get_checked", false);89 $.each(fieldDefinitionsTrees, function (pluginId, tree) { 90 var checkedNodes = tree.jstree('get_checked', false); 90 91 checkedFieldsInputs[pluginId].val(checkedNodes.join(',')); 91 92 }); … … 96 97 options = options || {}; 97 98 98 for (var pluginId in savedFieldDefinitionIds){99 for (var pluginId in savedFieldDefinitionIds) { 99 100 if (!savedFieldDefinitionIds.hasOwnProperty(pluginId)) { 100 101 continue; 101 102 } 102 103 103 fieldDefinitionsTrees[pluginId] = $('#fieldDefinitionsTree' +pluginId);104 checkedFieldsInputs[pluginId] = $('#checkedFieldsInput' +pluginId);104 fieldDefinitionsTrees[pluginId] = $('#fieldDefinitionsTree' + pluginId); 105 checkedFieldsInputs[pluginId] = $('#checkedFieldsInput' + pluginId); 105 106 106 107 fieldDefinitionsTrees[pluginId].jstree({ 107 'core': {108 'themes': {109 'name': 'wordpress-dark'108 core: { 109 themes: { 110 name: 'wordpress-dark' 110 111 } 111 112 }, 112 'plugins': ['checkbox'],113 'checkbox': {114 'keep_selected_style': false113 plugins: ['checkbox'], 114 checkbox: { 115 keep_selected_style: false 115 116 } 116 117 }); … … 122 123 } 123 124 }; 124 } ());125 })(); 125 126 126 127 return { … … 138 139 'use strict'; 139 140 140 var shortcodeSettingTemplate, 141 shortcodeAttributeTemplate; 142 143 function addShortcodeSetting($container, name, contentEncoding){ 141 var shortcodeSettingTemplate, shortcodeAttributeTemplate; 142 143 function addShortcodeSetting($container, name, contentEncoding) { 144 144 var lastIndex = $container.data('lastIndex'); 145 var newIndex = lastIndex === undefined ? 0 : lastIndex + 1;145 var newIndex = lastIndex === undefined ? 0 : lastIndex + 1; 146 146 147 147 var html = shortcodeSettingTemplate({ … … 155 155 $container.data('lastIndex', newIndex); 156 156 157 $shortcodeSetting.children('.shortcode-remove-setting') 158 .click(function(){ 159 $shortcodeSetting.remove(); 160 }); 161 162 $shortcodeSetting.find('.shortcode-attribute-add-input') 163 .click(function(){ 164 addAttributeInput($shortcodeSetting.find('.shortcode-setting-attributes'), newIndex); 165 }); 157 $shortcodeSetting.children('.shortcode-remove-setting').click(function () { 158 $shortcodeSetting.remove(); 159 }); 160 161 $shortcodeSetting.find('.shortcode-attribute-add-input').click(function () { 162 addAttributeInput($shortcodeSetting.find('.shortcode-setting-attributes'), newIndex); 163 }); 166 164 167 165 initEncodingAutoComplete($shortcodeSetting); … … 171 169 function addAttributeInput($container, shortcodeIndex, name, encoding) { 172 170 var lastIndex = $container.data('lastIndex'); 173 var newIndex = lastIndex === undefined ? 0 : lastIndex + 1; 174 175 var $shortcodeAttribute = $(shortcodeAttributeTemplate({ 176 shortcodeIndex: shortcodeIndex, 177 attributeIndex: newIndex, 178 name: name, 179 encoding: encoding 180 })); 171 var newIndex = lastIndex === undefined ? 0 : lastIndex + 1; 172 173 var $shortcodeAttribute = $( 174 shortcodeAttributeTemplate({ 175 shortcodeIndex: shortcodeIndex, 176 attributeIndex: newIndex, 177 name: name, 178 encoding: encoding 179 }) 180 ); 181 181 182 182 $container.append($shortcodeAttribute); 183 183 $container.data('lastIndex', newIndex); 184 184 185 $shortcodeAttribute.children('.shortcode-attribute-remove-input') 186 .click(function(){ 187 $shortcodeAttribute.remove(); 188 }); 185 $shortcodeAttribute.children('.shortcode-attribute-remove-input').click(function () { 186 $shortcodeAttribute.remove(); 187 }); 189 188 190 189 initEncodingAutoComplete($shortcodeAttribute); … … 199 198 } 200 199 201 function initShortcodeAutoComplete($element) {202 $element .find('.shortcode-input-name')203 . bind("keydown", function (event) {204 if (event.keyCode === $.ui.keyCode.TAB &&205 $(this).autocomplete("instance").menu.active) {200 function initShortcodeAutoComplete($element) { 201 $element 202 .find('.shortcode-input-name') 203 .bind('keydown', function (event) { 204 if (event.keyCode === $.ui.keyCode.TAB && $(this).autocomplete('instance').menu.active) { 206 205 event.preventDefault(); 207 206 } … … 213 212 response($.ui.autocomplete.filter(registeredShortcodes, request.term)); 214 213 } 215 } 216 ); 217 } 218 219 function initEncodingAutoComplete($element){ 220 $element.find('.shortcode-input-encoding') 221 .bind("keydown", function (event) { 222 if (event.keyCode === $.ui.keyCode.TAB && 223 $(this).autocomplete("instance").menu.active) { 214 }); 215 } 216 217 function initEncodingAutoComplete($element) { 218 $element 219 .find('.shortcode-input-encoding') 220 .bind('keydown', function (event) { 221 if (event.keyCode === $.ui.keyCode.TAB && $(this).autocomplete('instance').menu.active) { 224 222 event.preventDefault(); 225 223 } … … 242 240 terms.push(ui.item.value); 243 241 // add placeholder to get the comma-and-space at the end 244 terms.push( "");245 this.value = terms.join( ", ");242 terms.push(''); 243 this.value = terms.join(', '); 246 244 return false; 247 245 } 248 } 249 ); 246 }); 250 247 } 251 248 … … 254 251 options = options || {}; 255 252 256 shortcodeSettingTemplate = options.template( "sttr-shortcode-setting");257 shortcodeAttributeTemplate = options.template( "sttr-shortcode-attribute");258 259 var $shortcodeSettings = $( "#shortcode-settings");260 261 $.each(savedShortcodes, function (name, shortcode){253 shortcodeSettingTemplate = options.template('sttr-shortcode-setting'); 254 shortcodeAttributeTemplate = options.template('sttr-shortcode-attribute'); 255 256 var $shortcodeSettings = $('#shortcode-settings'); 257 258 $.each(savedShortcodes, function (name, shortcode) { 262 259 addShortcodeSetting($shortcodeSettings, name, shortcode.content_encoding); 263 260 var $container = $shortcodeSettings.find('.shortcode-setting-container:last .shortcode-setting-attributes'); 264 261 var shortcodeIndex = $shortcodeSettings.data('lastIndex'); 265 262 266 $.each(shortcode.attributes, function (index, attribute){263 $.each(shortcode.attributes, function (index, attribute) { 267 264 addAttributeInput($container, shortcodeIndex, attribute.name, attribute.encoding); 268 265 }); 269 266 }); 270 271 $('#shortcodesSettingsForm .shortcode-add-setting') 272 .click(function(){ 273 addShortcodeSetting($shortcodeSettings); 274 }); 267 268 $('#shortcodesSettingsForm .shortcode-add-setting').click(function () { 269 addShortcodeSetting($shortcodeSettings); 270 }); 275 271 } 276 272 }; … … 280 276 'use strict'; 281 277 282 var 283 $apiUrl, 284 $apiSelection; 285 286 function updateAlternativeApiUrlInput(){ 278 var $apiUrl, $apiSelection; 279 280 function updateAlternativeApiUrlInput() { 287 281 $apiUrl.val($apiSelection.val()); 288 282 289 if ($apiSelection.children('option:last').is(':selected')){283 if ($apiSelection.children('option:last').is(':selected')) { 290 284 $apiUrl.removeProp('readonly'); 291 } else{285 } else { 292 286 $apiUrl.prop('readonly', true); 293 287 } … … 325 319 326 320 case 'shortcodes': 327 Supertext.Settings.Shortcodes.initialize({ template: wp.template });321 Supertext.Settings.Shortcodes.initialize({ template: wp.template }); 328 322 break; 329 323 330 324 case 'workflow': 331 Supertext.Settings.Workflow.initialize();332 break;325 Supertext.Settings.Workflow.initialize(); 326 break; 333 327 } 334 328 }); -
polylang-supertext/trunk/resources/scripts/settings-library.min.js
r2572430 r2594450 5 5 * @version 2.7.0 6 6 * Copyright 2021 */ 7 var Supertext=Supertext||{};Supertext.Settings={},Supertext.Settings.Users=function(t){"use strict";var i,n;function o(){var e=n.clone();e.find(".remove-user-button").click(r),i.append(e)}function r(){t(this).parent("td").parent("tr").remove(),0===i.find("tr").length&&o()}return{initialize:function(e){(i=t("#tblStFields tbody")).find("tr .saved-user-id-hidden"),i.find("tr .remove-user-button").click(r),i.find("tr .saved-user-id-hidden").each(function(){var e=t(this);e.prev().val(e.val())}),(n=t("#tblStFields tr:last").clone()).find("input").val(""),t("#btnAddUser").click(o)}}}(jQuery),Supertext.Settings.TranslatableFields=function(i){"use strict";var n,t={initialize:function(e){n=i("#translatablefieldsSettingsForm .custom-field-input").last().clone(),i("#translatablefieldsSettingsForm .custom-field-remove-input").click(r),i("#translatablefieldsSettingsForm .custom-field-add-input").click(o)}};function o(){var e=i(this),t=n.clone();t.children(".custom-field-remove-input").click(r),t.insertBefore(e).show()}function r(){i(this).parent().remove()}var s,a,c=(s={},a={},{initialize:function(e){for(var t in savedFieldDefinitionIds)savedFieldDefinitionIds.hasOwnProperty(t)&&(s[t]=i("#fieldDefinitionsTree"+t),a[t]=i("#checkedFieldsInput"+t),s[t].jstree({core:{themes:{name:"wordpress-dark"}},plugins:["checkbox"],checkbox:{keep_selected_style:!1}}),s[t].jstree("select_node",savedFieldDefinitionIds[t]));i("#translatablefieldsSettingsForm").submit(d)}});function d(){i.each(s,function(e,t){t=t.jstree("get_checked",!1);a[e].val(t.join(","))})}return{initialize:function(e){t.initialize(e=e||{}),c.initialize(e)}}}(jQuery),Supertext.Settings.Shortcodes=function(s){"use strict";var a,c;function r(e,t,i){var n=e.data("lastIndex"),o=void 0===n?0:n+1,i=a({shortcodeIndex:o,name:t,contentEncoding:i}),r=s(i);e.append(r),e.data("lastIndex",o),r.children(".shortcode-remove-setting").click(function(){r.remove()}),r.find(".shortcode-attribute-add-input").click(function(){d(r.find(".shortcode-setting-attributes"),o)}),u(r),r.find(".shortcode-input-name").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(registeredShortcodes,e.term))}})}function d(e,t,i,n){var o=e.data("lastIndex"),o=void 0===o?0:o+1,r=s(c({shortcodeIndex:t,attributeIndex:o,name:i,encoding:n}));e.append(r),e.data("lastIndex",o),r.children(".shortcode-attribute-remove-input").click(function(){r.remove()}),u(r)}function n(e){return e.split(/,\s*/)}function u(e){e.find(".shortcode-input-encoding").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(availableEncodingFunctions,n(e.term).pop()))},focus:function(){return!1},select:function(e,t){var i=n(this.value);return i.pop(),i.push(t.item.value),i.push(""),this.value=i.join(", "),!1}})}return{initialize:function(e){a=(e=e||{}).template("sttr-shortcode-setting"),c=e.template("sttr-shortcode-attribute");var o=s("#shortcode-settings");s.each(savedShortcodes,function(e,t){r(o,e,t.content_encoding);var i=o.find(".shortcode-setting-container:last .shortcode-setting-attributes"),n=o.data("lastIndex");s.each(t.attributes,function(e,t){d(i,n,t.name,t.encoding)})}),s("#shortcodesSettingsForm .shortcode-add-setting").click(function(){r(o)})}}}(jQuery),Supertext.Settings.Workflow=function(t){"use strict";var i,n;function o(){i.val(n.val()),n.children("option:last").is(":selected")?i.removeProp("readonly"):i.prop("readonly",!0)}return{initialize:function(e){i=t("#sttr-api-url"),(n=t("#sttr-api-selection")).change(o),o()}}}(jQuery),jQuery(document).ready(function(){var e=window.location.search,e=/tab=(.*?)(&|$|\s)/.exec(e);switch(null===e?"users":e[1]){case"users":Supertext.Settings.Users.initialize();break;case"translatablefields":Supertext.Settings.TranslatableFields.initialize();break;case"shortcodes":Supertext.Settings.Shortcodes.initialize({template:wp.template});break;case"workflow":Supertext.Settings.Workflow.initialize()}});7 var Supertext=Supertext||{};Supertext.Settings={},Supertext.Settings.Users=function(t){"use strict";var i,n;function r(){var e=n.clone();e.find(".remove-user-button").click(o),i.append(e)}function o(){t(this).parent("td").parent("tr").remove(),0===i.find("tr").length&&r()}return{initialize:function(e){(i=t("#tblStFields tbody")).find("tr .saved-user-id-hidden"),i.find("tr .remove-user-button").click(o),i.find("tr .saved-user-id-hidden").each(function(){var e=t(this);e.prev().val(e.val())}),(n=t("#tblStFields tr:last").clone()).find("input").val(""),t("#btnAddUser").click(r)}}}(jQuery),Supertext.Settings.TranslatableFields=function(n){"use strict";var r,t=(r={},{initialize:function(e){n("#translatablefieldsSettingsForm .field-remove-input").click(o),n("#translatablefieldsSettingsForm .field-add-input").click(i),n("#translatablefieldsSettingsForm .settings-input-list").each(function(e,t){var i=n(t),t=i.children(".settings-input-element").last().clone(),i=i.children(".field-add-input").first().data("input-name");r[i]=t})}});function i(){var e=n(this),t=r[e.data("input-name")].clone();t.children(".field-remove-input").click(o),t.children(".custom-field-remove-input").click(o),t.insertBefore(e).show()}function o(){n(this).parent().remove()}var s,a,c=(s={},a={},{initialize:function(e){for(var t in savedFieldDefinitionIds)savedFieldDefinitionIds.hasOwnProperty(t)&&(s[t]=n("#fieldDefinitionsTree"+t),a[t]=n("#checkedFieldsInput"+t),s[t].jstree({core:{themes:{name:"wordpress-dark"}},plugins:["checkbox"],checkbox:{keep_selected_style:!1}}),s[t].jstree("select_node",savedFieldDefinitionIds[t]));n("#translatablefieldsSettingsForm").submit(d)}});function d(){n.each(s,function(e,t){t=t.jstree("get_checked",!1);a[e].val(t.join(","))})}return{initialize:function(e){t.initialize(e=e||{}),c.initialize(e)}}}(jQuery),Supertext.Settings.Shortcodes=function(s){"use strict";var a,c;function o(e,t,i){var n=e.data("lastIndex"),r=void 0===n?0:n+1,i=a({shortcodeIndex:r,name:t,contentEncoding:i}),o=s(i);e.append(o),e.data("lastIndex",r),o.children(".shortcode-remove-setting").click(function(){o.remove()}),o.find(".shortcode-attribute-add-input").click(function(){d(o.find(".shortcode-setting-attributes"),r)}),l(o),o.find(".shortcode-input-name").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(registeredShortcodes,e.term))}})}function d(e,t,i,n){var r=e.data("lastIndex"),r=void 0===r?0:r+1,o=s(c({shortcodeIndex:t,attributeIndex:r,name:i,encoding:n}));e.append(o),e.data("lastIndex",r),o.children(".shortcode-attribute-remove-input").click(function(){o.remove()}),l(o)}function n(e){return e.split(/,\s*/)}function l(e){e.find(".shortcode-input-encoding").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(availableEncodingFunctions,n(e.term).pop()))},focus:function(){return!1},select:function(e,t){var i=n(this.value);return i.pop(),i.push(t.item.value),i.push(""),this.value=i.join(", "),!1}})}return{initialize:function(e){a=(e=e||{}).template("sttr-shortcode-setting"),c=e.template("sttr-shortcode-attribute");var r=s("#shortcode-settings");s.each(savedShortcodes,function(e,t){o(r,e,t.content_encoding);var i=r.find(".shortcode-setting-container:last .shortcode-setting-attributes"),n=r.data("lastIndex");s.each(t.attributes,function(e,t){d(i,n,t.name,t.encoding)})}),s("#shortcodesSettingsForm .shortcode-add-setting").click(function(){o(r)})}}}(jQuery),Supertext.Settings.Workflow=function(t){"use strict";var i,n;function r(){i.val(n.val()),n.children("option:last").is(":selected")?i.removeProp("readonly"):i.prop("readonly",!0)}return{initialize:function(e){i=t("#sttr-api-url"),(n=t("#sttr-api-selection")).change(r),r()}}}(jQuery),jQuery(document).ready(function(){var e=window.location.search,e=/tab=(.*?)(&|$|\s)/.exec(e);switch(null===e?"users":e[1]){case"users":Supertext.Settings.Users.initialize();break;case"translatablefields":Supertext.Settings.TranslatableFields.initialize();break;case"shortcodes":Supertext.Settings.Shortcodes.initialize({template:wp.template});break;case"workflow":Supertext.Settings.Workflow.initialize()}}); -
polylang-supertext/trunk/views/backend/settings-custom-fields.php
r2520480 r2594450 1 1 <?php 2 2 3 function getCustomFieldInput($value=''){ 4 return '<div class="custom-field-input"> 5 <input type="text" name="custom-fields[]" placeholder="'.__('Custom field name...', 'supertext').'" value="'.$value.'"/> 6 <button type="button" class="button button-highlighted button-remove custom-field-remove-input"><span class="dashicons dashicons-trash"></span></button> 3 function getCustomFieldInput($value = '') 4 { 5 return '<div class="settings-input-element"> 6 <input type="text" name="custom-fields[]" placeholder="' . __('Custom field name...', 'supertext') . '" value="' . $value . '"/> 7 <button type="button" class="button button-highlighted button-remove field-remove-input"><span class="dashicons dashicons-trash"></span></button> 7 8 </div>'; 8 9 } … … 10 11 $savedCustomFieldsInputs = ''; 11 12 12 foreach ($savedCustomFields as $savedCustomField){13 foreach ($savedCustomFields as $savedCustomField) { 13 14 $savedCustomFieldsInputs .= getCustomFieldInput($savedCustomField); 14 15 } … … 16 17 ?> 17 18 <div class="postbox postbox_admin"> 18 <div class="inside ">19 <div class="inside settings-input-list"> 19 20 <h3><?php _e('General custom fields', 'supertext'); ?></h3> 20 21 <p> … … 23 24 <?php echo $savedCustomFieldsInputs; ?> 24 25 <?php echo getCustomFieldInput(); ?> 25 <button type="button" class="button button-highlighted button-add custom-field-add-input"><?php _e('Add field', 'supertext'); ?></button>26 <button type="button" class="button button-highlighted button-add field-add-input" data-input-name="custom-field"><?php _e('Add field', 'supertext'); ?></button> 26 27 </div> 27 28 </div> 28 -
polylang-supertext/trunk/views/backend/settings-elementor.php
r2565361 r2594450 3 3 function getElementorTextPropertyInput($value = '') 4 4 { 5 return '<div class=" custom-field-input">6 <input type="text" name="elementor-text-properties[]" placeholder="' . __('Property name...', 'supertext') . '" value="' . $value . '"/>7 <button type="button" class="button button-highlighted button-remove custom-field-remove-input"><span class="dashicons dashicons-trash"></span></button>8 </div>';5 return '<div class="settings-input-element"> 6 <input type="text" name="elementor-text-properties[]" placeholder="' . __('Property name...', 'supertext') . '" value="' . $value . '"/> 7 <button type="button" class="button button-highlighted button-remove field-remove-input"><span class="dashicons dashicons-trash"></span></button> 8 </div>'; 9 9 } 10 10 … … 17 17 ?> 18 18 <div class="postbox postbox_admin"> 19 <div class="inside ">19 <div class="inside settings-input-list"> 20 20 <h3><?php _e('Elementor (Plugin)', 'supertext'); ?></h3> 21 21 <p> … … 24 24 <?php echo $elementorTextPropertyInputs; ?> 25 25 <?php echo getElementorTextPropertyInput(); ?> 26 <button type="button" class="button button-highlighted button-add custom-field-add-input"><?php _e('Add text property', 'supertext'); ?></button>26 <button type="button" class="button button-highlighted button-add field-add-input" data-input-name="elementor-field"><?php _e('Add text property', 'supertext'); ?></button> 27 27 </div> 28 28 </div>
Note: See TracChangeset
for help on using the changeset viewer.