LuckyWP Table of Contents - Version 1.8

Version Description

2019-07-29 = + Added option "Use rel="nofollow" for links" + Added compatibility with Rank Math SEO plugin. * Option "Auto Insert Table of Contents" is disabled by default. * In notice "Rate the plugin" action "I've already rated the plugin" replaced to "Don't show again". * Added tips for translators in code.

Download this release

Release Info

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

Code changes from version 1.7 to 1.8

admin/Admin.php CHANGED
@@ -97,6 +97,7 @@ class Admin extends BaseObject
97
  'postId' => in_array($hook, ['post.php', 'post-new.php']) ? ArrayHelper::getValue($post, 'ID') : null,
98
  'shortcodeTag' => Core::$plugin->shortcode->getTag(),
99
  'tableOfContents' => esc_html__('Table of Contents', 'luckywp-table-of-contents'),
 
100
  'Edit' => esc_html__('Edit', 'luckywp-table-of-contents'),
101
  ]);
102
  }
@@ -202,6 +203,16 @@ class Admin extends BaseObject
202
  $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')
203
  ];
204
  }
 
 
 
 
 
 
 
 
 
 
205
  if (null !== $v = $getValue($source, 'skipHeadingLevel')) {
206
  $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), Core::$plugin->skipHeadingLevelToLabel($v)];
207
  }
97
  'postId' => in_array($hook, ['post.php', 'post-new.php']) ? ArrayHelper::getValue($post, 'ID') : null,
98
  'shortcodeTag' => Core::$plugin->shortcode->getTag(),
99
  'tableOfContents' => esc_html__('Table of Contents', 'luckywp-table-of-contents'),
100
+ /* translators: verb */
101
  'Edit' => esc_html__('Edit', 'luckywp-table-of-contents'),
102
  ]);
103
  }
203
  $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')
204
  ];
205
  }
206
+ if (null !== $v = $getValue($source, 'useNofollow')) {
207
+ $rows[] = [
208
+ sprintf(
209
+ /* translators: %s: rel="nofollow" */
210
+ esc_html__('Use %s for links', 'luckywp-table-of-contents'),
211
+ 'rel="nofollow"'
212
+ ),
213
+ $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')
214
+ ];
215
+ }
216
  if (null !== $v = $getValue($source, 'skipHeadingLevel')) {
217
  $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), Core::$plugin->skipHeadingLevelToLabel($v)];
218
  }
admin/Rate.php CHANGED
@@ -35,12 +35,12 @@ class Rate extends BaseObject
35
 
36
  public function rate()
37
  {
38
- Core::$plugin->options->set('rate_time', time() + YEAR_IN_SECONDS);
39
  }
40
 
41
- public function alreadyRate()
42
  {
43
- Core::$plugin->options->set('rate_time', time() + YEAR_IN_SECONDS);
44
  }
45
 
46
  public function showLater()
35
 
36
  public function rate()
37
  {
38
+ Core::$plugin->options->set('rate_time', time() + YEAR_IN_SECONDS * 5);
39
  }
40
 
41
+ public function hide()
42
  {
43
+ Core::$plugin->options->set('rate_time', time() + YEAR_IN_SECONDS * 5);
44
  }
45
 
46
  public function showLater()
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(l){var r="lwptocModal",e={type:"html",content:"",url:"",ajax:{},ajaxRequest:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="'+r+'-overlay"></div>',css:{backgroundColor:"#000",opacity:.6,zIndex:1e5}},container:{block:void 0,tpl:'<div class="'+r+'-container"><div class="'+r+'-container_i"><div class="'+r+'-container_i2"></div></div></div>'},preloader:{verticalAlign:void 0,tpl:'<div class="'+r+'-preloader" />'},wrap:void 0,body:void 0,errors:{tpl:'<div class="'+r+"-error "+r+'-close"></div>',autocloseDelay:2e3,ajaxUnsuccessfulLoad:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},width:"auto",verticalAlign:"middle",beforeOpen:l.noop,afterOpen:l.noop,beforeClose:l.noop,afterClose:l.noop,afterLoading:l.noop,afterLoadingOnShow:l.noop,errorLoading:l.noop},d=0,s=l([]),u=function(t,e){var o=!0;return l(t).each(function(){l(e.target).get(0)==l(this).get(0)&&(o=!1),0==l(e.target).closest("HTML",l(this).get(0)).length&&(o=!1)}),o},i={getParentEl:function(t){var e=l(t);return e.data(r)?e:(e=l(t).closest("."+r+"-container").data(r+"ParentEl"))||!1},transition:function(t,e,o,n){switch(n=null==n?l.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"),l(document).trigger(r+"_setWrapMarginRight",e)},initEl:function(e,t){var o=e.data(r);if(!o){if(d++,(o=t).modalID=d,o.overlay.block=l(o.overlay.tpl),o.overlay.block.css(o.overlay.css),o.container.block=l(o.container.tpl),o.body=l("."+r+"-container_i2",o.container.block),t.clone?o.body.html(e.clone(!0)):(e.before('<div id="'+r+"Reserve"+o.modalID+'" style="display: none" />'),o.body.html(e)),o.body.on("click","."+r+"-close",function(){return e[r]("close"),!1}),o.closeOnOverlayClick&&o.overlay.block.add(o.container.block).click(function(t){u(l(">*",o.body),t)&&e[r]("close")}),o.container.block.data(r+"ParentEl",e),e.data(r,o),s=l.merge(s,e),l.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=l.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."+r),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."+r),o.afterLoadingOnShow(o,e,t)},error:function(){e.trigger("errorLoading."+r),o.errorLoading(o,e),null==a?(o.body.html(o.errors.tpl),l("."+r+"-error",o.body).html(o.errors.ajaxUnsuccessfulLoad),l("."+r+"-close",o.body).click(function(){return e[r]("close"),!1}),o.errors.autocloseDelay&&setTimeout(function(){e[r]("close")},o.errors.autocloseDelay)):a(o,e)}},o.ajax);o.ajaxRequest=l.ajax(c),e.data(r,o)}},init:function(t){return t=l.extend(!0,{},e,t),l.isFunction(this)?null==t?void l.error(r+": Uncorrect parameters"):""!=t.url?(t.type="ajax",i.initEl(l("<div />"),t)):""!=t.content?(t.type="html",i.initEl(l(t.content),t)):void l.error(r+': Set parameter "url" or "content"'):this.each(function(){i.initEl(l(this),l.extend(!0,{},t))})}},p={show:function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(r);if(e.overlay.block.hide(),e.container.block.hide(),l("BODY").append(e.overlay.block),l("BODY").append(e.container.block),e.container.block.css("zIndex",e.overlay.block.css("zIndex")),e.beforeOpen(e,t),t.trigger("beforeOpen."+r),"hidden"!=e.wrap.css("overflow-y")){e.wrap.data(r+"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(){l(this).data(r).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."+r)}),t}l.error(r+": Uncorrect call")},close:function(){if(!l.isFunction(this))return this.each(function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(r);!1!==e.beforeClose(e,t)&&(t.trigger("beforeClose."+r),s.not(t).last().each(function(){l(this).data(r).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."+r),e.clone||l("#"+r+"Reserve"+e.modalID).replaceWith(e.body.find(">*")),e.overlay.block.remove(),e.container.block.remove(),t.data(r,null),l("."+r+"-container").length||(e.wrap.data(r+"Overflow")&&e.wrap.css("overflow-y",e.wrap.data(r+"Overflow")),i.setWrapMarginRight(e,0))}),"ajax"==e.type&&e.ajaxRequest.abort(),s=s.not(t))}else l.error(r+": Uncorrect call")});s.each(function(){l(this)[r]("close")})},getActive:function(){var t=l("."+r+"-container").last();return!!t.length&&t.data(r+"ParentEl").data(r)},setDefault:function(t){l.extend(!0,e,t)}};l(function(){e.wrap=l(document.all&&!document.querySelector?"html":"body")}),l(document).bind("keyup."+r,function(t){var e=s.last();e.length&&e.data(r).closeOnEsc&&27===t.keyCode&&e[r]("close")}),l[r]=l.fn[r]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void l.error(r+": 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 l=d(".js-lwptocNumerationSuffixSelect").closest("TR");c.change(function(){"none"==c.val()?l.hide():l.show()}).change()}var r=d(".lwptoc_colorPicker");r.length&&r.wpColorPicker()}),d.lwptocCustomize={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,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(l,t){var r="lwptocModal",e={type:"html",content:"",url:"",ajax:{},ajaxRequest:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="'+r+'-overlay"></div>',css:{backgroundColor:"#000",opacity:.6,zIndex:1e5}},container:{block:void 0,tpl:'<div class="'+r+'-container"><div class="'+r+'-container_i"><div class="'+r+'-container_i2"></div></div></div>'},preloader:{verticalAlign:void 0,tpl:'<div class="'+r+'-preloader" />'},wrap:void 0,body:void 0,errors:{tpl:'<div class="'+r+"-error "+r+'-close"></div>',autocloseDelay:2e3,ajaxUnsuccessfulLoad:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},width:"auto",verticalAlign:"middle",beforeOpen:l.noop,afterOpen:l.noop,beforeClose:l.noop,afterClose:l.noop,afterLoading:l.noop,afterLoadingOnShow:l.noop,errorLoading:l.noop},d=0,s=l([]),u=function(t,e){var o=!0;return l(t).each(function(){l(e.target).get(0)==l(this).get(0)&&(o=!1),0==l(e.target).closest("HTML",l(this).get(0)).length&&(o=!1)}),o},i={getParentEl:function(t){var e=l(t);return e.data(r)?e:(e=l(t).closest("."+r+"-container").data(r+"ParentEl"))||!1},transition:function(t,e,o,n){switch(n=null==n?l.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"),l(document).trigger(r+"_setWrapMarginRight",e)},initEl:function(e,t){var o=e.data(r);if(!o){if(d++,(o=t).modalID=d,o.overlay.block=l(o.overlay.tpl),o.overlay.block.css(o.overlay.css),o.container.block=l(o.container.tpl),o.body=l("."+r+"-container_i2",o.container.block),t.clone?o.body.html(e.clone(!0)):(e.before('<div id="'+r+"Reserve"+o.modalID+'" style="display: none" />'),o.body.html(e)),o.body.on("click","."+r+"-close",function(){return e[r]("close"),!1}),o.closeOnOverlayClick&&o.overlay.block.add(o.container.block).click(function(t){u(l(">*",o.body),t)&&e[r]("close")}),o.container.block.data(r+"ParentEl",e),e.data(r,o),s=l.merge(s,e),l.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=l.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."+r),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."+r),o.afterLoadingOnShow(o,e,t)},error:function(){e.trigger("errorLoading."+r),o.errorLoading(o,e),null==a?(o.body.html(o.errors.tpl),l("."+r+"-error",o.body).html(o.errors.ajaxUnsuccessfulLoad),l("."+r+"-close",o.body).click(function(){return e[r]("close"),!1}),o.errors.autocloseDelay&&setTimeout(function(){e[r]("close")},o.errors.autocloseDelay)):a(o,e)}},o.ajax);o.ajaxRequest=l.ajax(c),e.data(r,o)}},init:function(t){return t=l.extend(!0,{},e,t),l.isFunction(this)?null==t?void l.error(r+": Uncorrect parameters"):""!=t.url?(t.type="ajax",i.initEl(l("<div />"),t)):""!=t.content?(t.type="html",i.initEl(l(t.content),t)):void l.error(r+': Set parameter "url" or "content"'):this.each(function(){i.initEl(l(this),l.extend(!0,{},t))})}},p={show:function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(r);if(e.overlay.block.hide(),e.container.block.hide(),l("BODY").append(e.overlay.block),l("BODY").append(e.container.block),e.container.block.css("zIndex",e.overlay.block.css("zIndex")),e.beforeOpen(e,t),t.trigger("beforeOpen."+r),"hidden"!=e.wrap.css("overflow-y")){e.wrap.data(r+"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(){l(this).data(r).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."+r)}),t}l.error(r+": Uncorrect call")},close:function(){if(!l.isFunction(this))return this.each(function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(r);!1!==e.beforeClose(e,t)&&(t.trigger("beforeClose."+r),s.not(t).last().each(function(){l(this).data(r).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."+r),e.clone||l("#"+r+"Reserve"+e.modalID).replaceWith(e.body.find(">*")),e.overlay.block.remove(),e.container.block.remove(),t.data(r,null),l("."+r+"-container").length||(e.wrap.data(r+"Overflow")&&e.wrap.css("overflow-y",e.wrap.data(r+"Overflow")),i.setWrapMarginRight(e,0))}),"ajax"==e.type&&e.ajaxRequest.abort(),s=s.not(t))}else l.error(r+": Uncorrect call")});s.each(function(){l(this)[r]("close")})},getActive:function(){var t=l("."+r+"-container").last();return!!t.length&&t.data(r+"ParentEl").data(r)},setDefault:function(t){l.extend(!0,e,t)}};l(function(){e.wrap=l(document.all&&!document.querySelector?"html":"body")}),l(document).bind("keyup."+r,function(t){var e=s.last();e.length&&(e.data(r).closeOnEsc&&27===t.keyCode&&e[r]("close"))}),l[r]=l.fn[r]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void l.error(r+": 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 l=d(".js-lwptocNumerationSuffixSelect").closest("TR");c.change(function(){"none"==c.val()?l.hide():l.show()}).change()}var r=d(".lwptoc_colorPicker");r.length&&r.wpColorPicker()}),d.lwptocCustomize={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,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/controllers/EditorBlockController.php CHANGED
@@ -67,7 +67,7 @@ class EditorBlockController extends AdminController
67
  echo '<div class="lwptocEditorBlock_items">';
68
  foreach ($rows as $row) {
69
  echo '<div class="lwptocEditorBlock_item">';
70
- echo '<span class="lwptocEditorBlock_item_label">' . esc_html($row[0]) . ':</span> ';
71
  echo $row[1] === null ? '<i>' . __('empty', 'luckywp-table-of-contents') . '</i>' : $row[1];
72
  echo '</div>';
73
  }
67
  echo '<div class="lwptocEditorBlock_items">';
68
  foreach ($rows as $row) {
69
  echo '<div class="lwptocEditorBlock_item">';
70
+ echo '<span class="lwptocEditorBlock_item_label">' . $row[0] . ':</span> ';
71
  echo $row[1] === null ? '<i>' . __('empty', 'luckywp-table-of-contents') . '</i>' : $row[1];
72
  echo '</div>';
73
  }
admin/controllers/RateController.php CHANGED
@@ -16,8 +16,8 @@ class RateController extends AdminController
16
  }
17
  });
18
  add_action('wp_ajax_lwptoc_rate', [$this, 'ajaxRate']);
19
- add_action('wp_ajax_lwptoc_show_later', [$this, 'ajaxShowLater']);
20
- add_action('wp_ajax_lwptoc_already_rate', [$this, 'ajaxAlreadyRate']);
21
  parent::init();
22
  }
23
 
@@ -31,9 +31,9 @@ class RateController extends AdminController
31
  Core::$plugin->rate->rate();
32
  }
33
 
34
- public function ajaxAlreadyRate()
35
  {
36
- Core::$plugin->rate->alreadyRate();
37
  }
38
 
39
  public function ajaxShowLater()
16
  }
17
  });
18
  add_action('wp_ajax_lwptoc_rate', [$this, 'ajaxRate']);
19
+ add_action('wp_ajax_lwptoc_rate_show_later', [$this, 'ajaxShowLater']);
20
+ add_action('wp_ajax_lwptoc_rate_hide', [$this, 'ajaxHide']);
21
  parent::init();
22
  }
23
 
31
  Core::$plugin->rate->rate();
32
  }
33
 
34
+ public function ajaxHide()
35
  {
36
+ Core::$plugin->rate->hide();
37
  }
38
 
39
  public function ajaxShowLater()
admin/forms/CustomizeForm.php CHANGED
@@ -89,6 +89,9 @@ class CustomizeForm extends Model
89
  public $defaultWrapNoindex;
90
  public $wrapNoindex;
91
 
 
 
 
92
  public $defaultSkipHeadingLevel;
93
  public $skipHeadingLevel;
94
 
@@ -136,6 +139,7 @@ class CustomizeForm extends Model
136
  'hoverLinkColor',
137
  'visitedLinkColor',
138
  'wrapNoindex',
 
139
  'skipHeadingLevel',
140
  'skipHeadingText',
141
  ];
@@ -216,6 +220,7 @@ class CustomizeForm extends Model
216
  'filter' => [Core::$plugin->settings, 'sanitizeCallbackColor'],
217
  ],
218
  ['wrapNoindex', 'boolean'],
 
219
  ['skipHeadingLevel', 'filter', 'filter' => [Settings::className(), 'sanitizeSkipHeadingLevel']],
220
  [
221
  'skipHeadingText',
@@ -295,6 +300,7 @@ class CustomizeForm extends Model
295
  'hoverLinkColor' => $this->defaultHoverLinkColor ? null : ($this->hoverLinkColor ? $this->hoverLinkColor : ''),
296
  'visitedLinkColor' => $this->defaultVisitedLinkColor ? null : ($this->visitedLinkColor ? $this->visitedLinkColor : ''),
297
  'wrapNoindex' => $this->defaultWrapNoindex ? null : (bool)$this->wrapNoindex,
 
298
  'skipHeadingLevel' => $this->defaultSkipHeadingLevel ? null : $this->skipHeadingLevel,
299
  'skipHeadingText' => $this->defaultSkipHeadingText ? null : $this->skipHeadingText,
300
  ];
89
  public $defaultWrapNoindex;
90
  public $wrapNoindex;
91
 
92
+ public $defaultUseNofollow;
93
+ public $useNofollow;
94
+
95
  public $defaultSkipHeadingLevel;
96
  public $skipHeadingLevel;
97
 
139
  'hoverLinkColor',
140
  'visitedLinkColor',
141
  'wrapNoindex',
142
+ 'useNofollow',
143
  'skipHeadingLevel',
144
  'skipHeadingText',
145
  ];
220
  'filter' => [Core::$plugin->settings, 'sanitizeCallbackColor'],
221
  ],
222
  ['wrapNoindex', 'boolean'],
223
+ ['useNofollow', 'boolean'],
224
  ['skipHeadingLevel', 'filter', 'filter' => [Settings::className(), 'sanitizeSkipHeadingLevel']],
225
  [
226
  'skipHeadingText',
300
  'hoverLinkColor' => $this->defaultHoverLinkColor ? null : ($this->hoverLinkColor ? $this->hoverLinkColor : ''),
301
  'visitedLinkColor' => $this->defaultVisitedLinkColor ? null : ($this->visitedLinkColor ? $this->visitedLinkColor : ''),
302
  'wrapNoindex' => $this->defaultWrapNoindex ? null : (bool)$this->wrapNoindex,
303
+ 'useNofollow' => $this->defaultUseNofollow ? null : (bool)$this->useNofollow,
304
  'skipHeadingLevel' => $this->defaultSkipHeadingLevel ? null : $this->skipHeadingLevel,
305
  'skipHeadingText' => $this->defaultSkipHeadingText ? null : $this->skipHeadingText,
306
  ];
admin/views/rate/notice.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  use luckywp\tableOfContents\admin\Rate;
4
  use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
 
5
 
6
  ?>
7
  <div class="notice notice-info lwptocRate">
@@ -11,7 +12,7 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
11
  <?= sprintf(
12
  /* translators: %s: LuckyWP Table of Contents */
13
  esc_html__('We are very pleased that you by now have been using the %s plugin a few days.', 'luckywp-table-of-contents'),
14
- '<b>LuckyWP Table of Contents</b>'
15
  ) ?>
16
  <br>
17
  <?= esc_html__('Please rate plugin. It will help us a lot.', 'luckywp-table-of-contents') ?>
@@ -26,13 +27,13 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
26
  ]) ?>
27
  <?= AdminHtml::button(esc_html__('Remind later', 'luckywp-table-of-contents'), [
28
  'attrs' => [
29
- 'data-action' => 'lwptoc_show_later',
30
  ],
31
  'theme' => AdminHtml::BUTTON_THEME_LINK,
32
  ]) ?>
33
- <?= AdminHtml::button(esc_html__('I\'ve already rated the plugin', 'luckywp-table-of-contents'), [
34
  'attrs' => [
35
- 'data-action' => 'lwptoc_already_rate',
36
  ],
37
  'theme' => AdminHtml::BUTTON_THEME_LINK,
38
  ]) ?>
2
 
3
  use luckywp\tableOfContents\admin\Rate;
4
  use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
5
+ use luckywp\tableOfContents\core\Core;
6
 
7
  ?>
8
  <div class="notice notice-info lwptocRate">
12
  <?= sprintf(
13
  /* translators: %s: LuckyWP Table of Contents */
14
  esc_html__('We are very pleased that you by now have been using the %s plugin a few days.', 'luckywp-table-of-contents'),
15
+ '<b>' . Core::$plugin->getName() . '</b>'
16
  ) ?>
17
  <br>
18
  <?= esc_html__('Please rate plugin. It will help us a lot.', 'luckywp-table-of-contents') ?>
27
  ]) ?>
28
  <?= AdminHtml::button(esc_html__('Remind later', 'luckywp-table-of-contents'), [
29
  'attrs' => [
30
+ 'data-action' => 'lwptoc_rate_show_later',
31
  ],
32
  'theme' => AdminHtml::BUTTON_THEME_LINK,
33
  ]) ?>
34
+ <?= AdminHtml::button(esc_html__('Don\'t show again', 'luckywp-table-of-contents'), [
35
  'attrs' => [
36
+ 'data-action' => 'lwptoc_rate_hide',
37
  ],
38
  'theme' => AdminHtml::BUTTON_THEME_LINK,
39
  ]) ?>
admin/widgets/customizeModal/views/modal.php CHANGED
@@ -510,33 +510,6 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
510
 
511
  <div class="lwptocCustomize_fields lwptocCustomize_fields-misc">
512
 
513
- <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->wrapNoindex)) ? Core::$plugin->settings->miscWrapNoindex : $model->postSettings->wrapNoindex ?>
514
- <div class="lwptocCustomize_field<?= $model->defaultWrapNoindex ? ' lwptocCustomize_field-default' : '' ?>">
515
- <div class="lwptocCustomize_field_header">
516
- <span class="lwptocCustomize_field_label"><?= sprintf(
517
- /* translators: %s: <!--noindex--> */
518
- esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
519
- '&lt;!--noindex--&gt;'
520
- ) ?></span>
521
- <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
522
- </div>
523
- <div class="lwptocCustomize_field_override">
524
- <?= $clickToOverrideDefaultValue ?>
525
- </div>
526
- <div class="lwptocCustomize_field_el">
527
- <label>
528
- <?= Html::checkbox(Html::getInputName($model, 'wrapNoindex'), $model->defaultWrapNoindex ? $defaultValue : $model->wrapNoindex, ['uncheck' => 0]) ?>
529
- <?= __('Enable', 'luckywp-table-of-contents') ?>
530
- </label>
531
- <?= Html::hiddenInput(Html::getInputName($model, 'defaultWrapNoindex'), $model->defaultWrapNoindex, [
532
- 'class' => 'lwptocCustomize_field_inputDefault',
533
- ]) ?>
534
- </div>
535
- <div class="lwptocCustomize_field_defaultValue">
536
- <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
537
- </div>
538
- </div>
539
-
540
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->skipHeadingLevel)) ? Core::$plugin->settings->getMiscSkipHeadingLevel() : $model->postSettings->skipHeadingLevel ?>
541
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingLevel ? ' lwptocCustomize_field-default' : '' ?>">
542
  <div class="lwptocCustomize_field_header">
@@ -601,6 +574,60 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
601
  </div>
602
  </div>
603
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
604
  </div>
605
 
606
  </div>
510
 
511
  <div class="lwptocCustomize_fields lwptocCustomize_fields-misc">
512
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->skipHeadingLevel)) ? Core::$plugin->settings->getMiscSkipHeadingLevel() : $model->postSettings->skipHeadingLevel ?>
514
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingLevel ? ' lwptocCustomize_field-default' : '' ?>">
515
  <div class="lwptocCustomize_field_header">
574
  </div>
575
  </div>
576
 
577
+ <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->wrapNoindex)) ? Core::$plugin->settings->miscWrapNoindex : $model->postSettings->wrapNoindex ?>
578
+ <div class="lwptocCustomize_field<?= $model->defaultWrapNoindex ? ' lwptocCustomize_field-default' : '' ?>">
579
+ <div class="lwptocCustomize_field_header">
580
+ <span class="lwptocCustomize_field_label"><?= sprintf(
581
+ /* translators: %s: <!--noindex--> */
582
+ esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
583
+ '<code>&lt;!--noindex--&gt;</code>'
584
+ ) ?></span>
585
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
586
+ </div>
587
+ <div class="lwptocCustomize_field_override">
588
+ <?= $clickToOverrideDefaultValue ?>
589
+ </div>
590
+ <div class="lwptocCustomize_field_el">
591
+ <label>
592
+ <?= Html::checkbox(Html::getInputName($model, 'wrapNoindex'), $model->defaultWrapNoindex ? $defaultValue : $model->wrapNoindex, ['uncheck' => 0]) ?>
593
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
594
+ </label>
595
+ <?= Html::hiddenInput(Html::getInputName($model, 'defaultWrapNoindex'), $model->defaultWrapNoindex, [
596
+ 'class' => 'lwptocCustomize_field_inputDefault',
597
+ ]) ?>
598
+ </div>
599
+ <div class="lwptocCustomize_field_defaultValue">
600
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
601
+ </div>
602
+ </div>
603
+
604
+ <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->useNofollow)) ? Core::$plugin->settings->getMiscUseNofollow() : $model->postSettings->useNofollow ?>
605
+ <div class="lwptocCustomize_field<?= $model->defaultUseNofollow ? ' lwptocCustomize_field-default' : '' ?>">
606
+ <div class="lwptocCustomize_field_header">
607
+ <span class="lwptocCustomize_field_label"><?= sprintf(
608
+ /* translators: %s: rel="nofollow" */
609
+ esc_html__('Use %s for links', 'luckywp-table-of-contents'),
610
+ '<code>rel="nofollow"</code>'
611
+ ) ?></span>
612
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
613
+ </div>
614
+ <div class="lwptocCustomize_field_override">
615
+ <?= $clickToOverrideDefaultValue ?>
616
+ </div>
617
+ <div class="lwptocCustomize_field_el">
618
+ <label>
619
+ <?= Html::checkbox(Html::getInputName($model, 'useNofollow'), $model->defaultUseNofollow ? $defaultValue : $model->useNofollow, ['uncheck' => 0]) ?>
620
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
621
+ </label>
622
+ <?= Html::hiddenInput(Html::getInputName($model, 'defaultUseNofollow'), $model->defaultUseNofollow, [
623
+ 'class' => 'lwptocCustomize_field_inputDefault',
624
+ ]) ?>
625
+ </div>
626
+ <div class="lwptocCustomize_field_defaultValue">
627
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
628
+ </div>
629
+ </div>
630
+
631
  </div>
632
 
633
  </div>
config/settings.php CHANGED
@@ -298,7 +298,7 @@ return [
298
  'class' => 'js-lwptocAutoInsertEnableCheckbox',
299
  ],
300
  ],
301
- 'default' => true,
302
  ],
303
 
304
  'position' => [
@@ -391,10 +391,12 @@ return [
391
  ],
392
  ],
393
  'hash' => [
 
394
  'title' => esc_html__('Hash', 'luckywp-table-of-contents'),
395
  'fields' => [
396
 
397
  'hashFormat' => [
 
398
  'label' => esc_html__('Hash Format', 'luckywp-table-of-contents'),
399
  'widget' => 'select',
400
  'params' => [
@@ -443,7 +445,22 @@ return [
443
  'label' => sprintf(
444
  /* translators: %s: <!--noindex--> */
445
  esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
446
- '&lt;!--noindex--&gt;'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  ),
448
  ],
449
  ],
298
  'class' => 'js-lwptocAutoInsertEnableCheckbox',
299
  ],
300
  ],
301
+ 'default' => false,
302
  ],
303
 
304
  'position' => [
391
  ],
392
  ],
393
  'hash' => [
394
+ /* translators: Hash is part of URL after # */
395
  'title' => esc_html__('Hash', 'luckywp-table-of-contents'),
396
  'fields' => [
397
 
398
  'hashFormat' => [
399
+ /* translators: Hash is part of URL after # */
400
  'label' => esc_html__('Hash Format', 'luckywp-table-of-contents'),
401
  'widget' => 'select',
402
  'params' => [
445
  'label' => sprintf(
446
  /* translators: %s: <!--noindex--> */
447
  esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
448
+ '<code>&lt;!--noindex--&gt;</code>'
449
+ ),
450
+ ],
451
+ ],
452
+ 'default' => false,
453
+ ],
454
+
455
+ 'useNofollow' => [
456
+ 'label' => '',
457
+ 'widget' => 'checkbox',
458
+ 'params' => [
459
+ 'checkboxOptions' => [
460
+ 'label' => sprintf(
461
+ /* translators: %s: rel="nofollow" */
462
+ esc_html__('Use %s for links', 'luckywp-table-of-contents'),
463
+ '<code>rel="nofollow"</code>'
464
  ),
465
  ],
466
  ],
front/Front.php CHANGED
@@ -125,6 +125,7 @@ class Front extends BaseFront
125
  $attrs['hoverLinkColor'] = $settings->hoverLinkColor;
126
  $attrs['visitedLinkColor'] = $settings->visitedLinkColor;
127
  $attrs['wrapNoindex'] = $settings->wrapNoindex;
 
128
  $attrs['skipHeadingLevel'] = $settings->skipHeadingLevel;
129
  $attrs['skipHeadingText'] = $settings->skipHeadingText;
130
 
125
  $attrs['hoverLinkColor'] = $settings->hoverLinkColor;
126
  $attrs['visitedLinkColor'] = $settings->visitedLinkColor;
127
  $attrs['wrapNoindex'] = $settings->wrapNoindex;
128
+ $attrs['useNofollow'] = $settings->useNofollow;
129
  $attrs['skipHeadingLevel'] = $settings->skipHeadingLevel;
130
  $attrs['skipHeadingText'] = $settings->skipHeadingText;
131
 
front/Toc.php CHANGED
@@ -56,6 +56,13 @@ class Toc
56
  return '';
57
  }
58
 
 
 
 
 
 
 
 
59
  $items = [];
60
  $tree = [];
61
  foreach ($headings as $heading) {
@@ -76,6 +83,7 @@ class Toc
76
  'number' => null,
77
  'numberSuffix' => null,
78
  'label' => $heading['label'],
 
79
  'childrens' => [],
80
  ];
81
 
56
  return '';
57
  }
58
 
59
+
60
+ if (ValueHelper::assertBool(ArrayHelper::getValue($attrs, 'usenofollow', Core::$plugin->settings->getMiscUseNofollow()))) {
61
+ $relNofollow = ' rel="nofollow"';
62
+ } else {
63
+ $relNofollow = '';
64
+ }
65
+
66
  $items = [];
67
  $tree = [];
68
  foreach ($headings as $heading) {
83
  'number' => null,
84
  'numberSuffix' => null,
85
  'label' => $heading['label'],
86
+ 'relNofollow' => $relNofollow,
87
  'childrens' => [],
88
  ];
89
 
front/views/items.php CHANGED
@@ -7,7 +7,7 @@
7
  <div class="lwptoc_itemWrap">
8
  <?php foreach ($items as $item) { ?>
9
  <div class="lwptoc_item">
10
- <a href="#<?= $item['id'] ?>" class="lwptoc_item">
11
  <?php if ($item['number']) { ?>
12
  <span class="lwptoc_item_number"><?= $item['number'] . $item['numberSuffix'] ?></span>
13
  <?php } ?>
7
  <div class="lwptoc_itemWrap">
8
  <?php foreach ($items as $item) { ?>
9
  <div class="lwptoc_item">
10
+ <a href="#<?= $item['id'] ?>" class="lwptoc_item"<?= $item['relNofollow'] ?>>
11
  <?php if ($item['number']) { ?>
12
  <span class="lwptoc_item_number"><?= $item['number'] . $item['numberSuffix'] ?></span>
13
  <?php } ?>
integrations/RankMath.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 RankMath extends BaseObject
9
+ {
10
+
11
+ public function init()
12
+ {
13
+ add_filter('rank_math/researches/toc_plugins', function ($plugins) {
14
+ $plugins['luckywp-table-of-contents/luckywp-table-of-contents.php'] = Core::$plugin->getName();
15
+ return $plugins;
16
+ });
17
+ }
18
+ }
languages/luckywp-table-of-contents-ru_RU.mo CHANGED
Binary file
languages/luckywp-table-of-contents.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2019-07-18 12:04+0300\n"
5
- "PO-Revision-Date: 2019-07-18 12:06+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ru_RU\n"
@@ -23,172 +23,181 @@ msgstr ""
23
 
24
  #: admin/Admin.php:51 admin/Admin.php:52 admin/Admin.php:72 admin/Admin.php:99
25
  #: admin/controllers/EditorBlockController.php:65
26
- #: admin/controllers/ShortcodeController.php:68 plugin/WpWidget.php:20
 
27
  msgid "Table of Contents"
28
  msgstr ""
29
 
30
- #: admin/Admin.php:100
31
  msgid "Edit"
32
  msgstr ""
33
 
34
- #: admin/Admin.php:127 admin/forms/CustomizeForm.php:241
35
  #: admin/widgets/customizeModal/views/modal.php:52 config/settings.php:305
36
  msgid "Position"
37
  msgstr ""
38
 
39
- #: admin/Admin.php:130 admin/widgets/customizeModal/views/modal.php:75
40
  #: config/settings.php:22
41
  msgid "Minimal Count of Headings"
42
  msgstr ""
43
 
44
- #: admin/Admin.php:133 admin/forms/CustomizeForm.php:236
45
  #: admin/widgets/customizeModal/views/modal.php:98 config/settings.php:34
46
  msgid "Depth"
47
  msgstr ""
48
 
49
- #: admin/Admin.php:136 admin/widgets/customizeModal/views/modal.php:120
50
  #: config/settings.php:43
51
  msgid "Hierarchical View"
52
  msgstr ""
53
 
54
- #: admin/Admin.php:136 admin/Admin.php:148 admin/Admin.php:157
55
- #: admin/Admin.php:160 admin/Admin.php:202
56
  #: admin/widgets/customizeModal/views/modal.php:136
57
  #: admin/widgets/customizeModal/views/modal.php:229
58
  #: admin/widgets/customizeModal/views/modal.php:292
59
  #: admin/widgets/customizeModal/views/modal.php:315
60
- #: admin/widgets/customizeModal/views/modal.php:536
 
61
  msgid "Enabled"
62
  msgstr ""
63
 
64
- #: admin/Admin.php:136 admin/Admin.php:148 admin/Admin.php:157
65
- #: admin/Admin.php:160 admin/Admin.php:202
66
  #: admin/widgets/customizeModal/views/modal.php:136
67
  #: admin/widgets/customizeModal/views/modal.php:229
68
  #: admin/widgets/customizeModal/views/modal.php:292
69
  #: admin/widgets/customizeModal/views/modal.php:315
70
- #: admin/widgets/customizeModal/views/modal.php:536
 
71
  msgid "Disabled"
72
  msgstr ""
73
 
74
- #: admin/Admin.php:139 admin/forms/CustomizeForm.php:237
75
  #: admin/widgets/customizeModal/views/modal.php:143 config/settings.php:54
76
  msgid "Numeration"
77
  msgstr ""
78
 
79
- #: admin/Admin.php:142 admin/forms/CustomizeForm.php:238
80
  #: admin/widgets/customizeModal/views/modal.php:165 config/settings.php:66
81
  msgid "Numeration Suffix"
82
  msgstr ""
83
 
84
- #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:187
85
  #: config/settings.php:89
86
  msgid "Title"
87
  msgstr ""
88
 
89
- #: admin/Admin.php:148 admin/widgets/customizeModal/views/modal.php:213
90
  #: config/settings.php:95
91
  msgid "Toggle Show/Hide"
92
  msgstr ""
93
 
94
- #: admin/Admin.php:151 admin/forms/CustomizeForm.php:239
95
  #: admin/widgets/customizeModal/views/modal.php:236 config/settings.php:107
96
  msgid "Label Show"
97
  msgstr ""
98
 
99
- #: admin/Admin.php:154 admin/forms/CustomizeForm.php:240
100
  #: admin/widgets/customizeModal/views/modal.php:256 config/settings.php:118
101
  msgid "Label Hide"
102
  msgstr ""
103
 
104
- #: admin/Admin.php:157
105
  msgid "Hide Items"
106
  msgstr ""
107
 
108
- #: admin/Admin.php:160 admin/widgets/customizeModal/views/modal.php:299
109
  #: config/settings.php:146
110
  msgid "Smooth Scroll"
111
  msgstr ""
112
 
113
- #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:322
114
  msgid "Smooth Scroll Offset Top"
115
  msgstr ""
116
 
117
- #: admin/Admin.php:166 admin/widgets/customizeModal/views/modal.php:346
118
  #: config/settings.php:182
119
  msgid "Width"
120
  msgstr ""
121
 
122
- #: admin/Admin.php:169 admin/forms/CustomizeForm.php:242
123
  #: admin/widgets/customizeModal/views/modal.php:369 config/settings.php:194
124
  msgid "Float"
125
  msgstr ""
126
 
127
- #: admin/Admin.php:172 admin/widgets/customizeModal/views/modal.php:391
128
  #: config/settings.php:203
129
  msgid "Title Font Size"
130
  msgstr ""
131
 
132
- #: admin/Admin.php:175 admin/forms/CustomizeForm.php:243
133
  #: admin/widgets/customizeModal/views/modal.php:415 config/settings.php:216
134
  msgid "Title Font Weight"
135
  msgstr ""
136
 
137
- #: admin/Admin.php:178 admin/widgets/customizeModal/views/modal.php:437
138
  #: config/settings.php:225
139
  msgid "Items Font Size"
140
  msgstr ""
141
 
142
- #: admin/Admin.php:181 admin/forms/CustomizeForm.php:244
143
  #: admin/widgets/customizeModal/views/modal.php:461 config/settings.php:238
144
  msgid "Color Scheme"
145
  msgstr ""
146
 
147
- #: admin/Admin.php:199 admin/widgets/customizeModal/views/modal.php:518
148
- #: config/settings.php:445
149
  #, php-format
150
  msgid "Wrap table of contents with %s tag"
151
  msgstr ""
152
 
153
- #: admin/Admin.php:206 admin/Admin.php:209
 
 
 
 
 
 
154
  msgid "Skip headings"
155
  msgstr ""
156
 
157
  #: admin/controllers/EditorBlockController.php:71
158
  #: admin/controllers/ShortcodeController.php:74
159
- #: admin/widgets/customizeModal/views/modal.php:596
160
  #: admin/widgets/metabox/views/box.php:33
161
  #: admin/widgets/widget/views/_override.php:18
162
  msgid "empty"
163
  msgstr ""
164
 
165
- #: admin/views/rate/notice.php:9
166
  msgid "Hello!"
167
  msgstr ""
168
 
169
- #: admin/views/rate/notice.php:13
170
  #, php-format
171
  msgid ""
172
  "We are very pleased that you by now have been using the %s plugin a few days."
173
  msgstr ""
174
 
175
- #: admin/views/rate/notice.php:17
176
  msgid "Please rate plugin. It will help us a lot."
177
  msgstr ""
178
 
179
- #: admin/views/rate/notice.php:20
180
  msgid "Rate the plugin"
181
  msgstr ""
182
 
183
- #: admin/views/rate/notice.php:27
184
  msgid "Remind later"
185
  msgstr ""
186
 
187
- #: admin/views/rate/notice.php:33
188
- msgid "I've already rated the plugin"
189
  msgstr ""
190
 
191
- #: admin/views/rate/notice.php:41
192
  msgid "Thank you very much!"
193
  msgstr ""
194
 
@@ -210,7 +219,7 @@ msgid "Click to override default value"
210
  msgstr ""
211
 
212
  #: admin/widgets/customizeModal/views/modal.php:27
213
- #: admin/widgets/customizeModal/views/modal.php:609
214
  msgid "Cancel"
215
  msgstr ""
216
 
@@ -250,9 +259,10 @@ msgstr ""
250
  #: admin/widgets/customizeModal/views/modal.php:438
251
  #: admin/widgets/customizeModal/views/modal.php:462
252
  #: admin/widgets/customizeModal/views/modal.php:492
253
- #: admin/widgets/customizeModal/views/modal.php:521
254
- #: admin/widgets/customizeModal/views/modal.php:544
255
- #: admin/widgets/customizeModal/views/modal.php:567
 
256
  msgid "default"
257
  msgstr ""
258
 
@@ -266,7 +276,8 @@ msgstr ""
266
  #: admin/widgets/customizeModal/views/modal.php:222
267
  #: admin/widgets/customizeModal/views/modal.php:285
268
  #: admin/widgets/customizeModal/views/modal.php:308
269
- #: admin/widgets/customizeModal/views/modal.php:529 config/settings.php:47
 
270
  #: config/settings.php:99 config/settings.php:150 config/settings.php:297
271
  msgid "Enable"
272
  msgstr ""
@@ -279,25 +290,25 @@ msgstr ""
279
  msgid "By default, items of contents will be hidden"
280
  msgstr ""
281
 
282
- #: admin/widgets/customizeModal/views/modal.php:543
283
  msgid "Skip heading by level"
284
  msgstr ""
285
 
286
- #: admin/widgets/customizeModal/views/modal.php:566
287
  msgid "Skip heading by text"
288
  msgstr ""
289
 
290
- #: admin/widgets/customizeModal/views/modal.php:580 config/settings.php:378
291
  msgid ""
292
  "Specify headings (one per line) to be excluded from the table of contents."
293
  msgstr ""
294
 
295
- #: admin/widgets/customizeModal/views/modal.php:584 config/settings.php:382
296
  #, php-format
297
  msgid "Use an asterisk %s as a wildcard to match any text."
298
  msgstr ""
299
 
300
- #: admin/widgets/customizeModal/views/modal.php:612
301
  msgid "Save"
302
  msgstr ""
303
 
@@ -305,11 +316,11 @@ msgstr ""
305
  msgid "Saved!"
306
  msgstr ""
307
 
308
- #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:306
309
  msgid "Default"
310
  msgstr ""
311
 
312
- #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:271
313
  msgid "Custom Value"
314
  msgstr ""
315
 
@@ -446,32 +457,32 @@ msgstr ""
446
  msgid "By Text"
447
  msgstr ""
448
 
449
- #: config/settings.php:394
450
  msgid "Hash"
451
  msgstr ""
452
 
453
- #: config/settings.php:398
454
  msgid "Hash Format"
455
  msgstr ""
456
 
457
- #: config/settings.php:411
458
  msgid "Convert to lowercase"
459
  msgstr ""
460
 
461
- #: config/settings.php:424
462
  #, php-format
463
  msgid "Replace underscores %1$s with dashes %2$s"
464
  msgstr ""
465
 
466
- #: config/settings.php:435
467
  msgid "SEO"
468
  msgstr ""
469
 
470
- #: config/settings.php:455
471
  msgid "Post Settings"
472
  msgstr ""
473
 
474
- #: config/settings.php:458
475
  msgid "Show Panel \"Table of Contents\" in Post Types"
476
  msgstr ""
477
 
@@ -494,140 +505,140 @@ msgstr ""
494
  msgid "%s cannot be blank."
495
  msgstr ""
496
 
497
- #: plugin/Plugin.php:124
498
  msgid "Without numeration"
499
  msgstr ""
500
 
501
- #: plugin/Plugin.php:125
502
  msgid "Decimal numbers (nested)"
503
  msgstr ""
504
 
505
- #: plugin/Plugin.php:126
506
  msgid "Decimal numbers"
507
  msgstr ""
508
 
509
- #: plugin/Plugin.php:127
510
  msgid "Roman numbers (nested)"
511
  msgstr ""
512
 
513
- #: plugin/Plugin.php:128
514
  msgid "Roman numbers"
515
  msgstr ""
516
 
517
- #: plugin/Plugin.php:138 plugin/Plugin.php:225 plugin/Plugin.php:357
518
  msgid "None"
519
  msgstr ""
520
 
521
- #: plugin/Plugin.php:150
522
  msgid "Before first heading"
523
  msgstr ""
524
 
525
- #: plugin/Plugin.php:151
526
  msgid "After first heading"
527
  msgstr ""
528
 
529
- #: plugin/Plugin.php:152
530
  msgid "After first block (paragraph, list or heading)"
531
  msgstr ""
532
 
533
- #: plugin/Plugin.php:153
534
  msgid "Top"
535
  msgstr ""
536
 
537
- #: plugin/Plugin.php:154
538
  msgid "Bottom"
539
  msgstr ""
540
 
541
- #: plugin/Plugin.php:188
542
  msgid "Thin"
543
  msgstr ""
544
 
545
- #: plugin/Plugin.php:189
546
  msgid "Extra Light"
547
  msgstr ""
548
 
549
- #: plugin/Plugin.php:190
550
  msgid "Light"
551
  msgstr ""
552
 
553
- #: plugin/Plugin.php:191
554
  msgid "Normal"
555
  msgstr ""
556
 
557
- #: plugin/Plugin.php:192
558
  msgid "Medium"
559
  msgstr ""
560
 
561
- #: plugin/Plugin.php:193
562
  msgid "Semi Bold"
563
  msgstr ""
564
 
565
- #: plugin/Plugin.php:194
566
  msgid "Bold"
567
  msgstr ""
568
 
569
- #: plugin/Plugin.php:195
570
  msgid "Extra Bold"
571
  msgstr ""
572
 
573
- #: plugin/Plugin.php:196
574
  msgid "Heavy"
575
  msgstr ""
576
 
577
- #: plugin/Plugin.php:226
578
  msgid "Left"
579
  msgstr ""
580
 
581
- #: plugin/Plugin.php:227
582
  msgid "Right"
583
  msgstr ""
584
 
585
- #: plugin/Plugin.php:228
586
  msgid "Right without flow"
587
  msgstr ""
588
 
589
- #: plugin/Plugin.php:229
590
  msgid "Center"
591
  msgstr ""
592
 
593
- #: plugin/Plugin.php:239
594
  msgid "Light Colors"
595
  msgstr ""
596
 
597
- #: plugin/Plugin.php:240
598
  msgid "Dark Colors"
599
  msgstr ""
600
 
601
- #: plugin/Plugin.php:241
602
  msgid "White"
603
  msgstr ""
604
 
605
- #: plugin/Plugin.php:242
606
  msgid "Transparent"
607
  msgstr ""
608
 
609
- #: plugin/Plugin.php:252
610
  msgid "As heading (#Example_Heading_Text)"
611
  msgstr ""
612
 
613
- #: plugin/Plugin.php:253
614
  msgid "As heading w/o transliterate (#Example_Heading_Text)"
615
  msgstr ""
616
 
617
- #: plugin/Plugin.php:256
618
  #, php-format
619
  msgid "Counter %s"
620
  msgstr ""
621
 
622
- #: plugin/Plugin.php:269
623
  msgid "Auto"
624
  msgstr ""
625
 
626
- #: plugin/Plugin.php:270
627
  msgid "Full Width"
628
  msgstr ""
629
 
630
- #: plugin/Plugin.php:433
631
  msgid ""
632
  "Creates a table of contents for your posts/pages. Works automatically or "
633
  "manually (via shortcode, Gutenberg block or widget)."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2019-07-29 16:14+0300\n"
5
+ "PO-Revision-Date: 2019-07-29 16:16+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ru_RU\n"
23
 
24
  #: admin/Admin.php:51 admin/Admin.php:52 admin/Admin.php:72 admin/Admin.php:99
25
  #: admin/controllers/EditorBlockController.php:65
26
+ #: admin/controllers/ShortcodeController.php:68 plugin/Plugin.php:440
27
+ #: plugin/WpWidget.php:20
28
  msgid "Table of Contents"
29
  msgstr ""
30
 
31
+ #: admin/Admin.php:101
32
  msgid "Edit"
33
  msgstr ""
34
 
35
+ #: admin/Admin.php:128 admin/forms/CustomizeForm.php:246
36
  #: admin/widgets/customizeModal/views/modal.php:52 config/settings.php:305
37
  msgid "Position"
38
  msgstr ""
39
 
40
+ #: admin/Admin.php:131 admin/widgets/customizeModal/views/modal.php:75
41
  #: config/settings.php:22
42
  msgid "Minimal Count of Headings"
43
  msgstr ""
44
 
45
+ #: admin/Admin.php:134 admin/forms/CustomizeForm.php:241
46
  #: admin/widgets/customizeModal/views/modal.php:98 config/settings.php:34
47
  msgid "Depth"
48
  msgstr ""
49
 
50
+ #: admin/Admin.php:137 admin/widgets/customizeModal/views/modal.php:120
51
  #: config/settings.php:43
52
  msgid "Hierarchical View"
53
  msgstr ""
54
 
55
+ #: admin/Admin.php:137 admin/Admin.php:149 admin/Admin.php:158
56
+ #: admin/Admin.php:161 admin/Admin.php:203 admin/Admin.php:213
57
  #: admin/widgets/customizeModal/views/modal.php:136
58
  #: admin/widgets/customizeModal/views/modal.php:229
59
  #: admin/widgets/customizeModal/views/modal.php:292
60
  #: admin/widgets/customizeModal/views/modal.php:315
61
+ #: admin/widgets/customizeModal/views/modal.php:600
62
+ #: admin/widgets/customizeModal/views/modal.php:627
63
  msgid "Enabled"
64
  msgstr ""
65
 
66
+ #: admin/Admin.php:137 admin/Admin.php:149 admin/Admin.php:158
67
+ #: admin/Admin.php:161 admin/Admin.php:203 admin/Admin.php:213
68
  #: admin/widgets/customizeModal/views/modal.php:136
69
  #: admin/widgets/customizeModal/views/modal.php:229
70
  #: admin/widgets/customizeModal/views/modal.php:292
71
  #: admin/widgets/customizeModal/views/modal.php:315
72
+ #: admin/widgets/customizeModal/views/modal.php:600
73
+ #: admin/widgets/customizeModal/views/modal.php:627
74
  msgid "Disabled"
75
  msgstr ""
76
 
77
+ #: admin/Admin.php:140 admin/forms/CustomizeForm.php:242
78
  #: admin/widgets/customizeModal/views/modal.php:143 config/settings.php:54
79
  msgid "Numeration"
80
  msgstr ""
81
 
82
+ #: admin/Admin.php:143 admin/forms/CustomizeForm.php:243
83
  #: admin/widgets/customizeModal/views/modal.php:165 config/settings.php:66
84
  msgid "Numeration Suffix"
85
  msgstr ""
86
 
87
+ #: admin/Admin.php:146 admin/widgets/customizeModal/views/modal.php:187
88
  #: config/settings.php:89
89
  msgid "Title"
90
  msgstr ""
91
 
92
+ #: admin/Admin.php:149 admin/widgets/customizeModal/views/modal.php:213
93
  #: config/settings.php:95
94
  msgid "Toggle Show/Hide"
95
  msgstr ""
96
 
97
+ #: admin/Admin.php:152 admin/forms/CustomizeForm.php:244
98
  #: admin/widgets/customizeModal/views/modal.php:236 config/settings.php:107
99
  msgid "Label Show"
100
  msgstr ""
101
 
102
+ #: admin/Admin.php:155 admin/forms/CustomizeForm.php:245
103
  #: admin/widgets/customizeModal/views/modal.php:256 config/settings.php:118
104
  msgid "Label Hide"
105
  msgstr ""
106
 
107
+ #: admin/Admin.php:158
108
  msgid "Hide Items"
109
  msgstr ""
110
 
111
+ #: admin/Admin.php:161 admin/widgets/customizeModal/views/modal.php:299
112
  #: config/settings.php:146
113
  msgid "Smooth Scroll"
114
  msgstr ""
115
 
116
+ #: admin/Admin.php:164 admin/widgets/customizeModal/views/modal.php:322
117
  msgid "Smooth Scroll Offset Top"
118
  msgstr ""
119
 
120
+ #: admin/Admin.php:167 admin/widgets/customizeModal/views/modal.php:346
121
  #: config/settings.php:182
122
  msgid "Width"
123
  msgstr ""
124
 
125
+ #: admin/Admin.php:170 admin/forms/CustomizeForm.php:247
126
  #: admin/widgets/customizeModal/views/modal.php:369 config/settings.php:194
127
  msgid "Float"
128
  msgstr ""
129
 
130
+ #: admin/Admin.php:173 admin/widgets/customizeModal/views/modal.php:391
131
  #: config/settings.php:203
132
  msgid "Title Font Size"
133
  msgstr ""
134
 
135
+ #: admin/Admin.php:176 admin/forms/CustomizeForm.php:248
136
  #: admin/widgets/customizeModal/views/modal.php:415 config/settings.php:216
137
  msgid "Title Font Weight"
138
  msgstr ""
139
 
140
+ #: admin/Admin.php:179 admin/widgets/customizeModal/views/modal.php:437
141
  #: config/settings.php:225
142
  msgid "Items Font Size"
143
  msgstr ""
144
 
145
+ #: admin/Admin.php:182 admin/forms/CustomizeForm.php:249
146
  #: admin/widgets/customizeModal/views/modal.php:461 config/settings.php:238
147
  msgid "Color Scheme"
148
  msgstr ""
149
 
150
+ #: admin/Admin.php:200 admin/widgets/customizeModal/views/modal.php:582
151
+ #: config/settings.php:447
152
  #, php-format
153
  msgid "Wrap table of contents with %s tag"
154
  msgstr ""
155
 
156
+ #: admin/Admin.php:210 admin/widgets/customizeModal/views/modal.php:609
157
+ #: config/settings.php:462
158
+ #, php-format
159
+ msgid "Use %s for links"
160
+ msgstr ""
161
+
162
+ #: admin/Admin.php:217 admin/Admin.php:220
163
  msgid "Skip headings"
164
  msgstr ""
165
 
166
  #: admin/controllers/EditorBlockController.php:71
167
  #: admin/controllers/ShortcodeController.php:74
168
+ #: admin/widgets/customizeModal/views/modal.php:569
169
  #: admin/widgets/metabox/views/box.php:33
170
  #: admin/widgets/widget/views/_override.php:18
171
  msgid "empty"
172
  msgstr ""
173
 
174
+ #: admin/views/rate/notice.php:10
175
  msgid "Hello!"
176
  msgstr ""
177
 
178
+ #: admin/views/rate/notice.php:14
179
  #, php-format
180
  msgid ""
181
  "We are very pleased that you by now have been using the %s plugin a few days."
182
  msgstr ""
183
 
184
+ #: admin/views/rate/notice.php:18
185
  msgid "Please rate plugin. It will help us a lot."
186
  msgstr ""
187
 
188
+ #: admin/views/rate/notice.php:21
189
  msgid "Rate the plugin"
190
  msgstr ""
191
 
192
+ #: admin/views/rate/notice.php:28
193
  msgid "Remind later"
194
  msgstr ""
195
 
196
+ #: admin/views/rate/notice.php:34
197
+ msgid "Don't show again"
198
  msgstr ""
199
 
200
+ #: admin/views/rate/notice.php:42
201
  msgid "Thank you very much!"
202
  msgstr ""
203
 
219
  msgstr ""
220
 
221
  #: admin/widgets/customizeModal/views/modal.php:27
222
+ #: admin/widgets/customizeModal/views/modal.php:636
223
  msgid "Cancel"
224
  msgstr ""
225
 
259
  #: admin/widgets/customizeModal/views/modal.php:438
260
  #: admin/widgets/customizeModal/views/modal.php:462
261
  #: admin/widgets/customizeModal/views/modal.php:492
262
+ #: admin/widgets/customizeModal/views/modal.php:517
263
+ #: admin/widgets/customizeModal/views/modal.php:540
264
+ #: admin/widgets/customizeModal/views/modal.php:585
265
+ #: admin/widgets/customizeModal/views/modal.php:612
266
  msgid "default"
267
  msgstr ""
268
 
276
  #: admin/widgets/customizeModal/views/modal.php:222
277
  #: admin/widgets/customizeModal/views/modal.php:285
278
  #: admin/widgets/customizeModal/views/modal.php:308
279
+ #: admin/widgets/customizeModal/views/modal.php:593
280
+ #: admin/widgets/customizeModal/views/modal.php:620 config/settings.php:47
281
  #: config/settings.php:99 config/settings.php:150 config/settings.php:297
282
  msgid "Enable"
283
  msgstr ""
290
  msgid "By default, items of contents will be hidden"
291
  msgstr ""
292
 
293
+ #: admin/widgets/customizeModal/views/modal.php:516
294
  msgid "Skip heading by level"
295
  msgstr ""
296
 
297
+ #: admin/widgets/customizeModal/views/modal.php:539
298
  msgid "Skip heading by text"
299
  msgstr ""
300
 
301
+ #: admin/widgets/customizeModal/views/modal.php:553 config/settings.php:378
302
  msgid ""
303
  "Specify headings (one per line) to be excluded from the table of contents."
304
  msgstr ""
305
 
306
+ #: admin/widgets/customizeModal/views/modal.php:557 config/settings.php:382
307
  #, php-format
308
  msgid "Use an asterisk %s as a wildcard to match any text."
309
  msgstr ""
310
 
311
+ #: admin/widgets/customizeModal/views/modal.php:639
312
  msgid "Save"
313
  msgstr ""
314
 
316
  msgid "Saved!"
317
  msgstr ""
318
 
319
+ #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:310
320
  msgid "Default"
321
  msgstr ""
322
 
323
+ #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:275
324
  msgid "Custom Value"
325
  msgstr ""
326
 
457
  msgid "By Text"
458
  msgstr ""
459
 
460
+ #: config/settings.php:395
461
  msgid "Hash"
462
  msgstr ""
463
 
464
+ #: config/settings.php:400
465
  msgid "Hash Format"
466
  msgstr ""
467
 
468
+ #: config/settings.php:413
469
  msgid "Convert to lowercase"
470
  msgstr ""
471
 
472
+ #: config/settings.php:426
473
  #, php-format
474
  msgid "Replace underscores %1$s with dashes %2$s"
475
  msgstr ""
476
 
477
+ #: config/settings.php:437
478
  msgid "SEO"
479
  msgstr ""
480
 
481
+ #: config/settings.php:472
482
  msgid "Post Settings"
483
  msgstr ""
484
 
485
+ #: config/settings.php:475
486
  msgid "Show Panel \"Table of Contents\" in Post Types"
487
  msgstr ""
488
 
505
  msgid "%s cannot be blank."
506
  msgstr ""
507
 
508
+ #: plugin/Plugin.php:128
509
  msgid "Without numeration"
510
  msgstr ""
511
 
512
+ #: plugin/Plugin.php:129
513
  msgid "Decimal numbers (nested)"
514
  msgstr ""
515
 
516
+ #: plugin/Plugin.php:130
517
  msgid "Decimal numbers"
518
  msgstr ""
519
 
520
+ #: plugin/Plugin.php:131
521
  msgid "Roman numbers (nested)"
522
  msgstr ""
523
 
524
+ #: plugin/Plugin.php:132
525
  msgid "Roman numbers"
526
  msgstr ""
527
 
528
+ #: plugin/Plugin.php:142 plugin/Plugin.php:229 plugin/Plugin.php:361
529
  msgid "None"
530
  msgstr ""
531
 
532
+ #: plugin/Plugin.php:154
533
  msgid "Before first heading"
534
  msgstr ""
535
 
536
+ #: plugin/Plugin.php:155
537
  msgid "After first heading"
538
  msgstr ""
539
 
540
+ #: plugin/Plugin.php:156
541
  msgid "After first block (paragraph, list or heading)"
542
  msgstr ""
543
 
544
+ #: plugin/Plugin.php:157
545
  msgid "Top"
546
  msgstr ""
547
 
548
+ #: plugin/Plugin.php:158
549
  msgid "Bottom"
550
  msgstr ""
551
 
552
+ #: plugin/Plugin.php:192
553
  msgid "Thin"
554
  msgstr ""
555
 
556
+ #: plugin/Plugin.php:193
557
  msgid "Extra Light"
558
  msgstr ""
559
 
560
+ #: plugin/Plugin.php:194
561
  msgid "Light"
562
  msgstr ""
563
 
564
+ #: plugin/Plugin.php:195
565
  msgid "Normal"
566
  msgstr ""
567
 
568
+ #: plugin/Plugin.php:196
569
  msgid "Medium"
570
  msgstr ""
571
 
572
+ #: plugin/Plugin.php:197
573
  msgid "Semi Bold"
574
  msgstr ""
575
 
576
+ #: plugin/Plugin.php:198
577
  msgid "Bold"
578
  msgstr ""
579
 
580
+ #: plugin/Plugin.php:199
581
  msgid "Extra Bold"
582
  msgstr ""
583
 
584
+ #: plugin/Plugin.php:200
585
  msgid "Heavy"
586
  msgstr ""
587
 
588
+ #: plugin/Plugin.php:230
589
  msgid "Left"
590
  msgstr ""
591
 
592
+ #: plugin/Plugin.php:231
593
  msgid "Right"
594
  msgstr ""
595
 
596
+ #: plugin/Plugin.php:232
597
  msgid "Right without flow"
598
  msgstr ""
599
 
600
+ #: plugin/Plugin.php:233
601
  msgid "Center"
602
  msgstr ""
603
 
604
+ #: plugin/Plugin.php:243
605
  msgid "Light Colors"
606
  msgstr ""
607
 
608
+ #: plugin/Plugin.php:244
609
  msgid "Dark Colors"
610
  msgstr ""
611
 
612
+ #: plugin/Plugin.php:245
613
  msgid "White"
614
  msgstr ""
615
 
616
+ #: plugin/Plugin.php:246
617
  msgid "Transparent"
618
  msgstr ""
619
 
620
+ #: plugin/Plugin.php:256
621
  msgid "As heading (#Example_Heading_Text)"
622
  msgstr ""
623
 
624
+ #: plugin/Plugin.php:257
625
  msgid "As heading w/o transliterate (#Example_Heading_Text)"
626
  msgstr ""
627
 
628
+ #: plugin/Plugin.php:260
629
  #, php-format
630
  msgid "Counter %s"
631
  msgstr ""
632
 
633
+ #: plugin/Plugin.php:273
634
  msgid "Auto"
635
  msgstr ""
636
 
637
+ #: plugin/Plugin.php:274
638
  msgid "Full Width"
639
  msgstr ""
640
 
641
+ #: plugin/Plugin.php:445
642
  msgid ""
643
  "Creates a table of contents for your posts/pages. Works automatically or "
644
  "manually (via shortcode, Gutenberg block or widget)."
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: 1.7
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
  Text Domain: luckywp-table-of-contents
@@ -29,6 +29,6 @@ $lwptocAutoloader->register();
29
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
30
 
31
  $config = require(__DIR__ . '/config/plugin.php');
32
- (new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.7', __FILE__, 'lwptoc_');
33
 
34
  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: 1.8
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
  Text Domain: luckywp-table-of-contents
29
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
30
 
31
  $config = require(__DIR__ . '/config/plugin.php');
32
+ (new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.8', __FILE__, 'lwptoc_');
33
 
34
  require_once __DIR__ . '/functions.php';
plugin/Plugin.php CHANGED
@@ -12,6 +12,7 @@ use luckywp\tableOfContents\core\helpers\ArrayHelper;
12
  use luckywp\tableOfContents\core\wp\Options;
13
  use luckywp\tableOfContents\front\Front;
14
  use luckywp\tableOfContents\integrations\BeaverBuilder;
 
15
  use luckywp\tableOfContents\plugin\editorBlock\EditorBlock;
16
  use luckywp\tableOfContents\plugin\mcePlugin\McePlugin;
17
  use WP_Post_Type;
@@ -62,6 +63,9 @@ class Plugin extends BasePlugin
62
  if (defined('FL_BUILDER_VERSION')) {
63
  Core::createObject(BeaverBuilder::className());
64
  }
 
 
 
65
  });
66
  }
67
 
@@ -428,6 +432,14 @@ class Plugin extends BasePlugin
428
  return $regex ? '#^(' . implode('|', $regex) . ')$#i' : false;
429
  }
430
 
 
 
 
 
 
 
 
 
431
  private function pluginI18n()
432
  {
433
  __('Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).', 'luckywp-table-of-contents');
12
  use luckywp\tableOfContents\core\wp\Options;
13
  use luckywp\tableOfContents\front\Front;
14
  use luckywp\tableOfContents\integrations\BeaverBuilder;
15
+ use luckywp\tableOfContents\integrations\RankMath;
16
  use luckywp\tableOfContents\plugin\editorBlock\EditorBlock;
17
  use luckywp\tableOfContents\plugin\mcePlugin\McePlugin;
18
  use WP_Post_Type;
63
  if (defined('FL_BUILDER_VERSION')) {
64
  Core::createObject(BeaverBuilder::className());
65
  }
66
+ if (class_exists('\RankMath')) {
67
+ Core::createObject(RankMath::className());
68
+ }
69
  });
70
  }
71
 
432
  return $regex ? '#^(' . implode('|', $regex) . ')$#i' : false;
433
  }
434
 
435
+ /**
436
+ * @return string
437
+ */
438
+ public function getName()
439
+ {
440
+ return 'LuckyWP ' . esc_html__('Table of Contents', 'luckywp-table-of-contents');
441
+ }
442
+
443
  private function pluginI18n()
444
  {
445
  __('Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).', 'luckywp-table-of-contents');
plugin/PostSettings.php CHANGED
@@ -159,6 +159,11 @@ class PostSettings extends BaseObject
159
  */
160
  public $wrapNoindex;
161
 
 
 
 
 
 
162
  /**
163
  * @var string|null
164
  */
@@ -215,6 +220,7 @@ class PostSettings extends BaseObject
215
  $this->hoverLinkColor = ArrayHelper::getValue($data, 'hoverLinkColor');
216
  $this->visitedLinkColor = ArrayHelper::getValue($data, 'visitedLinkColor');
217
  $this->wrapNoindex = ArrayHelper::getValue($data, 'wrapNoindex');
 
218
  $this->skipHeadingLevel = ArrayHelper::getValue($data, 'skipHeadingLevel');
219
  $this->skipHeadingText = ArrayHelper::getValue($data, 'skipHeadingText');
220
  }
@@ -302,6 +308,9 @@ class PostSettings extends BaseObject
302
  if ($this->wrapNoindex !== null) {
303
  $data['wrapNoindex'] = (bool)$this->wrapNoindex;
304
  }
 
 
 
305
  if ($this->skipHeadingLevel !== null) {
306
  $data['skipHeadingLevel'] = $this->skipHeadingLevel;
307
  }
159
  */
160
  public $wrapNoindex;
161
 
162
+ /**
163
+ * @var bool
164
+ */
165
+ public $useNofollow;
166
+
167
  /**
168
  * @var string|null
169
  */
220
  $this->hoverLinkColor = ArrayHelper::getValue($data, 'hoverLinkColor');
221
  $this->visitedLinkColor = ArrayHelper::getValue($data, 'visitedLinkColor');
222
  $this->wrapNoindex = ArrayHelper::getValue($data, 'wrapNoindex');
223
+ $this->useNofollow = ArrayHelper::getValue($data, 'useNofollow');
224
  $this->skipHeadingLevel = ArrayHelper::getValue($data, 'skipHeadingLevel');
225
  $this->skipHeadingText = ArrayHelper::getValue($data, 'skipHeadingText');
226
  }
308
  if ($this->wrapNoindex !== null) {
309
  $data['wrapNoindex'] = (bool)$this->wrapNoindex;
310
  }
311
+ if ($this->useNofollow !== null) {
312
+ $data['useNofollow'] = (bool)$this->useNofollow;
313
+ }
314
  if ($this->skipHeadingLevel !== null) {
315
  $data['skipHeadingLevel'] = $this->skipHeadingLevel;
316
  }
plugin/Settings.php CHANGED
@@ -330,6 +330,14 @@ class Settings extends \luckywp\tableOfContents\core\wp\Settings
330
  return (bool)$this->getValue('misc', 'wrapNoindex', false);
331
  }
332
 
 
 
 
 
 
 
 
 
333
  /**
334
  * @return string
335
  */
330
  return (bool)$this->getValue('misc', 'wrapNoindex', false);
331
  }
332
 
333
+ /**
334
+ * @return bool
335
+ */
336
+ public function getMiscUseNofollow()
337
+ {
338
+ return (bool)$this->getValue('misc', 'useNofollow', false);
339
+ }
340
+
341
  /**
342
  * @return string
343
  */
plugin/Shortcode.php CHANGED
@@ -95,6 +95,7 @@ class Shortcode extends BaseObject
95
  'hoverLinkColor',
96
  'visitedLinkColor',
97
  'wrapNoindex',
 
98
  'skipHeadingLevel',
99
  'skipHeadingText',
100
  ] as $var) {
95
  'hoverLinkColor',
96
  'visitedLinkColor',
97
  'wrapNoindex',
98
+ 'useNofollow',
99
  'skipHeadingLevel',
100
  'skipHeadingText',
101
  ] as $var) {
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,p=l.Fragment,u=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"},skipHeadingLevel:{type:"string"},skipHeadingText:{type:"string"}},edit:function(t){var e=t.attributes,o=t.setAttributes,n={};$.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]&&($.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_block_view",attrs:n},success:function(t){d[l]=t,$("#"+i).replaceWith(t)}}),d[l]='<div class="lwptocEditorBlock_title lwptocEditorBlock_title-loading" id="'+i+'">'+lwptocMain.tableOfContents+"</div>"),c(p,null,c(u,null,c(a,null,c(y,{label:lwptocMain.Edit,icon:"edit",onClick:function(){$(document).one("lwptocEditorBlockChanged",function(t,e){_.each(e,function(t,o){null===t&&(e[o]=void 0)}),o(e)}),$.lwptocCustomize.show({action:"lwptoc_block_edit",attrs:n,postId:lwptocMain.postId},function(){$(document).off("lwptocEditorBlockChanged")})}}))),c("div",{class:"lwptocEditorBlock",dangerouslySetInnerHTML:{__html:d[l]}}))},save:function(t){return t.attributes.shortcode}})}]);
1
+ !function(t){var o={};function e(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var r in t)e.d(n,r,function(o){return t[o]}.bind(null,r));return n},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s=1)}([function(t,o){function e(t){return(e="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(o){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(o)}t.exports=n},function(t,o,e){"use strict";e.r(o);var n=e(0),r=e.n(n),i=wp.blocks.registerBlockType,l=wp.element,c=l.createElement,p=l.Fragment,u=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 o=t.attributes,e=t.setAttributes,n={};$.each(o,function(t,o){r()(o)==r()(!0)&&(o=o?1:0),n[t]=o});var i="lwptocEditorBlock"+ ++f,l=JSON.stringify(o);return void 0===d[l]&&($.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_block_view",attrs:n},success:function(t){d[l]=t,$("#"+i).replaceWith(t)}}),d[l]='<div class="lwptocEditorBlock_title lwptocEditorBlock_title-loading" id="'+i+'">'+lwptocMain.tableOfContents+"</div>"),c(p,null,c(u,null,c(a,null,c(y,{label:lwptocMain.Edit,icon:"edit",onClick:function(){$(document).one("lwptocEditorBlockChanged",function(t,o){_.each(o,function(t,e){null===t&&(o[e]=void 0)}),e(o)}),$.lwptocCustomize.show({action:"lwptoc_block_edit",attrs:n,postId:lwptocMain.postId},function(){$(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.2.2
7
- Stable tag: 1.7
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -30,7 +30,7 @@ Creates SEO-friendly table of contents for your posts, pages or custom post type
30
  * Customizable appearance: width, float, title font size and weight, items font size, colors.
31
  * Color schemes (dark, light, white, transparent) and the ability to override colors.
32
  * Toggle Show/Hide (optionally)
33
- * Customizalbe labels.
34
  * Smooth scroll (optionally).
35
  * Setting offset top for smooth scroll.
36
  * Wrap table of contents with &lt;!--noindex--&gt; tag (optionally).
@@ -139,6 +139,13 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
142
  = 1.7 — 2019-07-18 =
143
  + Added option "Replace underscores (_) with dashes (-)" for hash.
144
  + Added option "Convert to lowercase" for hash.
4
  Tags: table of contents, toc, navigation, links, seo
5
  Requires at least: 4.7
6
  Tested up to: 5.2.2
7
+ Stable tag: 1.8
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
30
  * Customizable appearance: width, float, title font size and weight, items font size, colors.
31
  * Color schemes (dark, light, white, transparent) and the ability to override colors.
32
  * Toggle Show/Hide (optionally)
33
+ * Customizable labels.
34
  * Smooth scroll (optionally).
35
  * Setting offset top for smooth scroll.
36
  * Wrap table of contents with &lt;!--noindex--&gt; tag (optionally).
139
 
140
  == Changelog ==
141
 
142
+ = 1.8 — 2019-07-29 =
143
+ + Added option "Use rel="nofollow" for links"
144
+ + Added compatibility with Rank Math SEO plugin.
145
+ * Option "Auto Insert Table of Contents" is disabled by default.
146
+ * In notice "Rate the plugin" action "I've already rated the plugin" replaced to "Don't show again".
147
+ * Added tips for translators in code.
148
+
149
  = 1.7 — 2019-07-18 =
150
  + Added option "Replace underscores (_) with dashes (-)" for hash.
151
  + Added option "Convert to lowercase" for hash.