Version Description
Download this release
Release Info
Developer | gn_themes |
Plugin | Shortcodes Ultimate |
Version | 5.12.2 |
Comparing to | |
See all releases |
Code changes from version 5.12.1 to 5.12.2
- changelog.txt +7 -0
- inc/core/generator.php +4 -3
- includes/js/generator/index.js.map +1 -1
- languages/shortcodes-ultimate.pot +21 -21
- readme.txt +4 -5
- shortcodes-ultimate.php +2 -2
changelog.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
### 5.12.0
|
2 |
|
3 |
**What's new**
|
1 |
+
### 5.12.1
|
2 |
+
|
3 |
+
**Security release**
|
4 |
+
|
5 |
+
This update fixes a security vulnerability in the shortcode generator. Thanks to Dave John for discovering it.
|
6 |
+
|
7 |
+
|
8 |
### 5.12.0
|
9 |
|
10 |
**What's new**
|
inc/core/generator.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Shortcode Generator
|
4 |
*/
|
@@ -510,9 +511,9 @@ class Su_Generator {
|
|
510 |
if ( empty( $_GET['shortcode'] ) ) return;
|
511 |
// Check Nonce
|
512 |
if (
|
513 |
-
empty( $
|
514 |
-
! is_string( $
|
515 |
-
! wp_verify_nonce( $
|
516 |
) {
|
517 |
return;
|
518 |
}
|
1 |
<?php
|
2 |
+
// phpcs:ignoreFile
|
3 |
/**
|
4 |
* Shortcode Generator
|
5 |
*/
|
511 |
if ( empty( $_GET['shortcode'] ) ) return;
|
512 |
// Check Nonce
|
513 |
if (
|
514 |
+
empty( $_GET['nonce'] ) ||
|
515 |
+
! is_string( $_GET['nonce'] ) ||
|
516 |
+
! wp_verify_nonce( $_GET['nonce'], 'su_generator_preset' )
|
517 |
) {
|
518 |
return;
|
519 |
}
|
includes/js/generator/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["includes/js/generator/node_modules/browser-pack/_prelude.js","includes/js/generator/includes/js/generator/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","$","$generator","$search","$filter","$filters","$choices","$choice","$settings","$prefix","$result","$selected","self","window","SUG","App","jQuery","children","find","state","mceSelection","target","wpActiveEditor","context","insertArgs","preview","timer","request","el","body","init","gp_hover_timer","click","regex","filter","this","data","css","opacity","removeClass","RegExp","each","match","preventDefault","on","val","html","hide","show","focus","magnificPopup","close","blur","keyup","$first","best","keyCode","trigger","id","shortcode","matches","name","desc","group","join","addClass","ajax","type","url","ajaxurl","action","beforeSend","success","$content","attr","index","$val","min","max","step","simpleSlider","snap","range","farbtastic","update","images","tax","terms","ids","source","$sources","$images","categories","$cats","$taxes","$terms","frame","$picker","$source","$addMedia","indexOf","parent","fadeOut","remove","wp","media","frames","su_media_frame_1","title","SUGL10n","isp_media_title","library","button","text","isp_media_insert","multiple","files","get","toJSON","append","open","sortable","revert","containment","tolerance","stop","ajaxTermSelect","$cont","parents","dataType","class","size","_typeof","abort","file","$button","stopPropagation","su_media_frame_2","upload_title","upload_insert","attachment","first","$field","toggleClass","hasClass","$icons","$value","$switch","value","su_generator_get_terms","noselect","$fields","$hoff","$voff","$blur","$color","cnt","wheel","split","replace","$width","$style","$cnt","_default","nonce","setSettings","insertShortcode","$preview","updatePreview","clearTimeout","setTimeout","$list","Date","getTime","prompt","presets_prompt_msg","presets_prompt_value","addPreset","$insert","$preset","removePreset","settings","getSettings","parseSettings","settingsSelector","query","prefix","content","result","String","$this","is","toString","hasOwnProperty","forced","previous","cache","insert","args","preSelectedShortcode","mfpOptions","alignTop","closeOnBgClick","mainClass","items","src","callbacks","concat","tinyMCE","activeEditor","selection","getContent","format","props","originalText","last_used","HTMLEditor","document","getElementById","editorID","insertAtCaret","editor","attributes","setAttributes","field","start","selectionStart","substring","ready"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAA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6L,OAExBS,WAAW7B,eAAe,WAClCoB,EAAMU,cAAc,CAAEpC,QAAS0B,EAAMS,WAAWnC,QAAUhI,IAClC,mBAAf0J,EAAMxJ,OACXyJ,EAAeD,EAAMS,WAAW7B,eAAe,QAC/CoB,EAAMS,WAAW7G,KACjB,GAEJoG,EAAMU,cAAc,CAAE9G,KAAMqG,EAAe3J,OAKjD/C,EAAKgN,cAAgB,SAACI,EAAO/G,GAC3B,IAAIgH,EAAQD,EAAME,eAClBF,EAAM5E,MAAQ4E,EAAM5E,MAAM+E,UAAU,EAAGF,GAAShH,EAAO+G,EAAM5E,MAAM+E,UAAUF,GAC7ED,EAAM/K,QACN+K,EAAME,eAAiBD,EAAQhH,EAAKnH,QAG/B,CACLgC,KAAMlB,EAAKkB,KACXuK,OAAQzL,EAAKyL,SAIjBrL,OAAOyM,UAAUW,MAAMvN,OAAOC,IAAIC,IAAIe","file":"index.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","/* global jQuery, wp, ajaxurl, SUGL10n */\n\nwindow.SUG = {}\n\nwindow.SUG.App = (($) => {\n var $generator = $('#su-generator')\n var $search = $('#su-generator-search')\n var $filter = $('#su-generator-filter')\n var $filters = $filter.children('a')\n var $choices = $('#su-generator-choices')\n var $choice = $choices.find('span')\n var $settings = $('#su-generator-settings')\n var $prefix = $('#su-compatibility-mode-prefix')\n var $result = $('#su-generator-result')\n var $selected = $('#su-generator-selected')\n\n var self = {}\n\n self.state = {\n mceSelection: '',\n target: '',\n wpActiveEditor: null,\n context: '',\n insertArgs: '',\n preview: {\n timer: null,\n request: null\n }\n }\n\n self.el = {\n body: $('body')\n }\n\n self.init = () => {\n $filters.click(\n function (e) {\n // Prepare data\n var filter = $(this).data('filter')\n // If filter All, show all choices\n if (filter === 'all') {\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n } else { // Else run search\n var regex = new RegExp(filter, 'gi')\n // Hide all choices\n $choice.css({ opacity: 0.2 })\n // Find searched choices and show\n $choice.each(\n function () {\n // Get shortcode name\n var group = $(this).data('group')\n // Show choice if matched\n if (group.match(regex) !== null) {\n $(this)\n .css({ opacity: 1 })\n .removeClass('su-generator-choice-first')\n }\n }\n )\n }\n e.preventDefault()\n }\n )\n // Go to home link\n $('#su-generator').on(\n 'click',\n '.su-generator-home',\n function (e) {\n // Clear search field\n $search.val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show filters\n $filter.show()\n // Show choices panel\n $choices.show()\n $choice.show()\n // Clear selection\n self.state.mceSelection = ''\n // Focus search field\n $search.focus()\n e.preventDefault()\n }\n )\n // Generator close button\n $('#su-generator').on(\n 'click',\n '.su-generator-close',\n function (e) {\n // Close popup\n $.magnificPopup.close()\n // Prevent default action\n e.preventDefault()\n }\n )\n // Search field\n $search.on(\n {\n focus: function () {\n // Clear field\n $(this).val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show choices panel\n $choices.show()\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n // Show filters\n $filter.show()\n },\n blur: function () {},\n keyup: function (e) {\n // Prepare vars\n var $first = $('.su-generator-choice-first:first')\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n var best = 0\n // Hotkey action\n if (e.keyCode === 13 && $first.length > 0) {\n e.preventDefault()\n $(this).val('').blur()\n $first.trigger('click')\n }\n // Hide all choices\n $choice.css(\n {\n opacity: 0.2\n }\n ).removeClass('su-generator-choice-first')\n // Loop and highlight choices\n $choice.each(\n function () {\n // Get choice data\n var data = $(this).data()\n var id = data.shortcode\n var name = data.name\n var desc = data.desc\n var group = data.group\n var matches = ([id, name, desc, group].join(' ')).match(regex)\n // Highlight choice if matched\n if (matches !== null) {\n // Highlight current choice\n $(this).css(\n {\n opacity: 1\n }\n )\n // Check for exact match\n if (val === id) {\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Prevent selecting by matches number\n best = 999\n } else if (matches.length > best) { // Check matches length\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Save the score\n best = matches.length\n }\n }\n }\n )\n // Remove primary class if search field is empty\n if (val === '') {\n $choice.removeClass('su-generator-choice-first')\n }\n }\n }\n )\n // Click on shortcode choice\n $choice.on(\n 'click',\n function (e) {\n // Prepare data\n var shortcode = $(this).data('shortcode')\n // Load shortcode options\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_settings',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Hide preview box\n $('#su-generator-preview').hide()\n // Hide choices panel\n $choices.hide()\n // Show loading animation\n $settings.addClass('su-generator-loading').show()\n // Add narrow class\n $generator.addClass('su-generator-narrow')\n // Hide filters\n $filter.hide()\n },\n success: function (data) {\n // Hide loading animation\n $settings.removeClass('su-generator-loading')\n // Insert new HTML\n $settings.html(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n // Init range pickers\n $('.su-generator-range-picker').each(\n function (index) {\n var $picker = $(this)\n var $val = $picker.find('input')\n var min = $val.attr('min')\n var max = $val.attr('max')\n var step = $val.attr('step')\n // Apply noUIslider\n $val.simpleSlider(\n {\n snap: true,\n step: step,\n range: [min, max]\n }\n )\n $val.show()\n $val.on(\n 'keyup blur',\n function (e) {\n $val.simpleSlider('setValue', $val.val())\n }\n )\n }\n )\n // Init color pickers\n $('.su-generator-select-color').each(\n function (index) {\n $(this).find('.su-generator-select-color-wheel').filter(':first').farbtastic('.su-generator-select-color-value:eq(' + index + ')')\n $(this).find('.su-generator-select-color-value').focus(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').show()\n }\n )\n $(this).find('.su-generator-select-color-value').blur(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').hide()\n }\n )\n }\n )\n // Init image sourse pickers\n $('.su-generator-isp').each(\n function () {\n var $picker = $(this)\n var $sources = $picker.find('.su-generator-isp-sources')\n var $source = $picker.find('.su-generator-isp-source')\n var $addMedia = $picker.find('.su-generator-isp-add-media')\n var $images = $picker.find('.su-generator-isp-images')\n var $cats = $picker.find('.su-generator-isp-categories')\n var $taxes = $picker.find('.su-generator-isp-taxonomies')\n var $terms = $('.su-generator-isp-terms')\n var $val = $picker.find('.su-generator-attr')\n var frame\n // Update hidden value\n var update = function () {\n var val = 'none'\n var ids = ''\n var source = $sources.val()\n // Media library\n if (source === 'media') {\n var images = []\n $images.find('span').each(\n function (i) {\n images[i] = $(this).data('id')\n }\n )\n if (images.length > 0) {\n ids = images.join(',')\n }\n }\n // Category\n else if (source === 'category') {\n var categories = $cats.val() || []\n if (categories.length > 0) {\n ids = categories.join(',')\n }\n }\n // Taxonomy\n else if (source === 'taxonomy') {\n var tax = $taxes.val() || ''\n var terms = $terms.val() || []\n if (tax !== '0' && terms.length > 0) {\n val = 'taxonomy: ' + tax + '/' + terms.join(',')\n }\n }\n // Deselect\n else if (source === '0') {\n val = 'none'\n }\n // Other options\n else {\n val = source\n }\n if (ids !== '') {\n val = source + ': ' + ids\n }\n $val.val(val).trigger('change')\n }\n // Switch source\n $sources.on(\n 'change',\n function (e) {\n var source = $(this).val()\n e.preventDefault()\n $source.removeClass('su-generator-isp-source-open')\n if (source.indexOf(':') === -1) {\n $picker.find('.su-generator-isp-source-' + source).addClass('su-generator-isp-source-open')\n }\n update()\n }\n )\n // Remove image\n $images.on(\n 'click',\n 'span i',\n function () {\n $(this).parent('span').css('border-color', '#f03').fadeOut(\n 300,\n function () {\n $(this).remove()\n update()\n }\n )\n }\n )\n // Add image\n $addMedia.click(\n function (e) {\n e.preventDefault()\n if (typeof (frame) !== 'undefined') {\n frame.close()\n }\n frame = wp.media.frames.su_media_frame_1 = wp.media(\n {\n title: SUGL10n.isp_media_title,\n library: {\n type: 'image'\n },\n button: {\n text: SUGL10n.isp_media_insert\n },\n multiple: true\n }\n )\n frame.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n frame.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n frame.on(\n 'select',\n function () {\n var files = frame.state().get('selection').toJSON()\n $images.find('em').remove()\n $.each(\n files,\n function (i) {\n $images.append('<span data-id=\"' + this.id + '\" title=\"' + this.title + '\"><img src=\"' + this.url + '\" alt=\"\" /><i class=\"sui sui-times\"></i></span>')\n }\n )\n update()\n }\n ).open()\n }\n )\n // Sort images\n $images.sortable(\n {\n revert: 200,\n containment: $picker,\n tolerance: 'pointer',\n stop: function () {\n update()\n }\n }\n )\n // Select categories and terms\n $cats.on('change', update)\n $terms.on('change', update)\n // Select taxonomy\n $taxes.on(\n 'change',\n function () {\n var $cont = $(this).parents('.su-generator-isp-source')\n var tax = $(this).val()\n // Remove terms\n $terms.hide().find('option').remove()\n update()\n // Taxonomy is not selected\n if (tax === '0') {\n\n } else { // Taxonomy selected\n var ajaxTermSelect = $.ajax(\n {\n url: ajaxurl,\n type: 'post',\n dataType: 'html',\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n class: 'su-generator-isp-terms',\n multiple: true,\n size: 10\n },\n beforeSend: function () {\n if (typeof ajaxTermSelect === 'object') {\n ajaxTermSelect.abort()\n }\n $terms.html('').attr('disabled', true).hide()\n $cont.addClass('su-generator-loading')\n },\n success: function (data) {\n $terms.html(data).attr('disabled', false).show()\n $cont.removeClass('su-generator-loading')\n }\n }\n )\n }\n }\n )\n }\n )\n // Init media buttons\n $('.su-generator-upload-button').each(\n function () {\n var $button = $(this)\n var $val = $(this).parents('.su-generator-attr-container').find('input:text')\n var file\n $button.on(\n 'click',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // If the frame already exists, reopen it\n if (typeof (file) !== 'undefined') {\n file.close()\n }\n // Create WP media frame.\n file = wp.media.frames.su_media_frame_2 = wp.media(\n {\n // Title of media manager frame\n title: SUGL10n.upload_title,\n button: {\n // Button text\n text: SUGL10n.upload_insert\n },\n // Do not allow multiple files, if you want multiple, set true\n multiple: false\n }\n )\n // callback for selected image\n file.on(\n 'select',\n function () {\n var attachment = file.state().get('selection').first().toJSON()\n $val.val(attachment.url).trigger('change')\n }\n )\n file.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n file.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n // Open modal\n file.open()\n }\n )\n }\n )\n // Init icon pickers\n $('.su-generator-icon-picker-button').each(\n function () {\n var $button = $(this)\n var $field = $(this).parents('.su-generator-attr-container')\n var $val = $field.find('.su-generator-attr')\n var $picker = $field.find('.su-generator-icon-picker')\n var $filter = $picker.find('input:text')\n $button.click(\n function (e) {\n $picker.toggleClass('su-generator-icon-picker-visible')\n $filter.val('').trigger('keyup')\n if ($picker.hasClass('su-generator-icon-picker-loaded')) {\n return\n }\n // Load icons\n $.ajax(\n {\n type: 'post',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_icons'\n },\n dataType: 'html',\n beforeSend: function () {\n // Show loading animation\n $picker.addClass('su-generator-loading')\n // Add loaded class\n $picker.addClass('su-generator-icon-picker-loaded')\n },\n success: function (data) {\n $picker.append(data)\n var $icons = $picker.children('i')\n $icons.click(\n function (e) {\n $val.val('icon: ' + $(this).attr('title'))\n $picker.removeClass('su-generator-icon-picker-visible')\n $val.trigger('change')\n e.preventDefault()\n }\n )\n $filter.on(\n {\n keyup: function () {\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n // Hide all choices\n $icons.hide()\n // Find searched choices and show\n $icons.each(\n function () {\n // Get shortcode name\n var name = $(this).attr('title')\n // Show choice if matched\n if (name.match(regex) !== null) {\n $(this).show()\n }\n }\n )\n },\n focus: function () {\n $(this).val('')\n $icons.show()\n }\n }\n )\n $picker.removeClass('su-generator-loading')\n }\n }\n )\n e.preventDefault()\n }\n )\n }\n )\n // Init switches\n $('.su-generator-switch').click(\n function (e) {\n // Prepare data\n var $switch = $(this)\n var $value = $switch.parent().children('input')\n var isOn = $value.val() === 'yes'\n // Disable\n if (isOn) {\n // Change value\n $value.val('no').trigger('change')\n } else { // Enable\n // Change value\n $value.val('yes').trigger('change')\n }\n e.preventDefault()\n }\n )\n $('.su-generator-switch-value').on(\n 'change',\n function () {\n // Prepare data\n var $value = $(this)\n var $switch = $value.parent().children('.su-generator-switch')\n var value = $value.val()\n // Disable\n if (value === 'yes') {\n $switch.removeClass('su-generator-switch-no').addClass('su-generator-switch-yes')\n } else if (value === 'no') { // Enable\n $switch.removeClass('su-generator-switch-yes').addClass('su-generator-switch-no')\n }\n }\n )\n // Init tax_term selects\n $('select#su-generator-attr-taxonomy').on(\n 'change',\n function () {\n var $taxonomy = $(this)\n var tax = $taxonomy.val()\n var $terms = $('select#su-generator-attr-tax_term')\n // Load new options\n window.su_generator_get_terms = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n noselect: true\n },\n dataType: 'html',\n beforeSend: function () {\n // Check previous requests\n if (typeof window.su_generator_get_terms === 'object') {\n window.su_generator_get_terms.abort()\n }\n // Show loading animation\n $terms.parent().addClass('su-generator-loading')\n },\n success: function (data) {\n // Remove previous options\n $terms.find('option').remove()\n // Append new options\n $terms.append(data)\n // Hide loading animation\n $terms.parent().removeClass('su-generator-loading')\n }\n }\n )\n }\n )\n // Init shadow pickers\n $('.su-generator-shadow-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-shadow-picker-field input')\n var $hoff = $picker.find('.su-generator-sp-hoff')\n var $voff = $picker.find('.su-generator-sp-voff')\n var $blur = $picker.find('.su-generator-sp-blur')\n var $color = {\n cnt: $picker.find('.su-generator-shadow-picker-color'),\n value: $picker.find('.su-generator-shadow-picker-color-value'),\n wheel: $picker.find('.su-generator-shadow-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($hoff.val() + 'px ' + $voff.val() + 'px ' + $blur.val() + 'px ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 4) {\n $hoff.val(value[0].replace('px', ''))\n $voff.val(value[1].replace('px', ''))\n $blur.val(value[2].replace('px', ''))\n $color.value.val(value[3])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Init border pickers\n $('.su-generator-border-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-border-picker-field input, .su-generator-border-picker-field select')\n var $width = $picker.find('.su-generator-bp-width')\n var $style = $picker.find('.su-generator-bp-style')\n var $color = {\n cnt: $picker.find('.su-generator-border-picker-color'),\n value: $picker.find('.su-generator-border-picker-color-value'),\n wheel: $picker.find('.su-generator-border-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($width.val() + 'px ' + $style.val() + ' ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 3) {\n $width.val(value[0].replace('px', ''))\n $style.val(value[1])\n $color.value.val(value[2])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Remove skip class when setting is changed\n $settings.find('.su-generator-attr').on(\n 'change keyup blur',\n function () {\n var $cnt = $(this).parents('.su-generator-attr-container')\n var _default = $cnt.data('default')\n var val = $(this).val()\n // Value is changed\n if (val != _default) {\n $cnt.removeClass('su-generator-skip')\n } else {\n $cnt.addClass('su-generator-skip')\n }\n }\n )\n // Init value setters\n $('.su-generator-set-value').click(\n function (e) {\n $(this).parents('.su-generator-attr-container').find('input').val($(this).text()).trigger('change')\n }\n )\n // Save selected value\n $selected.val(shortcode)\n // Load last used preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: 'last_used',\n shortcode: shortcode,\n nonce: $('#su_generator_presets_nonce').val()\n },\n beforeSend: function () {\n // Show loading animation\n // $settings.addClass('su-generator-loading');\n },\n success: function (data) {\n // Remove loading animation\n // $settings.removeClass('su-generator-loading');\n // Set new settings\n self.setSettings(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n },\n dataType: 'json'\n }\n )\n },\n dataType: 'html'\n }\n )\n }\n )\n // Insert shortcode\n $('#su-generator').on('click', '.su-generator-insert', self.insertShortcode)\n // Preview shortcode\n $('#su-generator').on(\n 'click',\n '.su-generator-toggle-preview',\n function (e) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var $button = $(this)\n // Hide button\n $button.hide()\n // Show preview box\n $preview.addClass('su-generator-loading').show()\n // Bind updating on settings changes\n $settings.find('input, textarea, select').on(\n 'change keyup blur',\n function () {\n self.updatePreview()\n }\n )\n // Update preview box\n self.updatePreview(true)\n // Prevent default action\n e.preventDefault()\n }\n )\n var gp_hover_timer\n // Presets manager - mouseenter\n $('#su-generator').on(\n 'mouseenter click',\n '.su-generator-presets',\n function () {\n clearTimeout(gp_hover_timer)\n $('.su-gp-popup').show()\n }\n )\n // Presets manager - mouseleave\n $('#su-generator').on(\n 'mouseleave',\n '.su-generator-presets',\n function () {\n gp_hover_timer = window.setTimeout(\n function () {\n $('.su-gp-popup').fadeOut(200)\n },\n 600\n )\n }\n )\n // Presets manager - add new preset\n $('#su-generator').on(\n 'click',\n '.su-gp-new',\n function (e) {\n // Prepare data\n var $container = $(this).parents('.su-generator-presets')\n var $list = $('.su-gp-list')\n var id = new Date().getTime()\n // Ask for preset name\n var name = prompt(SUGL10n.presets_prompt_msg, SUGL10n.presets_prompt_value)\n // Name is entered\n if (name !== '' && name !== null) {\n // Hide default text\n $list.find('b').hide()\n // Add new option\n $list.append('<span data-id=\"' + id + '\"><em>' + name + '</em><i class=\"sui sui-times\"></i></span>')\n // Perform AJAX request\n self.addPreset(id, name)\n }\n }\n )\n // Presets manager - load preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list span',\n function (e) {\n // Prepare data\n var shortcode = $('.su-generator-presets').data('shortcode')\n var id = $(this).data('id')\n var $insert = $('.su-generator-insert')\n // Hide popup\n $('.su-gp-popup').hide()\n // Disable hover timer\n clearTimeout(gp_hover_timer)\n // Get the preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: id,\n shortcode: shortcode,\n nonce: $('#su_generator_presets_nonce').val()\n },\n beforeSend: function () {\n // Disable insert button\n $insert.addClass('button-primary-disabled').attr('disabled', true)\n },\n success: function (data) {\n // Enable insert button\n $insert.removeClass('button-primary-disabled').attr('disabled', false)\n // Set new settings\n self.setSettings(data)\n },\n dataType: 'json'\n }\n )\n // Prevent default action\n e.preventDefault()\n e.stopPropagation()\n }\n )\n // Presets manager - remove preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list i',\n function (e) {\n // Prepare data\n var $list = $(this).parents('.su-gp-list')\n var $preset = $(this).parent('span')\n var id = $preset.data('id')\n // Remove DOM element\n $preset.remove()\n // Show default text if last preset was removed\n if ($list.find('span').length < 1) {\n $list.find('b').show()\n }\n // Perform ajax request\n self.removePreset(id)\n // Prevent <span> action\n e.stopPropagation()\n // Prevent default action\n e.preventDefault()\n }\n )\n }\n\n /**\n\t * Create new preset with specified name from current settings\n\t */\n self.addPreset = function (id, name) {\n // Prepare shortcode name and current settings\n var shortcode = $('.su-generator-presets').data('shortcode')\n var settings = self.getSettings()\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_add_preset',\n id: id,\n name: name,\n shortcode: shortcode,\n settings: settings,\n nonce: $('#su_generator_presets_nonce').val()\n }\n }\n )\n }\n /**\n\t * Remove preset by ID\n\t */\n self.removePreset = function (id) {\n // Get current shortcode name\n var shortcode = $('.su-generator-presets').data('shortcode')\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_remove_preset',\n id: id,\n shortcode: shortcode,\n nonce: $('#su_generator_presets_nonce').val()\n }\n }\n )\n }\n\n self.parseSettings = function () {\n var settingsSelector = $('#su-generator-option-skip').val() === 'on'\n ? '#su-generator-settings .su-generator-attr-container:not(.su-generator-skip) .su-generator-attr'\n : '#su-generator-settings .su-generator-attr-container .su-generator-attr'\n // Prepare data\n var query = $selected.val()\n var prefix = $prefix.val()\n var $settings = $(settingsSelector)\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var result = new String('')\n // Open shortcode\n result += '[' + prefix + query\n // Add shortcode attributes\n $settings.each(\n function () {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n } else if (typeof value === 'array') {\n value = value.join(',')\n }\n // Add attribute\n if (value !== '') {\n result += ' ' + $(this).attr('name') + '=\"' + $(this).val().toString().replace(/\"/gi, \"'\") + '\"'\n }\n }\n )\n // End of opening tag\n result += ']'\n // Wrap shortcode if content presented\n if (content != 'false') {\n result += content + '[/' + prefix + query + ']'\n }\n // Return result\n return result\n }\n\n self.getSettings = function () {\n // Prepare data\n var query = $selected.val()\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var data = {}\n // Add shortcode attributes\n $settings.each(\n function (i) {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n var name = $this.attr('name')\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n }\n // Save value\n data[name] = value\n }\n )\n // Add content\n data.content = content.toString()\n // Return data\n return data\n }\n\n self.setSettings = function (data) {\n // Prepare data\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('#su-generator-content')\n // Loop through settings\n $settings.each(\n function () {\n var $this = $(this)\n var name = $this.attr('name')\n // Data contains value for this field\n if (data.hasOwnProperty(name)) {\n // Set new value\n $this.val(data[name])\n $this.trigger('keyup').trigger('change').trigger('blur')\n }\n }\n )\n // Set content\n if (data.hasOwnProperty('content')) {\n $content.val(data.content).trigger('keyup').trigger('change').trigger('blur')\n }\n // Update preview\n self.updatePreview()\n }\n\n self.updatePreview = function (forced) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var shortcode = self.parseSettings()\n var previous = $result.text()\n // Check forced mode\n forced = forced || false\n // Break if preview box is hidden (preview isn't enabled)\n if (!$preview.is(':visible')) {\n return\n }\n // Check shortcode is changed is this is not a forced mode\n if (shortcode === previous && !forced) {\n return\n }\n // Run timer to filter often calls\n window.clearTimeout(self.state.preview.timer)\n self.state.preview.timer = window.setTimeout(\n function () {\n self.state.preview.request = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n cache: false,\n data: {\n action: 'su_generator_preview',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Abort previous requests\n if (self.state.preview.request) {\n self.state.preview.request.abort()\n }\n // Show loading animation\n $preview.addClass('su-generator-loading').html('')\n },\n success: function (data) {\n // Hide loading animation and set new HTML\n $preview.html(data).removeClass('su-generator-loading')\n },\n dataType: 'html'\n }\n )\n },\n 300\n )\n // Save shortcode to div\n $result.text(shortcode)\n }\n\n self.insert = function (context, args) {\n if (typeof context !== 'string' || typeof args !== 'object') {\n return\n }\n\n self.state.context = context\n self.state.insertArgs = args\n\n var preSelectedShortcode = args.shortcode || ''\n\n var mfpOptions = {\n type: 'inline',\n alignTop: true,\n closeOnBgClick: false,\n mainClass: 'su-generator-mfp',\n items: {\n src: '#su-generator'\n },\n callbacks: {}\n }\n\n mfpOptions.callbacks.open = () => {\n if (preSelectedShortcode) {\n $choice.filter(`[data-shortcode=\"${preSelectedShortcode}\"]`).trigger('click')\n } else {\n window.setTimeout(() => $search.focus(), 200)\n }\n\n // self.el.body.addClass( 'su-mfp-shown' );\n\n if (\n typeof tinyMCE !== 'undefined' &&\n\t\t\t\ttinyMCE.activeEditor != null &&\n\t\t\t\ttinyMCE.activeEditor.hasOwnProperty('selection')\n ) {\n self.state.mceSelection = tinyMCE.activeEditor.selection.getContent({ format: 'text' })\n }\n }\n\n mfpOptions.callbacks.close = () => {\n $search.val('')\n $settings.html('').hide()\n $generator.removeClass('su-generator-narrow')\n $filter.show()\n $choices.show()\n $choice.show()\n\n self.state.mceSelection = ''\n\n // self.el.body.removeClass( 'su-mfp-shown' );\n }\n\n $.magnificPopup.open(mfpOptions)\n }\n\n self.insertShortcode = function () {\n var shortcode = self.parseSettings()\n\n self.addPreset('last_used', SUGL10n.last_used)\n\n $.magnificPopup.close()\n\n $result.text(shortcode)\n\n if (self.state.context === 'html') {\n var HTMLEditor = document.getElementById(self.state.insertArgs.editorID)\n self.insertAtCaret(HTMLEditor, shortcode)\n }\n\n if (self.state.context === 'classic') {\n window.wp.media.editor.insert(shortcode)\n }\n\n if (self.state.context === 'block') {\n var props = self.state.insertArgs.props\n\n if (props.attributes.hasOwnProperty('content')) {\n props.setAttributes({ content: props.attributes.content + shortcode })\n } else if (props.name === 'core/shortcode') {\n var originalText = props.attributes.hasOwnProperty('text')\n ? props.attributes.text\n : ''\n\n props.setAttributes({ text: originalText + shortcode })\n }\n }\n }\n\n self.insertAtCaret = (field, text) => {\n var start = field.selectionStart\n field.value = field.value.substring(0, start) + text + field.value.substring(start)\n field.focus()\n field.selectionStart = start + text.length\n }\n\n return {\n init: self.init,\n insert: self.insert\n }\n})(jQuery)\n\njQuery(document).ready(window.SUG.App.init)\n"]}
|
1 |
+
{"version":3,"sources":["includes/js/generator/node_modules/browser-pack/_prelude.js","includes/js/generator/includes/js/generator/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","$","$generator","$search","$filter","$filters","$choices","$choice","$settings","$prefix","$result","$selected","self","window","SUG","App","jQuery","children","find","state","mceSelection","target","wpActiveEditor","context","insertArgs","preview","timer","request","el","body","init","gp_hover_timer","click","regex","filter","this","data","css","opacity","removeClass","RegExp","each","match","preventDefault","on","val","html","hide","show","focus","magnificPopup","close","blur","keyup","$first","best","keyCode","trigger","id","shortcode","matches","name","desc","group","join","addClass","ajax","type","url","ajaxurl","action","beforeSend","success","$content","attr","index","$val","min","max","step","simpleSlider","snap","range","farbtastic","update","images","tax","terms","ids","source","$sources","$images","categories","$cats","$taxes","$terms","frame","$picker","$source","$addMedia","indexOf","parent","fadeOut","remove","wp","media","frames","su_media_frame_1","title","SUGL10n","isp_media_title","library","button","text","isp_media_insert","multiple","files","get","toJSON","append","open","sortable","revert","containment","tolerance","stop","ajaxTermSelect","$cont","parents","dataType","class","size","_typeof","abort","file","$button","stopPropagation","su_media_frame_2","upload_title","upload_insert","attachment","first","$field","toggleClass","hasClass","$icons","$value","$switch","value","su_generator_get_terms","noselect","$fields","$hoff","$voff","$blur","$color","cnt","wheel","split","replace","$width","$style","$cnt","_default","nonce","setSettings","insertShortcode","$preview","updatePreview","clearTimeout","setTimeout","$list","Date","getTime","prompt","presets_prompt_msg","presets_prompt_value","addPreset","$insert","$preset","removePreset","settings","getSettings","parseSettings","settingsSelector","query","prefix","content","result","String","$this","is","toString","hasOwnProperty","forced","previous","cache","insert","args","preSelectedShortcode","mfpOptions","alignTop","closeOnBgClick","mainClass","items","src","callbacks","concat","tinyMCE","activeEditor","selection","getContent","format","props","originalText","last_used","HTMLEditor","document","getElementById","editorID","insertAtCaret","editor","attributes","setAttributes","field","start","selectionStart","substring","ready"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,MAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,MAAAO,KAAA,mBAAAF,EAAAG,EAAAX,EAAAG,GAAA,CAAAS,QAAA,IAAAb,EAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,OAAAI,EAAAH,EAAAI,GAAA,GAAAL,IAAAA,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,OAAAD,EAAAG,GAAAS,QAAA,IAAA,IAAAL,EAAA,mBAAAD,SAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,IAAA,OAAAD,EAAA,CAAA,CAAAa,EAAA,CAAA,SAAAT,EAAAU,EAAAJ,gB,qOCMkB,IAACK,EACbC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEAC,EAdNC,OAAOC,IAAM,GAEbD,OAAOC,IAAIC,KAAQd,EA+sChBe,OA9sCGd,EAAaD,EAAE,iBACfE,EAA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,EAAKO,MAAMC,aAAe,IAK5BnB,EAAEiD,cAAcsE,KAAKgF,KAGvB5L,EAAK0J,gBAAkB,WACrB,IAkBM+C,EAKEC,EAvBJ3J,EAAY/C,EAAK2K,gBAErB3K,EAAKqK,UAAU,YAAapE,QAAQ0G,WAEpCtN,EAAEiD,cAAcC,QAEhBzC,EAAQuG,KAAKtD,GAEc,SAAvB/C,EAAKO,MAAMI,UACTiM,EAAaC,SAASC,eAAe9M,EAAKO,MAAMK,WAAWmM,UAC/D/M,EAAKgN,cAAcJ,EAAY7J,IAGN,YAAvB/C,EAAKO,MAAMI,SACbV,OAAO2F,GAAGC,MAAMoH,OAAOxB,OAAO1I,GAGL,UAAvB/C,EAAKO,MAAMI,WACT8L,EAAQzM,EAAKO,MAAMK,WAAW6L,OAExBS,WAAW7B,eAAe,WAClCoB,EAAMU,cAAc,CAAEpC,QAAS0B,EAAMS,WAAWnC,QAAUhI,IAClC,mBAAf0J,EAAMxJ,OACXyJ,EAAeD,EAAMS,WAAW7B,eAAe,QAC/CoB,EAAMS,WAAW7G,KACjB,GAEJoG,EAAMU,cAAc,CAAE9G,KAAMqG,EAAe3J,OAKjD/C,EAAKgN,cAAgB,SAACI,EAAO/G,GAC3B,IAAIgH,EAAQD,EAAME,eAClBF,EAAM5E,MAAQ4E,EAAM5E,MAAM+E,UAAU,EAAGF,GAAShH,EAAO+G,EAAM5E,MAAM+E,UAAUF,GAC7ED,EAAM/K,QACN+K,EAAME,eAAiBD,EAAQhH,EAAKnH,QAG/B,CACLgC,KAAMlB,EAAKkB,KACXuK,OAAQzL,EAAKyL,SAIjBrL,OAAOyM,UAAUW,MAAMvN,OAAOC,IAAIC,IAAIe","file":"index.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","/* eslint-disable */\n\n/* global jQuery, wp, ajaxurl, SUGL10n */\n\nwindow.SUG = {}\n\nwindow.SUG.App = (($) => {\n var $generator = $('#su-generator')\n var $search = $('#su-generator-search')\n var $filter = $('#su-generator-filter')\n var $filters = $filter.children('a')\n var $choices = $('#su-generator-choices')\n var $choice = $choices.find('span')\n var $settings = $('#su-generator-settings')\n var $prefix = $('#su-compatibility-mode-prefix')\n var $result = $('#su-generator-result')\n var $selected = $('#su-generator-selected')\n\n var self = {}\n\n self.state = {\n mceSelection: '',\n target: '',\n wpActiveEditor: null,\n context: '',\n insertArgs: '',\n preview: {\n timer: null,\n request: null\n }\n }\n\n self.el = {\n body: $('body')\n }\n\n self.init = () => {\n $filters.click(\n function (e) {\n // Prepare data\n var filter = $(this).data('filter')\n // If filter All, show all choices\n if (filter === 'all') {\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n } else { // Else run search\n var regex = new RegExp(filter, 'gi')\n // Hide all choices\n $choice.css({ opacity: 0.2 })\n // Find searched choices and show\n $choice.each(\n function () {\n // Get shortcode name\n var group = $(this).data('group')\n // Show choice if matched\n if (group.match(regex) !== null) {\n $(this)\n .css({ opacity: 1 })\n .removeClass('su-generator-choice-first')\n }\n }\n )\n }\n e.preventDefault()\n }\n )\n // Go to home link\n $('#su-generator').on(\n 'click',\n '.su-generator-home',\n function (e) {\n // Clear search field\n $search.val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show filters\n $filter.show()\n // Show choices panel\n $choices.show()\n $choice.show()\n // Clear selection\n self.state.mceSelection = ''\n // Focus search field\n $search.focus()\n e.preventDefault()\n }\n )\n // Generator close button\n $('#su-generator').on(\n 'click',\n '.su-generator-close',\n function (e) {\n // Close popup\n $.magnificPopup.close()\n // Prevent default action\n e.preventDefault()\n }\n )\n // Search field\n $search.on(\n {\n focus: function () {\n // Clear field\n $(this).val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show choices panel\n $choices.show()\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n // Show filters\n $filter.show()\n },\n blur: function () {},\n keyup: function (e) {\n // Prepare vars\n var $first = $('.su-generator-choice-first:first')\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n var best = 0\n // Hotkey action\n if (e.keyCode === 13 && $first.length > 0) {\n e.preventDefault()\n $(this).val('').blur()\n $first.trigger('click')\n }\n // Hide all choices\n $choice.css(\n {\n opacity: 0.2\n }\n ).removeClass('su-generator-choice-first')\n // Loop and highlight choices\n $choice.each(\n function () {\n // Get choice data\n var data = $(this).data()\n var id = data.shortcode\n var name = data.name\n var desc = data.desc\n var group = data.group\n var matches = ([id, name, desc, group].join(' ')).match(regex)\n // Highlight choice if matched\n if (matches !== null) {\n // Highlight current choice\n $(this).css(\n {\n opacity: 1\n }\n )\n // Check for exact match\n if (val === id) {\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Prevent selecting by matches number\n best = 999\n } else if (matches.length > best) { // Check matches length\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Save the score\n best = matches.length\n }\n }\n }\n )\n // Remove primary class if search field is empty\n if (val === '') {\n $choice.removeClass('su-generator-choice-first')\n }\n }\n }\n )\n // Click on shortcode choice\n $choice.on(\n 'click',\n function (e) {\n // Prepare data\n var shortcode = $(this).data('shortcode')\n // Load shortcode options\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_settings',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Hide preview box\n $('#su-generator-preview').hide()\n // Hide choices panel\n $choices.hide()\n // Show loading animation\n $settings.addClass('su-generator-loading').show()\n // Add narrow class\n $generator.addClass('su-generator-narrow')\n // Hide filters\n $filter.hide()\n },\n success: function (data) {\n // Hide loading animation\n $settings.removeClass('su-generator-loading')\n // Insert new HTML\n $settings.html(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n // Init range pickers\n $('.su-generator-range-picker').each(\n function (index) {\n var $picker = $(this)\n var $val = $picker.find('input')\n var min = $val.attr('min')\n var max = $val.attr('max')\n var step = $val.attr('step')\n // Apply noUIslider\n $val.simpleSlider(\n {\n snap: true,\n step: step,\n range: [min, max]\n }\n )\n $val.show()\n $val.on(\n 'keyup blur',\n function (e) {\n $val.simpleSlider('setValue', $val.val())\n }\n )\n }\n )\n // Init color pickers\n $('.su-generator-select-color').each(\n function (index) {\n $(this).find('.su-generator-select-color-wheel').filter(':first').farbtastic('.su-generator-select-color-value:eq(' + index + ')')\n $(this).find('.su-generator-select-color-value').focus(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').show()\n }\n )\n $(this).find('.su-generator-select-color-value').blur(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').hide()\n }\n )\n }\n )\n // Init image sourse pickers\n $('.su-generator-isp').each(\n function () {\n var $picker = $(this)\n var $sources = $picker.find('.su-generator-isp-sources')\n var $source = $picker.find('.su-generator-isp-source')\n var $addMedia = $picker.find('.su-generator-isp-add-media')\n var $images = $picker.find('.su-generator-isp-images')\n var $cats = $picker.find('.su-generator-isp-categories')\n var $taxes = $picker.find('.su-generator-isp-taxonomies')\n var $terms = $('.su-generator-isp-terms')\n var $val = $picker.find('.su-generator-attr')\n var frame\n // Update hidden value\n var update = function () {\n var val = 'none'\n var ids = ''\n var source = $sources.val()\n // Media library\n if (source === 'media') {\n var images = []\n $images.find('span').each(\n function (i) {\n images[i] = $(this).data('id')\n }\n )\n if (images.length > 0) {\n ids = images.join(',')\n }\n }\n // Category\n else if (source === 'category') {\n var categories = $cats.val() || []\n if (categories.length > 0) {\n ids = categories.join(',')\n }\n }\n // Taxonomy\n else if (source === 'taxonomy') {\n var tax = $taxes.val() || ''\n var terms = $terms.val() || []\n if (tax !== '0' && terms.length > 0) {\n val = 'taxonomy: ' + tax + '/' + terms.join(',')\n }\n }\n // Deselect\n else if (source === '0') {\n val = 'none'\n }\n // Other options\n else {\n val = source\n }\n if (ids !== '') {\n val = source + ': ' + ids\n }\n $val.val(val).trigger('change')\n }\n // Switch source\n $sources.on(\n 'change',\n function (e) {\n var source = $(this).val()\n e.preventDefault()\n $source.removeClass('su-generator-isp-source-open')\n if (source.indexOf(':') === -1) {\n $picker.find('.su-generator-isp-source-' + source).addClass('su-generator-isp-source-open')\n }\n update()\n }\n )\n // Remove image\n $images.on(\n 'click',\n 'span i',\n function () {\n $(this).parent('span').css('border-color', '#f03').fadeOut(\n 300,\n function () {\n $(this).remove()\n update()\n }\n )\n }\n )\n // Add image\n $addMedia.click(\n function (e) {\n e.preventDefault()\n if (typeof (frame) !== 'undefined') {\n frame.close()\n }\n frame = wp.media.frames.su_media_frame_1 = wp.media(\n {\n title: SUGL10n.isp_media_title,\n library: {\n type: 'image'\n },\n button: {\n text: SUGL10n.isp_media_insert\n },\n multiple: true\n }\n )\n frame.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n frame.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n frame.on(\n 'select',\n function () {\n var files = frame.state().get('selection').toJSON()\n $images.find('em').remove()\n $.each(\n files,\n function (i) {\n $images.append('<span data-id=\"' + this.id + '\" title=\"' + this.title + '\"><img src=\"' + this.url + '\" alt=\"\" /><i class=\"sui sui-times\"></i></span>')\n }\n )\n update()\n }\n ).open()\n }\n )\n // Sort images\n $images.sortable(\n {\n revert: 200,\n containment: $picker,\n tolerance: 'pointer',\n stop: function () {\n update()\n }\n }\n )\n // Select categories and terms\n $cats.on('change', update)\n $terms.on('change', update)\n // Select taxonomy\n $taxes.on(\n 'change',\n function () {\n var $cont = $(this).parents('.su-generator-isp-source')\n var tax = $(this).val()\n // Remove terms\n $terms.hide().find('option').remove()\n update()\n // Taxonomy is not selected\n if (tax === '0') {\n\n } else { // Taxonomy selected\n var ajaxTermSelect = $.ajax(\n {\n url: ajaxurl,\n type: 'post',\n dataType: 'html',\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n class: 'su-generator-isp-terms',\n multiple: true,\n size: 10\n },\n beforeSend: function () {\n if (typeof ajaxTermSelect === 'object') {\n ajaxTermSelect.abort()\n }\n $terms.html('').attr('disabled', true).hide()\n $cont.addClass('su-generator-loading')\n },\n success: function (data) {\n $terms.html(data).attr('disabled', false).show()\n $cont.removeClass('su-generator-loading')\n }\n }\n )\n }\n }\n )\n }\n )\n // Init media buttons\n $('.su-generator-upload-button').each(\n function () {\n var $button = $(this)\n var $val = $(this).parents('.su-generator-attr-container').find('input:text')\n var file\n $button.on(\n 'click',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // If the frame already exists, reopen it\n if (typeof (file) !== 'undefined') {\n file.close()\n }\n // Create WP media frame.\n file = wp.media.frames.su_media_frame_2 = wp.media(\n {\n // Title of media manager frame\n title: SUGL10n.upload_title,\n button: {\n // Button text\n text: SUGL10n.upload_insert\n },\n // Do not allow multiple files, if you want multiple, set true\n multiple: false\n }\n )\n // callback for selected image\n file.on(\n 'select',\n function () {\n var attachment = file.state().get('selection').first().toJSON()\n $val.val(attachment.url).trigger('change')\n }\n )\n file.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n file.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n // Open modal\n file.open()\n }\n )\n }\n )\n // Init icon pickers\n $('.su-generator-icon-picker-button').each(\n function () {\n var $button = $(this)\n var $field = $(this).parents('.su-generator-attr-container')\n var $val = $field.find('.su-generator-attr')\n var $picker = $field.find('.su-generator-icon-picker')\n var $filter = $picker.find('input:text')\n $button.click(\n function (e) {\n $picker.toggleClass('su-generator-icon-picker-visible')\n $filter.val('').trigger('keyup')\n if ($picker.hasClass('su-generator-icon-picker-loaded')) {\n return\n }\n // Load icons\n $.ajax(\n {\n type: 'post',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_icons'\n },\n dataType: 'html',\n beforeSend: function () {\n // Show loading animation\n $picker.addClass('su-generator-loading')\n // Add loaded class\n $picker.addClass('su-generator-icon-picker-loaded')\n },\n success: function (data) {\n $picker.append(data)\n var $icons = $picker.children('i')\n $icons.click(\n function (e) {\n $val.val('icon: ' + $(this).attr('title'))\n $picker.removeClass('su-generator-icon-picker-visible')\n $val.trigger('change')\n e.preventDefault()\n }\n )\n $filter.on(\n {\n keyup: function () {\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n // Hide all choices\n $icons.hide()\n // Find searched choices and show\n $icons.each(\n function () {\n // Get shortcode name\n var name = $(this).attr('title')\n // Show choice if matched\n if (name.match(regex) !== null) {\n $(this).show()\n }\n }\n )\n },\n focus: function () {\n $(this).val('')\n $icons.show()\n }\n }\n )\n $picker.removeClass('su-generator-loading')\n }\n }\n )\n e.preventDefault()\n }\n )\n }\n )\n // Init switches\n $('.su-generator-switch').click(\n function (e) {\n // Prepare data\n var $switch = $(this)\n var $value = $switch.parent().children('input')\n var isOn = $value.val() === 'yes'\n // Disable\n if (isOn) {\n // Change value\n $value.val('no').trigger('change')\n } else { // Enable\n // Change value\n $value.val('yes').trigger('change')\n }\n e.preventDefault()\n }\n )\n $('.su-generator-switch-value').on(\n 'change',\n function () {\n // Prepare data\n var $value = $(this)\n var $switch = $value.parent().children('.su-generator-switch')\n var value = $value.val()\n // Disable\n if (value === 'yes') {\n $switch.removeClass('su-generator-switch-no').addClass('su-generator-switch-yes')\n } else if (value === 'no') { // Enable\n $switch.removeClass('su-generator-switch-yes').addClass('su-generator-switch-no')\n }\n }\n )\n // Init tax_term selects\n $('select#su-generator-attr-taxonomy').on(\n 'change',\n function () {\n var $taxonomy = $(this)\n var tax = $taxonomy.val()\n var $terms = $('select#su-generator-attr-tax_term')\n // Load new options\n window.su_generator_get_terms = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n noselect: true\n },\n dataType: 'html',\n beforeSend: function () {\n // Check previous requests\n if (typeof window.su_generator_get_terms === 'object') {\n window.su_generator_get_terms.abort()\n }\n // Show loading animation\n $terms.parent().addClass('su-generator-loading')\n },\n success: function (data) {\n // Remove previous options\n $terms.find('option').remove()\n // Append new options\n $terms.append(data)\n // Hide loading animation\n $terms.parent().removeClass('su-generator-loading')\n }\n }\n )\n }\n )\n // Init shadow pickers\n $('.su-generator-shadow-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-shadow-picker-field input')\n var $hoff = $picker.find('.su-generator-sp-hoff')\n var $voff = $picker.find('.su-generator-sp-voff')\n var $blur = $picker.find('.su-generator-sp-blur')\n var $color = {\n cnt: $picker.find('.su-generator-shadow-picker-color'),\n value: $picker.find('.su-generator-shadow-picker-color-value'),\n wheel: $picker.find('.su-generator-shadow-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($hoff.val() + 'px ' + $voff.val() + 'px ' + $blur.val() + 'px ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 4) {\n $hoff.val(value[0].replace('px', ''))\n $voff.val(value[1].replace('px', ''))\n $blur.val(value[2].replace('px', ''))\n $color.value.val(value[3])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Init border pickers\n $('.su-generator-border-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-border-picker-field input, .su-generator-border-picker-field select')\n var $width = $picker.find('.su-generator-bp-width')\n var $style = $picker.find('.su-generator-bp-style')\n var $color = {\n cnt: $picker.find('.su-generator-border-picker-color'),\n value: $picker.find('.su-generator-border-picker-color-value'),\n wheel: $picker.find('.su-generator-border-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($width.val() + 'px ' + $style.val() + ' ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 3) {\n $width.val(value[0].replace('px', ''))\n $style.val(value[1])\n $color.value.val(value[2])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Remove skip class when setting is changed\n $settings.find('.su-generator-attr').on(\n 'change keyup blur',\n function () {\n var $cnt = $(this).parents('.su-generator-attr-container')\n var _default = $cnt.data('default')\n var val = $(this).val()\n // Value is changed\n if (val != _default) {\n $cnt.removeClass('su-generator-skip')\n } else {\n $cnt.addClass('su-generator-skip')\n }\n }\n )\n // Init value setters\n $('.su-generator-set-value').click(\n function (e) {\n $(this).parents('.su-generator-attr-container').find('input').val($(this).text()).trigger('change')\n }\n )\n // Save selected value\n $selected.val(shortcode)\n // Load last used preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: 'last_used',\n shortcode: shortcode,\n nonce: $('#su_generator_presets_nonce').val()\n },\n beforeSend: function () {\n // Show loading animation\n // $settings.addClass('su-generator-loading');\n },\n success: function (data) {\n // Remove loading animation\n // $settings.removeClass('su-generator-loading');\n // Set new settings\n self.setSettings(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n },\n dataType: 'json'\n }\n )\n },\n dataType: 'html'\n }\n )\n }\n )\n // Insert shortcode\n $('#su-generator').on('click', '.su-generator-insert', self.insertShortcode)\n // Preview shortcode\n $('#su-generator').on(\n 'click',\n '.su-generator-toggle-preview',\n function (e) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var $button = $(this)\n // Hide button\n $button.hide()\n // Show preview box\n $preview.addClass('su-generator-loading').show()\n // Bind updating on settings changes\n $settings.find('input, textarea, select').on(\n 'change keyup blur',\n function () {\n self.updatePreview()\n }\n )\n // Update preview box\n self.updatePreview(true)\n // Prevent default action\n e.preventDefault()\n }\n )\n var gp_hover_timer\n // Presets manager - mouseenter\n $('#su-generator').on(\n 'mouseenter click',\n '.su-generator-presets',\n function () {\n clearTimeout(gp_hover_timer)\n $('.su-gp-popup').show()\n }\n )\n // Presets manager - mouseleave\n $('#su-generator').on(\n 'mouseleave',\n '.su-generator-presets',\n function () {\n gp_hover_timer = window.setTimeout(\n function () {\n $('.su-gp-popup').fadeOut(200)\n },\n 600\n )\n }\n )\n // Presets manager - add new preset\n $('#su-generator').on(\n 'click',\n '.su-gp-new',\n function (e) {\n // Prepare data\n var $container = $(this).parents('.su-generator-presets')\n var $list = $('.su-gp-list')\n var id = new Date().getTime()\n // Ask for preset name\n var name = prompt(SUGL10n.presets_prompt_msg, SUGL10n.presets_prompt_value)\n // Name is entered\n if (name !== '' && name !== null) {\n // Hide default text\n $list.find('b').hide()\n // Add new option\n $list.append('<span data-id=\"' + id + '\"><em>' + name + '</em><i class=\"sui sui-times\"></i></span>')\n // Perform AJAX request\n self.addPreset(id, name)\n }\n }\n )\n // Presets manager - load preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list span',\n function (e) {\n // Prepare data\n var shortcode = $('.su-generator-presets').data('shortcode')\n var id = $(this).data('id')\n var $insert = $('.su-generator-insert')\n // Hide popup\n $('.su-gp-popup').hide()\n // Disable hover timer\n clearTimeout(gp_hover_timer)\n // Get the preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: id,\n shortcode: shortcode,\n nonce: $('#su_generator_presets_nonce').val()\n },\n beforeSend: function () {\n // Disable insert button\n $insert.addClass('button-primary-disabled').attr('disabled', true)\n },\n success: function (data) {\n // Enable insert button\n $insert.removeClass('button-primary-disabled').attr('disabled', false)\n // Set new settings\n self.setSettings(data)\n },\n dataType: 'json'\n }\n )\n // Prevent default action\n e.preventDefault()\n e.stopPropagation()\n }\n )\n // Presets manager - remove preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list i',\n function (e) {\n // Prepare data\n var $list = $(this).parents('.su-gp-list')\n var $preset = $(this).parent('span')\n var id = $preset.data('id')\n // Remove DOM element\n $preset.remove()\n // Show default text if last preset was removed\n if ($list.find('span').length < 1) {\n $list.find('b').show()\n }\n // Perform ajax request\n self.removePreset(id)\n // Prevent <span> action\n e.stopPropagation()\n // Prevent default action\n e.preventDefault()\n }\n )\n }\n\n /**\n\t * Create new preset with specified name from current settings\n\t */\n self.addPreset = function (id, name) {\n // Prepare shortcode name and current settings\n var shortcode = $('.su-generator-presets').data('shortcode')\n var settings = self.getSettings()\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_add_preset',\n id: id,\n name: name,\n shortcode: shortcode,\n settings: settings,\n nonce: $('#su_generator_presets_nonce').val()\n }\n }\n )\n }\n /**\n\t * Remove preset by ID\n\t */\n self.removePreset = function (id) {\n // Get current shortcode name\n var shortcode = $('.su-generator-presets').data('shortcode')\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_remove_preset',\n id: id,\n shortcode: shortcode,\n nonce: $('#su_generator_presets_nonce').val()\n }\n }\n )\n }\n\n self.parseSettings = function () {\n var settingsSelector = $('#su-generator-option-skip').val() === 'on'\n ? '#su-generator-settings .su-generator-attr-container:not(.su-generator-skip) .su-generator-attr'\n : '#su-generator-settings .su-generator-attr-container .su-generator-attr'\n // Prepare data\n var query = $selected.val()\n var prefix = $prefix.val()\n var $settings = $(settingsSelector)\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var result = new String('')\n // Open shortcode\n result += '[' + prefix + query\n // Add shortcode attributes\n $settings.each(\n function () {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n } else if (typeof value === 'array') {\n value = value.join(',')\n }\n // Add attribute\n if (value !== '') {\n result += ' ' + $(this).attr('name') + '=\"' + $(this).val().toString().replace(/\"/gi, \"'\") + '\"'\n }\n }\n )\n // End of opening tag\n result += ']'\n // Wrap shortcode if content presented\n if (content != 'false') {\n result += content + '[/' + prefix + query + ']'\n }\n // Return result\n return result\n }\n\n self.getSettings = function () {\n // Prepare data\n var query = $selected.val()\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var data = {}\n // Add shortcode attributes\n $settings.each(\n function (i) {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n var name = $this.attr('name')\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n }\n // Save value\n data[name] = value\n }\n )\n // Add content\n data.content = content.toString()\n // Return data\n return data\n }\n\n self.setSettings = function (data) {\n // Prepare data\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('#su-generator-content')\n // Loop through settings\n $settings.each(\n function () {\n var $this = $(this)\n var name = $this.attr('name')\n // Data contains value for this field\n if (data.hasOwnProperty(name)) {\n // Set new value\n $this.val(data[name])\n $this.trigger('keyup').trigger('change').trigger('blur')\n }\n }\n )\n // Set content\n if (data.hasOwnProperty('content')) {\n $content.val(data.content).trigger('keyup').trigger('change').trigger('blur')\n }\n // Update preview\n self.updatePreview()\n }\n\n self.updatePreview = function (forced) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var shortcode = self.parseSettings()\n var previous = $result.text()\n // Check forced mode\n forced = forced || false\n // Break if preview box is hidden (preview isn't enabled)\n if (!$preview.is(':visible')) {\n return\n }\n // Check shortcode is changed is this is not a forced mode\n if (shortcode === previous && !forced) {\n return\n }\n // Run timer to filter often calls\n window.clearTimeout(self.state.preview.timer)\n self.state.preview.timer = window.setTimeout(\n function () {\n self.state.preview.request = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n cache: false,\n data: {\n action: 'su_generator_preview',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Abort previous requests\n if (self.state.preview.request) {\n self.state.preview.request.abort()\n }\n // Show loading animation\n $preview.addClass('su-generator-loading').html('')\n },\n success: function (data) {\n // Hide loading animation and set new HTML\n $preview.html(data).removeClass('su-generator-loading')\n },\n dataType: 'html'\n }\n )\n },\n 300\n )\n // Save shortcode to div\n $result.text(shortcode)\n }\n\n self.insert = function (context, args) {\n if (typeof context !== 'string' || typeof args !== 'object') {\n return\n }\n\n self.state.context = context\n self.state.insertArgs = args\n\n var preSelectedShortcode = args.shortcode || ''\n\n var mfpOptions = {\n type: 'inline',\n alignTop: true,\n closeOnBgClick: false,\n mainClass: 'su-generator-mfp',\n items: {\n src: '#su-generator'\n },\n callbacks: {}\n }\n\n mfpOptions.callbacks.open = () => {\n if (preSelectedShortcode) {\n $choice.filter(`[data-shortcode=\"${preSelectedShortcode}\"]`).trigger('click')\n } else {\n window.setTimeout(() => $search.focus(), 200)\n }\n\n // self.el.body.addClass( 'su-mfp-shown' );\n\n if (\n typeof tinyMCE !== 'undefined' &&\n\t\t\t\ttinyMCE.activeEditor != null &&\n\t\t\t\ttinyMCE.activeEditor.hasOwnProperty('selection')\n ) {\n self.state.mceSelection = tinyMCE.activeEditor.selection.getContent({ format: 'text' })\n }\n }\n\n mfpOptions.callbacks.close = () => {\n $search.val('')\n $settings.html('').hide()\n $generator.removeClass('su-generator-narrow')\n $filter.show()\n $choices.show()\n $choice.show()\n\n self.state.mceSelection = ''\n\n // self.el.body.removeClass( 'su-mfp-shown' );\n }\n\n $.magnificPopup.open(mfpOptions)\n }\n\n self.insertShortcode = function () {\n var shortcode = self.parseSettings()\n\n self.addPreset('last_used', SUGL10n.last_used)\n\n $.magnificPopup.close()\n\n $result.text(shortcode)\n\n if (self.state.context === 'html') {\n var HTMLEditor = document.getElementById(self.state.insertArgs.editorID)\n self.insertAtCaret(HTMLEditor, shortcode)\n }\n\n if (self.state.context === 'classic') {\n window.wp.media.editor.insert(shortcode)\n }\n\n if (self.state.context === 'block') {\n var props = self.state.insertArgs.props\n\n if (props.attributes.hasOwnProperty('content')) {\n props.setAttributes({ content: props.attributes.content + shortcode })\n } else if (props.name === 'core/shortcode') {\n var originalText = props.attributes.hasOwnProperty('text')\n ? props.attributes.text\n : ''\n\n props.setAttributes({ text: originalText + shortcode })\n }\n }\n }\n\n self.insertAtCaret = (field, text) => {\n var start = field.selectionStart\n field.value = field.value.substring(0, start) + text + field.value.substring(start)\n field.focus()\n field.selectionStart = start + text.length\n }\n\n return {\n init: self.init,\n insert: self.insert\n }\n})(jQuery)\n\njQuery(document).ready(window.SUG.App.init)\n"]}
|
languages/shortcodes-ultimate.pot
CHANGED
@@ -17,7 +17,7 @@ msgstr ""
|
|
17 |
msgid "About"
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: admin/class-shortcodes-ultimate-admin-addons.php:26, admin/class-shortcodes-ultimate-admin-addons.php:29, admin/class-shortcodes-ultimate-admin-addons.php:54, inc/core/generator.php:
|
21 |
msgid "Add-ons"
|
22 |
msgstr ""
|
23 |
|
@@ -191,7 +191,7 @@ msgstr ""
|
|
191 |
msgid "This option enables alternative (deprecated) mode for nested shortcodes."
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: admin/class-shortcodes-ultimate-admin-settings.php:202, admin/class-shortcodes-ultimate-admin-settings.php:203, admin/class-shortcodes-ultimate-admin-settings.php:320, inc/core/generator.php:
|
195 |
msgid "Settings"
|
196 |
msgstr ""
|
197 |
|
@@ -375,79 +375,79 @@ msgstr ""
|
|
375 |
msgid "Select taxonomy and it's terms.<br>You can select multiple terms with Ctrl (Cmd) key"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: inc/core/generator.php:
|
379 |
msgid "Insert shortcode"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: inc/core/generator.php:
|
383 |
msgid "Plugin settings"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: inc/core/generator.php:
|
387 |
msgid "Plugin homepage"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: inc/core/generator.php:
|
391 |
msgid "Premium Add-ons"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: inc/core/generator.php:
|
395 |
msgid "Search for shortcodes"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: inc/core/generator.php:
|
399 |
msgid "Pro Tip"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: inc/core/generator.php:
|
403 |
msgid "Hit enter to select highlighted shortcode, while searching"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: inc/core/generator.php:
|
407 |
msgid "Filter by type"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: inc/core/generator.php:
|
411 |
msgid "Shortcode not specified"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: inc/core/generator.php:
|
415 |
msgid "Live preview"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: inc/core/generator.php:
|
419 |
msgid "Click to return to the shortcodes list"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: inc/core/generator.php:
|
423 |
msgid "All shortcodes"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: inc/core/generator.php:
|
427 |
msgid "Click to set this value"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: inc/core/generator.php:
|
431 |
msgid "Content"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: inc/core/generator.php:
|
435 |
msgid "Preview"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: inc/core/generator.php:
|
439 |
msgid "Access denied"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: inc/core/generator.php:
|
443 |
msgid "Presets"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: inc/core/generator.php:
|
447 |
msgid "Save current settings as preset"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: inc/core/generator.php:
|
451 |
msgid "Presets not found"
|
452 |
msgstr ""
|
453 |
|
17 |
msgid "About"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: admin/class-shortcodes-ultimate-admin-addons.php:26, admin/class-shortcodes-ultimate-admin-addons.php:29, admin/class-shortcodes-ultimate-admin-addons.php:54, inc/core/generator.php:216, admin/partials/help/sidebar.php:7
|
21 |
msgid "Add-ons"
|
22 |
msgstr ""
|
23 |
|
191 |
msgid "This option enables alternative (deprecated) mode for nested shortcodes."
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: admin/class-shortcodes-ultimate-admin-settings.php:202, admin/class-shortcodes-ultimate-admin-settings.php:203, admin/class-shortcodes-ultimate-admin-settings.php:320, inc/core/generator.php:210, admin/partials/notices/unsafe-features.php:19
|
195 |
msgid "Settings"
|
196 |
msgstr ""
|
197 |
|
375 |
msgid "Select taxonomy and it's terms.<br>You can select multiple terms with Ctrl (Cmd) key"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: inc/core/generator.php:57, inc/core/generator.php:125, inc/core/generator.php:153, inc/core/generator.php:281
|
379 |
msgid "Insert shortcode"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: inc/core/generator.php:210
|
383 |
msgid "Plugin settings"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: inc/core/generator.php:211, inc/core/generator.php:211
|
387 |
msgid "Plugin homepage"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: inc/core/generator.php:216, admin/partials/pages/about.php:45, admin/partials/pages/addons.php:14
|
391 |
msgid "Premium Add-ons"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: inc/core/generator.php:223
|
395 |
msgid "Search for shortcodes"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: inc/core/generator.php:224
|
399 |
msgid "Pro Tip"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: inc/core/generator.php:224
|
403 |
msgid "Hit enter to select highlighted shortcode, while searching"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: inc/core/generator.php:226
|
407 |
msgid "Filter by type"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: inc/core/generator.php:266
|
411 |
msgid "Shortcode not specified"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: inc/core/generator.php:282
|
415 |
msgid "Live preview"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: inc/core/generator.php:286, admin/partials/pro-features/generator.php:2
|
419 |
msgid "Click to return to the shortcodes list"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: inc/core/generator.php:286, admin/partials/pro-features/generator.php:2
|
423 |
msgid "All shortcodes"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: inc/core/generator.php:310
|
427 |
msgid "Click to set this value"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: inc/core/generator.php:328, includes/config/groups.php:7
|
431 |
msgid "Content"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: inc/core/generator.php:345
|
435 |
msgid "Preview"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: inc/core/generator.php:353
|
439 |
msgid "Access denied"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: inc/core/generator.php:398
|
443 |
msgid "Presets"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: inc/core/generator.php:401
|
447 |
msgid "Save current settings as preset"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: inc/core/generator.php:433, inc/core/generator.php:430
|
451 |
msgid "Presets not found"
|
452 |
msgstr ""
|
453 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: gn_themes
|
|
3 |
License: GPLv3
|
4 |
Donate link: https://paypal.me/anovladimir
|
5 |
Tags: shortcode, toggle, columns, button, slider
|
6 |
-
Stable tag: 5.12.
|
7 |
Requires PHP: 5.4
|
8 |
Requires at least: 4.6
|
9 |
Tested up to: 6.0
|
@@ -137,11 +137,10 @@ First, visit the [Help Center](https://getshortcodes.com/support/). If you get s
|
|
137 |
## Changelog
|
138 |
|
139 |
|
140 |
-
### 5.12.
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
This update fixes a security vulnerability in the shortcode generator. Thanks to Dave John for discovering it.
|
145 |
|
146 |
|
147 |
---
|
3 |
License: GPLv3
|
4 |
Donate link: https://paypal.me/anovladimir
|
5 |
Tags: shortcode, toggle, columns, button, slider
|
6 |
+
Stable tag: 5.12.2
|
7 |
Requires PHP: 5.4
|
8 |
Requires at least: 4.6
|
9 |
Tested up to: 6.0
|
137 |
## Changelog
|
138 |
|
139 |
|
140 |
+
### 5.12.2
|
141 |
|
142 |
+
* Fixed issue with Shortcode Generator Presets, introduced in the previous update
|
143 |
+
* Tested compatibility with WordPress 6
|
|
|
144 |
|
145 |
|
146 |
---
|
shortcodes-ultimate.php
CHANGED
@@ -7,13 +7,13 @@
|
|
7 |
* Description: A comprehensive collection of visual components for WordPress
|
8 |
* Text Domain: shortcodes-ultimate
|
9 |
* License: GPLv3
|
10 |
-
* Version: 5.12.
|
11 |
* Requires PHP: 5.4
|
12 |
* Requires at least: 4.6
|
13 |
* Tested up to: 6.0
|
14 |
*/
|
15 |
|
16 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
17 |
-
define( 'SU_PLUGIN_VERSION', '5.12.
|
18 |
|
19 |
require_once dirname( __FILE__ ) . '/plugin.php';
|
7 |
* Description: A comprehensive collection of visual components for WordPress
|
8 |
* Text Domain: shortcodes-ultimate
|
9 |
* License: GPLv3
|
10 |
+
* Version: 5.12.2
|
11 |
* Requires PHP: 5.4
|
12 |
* Requires at least: 4.6
|
13 |
* Tested up to: 6.0
|
14 |
*/
|
15 |
|
16 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
17 |
+
define( 'SU_PLUGIN_VERSION', '5.12.2' );
|
18 |
|
19 |
require_once dirname( __FILE__ ) . '/plugin.php';
|