LuckyWP Table of Contents - Version 2.1

Version Description

2020-03-12 = + Added option "Additional CSS Class(es)". + Added option "OL/LI" to "List Markup Tags". + Added support Oxygen Builder. - Removed class "lwptoc_item" from links. * Minor fixes for performance.

Download this release

Release Info

Developer theluckywp
Plugin Icon 128x128 LuckyWP Table of Contents
Version 2.1
Comparing to
See all releases

Code changes from version 2.0.9 to 2.1

admin/Admin.php CHANGED
@@ -233,6 +233,9 @@ class Admin extends BaseObject
233
  if (null !== $v = $getValue($source, 'skipHeadingText')) {
234
  $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), $v == '' ? null : $v];
235
  }
 
 
 
236
  return array_map(function ($row) {
237
  if ($row[1] !== null && ArrayHelper::getValue($row, 2, true) === true) {
238
  $row[1] = esc_html($row[1]);
233
  if (null !== $v = $getValue($source, 'skipHeadingText')) {
234
  $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), $v == '' ? null : $v];
235
  }
236
+ if (null !== $v = $getValue($source, 'containerClass')) {
237
+ $rows[] = [esc_html__('Additional CSS Class(es)', 'luckywp-table-of-contents'), $v == '' ? null : $v];
238
+ }
239
  return array_map(function ($row) {
240
  if ($row[1] !== null && ArrayHelper::getValue($row, 2, true) === true) {
241
  $row[1] = esc_html($row[1]);
admin/assets/main.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var o="lwptocPreloader";e.fn[o+"Show"]=function(){var t=e(this);t.addClass(o+"Wrapper"),t.append('<div class="'+o+'Overlay"><div class="lwptocDarkSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>')},e.fn[o+"Hide"]=function(){var t=e(this);t.removeClass(o+"Wrapper"),t.find("."+o+"Overlay").remove()}}(jQuery),function(r){var l="lwptocModal",e={type:"html",content:"",url:"",ajax:{},ajaxRequest:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="'+l+'-overlay"></div>',css:{backgroundColor:"#000",opacity:.6,zIndex:1e5}},container:{block:void 0,tpl:'<div class="'+l+'-container"><div class="'+l+'-container_i"><div class="'+l+'-container_i2"></div></div></div>'},preloader:{verticalAlign:void 0,tpl:'<div class="'+l+'-preloader" />'},wrap:void 0,body:void 0,errors:{tpl:'<div class="'+l+"-error "+l+'-close"></div>',autocloseDelay:2e3,ajaxUnsuccessfulLoad:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},width:"auto",verticalAlign:"middle",beforeOpen:r.noop,afterOpen:r.noop,beforeClose:r.noop,afterClose:r.noop,afterLoading:r.noop,afterLoadingOnShow:r.noop,errorLoading:r.noop},d=0,s=r([]),u=function(t,e){var o=!0;return r(t).each(function(){r(e.target).get(0)==r(this).get(0)&&(o=!1),0==r(e.target).closest("HTML",r(this).get(0)).length&&(o=!1)}),o},i={getParentEl:function(t){var e=r(t);return e.data(l)?e:(e=r(t).closest("."+l+"-container").data(l+"ParentEl"))||!1},transition:function(t,e,o,n){switch(n=null==n?r.noop:n,o.type){case"fade":"show"==e?t.fadeIn(o.speed,n):t.fadeOut(o.speed,n);break;case"none":"show"==e?t.show():t.hide(),n()}},setWrapMarginRight:function(t,e){t.wrap.css("marginRight",e+"px"),r(document).trigger(l+"_setWrapMarginRight",e)},initEl:function(e,t){var o=e.data(l);if(!o){if(d++,(o=t).modalID=d,o.overlay.block=r(o.overlay.tpl),o.overlay.block.css(o.overlay.css),o.container.block=r(o.container.tpl),o.body=r("."+l+"-container_i2",o.container.block),t.clone?o.body.html(e.clone(!0)):(e.before('<div id="'+l+"Reserve"+o.modalID+'" style="display: none" />'),o.body.html(e)),o.body.on("click","."+l+"-close",function(){return e[l]("close"),!1}),o.closeOnOverlayClick&&o.overlay.block.add(o.container.block).click(function(t){u(r(">*",o.body),t)&&e[l]("close")}),o.container.block.data(l+"ParentEl",e),e.data(l,o),s=r.merge(s,e),r.proxy(p.show,e)(),"html"==o.type)return e;if(null!=o.ajax.beforeSend){var n=o.ajax.beforeSend;delete o.ajax.beforeSend}if(null!=o.ajax.success){var i=o.ajax.success;delete o.ajax.success}if(null!=o.ajax.error){var a=o.ajax.error;delete o.ajax.error}var c=r.extend(!0,{url:o.url,beforeSend:function(){o.body.html(o.preloader.tpl).css("verticalAlign",void 0===o.preloader.verticalAlign?o.verticalAlign:o.preloader.verticalAlign),void 0!==n&&n(o,e)},success:function(t){e.trigger("afterLoading."+l),t=o.afterLoading(o,e,t)||t,o.body.css("verticalAlign",o.verticalAlign),null==i?o.body.html(t):i(o,e,t),e.trigger("afterLoadingOnShow."+l),o.afterLoadingOnShow(o,e,t)},error:function(){e.trigger("errorLoading."+l),o.errorLoading(o,e),null==a?(o.body.html(o.errors.tpl),r("."+l+"-error",o.body).html(o.errors.ajaxUnsuccessfulLoad),r("."+l+"-close",o.body).click(function(){return e[l]("close"),!1}),o.errors.autocloseDelay&&setTimeout(function(){e[l]("close")},o.errors.autocloseDelay)):a(o,e)}},o.ajax);o.ajaxRequest=r.ajax(c),e.data(l,o)}},init:function(t){return t=r.extend(!0,{},e,t),r.isFunction(this)?null==t?void r.error(l+": Uncorrect parameters"):""!=t.url?(t.type="ajax",i.initEl(r("<div />"),t)):""!=t.content?(t.type="html",i.initEl(r(t.content),t)):void r.error(l+': Set parameter "url" or "content"'):this.each(function(){i.initEl(r(this),r.extend(!0,{},t))})}},p={show:function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(l);if(e.overlay.block.hide(),e.container.block.hide(),r("BODY").append(e.overlay.block),r("BODY").append(e.container.block),e.container.block.css("zIndex",e.overlay.block.css("zIndex")),e.beforeOpen(e,t),t.trigger("beforeOpen."+l),"hidden"!=e.wrap.css("overflow-y")){e.wrap.data(l+"Overflow",e.wrap.css("overflow-y"));var o=e.wrap.outerWidth(!0);e.wrap.css("overflow-y","hidden");var n=e.wrap.outerWidth(!0);n!=o&&i.setWrapMarginRight(e,n-o)}return s.not(t).each(function(){r(this).data(l).overlay.block.hide()}),e.body.css("verticalAlign",e.verticalAlign),e.body.parent().css("width",e.width),i.transition(e.overlay.block,"show",1<s.length?{type:"none"}:e.openEffect),i.transition(e.container.block,"show",1<s.length?{type:"none"}:e.openEffect,function(){e.afterOpen(e,t),t.trigger("afterOpen."+l)}),t}r.error(l+": Uncorrect call")},close:function(){if(!r.isFunction(this))return this.each(function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(l);!1!==e.beforeClose(e,t)&&(t.trigger("beforeClose."+l),s.not(t).last().each(function(){r(this).data(l).overlay.block.show()}),i.transition(e.overlay.block,"hide",1<s.length?{type:"none"}:e.closeEffect),i.transition(e.container.block,"hide",1<s.length?{type:"none"}:e.closeEffect,function(){e.afterClose(e,t),t.trigger("afterClose."+l),e.clone||r("#"+l+"Reserve"+e.modalID).replaceWith(e.body.find(">*")),e.overlay.block.remove(),e.container.block.remove(),t.data(l,null),r("."+l+"-container").length||(e.wrap.data(l+"Overflow")&&e.wrap.css("overflow-y",e.wrap.data(l+"Overflow")),i.setWrapMarginRight(e,0))}),"ajax"==e.type&&e.ajaxRequest.abort(),s=s.not(t))}else r.error(l+": Uncorrect call")});s.each(function(){r(this)[l]("close")})},getActive:function(){var t=r("."+l+"-container").last();return!!t.length&&t.data(l+"ParentEl").data(l)},setDefault:function(t){r.extend(!0,e,t)}};r(function(){e.wrap=r(document.all&&!document.querySelector?"html":"body")}),r(document).bind("keyup."+l,function(t){var e=s.last();e.length&&e.data(l).closeOnEsc&&27===t.keyCode&&e[l]("close")}),r[l]=r.fn[l]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void r.error(l+": Method "+t+" does not exist"):i.init.apply(this,arguments)}}(jQuery),function(n){var i="lwptocAjaxForm",e={afterInit:n.noop,beforeSend:n.noop,success:n.noop,error:function(){alert("Failed to execute the query. Reload the page and try again.")},b:{}},a={isForm:function(t){return"form"==t.get(0).tagName.toLowerCase()},makeData:function(t){return a.isForm(t)?t.serialize():(e=t.clone().wrap("<form/>"),t.find("select").each(function(t){e.find("select").eq(t).val(n(this).val())}),e.serialize());var e},submit:function(t,e){n.ajax({type:"POST",cache:!1,data:a.makeData(t),url:a.isForm(t)?t.attr("action"):t.data("action"),beforeSend:function(){e.beforeSend(e,t)},success:function(t){e.b.container.html(t),e.success(e)},error:function(){e.error(e,t)}})},initContainer:function(t,e){var o=t.data(i);o||(o=e,t.data(i,o),(o.b.container=t).on("submit","[data-ajax-form]",function(){return a.submit(n(this),o),!1}),o.afterInit(o))},init:function(t){return t=n.extend(!0,{},e,t),n.isFunction(this)?(n.error(i+": Uncorrect call"),!1):this.each(function(){a.initContainer(n(this),n.extend(!0,{},t))})}},o={setDefault:function(t){n.extend(!0,e,t)}};n[i]=n.fn[i]=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?(n.error(i+": Method "+t+" does not exist"),!1):a.init.apply(this,arguments)}}(jQuery),function(d){d.lwptocModal("setDefault",{preloader:{tpl:'<div class="lwptocLightSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>'},overlay:{css:{zIndex:999999}}}),d(function(){var t=d(".js-lwptocSmoothScrollCheckbox");if(t.length){var e=d(".js-lwptocSmoothScrollIOffsetInput").closest("TR");t.change(function(){t.prop("checked")?e.show():e.hide()}).change()}var o=d(".js-lwptocToggleCheckbox");if(o.length){var n=d(".js-lwptocToggleEl").closest("TR");o.change(function(){o.prop("checked")?n.show():n.hide()}).change()}var i=d(".js-lwptocAutoInsertEnableCheckbox");if(i.length){var a=d(".js-lwptocAutoInsertEl").closest("TR");i.change(function(){i.prop("checked")?a.show():a.hide()}).change()}var c=d(".js-lwptocNumerationSelect");if(c.length){var r=d(".js-lwptocNumerationSuffixSelect").closest("TR");c.change(function(){"none"==c.val()?r.hide():r.show()}).change()}var l=d(".lwptoc_colorPicker");l.length&&l.wpColorPicker()}),d.lwptocCustomize={extraData:{},init:function(e,o){n.init(e.find(".lwptocWidthField")),i.init(e.find(".lwptocFontSizeField")),e.find(".lwptoc_colorPicker").wpColorPicker(),e.on("click",".lwptocCustomize_field_override",function(){var t=d(this).closest(".lwptocCustomize_field");t.removeClass("lwptocCustomize_field-default"),t.find("INPUT[type=text]").focus(),t.find(".lwptocCustomize_field_inputDefault").val(0)}),e.on("click",".lwptocCustomize_field_default",function(){var t=d(this).closest(".lwptocCustomize_field");t.addClass("lwptocCustomize_field-default"),t.find(".lwptocCustomize_field_inputDefault").val(1)}),e.on("click",".lwptocCustomize_tab",function(){e.find(".lwptocCustomize_tab-active").removeClass("lwptocCustomize_tab-active"),d(this).addClass("lwptocCustomize_tab-active"),e.find(".lwptocCustomize_fields").hide(),e.find(".lwptocCustomize_fields-"+d(this).data("tab")).show()}),e.lwptocAjaxForm({beforeSend:function(){e.lwptocPreloaderShow()},success:function(t){e.lwptocPreloaderHide(),o()}})},show:function(t,e){t._ajax_nonce=lwptocMain.nonce,t.extra=d.lwptocCustomize.extraData,d.lwptocModal({url:lwptocMain.ajaxUrl,closeOnOverlayClick:!1,verticalAlign:"top",ajax:{data:t},afterLoadingOnShow:function(t){d.lwptocCustomize.init(t.body.find(".lwptocCustomize"),function(){t.body.lwptocModal("close")})},afterClose:e})}};var o={reload:function(t){var e=d(t);o.$container.replaceWith(e),o.init(e)},setEnabled:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_enabled",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},setProcessing:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_processing",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},init:function(){o.$container=d(".lwptocMetabox"),o.$container.length&&(o.$container.find(".lwptocMetabox_disable").click(function(){o.setEnabled(!1)}),o.$container.find(".lwptocMetabox_enable").click(function(){o.setEnabled(!0)}),o.$container.find(".lwptocMetabox_disableProcessing").click(function(){o.setProcessing(!1)}),o.$container.find(".lwptocMetabox_enableProcessing").click(function(){o.setProcessing(!0)}),o.$container.find(".lwptocMetabox_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_metabox_customize",postId:o.$container.data("postId")},d.noop)}),d(document).on("lwptocMetaboxCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),o.reload(e.metabox)}))}};d(function(){o.init()});var e={oneInited:!1,oneInit:function(){d(document).on("lwptocWidgetCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),d(".lwptocWidget-"+e.id+" .lwptocWidget_override").html(e.override),d(".lwptocWidget-"+e.id+" .lwptocWidget_input").val(e.value).change()})},init:function(){d(".lwptocWidget").each(function(){var t=d(this);t.data("inited")||(t.find(".lwptocWidget_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_widget_customize",value:t.find(".lwptocWidget_input").val(),widgetId:t.data("id")},d.noop)}),t.data("inited",1),e.oneInited||e.oneInit())})}};d.lwptocWidget=e;var n={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocWidthField_typeInput"),t.$sizeInput=t.$container.find(".lwptocWidthField_sizeInput"),t.$unitInput=t.$container.find(".lwptocWidthField_unitInput"),t.$input=t.$container.find(".lwptocWidthField_input"),t.$custom=t.$container.find(".lwptocWidthField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){n.update(t)})})}};d(function(){n.init(d(".lwptocWidthField"))});var i={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocFontSizeField_typeInput"),t.$sizeInput=t.$container.find(".lwptocFontSizeField_sizeInput"),t.$unitInput=t.$container.find(".lwptocFontSizeField_unitInput"),t.$input=t.$container.find(".lwptocFontSizeField_input"),t.$custom=t.$container.find(".lwptocFontSizeField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){i.update(t)})})}};d(function(){i.init(d(".lwptocFontSizeField"))}),d(function(){var t=d(".lwptocRate");t.length&&t.on("click",".button",function(){d.ajax({url:lwptocMain.ajaxUrl,method:"POST",data:{action:d(this).data("action")},beforeSend:function(){t.lwptocPreloaderShow()},success:function(){t.remove()}})})})}(jQuery);
1
+ !function(e,t){var o="lwptocPreloader";e.fn[o+"Show"]=function(){var t=e(this);t.addClass(o+"Wrapper"),t.append('<div class="'+o+'Overlay"><div class="lwptocDarkSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>')},e.fn[o+"Hide"]=function(){var t=e(this);t.removeClass(o+"Wrapper"),t.find("."+o+"Overlay").remove()}}(jQuery),function(r,t){var l="lwptocModal",e={type:"html",content:"",url:"",ajax:{},ajaxRequest:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="'+l+'-overlay"></div>',css:{backgroundColor:"#000",opacity:.6,zIndex:1e5}},container:{block:void 0,tpl:'<div class="'+l+'-container"><div class="'+l+'-container_i"><div class="'+l+'-container_i2"></div></div></div>'},preloader:{verticalAlign:void 0,tpl:'<div class="'+l+'-preloader" />'},wrap:void 0,body:void 0,errors:{tpl:'<div class="'+l+"-error "+l+'-close"></div>',autocloseDelay:2e3,ajaxUnsuccessfulLoad:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},width:"auto",verticalAlign:"middle",beforeOpen:r.noop,afterOpen:r.noop,beforeClose:r.noop,afterClose:r.noop,afterLoading:r.noop,afterLoadingOnShow:r.noop,errorLoading:r.noop},d=0,s=r([]),u=function(t,e){var o=!0;return r(t).each(function(){r(e.target).get(0)==r(this).get(0)&&(o=!1),0==r(e.target).closest("HTML",r(this).get(0)).length&&(o=!1)}),o},i={getParentEl:function(t){var e=r(t);return e.data(l)?e:(e=r(t).closest("."+l+"-container").data(l+"ParentEl"))||!1},transition:function(t,e,o,n){switch(n=null==n?r.noop:n,o.type){case"fade":"show"==e?t.fadeIn(o.speed,n):t.fadeOut(o.speed,n);break;case"none":"show"==e?t.show():t.hide(),n()}},setWrapMarginRight:function(t,e){t.wrap.css("marginRight",e+"px"),r(document).trigger(l+"_setWrapMarginRight",e)},initEl:function(e,t){var o=e.data(l);if(!o){if(d++,(o=t).modalID=d,o.overlay.block=r(o.overlay.tpl),o.overlay.block.css(o.overlay.css),o.container.block=r(o.container.tpl),o.body=r("."+l+"-container_i2",o.container.block),t.clone?o.body.html(e.clone(!0)):(e.before('<div id="'+l+"Reserve"+o.modalID+'" style="display: none" />'),o.body.html(e)),o.body.on("click","."+l+"-close",function(){return e[l]("close"),!1}),o.closeOnOverlayClick&&o.overlay.block.add(o.container.block).click(function(t){u(r(">*",o.body),t)&&e[l]("close")}),o.container.block.data(l+"ParentEl",e),e.data(l,o),s=r.merge(s,e),r.proxy(p.show,e)(),"html"==o.type)return e;if(null!=o.ajax.beforeSend){var n=o.ajax.beforeSend;delete o.ajax.beforeSend}if(null!=o.ajax.success){var i=o.ajax.success;delete o.ajax.success}if(null!=o.ajax.error){var a=o.ajax.error;delete o.ajax.error}var c=r.extend(!0,{url:o.url,beforeSend:function(){o.body.html(o.preloader.tpl).css("verticalAlign",void 0===o.preloader.verticalAlign?o.verticalAlign:o.preloader.verticalAlign),void 0!==n&&n(o,e)},success:function(t){e.trigger("afterLoading."+l),t=o.afterLoading(o,e,t)||t,o.body.css("verticalAlign",o.verticalAlign),null==i?o.body.html(t):i(o,e,t),e.trigger("afterLoadingOnShow."+l),o.afterLoadingOnShow(o,e,t)},error:function(){e.trigger("errorLoading."+l),o.errorLoading(o,e),null==a?(o.body.html(o.errors.tpl),r("."+l+"-error",o.body).html(o.errors.ajaxUnsuccessfulLoad),r("."+l+"-close",o.body).click(function(){return e[l]("close"),!1}),o.errors.autocloseDelay&&setTimeout(function(){e[l]("close")},o.errors.autocloseDelay)):a(o,e)}},o.ajax);o.ajaxRequest=r.ajax(c),e.data(l,o)}},init:function(t){return t=r.extend(!0,{},e,t),r.isFunction(this)?null==t?void r.error(l+": Uncorrect parameters"):""!=t.url?(t.type="ajax",i.initEl(r("<div />"),t)):""!=t.content?(t.type="html",i.initEl(r(t.content),t)):void r.error(l+': Set parameter "url" or "content"'):this.each(function(){i.initEl(r(this),r.extend(!0,{},t))})}},p={show:function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(l);if(e.overlay.block.hide(),e.container.block.hide(),r("BODY").append(e.overlay.block),r("BODY").append(e.container.block),e.container.block.css("zIndex",e.overlay.block.css("zIndex")),e.beforeOpen(e,t),t.trigger("beforeOpen."+l),"hidden"!=e.wrap.css("overflow-y")){e.wrap.data(l+"Overflow",e.wrap.css("overflow-y"));var o=e.wrap.outerWidth(!0);e.wrap.css("overflow-y","hidden");var n=e.wrap.outerWidth(!0);n!=o&&i.setWrapMarginRight(e,n-o)}return s.not(t).each(function(){r(this).data(l).overlay.block.hide()}),e.body.css("verticalAlign",e.verticalAlign),e.body.parent().css("width",e.width),i.transition(e.overlay.block,"show",1<s.length?{type:"none"}:e.openEffect),i.transition(e.container.block,"show",1<s.length?{type:"none"}:e.openEffect,function(){e.afterOpen(e,t),t.trigger("afterOpen."+l)}),t}r.error(l+": Uncorrect call")},close:function(){if(!r.isFunction(this))return this.each(function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(l);!1!==e.beforeClose(e,t)&&(t.trigger("beforeClose."+l),s.not(t).last().each(function(){r(this).data(l).overlay.block.show()}),i.transition(e.overlay.block,"hide",1<s.length?{type:"none"}:e.closeEffect),i.transition(e.container.block,"hide",1<s.length?{type:"none"}:e.closeEffect,function(){e.afterClose(e,t),t.trigger("afterClose."+l),e.clone||r("#"+l+"Reserve"+e.modalID).replaceWith(e.body.find(">*")),e.overlay.block.remove(),e.container.block.remove(),t.data(l,null),r("."+l+"-container").length||(e.wrap.data(l+"Overflow")&&e.wrap.css("overflow-y",e.wrap.data(l+"Overflow")),i.setWrapMarginRight(e,0))}),"ajax"==e.type&&e.ajaxRequest.abort(),s=s.not(t))}else r.error(l+": Uncorrect call")});s.each(function(){r(this)[l]("close")})},getActive:function(){var t=r("."+l+"-container").last();return!!t.length&&t.data(l+"ParentEl").data(l)},setDefault:function(t){r.extend(!0,e,t)}};r(function(){e.wrap=r(document.all&&!document.querySelector?"html":"body")}),r(document).bind("keyup."+l,function(t){var e=s.last();e.length&&(e.data(l).closeOnEsc&&27===t.keyCode&&e[l]("close"))}),r[l]=r.fn[l]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void r.error(l+": Method "+t+" does not exist"):i.init.apply(this,arguments)}}(jQuery),function(n,t){var i="lwptocAjaxForm",e={afterInit:n.noop,beforeSend:n.noop,success:n.noop,error:function(){alert("Failed to execute the query. Reload the page and try again.")},b:{}},a={isForm:function(t){return"form"==t.get(0).tagName.toLowerCase()},makeData:function(t){return a.isForm(t)?t.serialize():(e=t.clone().wrap("<form/>"),t.find("select").each(function(t){e.find("select").eq(t).val(n(this).val())}),e.serialize());var e},submit:function(t,e){n.ajax({type:"POST",cache:!1,data:a.makeData(t),url:a.isForm(t)?t.attr("action"):t.data("action"),beforeSend:function(){e.beforeSend(e,t)},success:function(t){e.b.container.html(t),e.success(e)},error:function(){e.error(e,t)}})},initContainer:function(t,e){var o=t.data(i);o||(o=e,t.data(i,o),(o.b.container=t).on("submit","[data-ajax-form]",function(){return a.submit(n(this),o),!1}),o.afterInit(o))},init:function(t){return t=n.extend(!0,{},e,t),n.isFunction(this)?(n.error(i+": Uncorrect call"),!1):this.each(function(){a.initContainer(n(this),n.extend(!0,{},t))})}},o={setDefault:function(t){n.extend(!0,e,t)}};n[i]=n.fn[i]=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?(n.error(i+": Method "+t+" does not exist"),!1):a.init.apply(this,arguments)}}(jQuery),function(d){d.lwptocModal("setDefault",{preloader:{tpl:'<div class="lwptocLightSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>'},overlay:{css:{zIndex:999999}}}),d(function(){var t=d(".js-lwptocSmoothScrollCheckbox");if(t.length){var e=d(".js-lwptocSmoothScrollIOffsetInput").closest("TR");t.change(function(){t.prop("checked")?e.show():e.hide()}).change()}var o=d(".js-lwptocToggleCheckbox");if(o.length){var n=d(".js-lwptocToggleEl").closest("TR");o.change(function(){o.prop("checked")?n.show():n.hide()}).change()}var i=d(".js-lwptocAutoInsertEnableCheckbox");if(i.length){var a=d(".js-lwptocAutoInsertEl").closest("TR");i.change(function(){i.prop("checked")?a.show():a.hide()}).change()}var c=d(".js-lwptocNumerationSelect");if(c.length){var r=d(".js-lwptocNumerationSuffixSelect").closest("TR");c.change(function(){"none"==c.val()?r.hide():r.show()}).change()}var l=d(".lwptoc_colorPicker");l.length&&l.wpColorPicker()}),d.lwptocCustomize={extraData:{},init:function(e,o){n.init(e.find(".lwptocWidthField")),i.init(e.find(".lwptocFontSizeField")),e.find(".lwptoc_colorPicker").wpColorPicker(),e.on("click",".lwptocCustomize_field_override",function(){var t=d(this).closest(".lwptocCustomize_field");t.removeClass("lwptocCustomize_field-default"),t.find("INPUT[type=text]").focus(),t.find(".lwptocCustomize_field_inputDefault").val(0)}),e.on("click",".lwptocCustomize_field_default",function(){var t=d(this).closest(".lwptocCustomize_field");t.addClass("lwptocCustomize_field-default"),t.find(".lwptocCustomize_field_inputDefault").val(1)}),e.on("click",".lwptocCustomize_tab",function(){e.find(".lwptocCustomize_tab-active").removeClass("lwptocCustomize_tab-active"),d(this).addClass("lwptocCustomize_tab-active"),e.find(".lwptocCustomize_fields").hide(),e.find(".lwptocCustomize_fields-"+d(this).data("tab")).show()}),e.lwptocAjaxForm({beforeSend:function(){e.lwptocPreloaderShow()},success:function(t){e.lwptocPreloaderHide(),o()}})},show:function(t,e){t._ajax_nonce=lwptocMain.nonce,t.extra=d.lwptocCustomize.extraData,d.lwptocModal({url:lwptocMain.ajaxUrl,closeOnOverlayClick:!1,verticalAlign:"top",ajax:{data:t},afterLoadingOnShow:function(t){d.lwptocCustomize.init(t.body.find(".lwptocCustomize"),function(){t.body.lwptocModal("close")})},afterClose:e})}};var o={reload:function(t){var e=d(t);o.$container.replaceWith(e),o.init(e)},setEnabled:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_enabled",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},setProcessing:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_processing",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},init:function(){o.$container=d(".lwptocMetabox"),o.$container.length&&(o.$container.find(".lwptocMetabox_disable").click(function(){o.setEnabled(!1)}),o.$container.find(".lwptocMetabox_enable").click(function(){o.setEnabled(!0)}),o.$container.find(".lwptocMetabox_disableProcessing").click(function(){o.setProcessing(!1)}),o.$container.find(".lwptocMetabox_enableProcessing").click(function(){o.setProcessing(!0)}),o.$container.find(".lwptocMetabox_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_metabox_customize",postId:o.$container.data("postId")},d.noop)}),d(document).on("lwptocMetaboxCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),o.reload(e.metabox)}))}};d(function(){o.init()});var e={oneInited:!1,oneInit:function(){d(document).on("lwptocWidgetCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),d(".lwptocWidget-"+e.id+" .lwptocWidget_override").html(e.override),d(".lwptocWidget-"+e.id+" .lwptocWidget_input").val(e.value).change()})},init:function(){d(".lwptocWidget").each(function(){var t=d(this);t.data("inited")||(t.find(".lwptocWidget_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_widget_customize",value:t.find(".lwptocWidget_input").val(),widgetId:t.data("id")},d.noop)}),t.data("inited",1),e.oneInited||e.oneInit())})}};d.lwptocWidget=e;var n={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocWidthField_typeInput"),t.$sizeInput=t.$container.find(".lwptocWidthField_sizeInput"),t.$unitInput=t.$container.find(".lwptocWidthField_unitInput"),t.$input=t.$container.find(".lwptocWidthField_input"),t.$custom=t.$container.find(".lwptocWidthField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){n.update(t)})})}};d(function(){n.init(d(".lwptocWidthField"))});var i={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocFontSizeField_typeInput"),t.$sizeInput=t.$container.find(".lwptocFontSizeField_sizeInput"),t.$unitInput=t.$container.find(".lwptocFontSizeField_unitInput"),t.$input=t.$container.find(".lwptocFontSizeField_input"),t.$custom=t.$container.find(".lwptocFontSizeField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){i.update(t)})})}};d(function(){i.init(d(".lwptocFontSizeField"))}),d(function(){var t=d(".lwptocRate");t.length&&t.on("click",".button",function(){d.ajax({url:lwptocMain.ajaxUrl,method:"POST",data:{action:d(this).data("action")},beforeSend:function(){t.lwptocPreloaderShow()},success:function(){t.remove()}})})})}(jQuery);
admin/forms/CustomizeForm.php CHANGED
@@ -98,6 +98,9 @@ class CustomizeForm extends Model
98
  public $defaultSkipHeadingText;
99
  public $skipHeadingText;
100
 
 
 
 
101
  /**
102
  * @var PostSettings|null
103
  */
@@ -142,6 +145,7 @@ class CustomizeForm extends Model
142
  'useNofollow',
143
  'skipHeadingLevel',
144
  'skipHeadingText',
 
145
  ];
146
 
147
  /**
@@ -229,6 +233,7 @@ class CustomizeForm extends Model
229
  return Core::$plugin->skipHeadingTextMultipleStringToString((string)$value);
230
  }
231
  ],
 
232
  ];
233
  }
234
 
@@ -303,6 +308,7 @@ class CustomizeForm extends Model
303
  'useNofollow' => $this->defaultUseNofollow ? null : (bool)$this->useNofollow,
304
  'skipHeadingLevel' => $this->defaultSkipHeadingLevel ? null : $this->skipHeadingLevel,
305
  'skipHeadingText' => $this->defaultSkipHeadingText ? null : $this->skipHeadingText,
 
306
  ];
307
  }
308
  }
98
  public $defaultSkipHeadingText;
99
  public $skipHeadingText;
100
 
101
+ public $defaultContainerClass;
102
+ public $containerClass;
103
+
104
  /**
105
  * @var PostSettings|null
106
  */
145
  'useNofollow',
146
  'skipHeadingLevel',
147
  'skipHeadingText',
148
+ 'containerClass',
149
  ];
150
 
151
  /**
233
  return Core::$plugin->skipHeadingTextMultipleStringToString((string)$value);
234
  }
235
  ],
236
+ ['containerClass', 'filter', 'filter' => 'trim'],
237
  ];
238
  }
239
 
308
  'useNofollow' => $this->defaultUseNofollow ? null : (bool)$this->useNofollow,
309
  'skipHeadingLevel' => $this->defaultSkipHeadingLevel ? null : $this->skipHeadingLevel,
310
  'skipHeadingText' => $this->defaultSkipHeadingText ? null : $this->skipHeadingText,
311
+ 'containerClass' => $this->defaultContainerClass ? null : $this->containerClass,
312
  ];
313
  }
314
  }
admin/widgets/customizeModal/views/modal.php CHANGED
@@ -16,7 +16,8 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
16
  use luckywp\tableOfContents\core\Core;
17
  use luckywp\tableOfContents\core\helpers\Html;
18
 
19
- $clickToOverrideDefaultValue = esc_html__('Click to override default value', 'luckywp-table-of-contents');
 
20
 
21
  echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
22
  ?>
@@ -51,10 +52,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
51
  <div class="lwptocCustomize_field<?= $model->defaultPosition ? ' lwptocCustomize_field-default' : '' ?>">
52
  <div class="lwptocCustomize_field_header">
53
  <span class="lwptocCustomize_field_label"><?= __('Position', 'luckywp-table-of-contents') ?></span>
54
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
55
  </div>
56
  <div class="lwptocCustomize_field_override">
57
- <?= $clickToOverrideDefaultValue ?>
58
  </div>
59
  <div class="lwptocCustomize_field_el">
60
  <?= Html::dropDownList(Html::getInputName($model, 'position'), $model->defaultPosition ? Core::$plugin->settings->autoInsertPosition : $model->position, Core::$plugin->positionsList, [
@@ -74,10 +75,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
74
  <div class="lwptocCustomize_field<?= $model->defaultMin ? ' lwptocCustomize_field-default' : '' ?>">
75
  <div class="lwptocCustomize_field_header">
76
  <span class="lwptocCustomize_field_label"><?= __('Minimal Count of Headings', 'luckywp-table-of-contents') ?></span>
77
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
78
  </div>
79
  <div class="lwptocCustomize_field_override">
80
- <?= $clickToOverrideDefaultValue ?>
81
  </div>
82
  <div class="lwptocCustomize_field_el">
83
  <?= Html::textInput(Html::getInputName($model, 'min'), $model->defaultMin ? $defaultValue : $model->min, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -97,10 +98,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
97
  <div class="lwptocCustomize_field<?= $model->defaultDepth ? ' lwptocCustomize_field-default' : '' ?>">
98
  <div class="lwptocCustomize_field_header">
99
  <span class="lwptocCustomize_field_label"><?= __('Depth', 'luckywp-table-of-contents') ?></span>
100
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
101
  </div>
102
  <div class="lwptocCustomize_field_override">
103
- <?= $clickToOverrideDefaultValue ?>
104
  </div>
105
  <div class="lwptocCustomize_field_el">
106
  <?= Html::dropDownList(Html::getInputName($model, 'depth'), $model->defaultDepth ? $defaultValue : $model->depth, Core::$plugin->depthsList, [
@@ -119,10 +120,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
119
  <div class="lwptocCustomize_field<?= $model->defaultHierarchical ? ' lwptocCustomize_field-default' : '' ?>">
120
  <div class="lwptocCustomize_field_header">
121
  <span class="lwptocCustomize_field_label"><?= __('Hierarchical View', 'luckywp-table-of-contents') ?></span>
122
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
123
  </div>
124
  <div class="lwptocCustomize_field_override">
125
- <?= $clickToOverrideDefaultValue ?>
126
  </div>
127
  <div class="lwptocCustomize_field_el">
128
  <label>
@@ -142,10 +143,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
142
  <div class="lwptocCustomize_field<?= $model->defaultNumeration ? ' lwptocCustomize_field-default' : '' ?>">
143
  <div class="lwptocCustomize_field_header">
144
  <span class="lwptocCustomize_field_label"><?= __('Numeration', 'luckywp-table-of-contents') ?></span>
145
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
146
  </div>
147
  <div class="lwptocCustomize_field_override">
148
- <?= $clickToOverrideDefaultValue ?>
149
  </div>
150
  <div class="lwptocCustomize_field_el">
151
  <?= Html::dropDownList(Html::getInputName($model, 'numeration'), $model->defaultNumeration ? $defaultValue : $model->numeration, Core::$plugin->numerationsList, [
@@ -164,10 +165,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
164
  <div class="lwptocCustomize_field<?= $model->defaultNumerationSuffix ? ' lwptocCustomize_field-default' : '' ?>">
165
  <div class="lwptocCustomize_field_header">
166
  <span class="lwptocCustomize_field_label"><?= __('Numeration Suffix', 'luckywp-table-of-contents') ?></span>
167
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
168
  </div>
169
  <div class="lwptocCustomize_field_override">
170
- <?= $clickToOverrideDefaultValue ?>
171
  </div>
172
  <div class="lwptocCustomize_field_el">
173
  <?= Html::dropDownList(Html::getInputName($model, 'numerationSuffix'), $model->defaultNumerationSuffix ? $defaultValue : $model->numerationSuffix, Core::$plugin->getNumerationSuffixsList(), [
@@ -186,10 +187,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
186
  <div class="lwptocCustomize_field<?= $model->defaultTitle ? ' lwptocCustomize_field-default' : '' ?>">
187
  <div class="lwptocCustomize_field_header">
188
  <span class="lwptocCustomize_field_label"><?= __('Title', 'luckywp-table-of-contents') ?></span>
189
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
190
  </div>
191
  <div class="lwptocCustomize_field_override">
192
- <?= $clickToOverrideDefaultValue ?>
193
  </div>
194
  <div class="lwptocCustomize_field_el">
195
  <?= Html::textInput(Html::getInputName($model, 'title'), $model->defaultTitle ? $defaultValue : $model->title, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -212,10 +213,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
212
  <div class="lwptocCustomize_field<?= $model->defaultToggle ? ' lwptocCustomize_field-default' : '' ?>">
213
  <div class="lwptocCustomize_field_header">
214
  <span class="lwptocCustomize_field_label"><?= __('Toggle Show/Hide', 'luckywp-table-of-contents') ?></span>
215
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
216
  </div>
217
  <div class="lwptocCustomize_field_override">
218
- <?= $clickToOverrideDefaultValue ?>
219
  </div>
220
  <div class="lwptocCustomize_field_el">
221
  <label>
@@ -235,10 +236,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
235
  <div class="lwptocCustomize_field<?= $model->defaultLabelShow ? ' lwptocCustomize_field-default' : '' ?>">
236
  <div class="lwptocCustomize_field_header">
237
  <span class="lwptocCustomize_field_label"><?= __('Label Show', 'luckywp-table-of-contents') ?></span>
238
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
239
  </div>
240
  <div class="lwptocCustomize_field_override">
241
- <?= $clickToOverrideDefaultValue ?>
242
  </div>
243
  <div class="lwptocCustomize_field_el">
244
  <?= Html::textInput(Html::getInputName($model, 'labelShow'), $model->defaultLabelShow ? $defaultValue : $model->labelShow, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -255,10 +256,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
255
  <div class="lwptocCustomize_field<?= $model->defaultLabelHide ? ' lwptocCustomize_field-default' : '' ?>">
256
  <div class="lwptocCustomize_field_header">
257
  <span class="lwptocCustomize_field_label"><?= __('Label Hide', 'luckywp-table-of-contents') ?></span>
258
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
259
  </div>
260
  <div class="lwptocCustomize_field_override">
261
- <?= $clickToOverrideDefaultValue ?>
262
  </div>
263
  <div class="lwptocCustomize_field_el">
264
  <?= Html::textInput(Html::getInputName($model, 'labelHide'), $model->defaultLabelHide ? $defaultValue : $model->labelHide, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -275,10 +276,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
275
  <div class="lwptocCustomize_field<?= $model->defaultHideItems ? ' lwptocCustomize_field-default' : '' ?>">
276
  <div class="lwptocCustomize_field_header">
277
  <span class="lwptocCustomize_field_label"><?= __('By default, items of contents will be hidden', 'luckywp-table-of-contents') ?></span>
278
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
279
  </div>
280
  <div class="lwptocCustomize_field_override">
281
- <?= $clickToOverrideDefaultValue ?>
282
  </div>
283
  <div class="lwptocCustomize_field_el">
284
  <label>
@@ -298,10 +299,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
298
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScroll ? ' lwptocCustomize_field-default' : '' ?>">
299
  <div class="lwptocCustomize_field_header">
300
  <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll', 'luckywp-table-of-contents') ?></span>
301
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
302
  </div>
303
  <div class="lwptocCustomize_field_override">
304
- <?= $clickToOverrideDefaultValue ?>
305
  </div>
306
  <div class="lwptocCustomize_field_el">
307
  <label>
@@ -321,10 +322,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
321
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScrollOffset ? ' lwptocCustomize_field-default' : '' ?>">
322
  <div class="lwptocCustomize_field_header">
323
  <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll Offset Top', 'luckywp-table-of-contents') ?></span>
324
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
325
  </div>
326
  <div class="lwptocCustomize_field_override">
327
- <?= $clickToOverrideDefaultValue ?>
328
  </div>
329
  <div class="lwptocCustomize_field_el">
330
  <?= Html::textInput(Html::getInputName($model, 'smoothScrollOffset'), $model->defaultSmoothScrollOffset ? $defaultValue : $model->smoothScrollOffset, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -345,10 +346,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
345
  <div class="lwptocCustomize_field<?= $model->defaultWidth ? ' lwptocCustomize_field-default' : '' ?>">
346
  <div class="lwptocCustomize_field_header">
347
  <span class="lwptocCustomize_field_label"><?= esc_html__('Width', 'luckywp-table-of-contents') ?></span>
348
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
349
  </div>
350
  <div class="lwptocCustomize_field_override">
351
- <?= $clickToOverrideDefaultValue ?>
352
  </div>
353
  <div class="lwptocCustomize_field_el">
354
  <?= WidthField::widget([
@@ -368,10 +369,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
368
  <div class="lwptocCustomize_field<?= $model->defaultFloat ? ' lwptocCustomize_field-default' : '' ?>">
369
  <div class="lwptocCustomize_field_header">
370
  <span class="lwptocCustomize_field_label"><?= esc_html__('Float', 'luckywp-table-of-contents') ?></span>
371
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
372
  </div>
373
  <div class="lwptocCustomize_field_override">
374
- <?= $clickToOverrideDefaultValue ?>
375
  </div>
376
  <div class="lwptocCustomize_field_el">
377
  <?= Html::dropDownList(Html::getInputName($model, 'float'), $model->defaultFloat ? $defaultValue : $model->float, Core::$plugin->floatsList, [
@@ -390,10 +391,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
390
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontSize ? ' lwptocCustomize_field-default' : '' ?>">
391
  <div class="lwptocCustomize_field_header">
392
  <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Size', 'luckywp-table-of-contents') ?></span>
393
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
394
  </div>
395
  <div class="lwptocCustomize_field_override">
396
- <?= $clickToOverrideDefaultValue ?>
397
  </div>
398
  <div class="lwptocCustomize_field_el">
399
  <?= FontSizeField::widget([
@@ -414,10 +415,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
414
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontWeight ? ' lwptocCustomize_field-default' : '' ?>">
415
  <div class="lwptocCustomize_field_header">
416
  <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Weight', 'luckywp-table-of-contents') ?></span>
417
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
418
  </div>
419
  <div class="lwptocCustomize_field_override">
420
- <?= $clickToOverrideDefaultValue ?>
421
  </div>
422
  <div class="lwptocCustomize_field_el">
423
  <?= Html::dropDownList(Html::getInputName($model, 'titleFontWeight'), $model->defaultTitleFontWeight ? $defaultValue : $model->titleFontWeight, Core::$plugin->fontWeightsList, [
@@ -436,10 +437,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
436
  <div class="lwptocCustomize_field<?= $model->defaultItemsFontSize ? ' lwptocCustomize_field-default' : '' ?>">
437
  <div class="lwptocCustomize_field_header">
438
  <span class="lwptocCustomize_field_label"><?= esc_html__('Items Font Size', 'luckywp-table-of-contents') ?></span>
439
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
440
  </div>
441
  <div class="lwptocCustomize_field_override">
442
- <?= $clickToOverrideDefaultValue ?>
443
  </div>
444
  <div class="lwptocCustomize_field_el">
445
  <?= FontSizeField::widget([
@@ -460,10 +461,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
460
  <div class="lwptocCustomize_field<?= $model->defaultColorScheme ? ' lwptocCustomize_field-default' : '' ?>">
461
  <div class="lwptocCustomize_field_header">
462
  <span class="lwptocCustomize_field_label"><?= esc_html__('Color Scheme', 'luckywp-table-of-contents') ?></span>
463
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
464
  </div>
465
  <div class="lwptocCustomize_field_override">
466
- <?= $clickToOverrideDefaultValue ?>
467
  </div>
468
  <div class="lwptocCustomize_field_el">
469
  <?= Html::dropDownList(Html::getInputName($model, 'colorScheme'), $model->defaultColorScheme ? $defaultValue : $model->colorScheme, Core::$plugin->colorSchemesList, [
@@ -490,10 +491,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
490
  <div class="lwptocCustomize_field<?= $model->{'default' . ucfirst($var)} ? ' lwptocCustomize_field-default' : '' ?>">
491
  <div class="lwptocCustomize_field_header">
492
  <span class="lwptocCustomize_field_label"><?= esc_html__($label, 'luckywp-table-of-contents') ?></span>
493
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
494
  </div>
495
  <div class="lwptocCustomize_field_override">
496
- <?= $clickToOverrideDefaultValue ?>
497
  </div>
498
  <div class="lwptocCustomize_field_defaultValue">
499
  <?= OverrideColorBadge::widget(['color' => $defaultValue]) ?>
@@ -515,10 +516,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
515
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingLevel ? ' lwptocCustomize_field-default' : '' ?>">
516
  <div class="lwptocCustomize_field_header">
517
  <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by level', 'luckywp-table-of-contents') ?></span>
518
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
519
  </div>
520
  <div class="lwptocCustomize_field_override">
521
- <?= $clickToOverrideDefaultValue ?>
522
  </div>
523
  <div class="lwptocCustomize_field_el">
524
  <?= SkipHeadingLevelField::widget([
@@ -538,10 +539,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
538
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingText ? ' lwptocCustomize_field-default' : '' ?>">
539
  <div class="lwptocCustomize_field_header">
540
  <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by text', 'luckywp-table-of-contents') ?></span>
541
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
542
  </div>
543
  <div class="lwptocCustomize_field_override">
544
- <?= $clickToOverrideDefaultValue ?>
545
  </div>
546
  <div class="lwptocCustomize_field_el">
547
  <?php
@@ -583,10 +584,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
583
  esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
584
  '<code>&lt;!--noindex--&gt;</code>'
585
  ) ?></span>
586
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
587
  </div>
588
  <div class="lwptocCustomize_field_override">
589
- <?= $clickToOverrideDefaultValue ?>
590
  </div>
591
  <div class="lwptocCustomize_field_el">
592
  <label>
@@ -610,10 +611,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
610
  esc_html__('Use %s for links', 'luckywp-table-of-contents'),
611
  '<code>rel="nofollow"</code>'
612
  ) ?></span>
613
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
614
  </div>
615
  <div class="lwptocCustomize_field_override">
616
- <?= $clickToOverrideDefaultValue ?>
617
  </div>
618
  <div class="lwptocCustomize_field_el">
619
  <label>
@@ -629,6 +630,35 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
629
  </div>
630
  </div>
631
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
632
  </div>
633
 
634
  </div>
16
  use luckywp\tableOfContents\core\Core;
17
  use luckywp\tableOfContents\core\helpers\Html;
18
 
19
+ $labelClickToOverrideDefaultValue = esc_html__('Click to override default value', 'luckywp-table-of-contents');
20
+ $labelDefault = esc_html__('default', 'luckywp-table-of-contents');
21
 
22
  echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
23
  ?>
52
  <div class="lwptocCustomize_field<?= $model->defaultPosition ? ' lwptocCustomize_field-default' : '' ?>">
53
  <div class="lwptocCustomize_field_header">
54
  <span class="lwptocCustomize_field_label"><?= __('Position', 'luckywp-table-of-contents') ?></span>
55
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
56
  </div>
57
  <div class="lwptocCustomize_field_override">
58
+ <?= $labelClickToOverrideDefaultValue ?>
59
  </div>
60
  <div class="lwptocCustomize_field_el">
61
  <?= Html::dropDownList(Html::getInputName($model, 'position'), $model->defaultPosition ? Core::$plugin->settings->autoInsertPosition : $model->position, Core::$plugin->positionsList, [
75
  <div class="lwptocCustomize_field<?= $model->defaultMin ? ' lwptocCustomize_field-default' : '' ?>">
76
  <div class="lwptocCustomize_field_header">
77
  <span class="lwptocCustomize_field_label"><?= __('Minimal Count of Headings', 'luckywp-table-of-contents') ?></span>
78
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
79
  </div>
80
  <div class="lwptocCustomize_field_override">
81
+ <?= $labelClickToOverrideDefaultValue ?>
82
  </div>
83
  <div class="lwptocCustomize_field_el">
84
  <?= Html::textInput(Html::getInputName($model, 'min'), $model->defaultMin ? $defaultValue : $model->min, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
98
  <div class="lwptocCustomize_field<?= $model->defaultDepth ? ' lwptocCustomize_field-default' : '' ?>">
99
  <div class="lwptocCustomize_field_header">
100
  <span class="lwptocCustomize_field_label"><?= __('Depth', 'luckywp-table-of-contents') ?></span>
101
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
102
  </div>
103
  <div class="lwptocCustomize_field_override">
104
+ <?= $labelClickToOverrideDefaultValue ?>
105
  </div>
106
  <div class="lwptocCustomize_field_el">
107
  <?= Html::dropDownList(Html::getInputName($model, 'depth'), $model->defaultDepth ? $defaultValue : $model->depth, Core::$plugin->depthsList, [
120
  <div class="lwptocCustomize_field<?= $model->defaultHierarchical ? ' lwptocCustomize_field-default' : '' ?>">
121
  <div class="lwptocCustomize_field_header">
122
  <span class="lwptocCustomize_field_label"><?= __('Hierarchical View', 'luckywp-table-of-contents') ?></span>
123
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
124
  </div>
125
  <div class="lwptocCustomize_field_override">
126
+ <?= $labelClickToOverrideDefaultValue ?>
127
  </div>
128
  <div class="lwptocCustomize_field_el">
129
  <label>
143
  <div class="lwptocCustomize_field<?= $model->defaultNumeration ? ' lwptocCustomize_field-default' : '' ?>">
144
  <div class="lwptocCustomize_field_header">
145
  <span class="lwptocCustomize_field_label"><?= __('Numeration', 'luckywp-table-of-contents') ?></span>
146
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
147
  </div>
148
  <div class="lwptocCustomize_field_override">
149
+ <?= $labelClickToOverrideDefaultValue ?>
150
  </div>
151
  <div class="lwptocCustomize_field_el">
152
  <?= Html::dropDownList(Html::getInputName($model, 'numeration'), $model->defaultNumeration ? $defaultValue : $model->numeration, Core::$plugin->numerationsList, [
165
  <div class="lwptocCustomize_field<?= $model->defaultNumerationSuffix ? ' lwptocCustomize_field-default' : '' ?>">
166
  <div class="lwptocCustomize_field_header">
167
  <span class="lwptocCustomize_field_label"><?= __('Numeration Suffix', 'luckywp-table-of-contents') ?></span>
168
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
169
  </div>
170
  <div class="lwptocCustomize_field_override">
171
+ <?= $labelClickToOverrideDefaultValue ?>
172
  </div>
173
  <div class="lwptocCustomize_field_el">
174
  <?= Html::dropDownList(Html::getInputName($model, 'numerationSuffix'), $model->defaultNumerationSuffix ? $defaultValue : $model->numerationSuffix, Core::$plugin->getNumerationSuffixsList(), [
187
  <div class="lwptocCustomize_field<?= $model->defaultTitle ? ' lwptocCustomize_field-default' : '' ?>">
188
  <div class="lwptocCustomize_field_header">
189
  <span class="lwptocCustomize_field_label"><?= __('Title', 'luckywp-table-of-contents') ?></span>
190
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
191
  </div>
192
  <div class="lwptocCustomize_field_override">
193
+ <?= $labelClickToOverrideDefaultValue ?>
194
  </div>
195
  <div class="lwptocCustomize_field_el">
196
  <?= Html::textInput(Html::getInputName($model, 'title'), $model->defaultTitle ? $defaultValue : $model->title, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
213
  <div class="lwptocCustomize_field<?= $model->defaultToggle ? ' lwptocCustomize_field-default' : '' ?>">
214
  <div class="lwptocCustomize_field_header">
215
  <span class="lwptocCustomize_field_label"><?= __('Toggle Show/Hide', 'luckywp-table-of-contents') ?></span>
216
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
217
  </div>
218
  <div class="lwptocCustomize_field_override">
219
+ <?= $labelClickToOverrideDefaultValue ?>
220
  </div>
221
  <div class="lwptocCustomize_field_el">
222
  <label>
236
  <div class="lwptocCustomize_field<?= $model->defaultLabelShow ? ' lwptocCustomize_field-default' : '' ?>">
237
  <div class="lwptocCustomize_field_header">
238
  <span class="lwptocCustomize_field_label"><?= __('Label Show', 'luckywp-table-of-contents') ?></span>
239
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
240
  </div>
241
  <div class="lwptocCustomize_field_override">
242
+ <?= $labelClickToOverrideDefaultValue ?>
243
  </div>
244
  <div class="lwptocCustomize_field_el">
245
  <?= Html::textInput(Html::getInputName($model, 'labelShow'), $model->defaultLabelShow ? $defaultValue : $model->labelShow, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
256
  <div class="lwptocCustomize_field<?= $model->defaultLabelHide ? ' lwptocCustomize_field-default' : '' ?>">
257
  <div class="lwptocCustomize_field_header">
258
  <span class="lwptocCustomize_field_label"><?= __('Label Hide', 'luckywp-table-of-contents') ?></span>
259
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
260
  </div>
261
  <div class="lwptocCustomize_field_override">
262
+ <?= $labelClickToOverrideDefaultValue ?>
263
  </div>
264
  <div class="lwptocCustomize_field_el">
265
  <?= Html::textInput(Html::getInputName($model, 'labelHide'), $model->defaultLabelHide ? $defaultValue : $model->labelHide, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
276
  <div class="lwptocCustomize_field<?= $model->defaultHideItems ? ' lwptocCustomize_field-default' : '' ?>">
277
  <div class="lwptocCustomize_field_header">
278
  <span class="lwptocCustomize_field_label"><?= __('By default, items of contents will be hidden', 'luckywp-table-of-contents') ?></span>
279
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
280
  </div>
281
  <div class="lwptocCustomize_field_override">
282
+ <?= $labelClickToOverrideDefaultValue ?>
283
  </div>
284
  <div class="lwptocCustomize_field_el">
285
  <label>
299
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScroll ? ' lwptocCustomize_field-default' : '' ?>">
300
  <div class="lwptocCustomize_field_header">
301
  <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll', 'luckywp-table-of-contents') ?></span>
302
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
303
  </div>
304
  <div class="lwptocCustomize_field_override">
305
+ <?= $labelClickToOverrideDefaultValue ?>
306
  </div>
307
  <div class="lwptocCustomize_field_el">
308
  <label>
322
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScrollOffset ? ' lwptocCustomize_field-default' : '' ?>">
323
  <div class="lwptocCustomize_field_header">
324
  <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll Offset Top', 'luckywp-table-of-contents') ?></span>
325
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
326
  </div>
327
  <div class="lwptocCustomize_field_override">
328
+ <?= $labelClickToOverrideDefaultValue ?>
329
  </div>
330
  <div class="lwptocCustomize_field_el">
331
  <?= Html::textInput(Html::getInputName($model, 'smoothScrollOffset'), $model->defaultSmoothScrollOffset ? $defaultValue : $model->smoothScrollOffset, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
346
  <div class="lwptocCustomize_field<?= $model->defaultWidth ? ' lwptocCustomize_field-default' : '' ?>">
347
  <div class="lwptocCustomize_field_header">
348
  <span class="lwptocCustomize_field_label"><?= esc_html__('Width', 'luckywp-table-of-contents') ?></span>
349
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
350
  </div>
351
  <div class="lwptocCustomize_field_override">
352
+ <?= $labelClickToOverrideDefaultValue ?>
353
  </div>
354
  <div class="lwptocCustomize_field_el">
355
  <?= WidthField::widget([
369
  <div class="lwptocCustomize_field<?= $model->defaultFloat ? ' lwptocCustomize_field-default' : '' ?>">
370
  <div class="lwptocCustomize_field_header">
371
  <span class="lwptocCustomize_field_label"><?= esc_html__('Float', 'luckywp-table-of-contents') ?></span>
372
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
373
  </div>
374
  <div class="lwptocCustomize_field_override">
375
+ <?= $labelClickToOverrideDefaultValue ?>
376
  </div>
377
  <div class="lwptocCustomize_field_el">
378
  <?= Html::dropDownList(Html::getInputName($model, 'float'), $model->defaultFloat ? $defaultValue : $model->float, Core::$plugin->floatsList, [
391
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontSize ? ' lwptocCustomize_field-default' : '' ?>">
392
  <div class="lwptocCustomize_field_header">
393
  <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Size', 'luckywp-table-of-contents') ?></span>
394
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
395
  </div>
396
  <div class="lwptocCustomize_field_override">
397
+ <?= $labelClickToOverrideDefaultValue ?>
398
  </div>
399
  <div class="lwptocCustomize_field_el">
400
  <?= FontSizeField::widget([
415
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontWeight ? ' lwptocCustomize_field-default' : '' ?>">
416
  <div class="lwptocCustomize_field_header">
417
  <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Weight', 'luckywp-table-of-contents') ?></span>
418
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
419
  </div>
420
  <div class="lwptocCustomize_field_override">
421
+ <?= $labelClickToOverrideDefaultValue ?>
422
  </div>
423
  <div class="lwptocCustomize_field_el">
424
  <?= Html::dropDownList(Html::getInputName($model, 'titleFontWeight'), $model->defaultTitleFontWeight ? $defaultValue : $model->titleFontWeight, Core::$plugin->fontWeightsList, [
437
  <div class="lwptocCustomize_field<?= $model->defaultItemsFontSize ? ' lwptocCustomize_field-default' : '' ?>">
438
  <div class="lwptocCustomize_field_header">
439
  <span class="lwptocCustomize_field_label"><?= esc_html__('Items Font Size', 'luckywp-table-of-contents') ?></span>
440
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
441
  </div>
442
  <div class="lwptocCustomize_field_override">
443
+ <?= $labelClickToOverrideDefaultValue ?>
444
  </div>
445
  <div class="lwptocCustomize_field_el">
446
  <?= FontSizeField::widget([
461
  <div class="lwptocCustomize_field<?= $model->defaultColorScheme ? ' lwptocCustomize_field-default' : '' ?>">
462
  <div class="lwptocCustomize_field_header">
463
  <span class="lwptocCustomize_field_label"><?= esc_html__('Color Scheme', 'luckywp-table-of-contents') ?></span>
464
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
465
  </div>
466
  <div class="lwptocCustomize_field_override">
467
+ <?= $labelClickToOverrideDefaultValue ?>
468
  </div>
469
  <div class="lwptocCustomize_field_el">
470
  <?= Html::dropDownList(Html::getInputName($model, 'colorScheme'), $model->defaultColorScheme ? $defaultValue : $model->colorScheme, Core::$plugin->colorSchemesList, [
491
  <div class="lwptocCustomize_field<?= $model->{'default' . ucfirst($var)} ? ' lwptocCustomize_field-default' : '' ?>">
492
  <div class="lwptocCustomize_field_header">
493
  <span class="lwptocCustomize_field_label"><?= esc_html__($label, 'luckywp-table-of-contents') ?></span>
494
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
495
  </div>
496
  <div class="lwptocCustomize_field_override">
497
+ <?= $labelClickToOverrideDefaultValue ?>
498
  </div>
499
  <div class="lwptocCustomize_field_defaultValue">
500
  <?= OverrideColorBadge::widget(['color' => $defaultValue]) ?>
516
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingLevel ? ' lwptocCustomize_field-default' : '' ?>">
517
  <div class="lwptocCustomize_field_header">
518
  <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by level', 'luckywp-table-of-contents') ?></span>
519
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
520
  </div>
521
  <div class="lwptocCustomize_field_override">
522
+ <?= $labelClickToOverrideDefaultValue ?>
523
  </div>
524
  <div class="lwptocCustomize_field_el">
525
  <?= SkipHeadingLevelField::widget([
539
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingText ? ' lwptocCustomize_field-default' : '' ?>">
540
  <div class="lwptocCustomize_field_header">
541
  <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by text', 'luckywp-table-of-contents') ?></span>
542
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
543
  </div>
544
  <div class="lwptocCustomize_field_override">
545
+ <?= $labelClickToOverrideDefaultValue ?>
546
  </div>
547
  <div class="lwptocCustomize_field_el">
548
  <?php
584
  esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
585
  '<code>&lt;!--noindex--&gt;</code>'
586
  ) ?></span>
587
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
588
  </div>
589
  <div class="lwptocCustomize_field_override">
590
+ <?= $labelClickToOverrideDefaultValue ?>
591
  </div>
592
  <div class="lwptocCustomize_field_el">
593
  <label>
611
  esc_html__('Use %s for links', 'luckywp-table-of-contents'),
612
  '<code>rel="nofollow"</code>'
613
  ) ?></span>
614
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
615
  </div>
616
  <div class="lwptocCustomize_field_override">
617
+ <?= $labelClickToOverrideDefaultValue ?>
618
  </div>
619
  <div class="lwptocCustomize_field_el">
620
  <label>
630
  </div>
631
  </div>
632
 
633
+ <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->containerClass)) ? Core::$plugin->settings->getMiscContainerClass() : $model->postSettings->containerClass ?>
634
+ <div class="lwptocCustomize_field<?= $model->defaultContainerClass ? ' lwptocCustomize_field-default' : '' ?>">
635
+ <div class="lwptocCustomize_field_header">
636
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Additional CSS Class(es)', 'luckywp-table-of-contents') ?></span>
637
+ <span class="lwptocCustomize_field_default"><?= $labelDefault ?></span>
638
+ </div>
639
+ <div class="lwptocCustomize_field_override">
640
+ <?= $labelClickToOverrideDefaultValue ?>
641
+ </div>
642
+ <div class="lwptocCustomize_field_el">
643
+ <?= Html::textInput(Html::getInputName($model, 'containerClass'), $model->defaultContainerClass ? $defaultValue : $model->containerClass, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
644
+ <div class="lwptocCustomize_field_desc">
645
+ <?= esc_html__('Separate multiple classes with spaces.', 'luckywp-table-of-contents') ?>
646
+ </div>
647
+ <?= Html::hiddenInput(Html::getInputName($model, 'defaultContainerClass'), $model->defaultContainerClass, [
648
+ 'class' => 'lwptocCustomize_field_inputDefault',
649
+ ]) ?>
650
+ </div>
651
+ <div class="lwptocCustomize_field_defaultValue">
652
+ <?php
653
+ if ('' == $defaultValue) {
654
+ echo '<i>' . __('empty', 'luckywp-table-of-contents') . '</i>';
655
+ } else {
656
+ echo $defaultValue;
657
+ }
658
+ ?>
659
+ </div>
660
+ </div>
661
+
662
  </div>
663
 
664
  </div>
config/settings.php CHANGED
@@ -488,6 +488,11 @@ return [
488
  ],
489
  'default' => 'div',
490
  ],
 
 
 
 
 
491
  ],
492
  ],
493
  ],
488
  ],
489
  'default' => 'div',
490
  ],
491
+ 'containerClass' => [
492
+ 'label' => esc_html__('Additional CSS Class(es)', 'luckywp-table-of-contents'),
493
+ 'widget' => 'textInput',
494
+ 'desc' => esc_html__('Separate multiple classes with spaces.', 'luckywp-table-of-contents'),
495
+ ],
496
  ],
497
  ],
498
  ],
front/Front.php CHANGED
@@ -149,6 +149,7 @@ class Front extends BaseFront
149
  $attrs['useNofollow'] = $settings->useNofollow;
150
  $attrs['skipHeadingLevel'] = $settings->skipHeadingLevel;
151
  $attrs['skipHeadingText'] = $settings->skipHeadingText;
 
152
 
153
  $shortcode = Core::$plugin->shortcode->make($attrs, true);
154
 
149
  $attrs['useNofollow'] = $settings->useNofollow;
150
  $attrs['skipHeadingLevel'] = $settings->skipHeadingLevel;
151
  $attrs['skipHeadingText'] = $settings->skipHeadingText;
152
+ $attrs['containerClass'] = $settings->containerClass;
153
 
154
  $shortcode = Core::$plugin->shortcode->make($attrs, true);
155
 
front/Toc.php CHANGED
@@ -193,6 +193,12 @@ class Toc
193
  'class' => ['lwptoc_i'],
194
  ];
195
 
 
 
 
 
 
 
196
  // Плавная прокрутка
197
  $smoothScroll = ValueHelper::assertBool(ArrayHelper::getValue($attrs, 'smoothscroll', Core::$plugin->settings->getGeneralSmoothScroll()));
198
  $containerOptions['data']['smooth-scroll'] = $smoothScroll ? 1 : 0;
193
  'class' => ['lwptoc_i'],
194
  ];
195
 
196
+ // Дополнительные классы
197
+ $classes = trim((string)ArrayHelper::getValue($attrs, 'containerclass', Core::$plugin->settings->getMiscContainerClass()));
198
+ if ($classes) {
199
+ $containerOptions['class'][] = $classes;
200
+ }
201
+
202
  // Плавная прокрутка
203
  $smoothScroll = ValueHelper::assertBool(ArrayHelper::getValue($attrs, 'smoothscroll', Core::$plugin->settings->getGeneralSmoothScroll()));
204
  $containerOptions['data']['smooth-scroll'] = $smoothScroll ? 1 : 0;
front/assets/main.min.css CHANGED
@@ -1 +1 @@
1
- .lwptoc{margin:32px 0}.lwptoc:first-child{margin-top:16px}.lwptoc_i{padding:14px 18px 18px;text-align:left}.lwptoc_header{margin-bottom:6px}.rtl .lwptoc_header{text-align:right}.lwptoc_toggle{white-space:nowrap;margin-left:4px;font-size:80%}.rtl .lwptoc_toggle{margin-left:0;margin-right:4px}.lwptoc_toggle:before{content:'['}.lwptoc_toggle:after{content:']'}.lwptoc_toggle_label{margin:0 1px}.lwptoc_item{margin-top:2px}.rtl .lwptoc_item{text-align:right}LI.lwptoc_item{margin:2px 0 0 0!important;padding:0!important;list-style:none!important}.lwptoc_item:first-child{margin-top:0}LI.lwptoc_item:first-child{margin-top:0!important}.lwptoc_item_number{margin-right:2px}.rtl .lwptoc_item_number{margin-right:0;margin-left:2px}.lwptoc_itemWrap .lwptoc_itemWrap{margin:2px 0 0 14px}.rtl .lwptoc_itemWrap .lwptoc_itemWrap{margin-left:0;margin-right:14px}UL.lwptoc_itemWrap{margin:0!important;padding:0!important;list-style:none!important}UL.lwptoc_itemWrap UL.lwptoc_itemWrap{margin:2px 0 0 14px!important}.rtl UL.lwptoc_itemWrap UL.lwptoc_itemWrap{margin-left:0!important;margin-right:14px!important}.lwptoc-autoWidth .lwptoc_i{display:inline-block}.lwptoc-left{float:left;margin-top:0;margin-right:32px}.lwptoc-right{float:right;margin-top:0;margin-left:32px}.lwptoc-rightwithoutflow{text-align:right}.lwptoc-rightwithoutflow .lwptoc_i{display:inline-block}.lwptoc-center{text-align:center}.lwptoc-center .lwptoc_i{margin-left:auto;margin-right:auto}.lwptoc-baseItems .lwptoc_items{font-size:90%}.lwptoc-notInherit .lwptoc_i DIV A{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc-notInherit .lwptoc_i DIV A:active,.lwptoc-notInherit .lwptoc_i DIV A:focus,.lwptoc-notInherit .lwptoc_i DIV A:hover{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc-notInherit .lwptoc_i DIV A:hover{border-bottom:1px dotted!important}.lwptoc-light .lwptoc_i{color:#333;background:#fafafa}.lwptoc-light .lwptoc_i A{color:#3175e4}.lwptoc-light .lwptoc_i A:active,.lwptoc-light .lwptoc_i A:focus,.lwptoc-light .lwptoc_i A:hover{color:#3175e4;border-color:#3175e4}.lwptoc-light .lwptoc_items A:visited{color:#000394}.lwptoc-dark .lwptoc_i{color:#d3d5d8;background:#2b2b2b}.lwptoc-dark .lwptoc_i A{color:#96c6ff}.lwptoc-dark .lwptoc_i A:active,.lwptoc-dark .lwptoc_i A:focus,.lwptoc-dark .lwptoc_i A:hover{color:#96c6ff;border-color:#71b2ff}.lwptoc-dark .lwptoc_items A:visited{color:#53a1ff}.lwptoc-white .lwptoc_i{color:#333;background:#fff}.lwptoc-white .lwptoc_i A{color:#3175e4}.lwptoc-white .lwptoc_i A:active,.lwptoc-white .lwptoc_i A:focus,.lwptoc-white .lwptoc_i A:hover{color:#3175e4;border-color:#3175e4}.lwptoc-white .lwptoc_items A:visited{color:#000394}.lwptoc-transparent .lwptoc_i{border:1px solid #eee}
1
+ .lwptoc{margin:32px 0}.lwptoc:first-child{margin-top:16px}.lwptoc_i{padding:14px 18px 18px;text-align:left}.lwptoc_header{margin-bottom:6px}.rtl .lwptoc_header{text-align:right}.lwptoc_toggle{white-space:nowrap;margin-left:4px;font-size:80%}.rtl .lwptoc_toggle{margin-left:0;margin-right:4px}.lwptoc_toggle:before{content:'['}.lwptoc_toggle:after{content:']'}.lwptoc_toggle_label{margin:0 1px}.lwptoc_item{margin-top:2px}.rtl .lwptoc_item{text-align:right}LI.lwptoc_item{margin:2px 0 0 0!important;padding:0!important;list-style:none!important}.lwptoc_item:first-child{margin-top:0}LI.lwptoc_item:first-child{margin-top:0!important}.lwptoc_item_number{margin-right:2px}.rtl .lwptoc_item_number{margin-right:0;margin-left:2px}.lwptoc_itemWrap .lwptoc_itemWrap{margin:2px 0 0 14px}.rtl .lwptoc_itemWrap .lwptoc_itemWrap{margin-left:0;margin-right:14px}OL.lwptoc_itemWrap,UL.lwptoc_itemWrap{margin:0!important;padding:0!important;list-style:none!important}OL.lwptoc_itemWrap OL.lwptoc_itemWrap,OL.lwptoc_itemWrap UL.lwptoc_itemWrap,UL.lwptoc_itemWrap OL.lwptoc_itemWrap,UL.lwptoc_itemWrap UL.lwptoc_itemWrap{margin:2px 0 0 14px!important}.rtl OL.lwptoc_itemWrap OL.lwptoc_itemWrap,.rtl OL.lwptoc_itemWrap UL.lwptoc_itemWrap,.rtl UL.lwptoc_itemWrap OL.lwptoc_itemWrap,.rtl UL.lwptoc_itemWrap UL.lwptoc_itemWrap{margin-left:0!important;margin-right:14px!important}.lwptoc-autoWidth .lwptoc_i{display:inline-block}.lwptoc-left{float:left;margin-top:0;margin-right:32px}.lwptoc-right{float:right;margin-top:0;margin-left:32px}.lwptoc-rightwithoutflow{text-align:right}.lwptoc-rightwithoutflow .lwptoc_i{display:inline-block}.lwptoc-center{text-align:center}.lwptoc-center .lwptoc_i{margin-left:auto;margin-right:auto}.lwptoc-baseItems .lwptoc_items{font-size:90%}.lwptoc-notInherit .lwptoc_i DIV A{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc-notInherit .lwptoc_i DIV A:active,.lwptoc-notInherit .lwptoc_i DIV A:focus,.lwptoc-notInherit .lwptoc_i DIV A:hover{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc-notInherit .lwptoc_i DIV A:hover{border-bottom:1px dotted!important}.lwptoc-light .lwptoc_i{color:#333;background:#fafafa}.lwptoc-light .lwptoc_i A{color:#3175e4}.lwptoc-light .lwptoc_i A:active,.lwptoc-light .lwptoc_i A:focus,.lwptoc-light .lwptoc_i A:hover{color:#3175e4;border-color:#3175e4}.lwptoc-light .lwptoc_items A:visited{color:#000394}.lwptoc-dark .lwptoc_i{color:#d3d5d8;background:#2b2b2b}.lwptoc-dark .lwptoc_i A{color:#96c6ff}.lwptoc-dark .lwptoc_i A:active,.lwptoc-dark .lwptoc_i A:focus,.lwptoc-dark .lwptoc_i A:hover{color:#96c6ff;border-color:#71b2ff}.lwptoc-dark .lwptoc_items A:visited{color:#53a1ff}.lwptoc-white .lwptoc_i{color:#333;background:#fff}.lwptoc-white .lwptoc_i A{color:#3175e4}.lwptoc-white .lwptoc_i A:active,.lwptoc-white .lwptoc_i A:focus,.lwptoc-white .lwptoc_i A:hover{color:#3175e4;border-color:#3175e4}.lwptoc-white .lwptoc_items A:visited{color:#000394}.lwptoc-transparent .lwptoc_i{border:1px solid #eee}
front/assets/main.min.js CHANGED
@@ -1 +1 @@
1
- !function(){function n(t,e){var i,n={};for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n}function t(t){return t}var o,l,a=(o={duration:300,action:"close",startTime:null,startHeight:null,endHeight:null,easing:t},l=function(t,e,i){e.startTime||(e.startTime=i);var n=i-e.startTime;n<e.duration?(t.style.height=((e.endHeight-e.startingHeight)*e.easing(n/e.duration)+e.startingHeight).toFixed(2)+"px",r(t,e)):("close"===e.action&&(t.style.display="none"),"open"===e.action&&(t.style.display="block"),function(t){t.style.height=null,t.style.overflow=null}(t))},function(t,e){if(window.requestAnimationFrame){var i=n(o,{});i.action=e,t.style.height?i.startingHeight=parseFloat(t.style.height):i.startingHeight="close"===e?t.scrollHeight:0,function(t){t.style.display="block",t.style.overflow="hidden"}(t),"close"===e?i.endHeight=0:(t.style.height="0px",i.endHeight=t.scrollHeight),r(t,i)}else t.style.display="close"===e?"none":"block"});function r(e,i){cancelAnimationFrame(e.getAttribute("data-lwptoc-animation-request-id")),e.setAttribute("data-lwptoc-animation-request-id",window.requestAnimationFrame(function(t){l(e,i,t)}))}function s(t){for(var e,i=document.querySelectorAll('[id="'+t+'"]'),n=0;n<i.length;n++)if((e=i[n]).offsetWidth||e.offsetHeight||e.getClientRects().length)return i[n];return null}var e,i=(e={offset:0,duration:500,easing:t,onComplete:function(t,e){}},function(o,t){var l,a=n(e,t);if(window.requestAnimationFrame&&"smooth"!==window.getComputedStyle(document.getElementsByTagName("HTML")[0]).scrollBehavior){var r,s,c=window.pageYOffset,u=null,d=function(t){l=f(o,a.offset),r=l-c;var e=window.pageYOffset;if(!s||!(0<r&&e<s||r<0&&s<e)){s=e;var i=t-(u=u||t-1),n=((l-c)*a.easing(i/a.duration)+c).toFixed();window.scroll(0,n),i<a.duration?window.requestAnimationFrame(d):(window.scroll(0,l),a.onComplete(0,l))}};window.requestAnimationFrame(d)}else l=f(o,a.offset),window.scroll(0,l),a.onComplete(0,l)});function f(t,e){var i=t.getBoundingClientRect().top+window.pageYOffset-e;return i<0?0:i}var c={scrollTo:function(t,e){i(t,e)},registerScrollTrigger:function(t,i){for(var e=0;e<t.length;e++)t[e].addEventListener("click",function(t){t.preventDefault();var e=this.getAttribute("href"),a=e.substring(1),r=s(a);r&&(e!==document.location.hash&&(i.onComplete=function(t,e){var i,n,o,l;r.setAttribute("id",""),i=a,n=t,o=e,(l=document.createElement("a")).setAttribute("id",i),l.setAttribute("style","position:absolute;visibility:hidden;left:"+n+"px;top:"+o+"px;"),function(t,e){t.prepend?t.prepend(e):t.insertBefore(e,t.firstChild)}(document.body,l),document.location.hash=i,function(t){t.remove?t.remove():t.parentNode.removeChild(t)}(l),r.setAttribute("id",a)}),c.scrollTo(r,i))})},init:function(t){if("1"!==t.getAttribute("data-lwptoc-initialized")){t.setAttribute("data-lwptoc-initialized","1");var e,i=t.getElementsByClassName("lwptoc_toggle_label")[0],n=t.getElementsByClassName("lwptoc_items")[0];if(i)i.addEventListener("click",function(t){t.preventDefault(),e=i.getAttribute("data-label"),i.setAttribute("data-label",i.innerHTML),i.innerHTML=e,function(t,e){return-1<(" "+t.className+" ").indexOf(" "+e+" ")}(n,"lwptoc_items-visible")?(function(t,e){t.className=(" "+t.className+" ").replace(" "+e+" ","").trim()}(n,"lwptoc_items-visible"),a(n,"close")):(function(t,e){t.className=t.className.trim()+" "+e}(n,"lwptoc_items-visible"),a(n,"open"))});"1"===t.getAttribute("data-smooth-scroll")&&c.registerScrollTrigger(n.getElementsByTagName("A"),{offset:t.getAttribute("data-smooth-scroll-offset")})}},globalInit:function(){for(var t=document.getElementsByClassName("lwptoc"),e=0;e<t.length;e++)c.init(t[e])}};window.lwptoc=c,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c.globalInit):c.globalInit()}();
1
+ !function(){var o,l,n,e,g,m=function(t,e){var i,n={};for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n},t=function(t){return t},c=(o={duration:300,action:"close",startTime:null,startHeight:null,endHeight:null,easing:t},l=function(e,i){cancelAnimationFrame(e.getAttribute("data-lwptoc-animation-request-id")),e.setAttribute("data-lwptoc-animation-request-id",window.requestAnimationFrame(function(t){n(e,i,t)}))},n=function(t,e,i){e.startTime||(e.startTime=i);var n,o=i-e.startTime;o<e.duration?(t.style.height=((e.endHeight-e.startingHeight)*e.easing(o/e.duration)+e.startingHeight).toFixed(2)+"px",l(t,e)):("close"===e.action&&(t.style.display="none"),"open"===e.action&&(t.style.display="block"),(n=t).style.height=null,n.style.overflow=null)},function(t,e){if(window.requestAnimationFrame){var i=m(o,{});i.action=e,t.style.height?i.startingHeight=parseFloat(t.style.height):i.startingHeight="close"===e?t.scrollHeight:0,(n=t).style.display="block",n.style.overflow="hidden",i.endHeight="close"===e?0:(t.style.height="0px",t.scrollHeight),l(t,i)}else t.style.display="close"===e?"none":"block";var n}),a=function(t){for(var e,i=document.querySelectorAll('[id="'+t+'"]'),n=0;n<i.length;n++)if((e=i[n]).offsetWidth||e.offsetHeight||e.getClientRects().length)return i[n];return null},i=(e={offset:0,duration:500,easing:t,onComplete:function(t,e){}},g=function(t,e){var i=t.getBoundingClientRect().top+window.pageYOffset-e;return i<0?0:i},function(o,t){var l,a=m(e,t);if(window.requestAnimationFrame&&"smooth"!==window.getComputedStyle(document.getElementsByTagName("HTML")[0]).scrollBehavior){var r,s,c=window.pageYOffset,d=null,u=function(t){l=g(o,a.offset),r=l-c;var e=window.pageYOffset;if(!s||!(0<r&&e<s||r<0&&s<e)){s=e,d||(d=t-1);var i=t-d,n=((l-c)*a.easing(i/a.duration)+c).toFixed();window.scroll(0,n),i<a.duration?window.requestAnimationFrame(u):(window.scroll(0,l),a.onComplete(0,l))}};window.requestAnimationFrame(u)}else l=g(o,a.offset),window.scroll(0,l),a.onComplete(0,l)}),u={scrollTo:function(t,e){i(t,e)},registerScrollTrigger:function(t,i){for(var e=0;e<t.length;e++)t[e].addEventListener("click",function(t){t.preventDefault();var e=this.getAttribute("href"),c=e.substring(1),d=a(c);d&&(e!==document.location.hash&&(i.onComplete=function(t,e){var i,n,o,l,a,r,s;d.setAttribute("id",""),i=c,n=t,o=e,(s=document.createElement("a")).setAttribute("id",i),s.setAttribute("style","position:absolute;visibility:hidden;left:"+n+"px;top:"+o+"px;"),l=document.body,a=s,l.prepend?l.prepend(a):l.insertBefore(a,l.firstChild),document.location.hash=i,(r=s).remove?r.remove():r.parentNode.removeChild(r),d.setAttribute("id",c)}),u.scrollTo(d,i))})},init:function(t){if("1"!==t.getAttribute("data-lwptoc-initialized")){t.setAttribute("data-lwptoc-initialized","1");var a,r=t.getElementsByClassName("lwptoc_toggle_label")[0],s=t.getElementsByClassName("lwptoc_items")[0];if(r)r.addEventListener("click",function(t){var e,i,n,o,l;t.preventDefault(),a=r.getAttribute("data-label"),r.setAttribute("data-label",r.innerHTML),r.innerHTML=a,l="lwptoc_items-visible",-1<(" "+s.className+" ").indexOf(" "+l+" ")?(o="lwptoc_items-visible",(n=s).className=(" "+n.className+" ").replace(" "+o+" ","").trim(),c(s,"close")):(i="lwptoc_items-visible",(e=s).className=e.className.trim()+" "+i,c(s,"open"))});"1"===t.getAttribute("data-smooth-scroll")&&u.registerScrollTrigger(s.getElementsByTagName("A"),{offset:t.getAttribute("data-smooth-scroll-offset")})}},globalInit:function(){for(var t=document.getElementsByClassName("lwptoc"),e=0;e<t.length;e++)u.init(t[e])}};window.lwptoc=u,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",u.globalInit):u.globalInit()}();
front/views/items.php CHANGED
@@ -12,7 +12,7 @@ echo Html::beginTag($containerTag, ['class' => 'lwptoc_itemWrap']);
12
  foreach ($items as $item) {
13
  echo Html::beginTag($itemTag, ['class' => 'lwptoc_item']);
14
  ?>
15
- <a href="#<?= $item['id'] ?>" class="lwptoc_item"<?= $item['relNofollow'] ?>>
16
  <?php if ($item['number']) { ?>
17
  <span class="lwptoc_item_number"><?= $item['number'] . $item['numberSuffix'] ?></span>
18
  <?php } ?>
12
  foreach ($items as $item) {
13
  echo Html::beginTag($itemTag, ['class' => 'lwptoc_item']);
14
  ?>
15
+ <a href="#<?= $item['id'] ?>"<?= $item['relNofollow'] ?>>
16
  <?php if ($item['number']) { ?>
17
  <span class="lwptoc_item_number"><?= $item['number'] . $item['numberSuffix'] ?></span>
18
  <?php } ?>
functions.php CHANGED
@@ -18,6 +18,11 @@ function lwptoc_items($items, $echo = true)
18
  $itemTag = 'li';
19
  break;
20
 
 
 
 
 
 
21
  case 'div':
22
  default:
23
  $containerTag = 'div';
18
  $itemTag = 'li';
19
  break;
20
 
21
+ case 'ol':
22
+ $containerTag = 'ol';
23
+ $itemTag = 'li';
24
+ break;
25
+
26
  case 'div':
27
  default:
28
  $containerTag = 'div';
integrations/Oxygen.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace luckywp\tableOfContents\integrations;
4
+
5
+ use luckywp\tableOfContents\core\base\BaseObject;
6
+ use luckywp\tableOfContents\core\Core;
7
+
8
+ class Oxygen extends BaseObject
9
+ {
10
+
11
+ public function init()
12
+ {
13
+ add_action('ct_builder_start', function () {
14
+ Core::$plugin->onTheContentTrue('');
15
+ }, 1);
16
+ add_action('ct_builder_start', function () {
17
+ global $template_content;
18
+ $template_content = Core::$plugin->shortcode->theContent($template_content);
19
+ Core::$plugin->onTheContentFalse('');
20
+ }, 9999);
21
+ }
22
+ }
languages/luckywp-table-of-contents-ru_RU.mo CHANGED
Binary file
languages/luckywp-table-of-contents.pot CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2020-02-23 18:48+0300\n"
5
- "PO-Revision-Date: 2020-02-23 18:48+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.4\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
@@ -23,7 +23,7 @@ msgstr ""
23
 
24
  #: admin/Admin.php:54 admin/Admin.php:55 admin/Admin.php:75 admin/Admin.php:113
25
  #: admin/controllers/EditorBlockController.php:65
26
- #: admin/controllers/ShortcodeController.php:60 plugin/Plugin.php:476
27
  #: plugin/WpWidget.php:22
28
  msgid "Table of Contents"
29
  msgstr ""
@@ -32,75 +32,75 @@ msgstr ""
32
  msgid "Edit"
33
  msgstr ""
34
 
35
- #: admin/Admin.php:142 admin/forms/CustomizeForm.php:246
36
- #: admin/widgets/customizeModal/views/modal.php:53 config/settings.php:305
37
  msgid "Position"
38
  msgstr ""
39
 
40
- #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:76
41
  #: config/settings.php:23
42
  msgid "Minimal Count of Headings"
43
  msgstr ""
44
 
45
- #: admin/Admin.php:148 admin/forms/CustomizeForm.php:241
46
- #: admin/widgets/customizeModal/views/modal.php:99 config/settings.php:35
47
  msgid "Depth"
48
  msgstr ""
49
 
50
- #: admin/Admin.php:151 admin/widgets/customizeModal/views/modal.php:121
51
  #: config/settings.php:44
52
  msgid "Hierarchical View"
53
  msgstr ""
54
 
55
  #: admin/Admin.php:151 admin/Admin.php:163 admin/Admin.php:172
56
  #: admin/Admin.php:175 admin/Admin.php:217 admin/Admin.php:227
57
- #: admin/widgets/customizeModal/views/modal.php:137
58
- #: admin/widgets/customizeModal/views/modal.php:230
59
- #: admin/widgets/customizeModal/views/modal.php:293
60
- #: admin/widgets/customizeModal/views/modal.php:316
61
- #: admin/widgets/customizeModal/views/modal.php:601
62
- #: admin/widgets/customizeModal/views/modal.php:628
63
  msgid "Enabled"
64
  msgstr ""
65
 
66
  #: admin/Admin.php:151 admin/Admin.php:163 admin/Admin.php:172
67
  #: admin/Admin.php:175 admin/Admin.php:217 admin/Admin.php:227
68
- #: admin/widgets/customizeModal/views/modal.php:137
69
- #: admin/widgets/customizeModal/views/modal.php:230
70
- #: admin/widgets/customizeModal/views/modal.php:293
71
- #: admin/widgets/customizeModal/views/modal.php:316
72
- #: admin/widgets/customizeModal/views/modal.php:601
73
- #: admin/widgets/customizeModal/views/modal.php:628
74
  msgid "Disabled"
75
  msgstr ""
76
 
77
- #: admin/Admin.php:154 admin/forms/CustomizeForm.php:242
78
- #: admin/widgets/customizeModal/views/modal.php:144 config/settings.php:55
79
  msgid "Numeration"
80
  msgstr ""
81
 
82
- #: admin/Admin.php:157 admin/forms/CustomizeForm.php:243
83
- #: admin/widgets/customizeModal/views/modal.php:166 config/settings.php:67
84
  msgid "Numeration Suffix"
85
  msgstr ""
86
 
87
- #: admin/Admin.php:160 admin/widgets/customizeModal/views/modal.php:188
88
  #: config/settings.php:89
89
  msgid "Title"
90
  msgstr ""
91
 
92
- #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:214
93
  #: config/settings.php:95
94
  msgid "Toggle Show/Hide"
95
  msgstr ""
96
 
97
- #: admin/Admin.php:166 admin/forms/CustomizeForm.php:244
98
- #: admin/widgets/customizeModal/views/modal.php:237 config/settings.php:107
99
  msgid "Label Show"
100
  msgstr ""
101
 
102
- #: admin/Admin.php:169 admin/forms/CustomizeForm.php:245
103
- #: admin/widgets/customizeModal/views/modal.php:257 config/settings.php:118
104
  msgid "Label Hide"
105
  msgstr ""
106
 
@@ -108,52 +108,52 @@ msgstr ""
108
  msgid "Hide Items"
109
  msgstr ""
110
 
111
- #: admin/Admin.php:175 admin/widgets/customizeModal/views/modal.php:300
112
  #: config/settings.php:146
113
  msgid "Smooth Scroll"
114
  msgstr ""
115
 
116
- #: admin/Admin.php:178 admin/widgets/customizeModal/views/modal.php:323
117
  msgid "Smooth Scroll Offset Top"
118
  msgstr ""
119
 
120
- #: admin/Admin.php:181 admin/widgets/customizeModal/views/modal.php:347
121
  #: config/settings.php:182
122
  msgid "Width"
123
  msgstr ""
124
 
125
- #: admin/Admin.php:184 admin/forms/CustomizeForm.php:247
126
- #: admin/widgets/customizeModal/views/modal.php:370 config/settings.php:194
127
  msgid "Float"
128
  msgstr ""
129
 
130
- #: admin/Admin.php:187 admin/widgets/customizeModal/views/modal.php:392
131
  #: config/settings.php:203
132
  msgid "Title Font Size"
133
  msgstr ""
134
 
135
- #: admin/Admin.php:190 admin/forms/CustomizeForm.php:248
136
- #: admin/widgets/customizeModal/views/modal.php:416 config/settings.php:216
137
  msgid "Title Font Weight"
138
  msgstr ""
139
 
140
- #: admin/Admin.php:193 admin/widgets/customizeModal/views/modal.php:438
141
  #: config/settings.php:225
142
  msgid "Items Font Size"
143
  msgstr ""
144
 
145
- #: admin/Admin.php:196 admin/forms/CustomizeForm.php:249
146
- #: admin/widgets/customizeModal/views/modal.php:462 config/settings.php:238
147
  msgid "Color Scheme"
148
  msgstr ""
149
 
150
- #: admin/Admin.php:214 admin/widgets/customizeModal/views/modal.php:583
151
  #: config/settings.php:447
152
  #, php-format
153
  msgid "Wrap table of contents with %s tag"
154
  msgstr ""
155
 
156
- #: admin/Admin.php:224 admin/widgets/customizeModal/views/modal.php:610
157
  #: config/settings.php:462
158
  #, php-format
159
  msgid "Use %s for links"
@@ -163,6 +163,11 @@ msgstr ""
163
  msgid "Skip headings"
164
  msgstr ""
165
 
 
 
 
 
 
166
  #: admin/SiteHealth.php:26
167
  msgid "DOM/XML Version"
168
  msgstr ""
@@ -190,7 +195,8 @@ msgstr ""
190
 
191
  #: admin/controllers/EditorBlockController.php:71
192
  #: admin/controllers/ShortcodeController.php:66
193
- #: admin/widgets/customizeModal/views/modal.php:570
 
194
  #: admin/widgets/metabox/views/box.php:33
195
  #: admin/widgets/widget/views/_override.php:18
196
  msgid "empty"
@@ -243,97 +249,78 @@ msgstr ""
243
  msgid "Click to override default value"
244
  msgstr ""
245
 
246
- #: admin/widgets/customizeModal/views/modal.php:28
247
- #: admin/widgets/customizeModal/views/modal.php:637
248
- msgid "Cancel"
249
  msgstr ""
250
 
251
  #: admin/widgets/customizeModal/views/modal.php:29
 
 
 
 
 
252
  msgid "Customize Table of Contents"
253
  msgstr ""
254
 
255
- #: admin/widgets/customizeModal/views/modal.php:43 config/settings.php:17
256
  msgid "General"
257
  msgstr ""
258
 
259
- #: admin/widgets/customizeModal/views/modal.php:44 config/settings.php:176
260
  msgid "Appearance"
261
  msgstr ""
262
 
263
- #: admin/widgets/customizeModal/views/modal.php:45 config/settings.php:354
264
  msgid "Misc."
265
  msgstr ""
266
 
267
- #: admin/widgets/customizeModal/views/modal.php:54
268
- #: admin/widgets/customizeModal/views/modal.php:77
269
- #: admin/widgets/customizeModal/views/modal.php:100
270
- #: admin/widgets/customizeModal/views/modal.php:122
271
- #: admin/widgets/customizeModal/views/modal.php:145
272
- #: admin/widgets/customizeModal/views/modal.php:167
273
- #: admin/widgets/customizeModal/views/modal.php:189
274
- #: admin/widgets/customizeModal/views/modal.php:215
275
- #: admin/widgets/customizeModal/views/modal.php:238
276
- #: admin/widgets/customizeModal/views/modal.php:258
277
- #: admin/widgets/customizeModal/views/modal.php:278
278
- #: admin/widgets/customizeModal/views/modal.php:301
279
- #: admin/widgets/customizeModal/views/modal.php:324
280
- #: admin/widgets/customizeModal/views/modal.php:348
281
- #: admin/widgets/customizeModal/views/modal.php:371
282
- #: admin/widgets/customizeModal/views/modal.php:393
283
- #: admin/widgets/customizeModal/views/modal.php:417
284
- #: admin/widgets/customizeModal/views/modal.php:439
285
- #: admin/widgets/customizeModal/views/modal.php:463
286
- #: admin/widgets/customizeModal/views/modal.php:493
287
- #: admin/widgets/customizeModal/views/modal.php:518
288
- #: admin/widgets/customizeModal/views/modal.php:541
289
- #: admin/widgets/customizeModal/views/modal.php:586
290
- #: admin/widgets/customizeModal/views/modal.php:613
291
- msgid "default"
292
- msgstr ""
293
-
294
- #: admin/widgets/customizeModal/views/modal.php:89 config/settings.php:31
295
  msgid ""
296
  "If the count of headings in the post is less, then table of contents is not "
297
  "displayed."
298
  msgstr ""
299
 
300
- #: admin/widgets/customizeModal/views/modal.php:130
301
- #: admin/widgets/customizeModal/views/modal.php:223
302
- #: admin/widgets/customizeModal/views/modal.php:286
303
- #: admin/widgets/customizeModal/views/modal.php:309
304
- #: admin/widgets/customizeModal/views/modal.php:594
305
- #: admin/widgets/customizeModal/views/modal.php:621 config/settings.php:48
306
  #: config/settings.php:99 config/settings.php:150 config/settings.php:297
307
  msgid "Enable"
308
  msgstr ""
309
 
310
- #: admin/widgets/customizeModal/views/modal.php:203
311
  msgid "Without title"
312
  msgstr ""
313
 
314
- #: admin/widgets/customizeModal/views/modal.php:277 config/settings.php:133
315
  msgid "By default, items of contents will be hidden"
316
  msgstr ""
317
 
318
- #: admin/widgets/customizeModal/views/modal.php:517
319
  msgid "Skip heading by level"
320
  msgstr ""
321
 
322
- #: admin/widgets/customizeModal/views/modal.php:540
323
  msgid "Skip heading by text"
324
  msgstr ""
325
 
326
- #: admin/widgets/customizeModal/views/modal.php:554 config/settings.php:378
327
  msgid ""
328
  "Specify headings (one per line) to be excluded from the table of contents."
329
  msgstr ""
330
 
331
- #: admin/widgets/customizeModal/views/modal.php:558 config/settings.php:382
332
  #, php-format
333
  msgid "Use an asterisk %s as a wildcard to match any text."
334
  msgstr ""
335
 
336
- #: admin/widgets/customizeModal/views/modal.php:641
 
 
 
 
337
  msgid "Save"
338
  msgstr ""
339
 
@@ -341,11 +328,11 @@ msgstr ""
341
  msgid "Saved!"
342
  msgstr ""
343
 
344
- #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:331
345
  msgid "Default"
346
  msgstr ""
347
 
348
- #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:296
349
  msgid "Custom Value"
350
  msgstr ""
351
 
@@ -515,7 +502,7 @@ msgstr ""
515
  msgid "List Markup Tags"
516
  msgstr ""
517
 
518
- #: config/settings.php:497
519
  msgid "LuckyWP Plugins"
520
  msgstr ""
521
 
@@ -543,145 +530,149 @@ msgstr ""
543
  msgid "%1$s plugin require PHP extension %2$s to work."
544
  msgstr ""
545
 
546
- #: plugin/Plugin.php:148
547
  msgid "Without numeration"
548
  msgstr ""
549
 
550
- #: plugin/Plugin.php:149
551
  msgid "Decimal numbers (nested)"
552
  msgstr ""
553
 
554
- #: plugin/Plugin.php:150
555
  msgid "Decimal numbers"
556
  msgstr ""
557
 
558
- #: plugin/Plugin.php:151
559
  msgid "Roman numbers (nested)"
560
  msgstr ""
561
 
562
- #: plugin/Plugin.php:152
563
  msgid "Roman numbers"
564
  msgstr ""
565
 
566
- #: plugin/Plugin.php:162 plugin/Plugin.php:249 plugin/Plugin.php:393
567
  msgid "None"
568
  msgstr ""
569
 
570
- #: plugin/Plugin.php:174
571
  msgid "Before first heading"
572
  msgstr ""
573
 
574
- #: plugin/Plugin.php:175
575
  msgid "After first heading"
576
  msgstr ""
577
 
578
- #: plugin/Plugin.php:176
579
  msgid "After first block (paragraph or heading)"
580
  msgstr ""
581
 
582
- #: plugin/Plugin.php:177
583
  msgid "Top"
584
  msgstr ""
585
 
586
- #: plugin/Plugin.php:178
587
  msgid "Bottom"
588
  msgstr ""
589
 
590
- #: plugin/Plugin.php:212
591
  msgid "Thin"
592
  msgstr ""
593
 
594
- #: plugin/Plugin.php:213
595
  msgid "Extra Light"
596
  msgstr ""
597
 
598
- #: plugin/Plugin.php:214
599
  msgid "Light"
600
  msgstr ""
601
 
602
- #: plugin/Plugin.php:215
603
  msgid "Normal"
604
  msgstr ""
605
 
606
- #: plugin/Plugin.php:216
607
  msgid "Medium"
608
  msgstr ""
609
 
610
- #: plugin/Plugin.php:217
611
  msgid "Semi Bold"
612
  msgstr ""
613
 
614
- #: plugin/Plugin.php:218
615
  msgid "Bold"
616
  msgstr ""
617
 
618
- #: plugin/Plugin.php:219
619
  msgid "Extra Bold"
620
  msgstr ""
621
 
622
- #: plugin/Plugin.php:220
623
  msgid "Heavy"
624
  msgstr ""
625
 
626
- #: plugin/Plugin.php:250
627
  msgid "Left"
628
  msgstr ""
629
 
630
- #: plugin/Plugin.php:251
631
  msgid "Right"
632
  msgstr ""
633
 
634
- #: plugin/Plugin.php:252
635
  msgid "Right without flow"
636
  msgstr ""
637
 
638
- #: plugin/Plugin.php:253
639
  msgid "Center"
640
  msgstr ""
641
 
642
- #: plugin/Plugin.php:263
643
  msgid "Light Colors"
644
  msgstr ""
645
 
646
- #: plugin/Plugin.php:264
647
  msgid "Dark Colors"
648
  msgstr ""
649
 
650
- #: plugin/Plugin.php:265
651
  msgid "White"
652
  msgstr ""
653
 
654
- #: plugin/Plugin.php:266
655
  msgid "Transparent"
656
  msgstr ""
657
 
658
- #: plugin/Plugin.php:267
659
  msgid "Inherit from theme"
660
  msgstr ""
661
 
662
- #: plugin/Plugin.php:277
663
  msgid "As heading (#Example_Heading_Text)"
664
  msgstr ""
665
 
666
- #: plugin/Plugin.php:278
667
  msgid "As heading without transliterate (#Example_Heading_Text)"
668
  msgstr ""
669
 
670
- #: plugin/Plugin.php:281
671
  #, php-format
672
  msgid "Counter %s"
673
  msgstr ""
674
 
675
- #: plugin/Plugin.php:294
676
  msgid "Auto"
677
  msgstr ""
678
 
679
- #: plugin/Plugin.php:295
680
  msgid "Full Width"
681
  msgstr ""
682
 
683
- #: plugin/Plugin.php:481
684
  msgid ""
685
  "Creates a table of contents for your posts/pages. Works automatically or "
686
  "manually (via shortcode, Gutenberg block or widget)."
687
  msgstr ""
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2020-03-12 16:12+0300\n"
5
+ "PO-Revision-Date: 2020-03-12 16:14+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
23
 
24
  #: admin/Admin.php:54 admin/Admin.php:55 admin/Admin.php:75 admin/Admin.php:113
25
  #: admin/controllers/EditorBlockController.php:65
26
+ #: admin/controllers/ShortcodeController.php:60 plugin/Plugin.php:481
27
  #: plugin/WpWidget.php:22
28
  msgid "Table of Contents"
29
  msgstr ""
32
  msgid "Edit"
33
  msgstr ""
34
 
35
+ #: admin/Admin.php:142 admin/forms/CustomizeForm.php:251
36
+ #: admin/widgets/customizeModal/views/modal.php:54 config/settings.php:305
37
  msgid "Position"
38
  msgstr ""
39
 
40
+ #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:77
41
  #: config/settings.php:23
42
  msgid "Minimal Count of Headings"
43
  msgstr ""
44
 
45
+ #: admin/Admin.php:148 admin/forms/CustomizeForm.php:246
46
+ #: admin/widgets/customizeModal/views/modal.php:100 config/settings.php:35
47
  msgid "Depth"
48
  msgstr ""
49
 
50
+ #: admin/Admin.php:151 admin/widgets/customizeModal/views/modal.php:122
51
  #: config/settings.php:44
52
  msgid "Hierarchical View"
53
  msgstr ""
54
 
55
  #: admin/Admin.php:151 admin/Admin.php:163 admin/Admin.php:172
56
  #: admin/Admin.php:175 admin/Admin.php:217 admin/Admin.php:227
57
+ #: admin/widgets/customizeModal/views/modal.php:138
58
+ #: admin/widgets/customizeModal/views/modal.php:231
59
+ #: admin/widgets/customizeModal/views/modal.php:294
60
+ #: admin/widgets/customizeModal/views/modal.php:317
61
+ #: admin/widgets/customizeModal/views/modal.php:602
62
+ #: admin/widgets/customizeModal/views/modal.php:629
63
  msgid "Enabled"
64
  msgstr ""
65
 
66
  #: admin/Admin.php:151 admin/Admin.php:163 admin/Admin.php:172
67
  #: admin/Admin.php:175 admin/Admin.php:217 admin/Admin.php:227
68
+ #: admin/widgets/customizeModal/views/modal.php:138
69
+ #: admin/widgets/customizeModal/views/modal.php:231
70
+ #: admin/widgets/customizeModal/views/modal.php:294
71
+ #: admin/widgets/customizeModal/views/modal.php:317
72
+ #: admin/widgets/customizeModal/views/modal.php:602
73
+ #: admin/widgets/customizeModal/views/modal.php:629
74
  msgid "Disabled"
75
  msgstr ""
76
 
77
+ #: admin/Admin.php:154 admin/forms/CustomizeForm.php:247
78
+ #: admin/widgets/customizeModal/views/modal.php:145 config/settings.php:55
79
  msgid "Numeration"
80
  msgstr ""
81
 
82
+ #: admin/Admin.php:157 admin/forms/CustomizeForm.php:248
83
+ #: admin/widgets/customizeModal/views/modal.php:167 config/settings.php:67
84
  msgid "Numeration Suffix"
85
  msgstr ""
86
 
87
+ #: admin/Admin.php:160 admin/widgets/customizeModal/views/modal.php:189
88
  #: config/settings.php:89
89
  msgid "Title"
90
  msgstr ""
91
 
92
+ #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:215
93
  #: config/settings.php:95
94
  msgid "Toggle Show/Hide"
95
  msgstr ""
96
 
97
+ #: admin/Admin.php:166 admin/forms/CustomizeForm.php:249
98
+ #: admin/widgets/customizeModal/views/modal.php:238 config/settings.php:107
99
  msgid "Label Show"
100
  msgstr ""
101
 
102
+ #: admin/Admin.php:169 admin/forms/CustomizeForm.php:250
103
+ #: admin/widgets/customizeModal/views/modal.php:258 config/settings.php:118
104
  msgid "Label Hide"
105
  msgstr ""
106
 
108
  msgid "Hide Items"
109
  msgstr ""
110
 
111
+ #: admin/Admin.php:175 admin/widgets/customizeModal/views/modal.php:301
112
  #: config/settings.php:146
113
  msgid "Smooth Scroll"
114
  msgstr ""
115
 
116
+ #: admin/Admin.php:178 admin/widgets/customizeModal/views/modal.php:324
117
  msgid "Smooth Scroll Offset Top"
118
  msgstr ""
119
 
120
+ #: admin/Admin.php:181 admin/widgets/customizeModal/views/modal.php:348
121
  #: config/settings.php:182
122
  msgid "Width"
123
  msgstr ""
124
 
125
+ #: admin/Admin.php:184 admin/forms/CustomizeForm.php:252
126
+ #: admin/widgets/customizeModal/views/modal.php:371 config/settings.php:194
127
  msgid "Float"
128
  msgstr ""
129
 
130
+ #: admin/Admin.php:187 admin/widgets/customizeModal/views/modal.php:393
131
  #: config/settings.php:203
132
  msgid "Title Font Size"
133
  msgstr ""
134
 
135
+ #: admin/Admin.php:190 admin/forms/CustomizeForm.php:253
136
+ #: admin/widgets/customizeModal/views/modal.php:417 config/settings.php:216
137
  msgid "Title Font Weight"
138
  msgstr ""
139
 
140
+ #: admin/Admin.php:193 admin/widgets/customizeModal/views/modal.php:439
141
  #: config/settings.php:225
142
  msgid "Items Font Size"
143
  msgstr ""
144
 
145
+ #: admin/Admin.php:196 admin/forms/CustomizeForm.php:254
146
+ #: admin/widgets/customizeModal/views/modal.php:463 config/settings.php:238
147
  msgid "Color Scheme"
148
  msgstr ""
149
 
150
+ #: admin/Admin.php:214 admin/widgets/customizeModal/views/modal.php:584
151
  #: config/settings.php:447
152
  #, php-format
153
  msgid "Wrap table of contents with %s tag"
154
  msgstr ""
155
 
156
+ #: admin/Admin.php:224 admin/widgets/customizeModal/views/modal.php:611
157
  #: config/settings.php:462
158
  #, php-format
159
  msgid "Use %s for links"
163
  msgid "Skip headings"
164
  msgstr ""
165
 
166
+ #: admin/Admin.php:237 admin/widgets/customizeModal/views/modal.php:636
167
+ #: config/settings.php:492
168
+ msgid "Additional CSS Class(es)"
169
+ msgstr ""
170
+
171
  #: admin/SiteHealth.php:26
172
  msgid "DOM/XML Version"
173
  msgstr ""
195
 
196
  #: admin/controllers/EditorBlockController.php:71
197
  #: admin/controllers/ShortcodeController.php:66
198
+ #: admin/widgets/customizeModal/views/modal.php:571
199
+ #: admin/widgets/customizeModal/views/modal.php:654
200
  #: admin/widgets/metabox/views/box.php:33
201
  #: admin/widgets/widget/views/_override.php:18
202
  msgid "empty"
249
  msgid "Click to override default value"
250
  msgstr ""
251
 
252
+ #: admin/widgets/customizeModal/views/modal.php:20
253
+ msgid "default"
 
254
  msgstr ""
255
 
256
  #: admin/widgets/customizeModal/views/modal.php:29
257
+ #: admin/widgets/customizeModal/views/modal.php:667
258
+ msgid "Cancel"
259
+ msgstr ""
260
+
261
+ #: admin/widgets/customizeModal/views/modal.php:30
262
  msgid "Customize Table of Contents"
263
  msgstr ""
264
 
265
+ #: admin/widgets/customizeModal/views/modal.php:44 config/settings.php:17
266
  msgid "General"
267
  msgstr ""
268
 
269
+ #: admin/widgets/customizeModal/views/modal.php:45 config/settings.php:176
270
  msgid "Appearance"
271
  msgstr ""
272
 
273
+ #: admin/widgets/customizeModal/views/modal.php:46 config/settings.php:354
274
  msgid "Misc."
275
  msgstr ""
276
 
277
+ #: admin/widgets/customizeModal/views/modal.php:90 config/settings.php:31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  msgid ""
279
  "If the count of headings in the post is less, then table of contents is not "
280
  "displayed."
281
  msgstr ""
282
 
283
+ #: admin/widgets/customizeModal/views/modal.php:131
284
+ #: admin/widgets/customizeModal/views/modal.php:224
285
+ #: admin/widgets/customizeModal/views/modal.php:287
286
+ #: admin/widgets/customizeModal/views/modal.php:310
287
+ #: admin/widgets/customizeModal/views/modal.php:595
288
+ #: admin/widgets/customizeModal/views/modal.php:622 config/settings.php:48
289
  #: config/settings.php:99 config/settings.php:150 config/settings.php:297
290
  msgid "Enable"
291
  msgstr ""
292
 
293
+ #: admin/widgets/customizeModal/views/modal.php:204
294
  msgid "Without title"
295
  msgstr ""
296
 
297
+ #: admin/widgets/customizeModal/views/modal.php:278 config/settings.php:133
298
  msgid "By default, items of contents will be hidden"
299
  msgstr ""
300
 
301
+ #: admin/widgets/customizeModal/views/modal.php:518
302
  msgid "Skip heading by level"
303
  msgstr ""
304
 
305
+ #: admin/widgets/customizeModal/views/modal.php:541
306
  msgid "Skip heading by text"
307
  msgstr ""
308
 
309
+ #: admin/widgets/customizeModal/views/modal.php:555 config/settings.php:378
310
  msgid ""
311
  "Specify headings (one per line) to be excluded from the table of contents."
312
  msgstr ""
313
 
314
+ #: admin/widgets/customizeModal/views/modal.php:559 config/settings.php:382
315
  #, php-format
316
  msgid "Use an asterisk %s as a wildcard to match any text."
317
  msgstr ""
318
 
319
+ #: admin/widgets/customizeModal/views/modal.php:645 config/settings.php:494
320
+ msgid "Separate multiple classes with spaces."
321
+ msgstr ""
322
+
323
+ #: admin/widgets/customizeModal/views/modal.php:671
324
  msgid "Save"
325
  msgstr ""
326
 
328
  msgid "Saved!"
329
  msgstr ""
330
 
331
+ #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:335
332
  msgid "Default"
333
  msgstr ""
334
 
335
+ #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:300
336
  msgid "Custom Value"
337
  msgstr ""
338
 
502
  msgid "List Markup Tags"
503
  msgstr ""
504
 
505
+ #: config/settings.php:502
506
  msgid "LuckyWP Plugins"
507
  msgstr ""
508
 
530
  msgid "%1$s plugin require PHP extension %2$s to work."
531
  msgstr ""
532
 
533
+ #: plugin/Plugin.php:152
534
  msgid "Without numeration"
535
  msgstr ""
536
 
537
+ #: plugin/Plugin.php:153
538
  msgid "Decimal numbers (nested)"
539
  msgstr ""
540
 
541
+ #: plugin/Plugin.php:154
542
  msgid "Decimal numbers"
543
  msgstr ""
544
 
545
+ #: plugin/Plugin.php:155
546
  msgid "Roman numbers (nested)"
547
  msgstr ""
548
 
549
+ #: plugin/Plugin.php:156
550
  msgid "Roman numbers"
551
  msgstr ""
552
 
553
+ #: plugin/Plugin.php:166 plugin/Plugin.php:253 plugin/Plugin.php:398
554
  msgid "None"
555
  msgstr ""
556
 
557
+ #: plugin/Plugin.php:178
558
  msgid "Before first heading"
559
  msgstr ""
560
 
561
+ #: plugin/Plugin.php:179
562
  msgid "After first heading"
563
  msgstr ""
564
 
565
+ #: plugin/Plugin.php:180
566
  msgid "After first block (paragraph or heading)"
567
  msgstr ""
568
 
569
+ #: plugin/Plugin.php:181
570
  msgid "Top"
571
  msgstr ""
572
 
573
+ #: plugin/Plugin.php:182
574
  msgid "Bottom"
575
  msgstr ""
576
 
577
+ #: plugin/Plugin.php:216
578
  msgid "Thin"
579
  msgstr ""
580
 
581
+ #: plugin/Plugin.php:217
582
  msgid "Extra Light"
583
  msgstr ""
584
 
585
+ #: plugin/Plugin.php:218
586
  msgid "Light"
587
  msgstr ""
588
 
589
+ #: plugin/Plugin.php:219
590
  msgid "Normal"
591
  msgstr ""
592
 
593
+ #: plugin/Plugin.php:220
594
  msgid "Medium"
595
  msgstr ""
596
 
597
+ #: plugin/Plugin.php:221
598
  msgid "Semi Bold"
599
  msgstr ""
600
 
601
+ #: plugin/Plugin.php:222
602
  msgid "Bold"
603
  msgstr ""
604
 
605
+ #: plugin/Plugin.php:223
606
  msgid "Extra Bold"
607
  msgstr ""
608
 
609
+ #: plugin/Plugin.php:224
610
  msgid "Heavy"
611
  msgstr ""
612
 
613
+ #: plugin/Plugin.php:254
614
  msgid "Left"
615
  msgstr ""
616
 
617
+ #: plugin/Plugin.php:255
618
  msgid "Right"
619
  msgstr ""
620
 
621
+ #: plugin/Plugin.php:256
622
  msgid "Right without flow"
623
  msgstr ""
624
 
625
+ #: plugin/Plugin.php:257
626
  msgid "Center"
627
  msgstr ""
628
 
629
+ #: plugin/Plugin.php:267
630
  msgid "Light Colors"
631
  msgstr ""
632
 
633
+ #: plugin/Plugin.php:268
634
  msgid "Dark Colors"
635
  msgstr ""
636
 
637
+ #: plugin/Plugin.php:269
638
  msgid "White"
639
  msgstr ""
640
 
641
+ #: plugin/Plugin.php:270
642
  msgid "Transparent"
643
  msgstr ""
644
 
645
+ #: plugin/Plugin.php:271
646
  msgid "Inherit from theme"
647
  msgstr ""
648
 
649
+ #: plugin/Plugin.php:281
650
  msgid "As heading (#Example_Heading_Text)"
651
  msgstr ""
652
 
653
+ #: plugin/Plugin.php:282
654
  msgid "As heading without transliterate (#Example_Heading_Text)"
655
  msgstr ""
656
 
657
+ #: plugin/Plugin.php:285
658
  #, php-format
659
  msgid "Counter %s"
660
  msgstr ""
661
 
662
+ #: plugin/Plugin.php:298
663
  msgid "Auto"
664
  msgstr ""
665
 
666
+ #: plugin/Plugin.php:299
667
  msgid "Full Width"
668
  msgstr ""
669
 
670
+ #: plugin/Plugin.php:486
671
  msgid ""
672
  "Creates a table of contents for your posts/pages. Works automatically or "
673
  "manually (via shortcode, Gutenberg block or widget)."
674
  msgstr ""
675
+
676
+ #: plugin/WpWidget.php:24
677
+ msgid "Creates a table of contents for your posts and pages."
678
+ msgstr ""
luckywp-table-of-contents.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: LuckyWP Table of Contents
4
  Plugin URI: https://theluckywp.com/product/table-of-contents/
5
  Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
6
- Version: 2.0.9
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
  Text Domain: luckywp-table-of-contents
@@ -47,6 +47,6 @@ $lwptocAutoloader->register();
47
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
48
 
49
  $config = require(__DIR__ . '/config/plugin.php');
50
- (new \luckywp\tableOfContents\plugin\Plugin($config))->run('2.0.9', __FILE__, 'lwptoc_');
51
 
52
  require_once __DIR__ . '/functions.php';
3
  Plugin Name: LuckyWP Table of Contents
4
  Plugin URI: https://theluckywp.com/product/table-of-contents/
5
  Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
6
+ Version: 2.1
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
  Text Domain: luckywp-table-of-contents
47
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
48
 
49
  $config = require(__DIR__ . '/config/plugin.php');
50
+ (new \luckywp\tableOfContents\plugin\Plugin($config))->run('2.1', __FILE__, 'lwptoc_');
51
 
52
  require_once __DIR__ . '/functions.php';
plugin/Plugin.php CHANGED
@@ -13,6 +13,7 @@ use luckywp\tableOfContents\core\wp\Options;
13
  use luckywp\tableOfContents\front\Front;
14
  use luckywp\tableOfContents\integrations\BeaverBuilder;
15
  use luckywp\tableOfContents\integrations\elementor\Elementor;
 
16
  use luckywp\tableOfContents\integrations\RankMath;
17
  use luckywp\tableOfContents\integrations\ToolsetViews;
18
  use luckywp\tableOfContents\integrations\TwentyTwentyTheme;
@@ -79,6 +80,9 @@ class Plugin extends BasePlugin
79
  if (class_exists('\SitePress')) {
80
  Core::createObject(Wpml::class);
81
  }
 
 
 
82
  });
83
 
84
  // Интеграция с темами
@@ -354,6 +358,7 @@ class Plugin extends BasePlugin
354
  return [
355
  'div' => 'DIV',
356
  'ul' => 'UL/LI',
 
357
  ];
358
  }
359
 
13
  use luckywp\tableOfContents\front\Front;
14
  use luckywp\tableOfContents\integrations\BeaverBuilder;
15
  use luckywp\tableOfContents\integrations\elementor\Elementor;
16
+ use luckywp\tableOfContents\integrations\Oxygen;
17
  use luckywp\tableOfContents\integrations\RankMath;
18
  use luckywp\tableOfContents\integrations\ToolsetViews;
19
  use luckywp\tableOfContents\integrations\TwentyTwentyTheme;
80
  if (class_exists('\SitePress')) {
81
  Core::createObject(Wpml::class);
82
  }
83
+ if (defined('CT_VERSION')) {
84
+ Core::createObject(Oxygen::class);
85
+ }
86
  });
87
 
88
  // Интеграция с темами
358
  return [
359
  'div' => 'DIV',
360
  'ul' => 'UL/LI',
361
+ 'ol' => 'OL/LI',
362
  ];
363
  }
364
 
plugin/PostSettings.php CHANGED
@@ -174,6 +174,11 @@ class PostSettings extends BaseObject
174
  */
175
  public $skipHeadingText;
176
 
 
 
 
 
 
177
  /**
178
  * @var int
179
  */
@@ -223,6 +228,7 @@ class PostSettings extends BaseObject
223
  $this->useNofollow = ArrayHelper::getValue($data, 'useNofollow');
224
  $this->skipHeadingLevel = ArrayHelper::getValue($data, 'skipHeadingLevel');
225
  $this->skipHeadingText = ArrayHelper::getValue($data, 'skipHeadingText');
 
226
  }
227
  }
228
  }
@@ -317,6 +323,9 @@ class PostSettings extends BaseObject
317
  if ($this->skipHeadingText !== null) {
318
  $data['skipHeadingText'] = wp_slash($this->skipHeadingText);
319
  }
 
 
 
320
  if ($data ||
321
  $this->enabled != $this->defaultEnabled ||
322
  $this->processHeadings != $this->defaulProcessHeadings
174
  */
175
  public $skipHeadingText;
176
 
177
+ /**
178
+ * @var string|null
179
+ */
180
+ public $containerClass;
181
+
182
  /**
183
  * @var int
184
  */
228
  $this->useNofollow = ArrayHelper::getValue($data, 'useNofollow');
229
  $this->skipHeadingLevel = ArrayHelper::getValue($data, 'skipHeadingLevel');
230
  $this->skipHeadingText = ArrayHelper::getValue($data, 'skipHeadingText');
231
+ $this->containerClass = ArrayHelper::getValue($data, 'containerClass');
232
  }
233
  }
234
  }
323
  if ($this->skipHeadingText !== null) {
324
  $data['skipHeadingText'] = wp_slash($this->skipHeadingText);
325
  }
326
+ if ($this->containerClass !== null) {
327
+ $data['containerClass'] = wp_slash($this->containerClass);
328
+ }
329
  if ($data ||
330
  $this->enabled != $this->defaultEnabled ||
331
  $this->processHeadings != $this->defaulProcessHeadings
plugin/Settings.php CHANGED
@@ -443,4 +443,12 @@ class Settings extends \luckywp\tableOfContents\core\wp\Settings
443
  }
444
  return $tags;
445
  }
 
 
 
 
 
 
 
 
446
  }
443
  }
444
  return $tags;
445
  }
446
+
447
+ /**
448
+ * @return string
449
+ */
450
+ public function getMiscContainerClass()
451
+ {
452
+ return (string)$this->getValue('misc', 'containerClass', '');
453
+ }
454
  }
plugin/Shortcode.php CHANGED
@@ -100,6 +100,7 @@ class Shortcode extends BaseObject
100
  'useNofollow',
101
  'skipHeadingLevel',
102
  'skipHeadingText',
 
103
  ] as $var) {
104
  if (!array_key_exists(strtolower($var), $attrs) &&
105
  $postSettings->$var !== null
100
  'useNofollow',
101
  'skipHeadingLevel',
102
  'skipHeadingText',
103
+ 'containerClass',
104
  ] as $var) {
105
  if (!array_key_exists(strtolower($var), $attrs) &&
106
  $postSettings->$var !== null
plugin/WpWidget.php CHANGED
@@ -19,7 +19,10 @@ class WpWidget extends WP_Widget
19
  {
20
  parent::__construct(
21
  self::ID_BASE,
22
- esc_html__('Table of Contents', 'luckywp-table-of-contents')
 
 
 
23
  );
24
  }
25
 
19
  {
20
  parent::__construct(
21
  self::ID_BASE,
22
+ esc_html__('Table of Contents', 'luckywp-table-of-contents'),
23
+ [
24
+ 'description' => esc_html__('Creates a table of contents for your posts and pages.', 'luckywp-table-of-contents'),
25
+ ]
26
  );
27
  }
28
 
plugin/editorBlock/editorBlock.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=1)}([function(t,e){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(e){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?t.exports=n=function(t){return o(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)},n(e)}t.exports=n},function(t,e,o){"use strict";o.r(e);var n=o(0),r=o.n(n),i=wp.blocks.registerBlockType,l=wp.element,c=l.createElement,u=l.Fragment,p=(wp.blockEditor||wp.editor).BlockControls,s=wp.components,a=s.Toolbar,y=s.IconButton,f=0,d={};i("luckywp/tableofcontents",{title:lwptocMain.tableOfContents,icon:"list-view",category:"common",supports:{customClassName:!1,html:!1},attributes:{min:{type:"integer"},depth:{type:"integer"},hierarchical:{type:"boolean"},numeration:{type:"string"},numerationSuffix:{type:"string"},title:{type:"string"},toggle:{type:"boolean"},labelShow:{type:"string"},labelHide:{type:"string"},hideItems:{type:"boolean"},smoothScroll:{type:"boolean"},smoothScrollOffset:{type:"integer"},width:{type:"string"},float:{type:"string"},titleFontSize:{type:"string"},titleFontWeight:{type:"string"},itemsFontSize:{type:"string"},colorScheme:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},titleColor:{type:"string"},linkColor:{type:"string"},hoverLinkColor:{type:"string"},visitedLinkColor:{type:"string"},wrapNoindex:{type:"boolean"},useNofollow:{type:"boolean"},skipHeadingLevel:{type:"string"},skipHeadingText:{type:"string"}},edit:function(t){var e=t.attributes,o=t.setAttributes,n={};jQuery.each(e,(function(t,e){r()(e)==r()(!0)&&(e=e?1:0),n[t]=e}));var i="lwptocEditorBlock"+ ++f,l=JSON.stringify(e);return void 0===d[l]&&(jQuery.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_block_view",attrs:n},success:function(t){d[l]=t,jQuery("#"+i).replaceWith(t)}}),d[l]='<div class="lwptocEditorBlock_title lwptocEditorBlock_title-loading" id="'+i+'">'+lwptocMain.tableOfContents+"</div>"),c(u,null,c(p,null,c(a,null,c(y,{label:lwptocMain.Edit,icon:"edit",onClick:function(){jQuery(document).one("lwptocEditorBlockChanged",(function(t,e){_.each(e,(function(t,o){null===t&&(e[o]=void 0)})),o(e)})),jQuery.lwptocCustomize.show({action:"lwptoc_block_edit",attrs:n,postId:lwptocMain.postId},(function(){jQuery(document).off("lwptocEditorBlockChanged")}))}}))),c("div",{class:"lwptocEditorBlock",dangerouslySetInnerHTML:{__html:d[l]}}))},save:function(t){return t.attributes.shortcode}})}]);
1
+ !function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=1)}([function(t,e){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(e){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?t.exports=n=function(t){return o(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)},n(e)}t.exports=n},function(t,e,o){"use strict";o.r(e);var n=o(0),r=o.n(n),i=wp.blocks.registerBlockType,l=wp.element,c=l.createElement,u=l.Fragment,p=(wp.blockEditor||wp.editor).BlockControls,s=wp.components,a=s.Toolbar,y=s.IconButton,f=0,d={};i("luckywp/tableofcontents",{title:lwptocMain.tableOfContents,icon:"list-view",category:"common",supports:{customClassName:!1,html:!1},attributes:{min:{type:"integer"},depth:{type:"integer"},hierarchical:{type:"boolean"},numeration:{type:"string"},numerationSuffix:{type:"string"},title:{type:"string"},toggle:{type:"boolean"},labelShow:{type:"string"},labelHide:{type:"string"},hideItems:{type:"boolean"},smoothScroll:{type:"boolean"},smoothScrollOffset:{type:"integer"},width:{type:"string"},float:{type:"string"},titleFontSize:{type:"string"},titleFontWeight:{type:"string"},itemsFontSize:{type:"string"},colorScheme:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},titleColor:{type:"string"},linkColor:{type:"string"},hoverLinkColor:{type:"string"},visitedLinkColor:{type:"string"},wrapNoindex:{type:"boolean"},useNofollow:{type:"boolean"},skipHeadingLevel:{type:"string"},skipHeadingText:{type:"string"},containerClass:{type:"string"}},edit:function(t){var e=t.attributes,o=t.setAttributes,n={};jQuery.each(e,function(t,e){r()(e)==r()(!0)&&(e=e?1:0),n[t]=e});var i="lwptocEditorBlock"+ ++f,l=JSON.stringify(e);return void 0===d[l]&&(jQuery.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_block_view",attrs:n},success:function(t){d[l]=t,jQuery("#"+i).replaceWith(t)}}),d[l]='<div class="lwptocEditorBlock_title lwptocEditorBlock_title-loading" id="'+i+'">'+lwptocMain.tableOfContents+"</div>"),c(u,null,c(p,null,c(a,null,c(y,{label:lwptocMain.Edit,icon:"edit",onClick:function(){jQuery(document).one("lwptocEditorBlockChanged",function(t,e){_.each(e,function(t,o){null===t&&(e[o]=void 0)}),o(e)}),jQuery.lwptocCustomize.show({action:"lwptoc_block_edit",attrs:n,postId:lwptocMain.postId},function(){jQuery(document).off("lwptocEditorBlockChanged")})}}))),c("div",{class:"lwptocEditorBlock",dangerouslySetInnerHTML:{__html:d[l]}}))},save:function(t){return t.attributes.shortcode}})}]);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://theluckywp.com/product/table-of-contents/
4
  Tags: table of contents, toc, navigation, links, seo
5
  Requires at least: 4.7
6
  Tested up to: 5.4
7
- Stable tag: 2.0.9
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -74,6 +74,7 @@ LuckyWP Table of Contents was successfully tested with the following plugins:
74
  * Elementor Page Builder
75
  * Beaver Builder and Beaver Builder Themer Add-On
76
  * WPBakery Page Builder
 
77
  * WordPress Multilingual Plugin (WPML), [officially confirmed](https://wpml.org/plugin/luckywp-table-of-contents/)
78
  * Rank Math, [officially confirmed](https://rankmath.com/compatibility/luckywp-table-of-contents/)
79
  * WP Rocket
@@ -159,6 +160,13 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
 
 
162
  = 2.0.9 — 2020-03-07 =
163
  + Added hook filters `lwptoc_heading_html` and `lwptoc_heading_label`.
164
  * Fixed: in some cases don't register JS/CSS files.
4
  Tags: table of contents, toc, navigation, links, seo
5
  Requires at least: 4.7
6
  Tested up to: 5.4
7
+ Stable tag: 2.1
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
74
  * Elementor Page Builder
75
  * Beaver Builder and Beaver Builder Themer Add-On
76
  * WPBakery Page Builder
77
+ * Oxygen
78
  * WordPress Multilingual Plugin (WPML), [officially confirmed](https://wpml.org/plugin/luckywp-table-of-contents/)
79
  * Rank Math, [officially confirmed](https://rankmath.com/compatibility/luckywp-table-of-contents/)
80
  * WP Rocket
160
 
161
  == Changelog ==
162
 
163
+ = 2.1 — 2020-03-12 =
164
+ + Added option "Additional CSS Class(es)".
165
+ + Added option "OL/LI" to "List Markup Tags".
166
+ + Added support Oxygen Builder.
167
+ - Removed class "lwptoc_item" from links.
168
+ * Minor fixes for performance.
169
+
170
  = 2.0.9 — 2020-03-07 =
171
  + Added hook filters `lwptoc_heading_html` and `lwptoc_heading_label`.
172
  * Fixed: in some cases don't register JS/CSS files.