LuckyWP Table of Contents - Version 1.6

Version Description

2019-07-13 = + Added RTL support. + Added option "Numeration Suffix". * Changed text domain to "luckywp-table-of-contents". * Improved Beaver Builder plugin support.

Download this release

Release Info

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

Code changes from version 1.5.7 to 1.6

Files changed (40) hide show
  1. admin/Admin.php +31 -28
  2. admin/assets/main.min.css +1 -1
  3. admin/assets/main.min.js +1 -1
  4. admin/controllers/EditorBlockController.php +2 -2
  5. admin/controllers/ShortcodeController.php +2 -2
  6. admin/forms/CustomizeForm.php +15 -8
  7. admin/views/rate/notice.php +7 -7
  8. admin/views/settings/index.php +2 -2
  9. admin/widgets/OverrideColorBadge.php +5 -1
  10. admin/widgets/customizeModal/views/modal.php +112 -89
  11. admin/widgets/customizeSuccess/views/widget.php +1 -1
  12. admin/widgets/fontSizeField/views/widget.php +2 -2
  13. admin/widgets/metabox/views/box.php +11 -11
  14. admin/widgets/skipHeadingLevelField/views/field.php +4 -0
  15. admin/widgets/widget/views/_override.php +2 -2
  16. admin/widgets/widget/views/form.php +1 -1
  17. config/plugin.php +1 -1
  18. config/settings.php +71 -52
  19. core/admin/AdminController.php +1 -1
  20. core/helpers/Html.php +7 -2
  21. core/validators/BooleanValidator.php +1 -1
  22. core/validators/RangeValidator.php +1 -1
  23. core/validators/RequiredValidator.php +1 -1
  24. front/Front.php +1 -0
  25. front/Toc.php +14 -0
  26. front/assets/main.min.css +1 -1
  27. front/views/items.php +1 -1
  28. integrations/BeaverBuilder.php +3 -1
  29. languages/luckywp-table-of-contents-ru_RU.mo +0 -0
  30. languages/{lwptoc.pot → luckywp-table-of-contents.pot} +169 -157
  31. languages/lwptoc-ru_RU.mo +0 -0
  32. luckywp-table-of-contents.php +3 -3
  33. plugin/Plugin.php +48 -36
  34. plugin/PostSettings.php +9 -0
  35. plugin/Settings.php +15 -3
  36. plugin/Shortcode.php +1 -0
  37. plugin/WpWidget.php +1 -1
  38. plugin/editorBlock/editorBlock.min.js +1 -1
  39. plugin/mcePlugin/mce.min.css +1 -1
  40. readme.txt +29 -22
admin/Admin.php CHANGED
@@ -31,7 +31,7 @@ class Admin extends BaseObject
31
 
32
  // Ссылки в списке плагинов
33
  add_filter('plugin_action_links_' . Core::$plugin->basename, function ($links) {
34
- array_unshift($links, Html::a(esc_html__('Settings', 'lwptoc'), AdminUrl::toOptions('settings')));
35
  return $links;
36
  });
37
 
@@ -48,8 +48,8 @@ class Admin extends BaseObject
48
  {
49
  $this->pageSettingsHook = add_submenu_page(
50
  'options-general.php',
51
- esc_html__('Table of Contents', 'lwptoc'),
52
- esc_html__('Table of Contents', 'lwptoc'),
53
  'manage_options',
54
  Core::$plugin->prefix . 'settings',
55
  [SettingsController::className(), 'router']
@@ -69,7 +69,7 @@ class Admin extends BaseObject
69
  if (current_user_can('edit_posts') && $this->getMetaboxPostTypes()) {
70
  add_meta_box(
71
  Core::$plugin->prefix . '_postSettings',
72
- esc_html__('Table of Contents', 'lwptoc'),
73
  function ($post) {
74
  echo Metabox::widget([
75
  'post' => $post,
@@ -96,8 +96,8 @@ class Admin extends BaseObject
96
  'nonce' => wp_create_nonce(Core::$plugin->prefix . 'adminMain'),
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', 'lwptoc'),
100
- 'Edit' => esc_html__('Edit', 'lwptoc'),
101
  ]);
102
  }
103
 
@@ -124,58 +124,61 @@ class Admin extends BaseObject
124
  };
125
  $rows = [];
126
  if (null !== $v = $getValue($source, 'position')) {
127
- $rows[] = [esc_html__('Position', 'lwptoc'), ArrayHelper::getValue(Core::$plugin->positionsList, $v)];
128
  }
129
  if (null !== $v = $getValue($source, 'min')) {
130
- $rows[] = [esc_html__('Minimal Count of Headers', 'lwptoc'), $v];
131
  }
132
  if (null !== $v = $getValue($source, 'depth')) {
133
- $rows[] = [esc_html__('Depth', 'lwptoc'), $v];
134
  }
135
  if (null !== $v = $getValue($source, 'hierarchical')) {
136
- $rows[] = [esc_html__('Hierarchical View', 'lwptoc'), $v ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc')];
137
  }
138
  if (null !== $v = $getValue($source, 'numeration')) {
139
- $rows[] = [esc_html__('Numeration', 'lwptoc'), ArrayHelper::getValue(Core::$plugin->numerationsList, $v)];
 
 
 
140
  }
141
  if (null !== $v = $getValue($source, 'title')) {
142
- $rows[] = [esc_html__('Title', 'lwptoc'), $v == '' ? null : $v];
143
  }
144
  if (null !== $v = $getValue($source, 'toggle')) {
145
- $rows[] = [esc_html__('Toggle Show/Hide', 'lwptoc'), $v ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc')];
146
  }
147
  if (null !== $v = $getValue($source, 'labelShow')) {
148
- $rows[] = [esc_html__('Label Show', 'lwptoc'), $v == '' ? null : $v];
149
  }
150
  if (null !== $v = $getValue($source, 'labelHide')) {
151
- $rows[] = [esc_html__('Label Hide', 'lwptoc'), $v == '' ? null : $v];
152
  }
153
  if (null !== $v = $getValue($source, 'hideItems')) {
154
- $rows[] = [esc_html__('Hide Items', 'lwptoc'), $v ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc')];
155
  }
156
  if (null !== $v = $getValue($source, 'smoothScroll')) {
157
- $rows[] = [esc_html__('Smooth Scroll', 'lwptoc'), $v ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc')];
158
  }
159
  if (null !== $v = $getValue($source, 'smoothScrollOffset')) {
160
- $rows[] = [esc_html__('Smooth Scroll Offset Top', 'lwptoc'), $v . 'px'];
161
  }
162
  if (null !== $v = $getValue($source, 'width')) {
163
- $rows[] = [esc_html__('Width', 'lwptoc'), Core::$plugin->widthToLabel($v)];
164
  }
165
  if (null !== $v = $getValue($source, 'float')) {
166
- $rows[] = [esc_html__('Float', 'lwptoc'), ArrayHelper::getValue(Core::$plugin->floatsList, $v)];
167
  }
168
  if (null !== $v = $getValue($source, 'titleFontSize')) {
169
- $rows[] = [esc_html__('Title Font Size', 'lwptoc'), Core::$plugin->fontSizeToLabel($v)];
170
  }
171
  if (null !== $v = $getValue($source, 'titleFontWeight')) {
172
- $rows[] = [esc_html__('Title Font Weight', 'lwptoc'), ArrayHelper::getValue(Core::$plugin->fontWeightsList, $v)];
173
  }
174
  if (null !== $v = $getValue($source, 'itemsFontSize')) {
175
- $rows[] = [esc_html__('Items Font Size', 'lwptoc'), Core::$plugin->fontSizeToLabel($v)];
176
  }
177
  if (null !== $v = $getValue($source, 'colorScheme')) {
178
- $rows[] = [esc_html__('Color Scheme', 'lwptoc'), ArrayHelper::getValue(Core::$plugin->colorSchemesList, $v)];
179
  }
180
  foreach ([
181
  'backgroundColor' => 'Background Color',
@@ -186,17 +189,17 @@ class Admin extends BaseObject
186
  'visitedLinkColor' => 'Visited Link Color',
187
  ] as $var => $label) {
188
  if (null !== $v = $getValue($source, $var)) {
189
- $rows[] = [esc_html__($label, 'lwptoc'), OverrideColorBadge::widget(['color' => $v]), false];
190
  }
191
  }
192
  if (null !== $v = $getValue($source, 'wrapNoindex')) {
193
- $rows[] = [esc_html__('Wrap table of contents with <!--noindex--> tag', 'lwptoc'), $v ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc')];
194
  }
195
  if (null !== $v = $getValue($source, 'skipHeadingLevel')) {
196
- $rows[] = [esc_html__('Skip headings', 'lwptoc'), Core::$plugin->skipHeadingLevelToLabel($v)];
197
  }
198
  if (null !== $v = $getValue($source, 'skipHeadingText')) {
199
- $rows[] = [esc_html__('Skip headings', 'lwptoc'), $v == '' ? null : $v];
200
  }
201
  return array_map(function ($row) {
202
  if ($row[1] !== null && ArrayHelper::getValue($row, 2, true) === true) {
31
 
32
  // Ссылки в списке плагинов
33
  add_filter('plugin_action_links_' . Core::$plugin->basename, function ($links) {
34
+ array_unshift($links, Html::a(esc_html__('Settings', 'luckywp-table-of-contents'), AdminUrl::toOptions('settings')));
35
  return $links;
36
  });
37
 
48
  {
49
  $this->pageSettingsHook = add_submenu_page(
50
  'options-general.php',
51
+ esc_html__('Table of Contents', 'luckywp-table-of-contents'),
52
+ esc_html__('Table of Contents', 'luckywp-table-of-contents'),
53
  'manage_options',
54
  Core::$plugin->prefix . 'settings',
55
  [SettingsController::className(), 'router']
69
  if (current_user_can('edit_posts') && $this->getMetaboxPostTypes()) {
70
  add_meta_box(
71
  Core::$plugin->prefix . '_postSettings',
72
+ esc_html__('Table of Contents', 'luckywp-table-of-contents'),
73
  function ($post) {
74
  echo Metabox::widget([
75
  'post' => $post,
96
  'nonce' => wp_create_nonce(Core::$plugin->prefix . 'adminMain'),
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
  }
103
 
124
  };
125
  $rows = [];
126
  if (null !== $v = $getValue($source, 'position')) {
127
+ $rows[] = [esc_html__('Position', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->positionsList, $v)];
128
  }
129
  if (null !== $v = $getValue($source, 'min')) {
130
+ $rows[] = [esc_html__('Minimal Count of Headers', 'luckywp-table-of-contents'), $v];
131
  }
132
  if (null !== $v = $getValue($source, 'depth')) {
133
+ $rows[] = [esc_html__('Depth', 'luckywp-table-of-contents'), $v];
134
  }
135
  if (null !== $v = $getValue($source, 'hierarchical')) {
136
+ $rows[] = [esc_html__('Hierarchical View', 'luckywp-table-of-contents'), $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')];
137
  }
138
  if (null !== $v = $getValue($source, 'numeration')) {
139
+ $rows[] = [esc_html__('Numeration', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->numerationsList, $v)];
140
+ }
141
+ if (null !== $v = $getValue($source, 'numerationSuffix')) {
142
+ $rows[] = [esc_html__('Numeration Suffix', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->getNumerationSuffixsList(), $v)];
143
  }
144
  if (null !== $v = $getValue($source, 'title')) {
145
+ $rows[] = [esc_html__('Title', 'luckywp-table-of-contents'), $v == '' ? null : $v];
146
  }
147
  if (null !== $v = $getValue($source, 'toggle')) {
148
+ $rows[] = [esc_html__('Toggle Show/Hide', 'luckywp-table-of-contents'), $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')];
149
  }
150
  if (null !== $v = $getValue($source, 'labelShow')) {
151
+ $rows[] = [esc_html__('Label Show', 'luckywp-table-of-contents'), $v == '' ? null : $v];
152
  }
153
  if (null !== $v = $getValue($source, 'labelHide')) {
154
+ $rows[] = [esc_html__('Label Hide', 'luckywp-table-of-contents'), $v == '' ? null : $v];
155
  }
156
  if (null !== $v = $getValue($source, 'hideItems')) {
157
+ $rows[] = [esc_html__('Hide Items', 'luckywp-table-of-contents'), $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')];
158
  }
159
  if (null !== $v = $getValue($source, 'smoothScroll')) {
160
+ $rows[] = [esc_html__('Smooth Scroll', 'luckywp-table-of-contents'), $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')];
161
  }
162
  if (null !== $v = $getValue($source, 'smoothScrollOffset')) {
163
+ $rows[] = [esc_html__('Smooth Scroll Offset Top', 'luckywp-table-of-contents'), $v . 'px'];
164
  }
165
  if (null !== $v = $getValue($source, 'width')) {
166
+ $rows[] = [esc_html__('Width', 'luckywp-table-of-contents'), Core::$plugin->widthToLabel($v)];
167
  }
168
  if (null !== $v = $getValue($source, 'float')) {
169
+ $rows[] = [esc_html__('Float', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->floatsList, $v)];
170
  }
171
  if (null !== $v = $getValue($source, 'titleFontSize')) {
172
+ $rows[] = [esc_html__('Title Font Size', 'luckywp-table-of-contents'), Core::$plugin->fontSizeToLabel($v)];
173
  }
174
  if (null !== $v = $getValue($source, 'titleFontWeight')) {
175
+ $rows[] = [esc_html__('Title Font Weight', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->fontWeightsList, $v)];
176
  }
177
  if (null !== $v = $getValue($source, 'itemsFontSize')) {
178
+ $rows[] = [esc_html__('Items Font Size', 'luckywp-table-of-contents'), Core::$plugin->fontSizeToLabel($v)];
179
  }
180
  if (null !== $v = $getValue($source, 'colorScheme')) {
181
+ $rows[] = [esc_html__('Color Scheme', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->colorSchemesList, $v)];
182
  }
183
  foreach ([
184
  'backgroundColor' => 'Background Color',
189
  'visitedLinkColor' => 'Visited Link Color',
190
  ] as $var => $label) {
191
  if (null !== $v = $getValue($source, $var)) {
192
+ $rows[] = [esc_html__($label, 'luckywp-table-of-contents'), OverrideColorBadge::widget(['color' => $v]), false];
193
  }
194
  }
195
  if (null !== $v = $getValue($source, 'wrapNoindex')) {
196
+ $rows[] = [esc_html__('Wrap table of contents with <!--noindex--> tag', 'luckywp-table-of-contents'), $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')];
197
  }
198
  if (null !== $v = $getValue($source, 'skipHeadingLevel')) {
199
+ $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), Core::$plugin->skipHeadingLevelToLabel($v)];
200
  }
201
  if (null !== $v = $getValue($source, 'skipHeadingText')) {
202
+ $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), $v == '' ? null : $v];
203
  }
204
  return array_map(function ($row) {
205
  if ($row[1] !== null && ArrayHelper::getValue($row, 2, true) === true) {
admin/assets/main.min.css CHANGED
@@ -1 +1 @@
1
- @keyframes lwptocLightSpinnerKeyFrames{0%,100%,20%,80%{transform:scale(.7)}50%{transform:scale(1.5)}}.lwptocLightSpinner{display:inline-block;position:relative;width:64px;height:64px}.lwptocLightSpinner div{position:absolute;width:5px;height:5px;background:#fff;border-radius:50%;animation:lwptocLightSpinnerKeyFrames 1.2s linear infinite}.lwptocLightSpinner div:nth-child(1){animation-delay:0s;top:29px;left:53px}.lwptocLightSpinner div:nth-child(2){animation-delay:-.1s;top:18px;left:50px}.lwptocLightSpinner div:nth-child(3){animation-delay:-.2s;top:9px;left:41px}.lwptocLightSpinner div:nth-child(4){animation-delay:-.3s;top:6px;left:29px}.lwptocLightSpinner div:nth-child(5){animation-delay:-.4s;top:9px;left:18px}.lwptocLightSpinner div:nth-child(6){animation-delay:-.5s;top:18px;left:9px}.lwptocLightSpinner div:nth-child(7){animation-delay:-.6s;top:29px;left:6px}.lwptocLightSpinner div:nth-child(8){animation-delay:-.7s;top:41px;left:9px}.lwptocLightSpinner div:nth-child(9){animation-delay:-.8s;top:50px;left:18px}.lwptocLightSpinner div:nth-child(10){animation-delay:-.9s;top:53px;left:29px}.lwptocLightSpinner div:nth-child(11){animation-delay:-1s;top:50px;left:41px}.lwptocLightSpinner div:nth-child(12){animation-delay:-1.1s;top:41px;left:50px}@keyframes lwptocDarkSpinnerKeyFrames{0%,100%,20%,80%{transform:scale(.7)}50%{transform:scale(1.5)}}.lwptocDarkSpinner{display:inline-block;position:relative;width:64px;height:64px}.lwptocDarkSpinner div{position:absolute;width:5px;height:5px;background:#aaa;border-radius:50%;animation:lwptocDarkSpinnerKeyFrames 1.2s linear infinite}.lwptocDarkSpinner div:nth-child(1){animation-delay:0s;top:29px;left:53px}.lwptocDarkSpinner div:nth-child(2){animation-delay:-.1s;top:18px;left:50px}.lwptocDarkSpinner div:nth-child(3){animation-delay:-.2s;top:9px;left:41px}.lwptocDarkSpinner div:nth-child(4){animation-delay:-.3s;top:6px;left:29px}.lwptocDarkSpinner div:nth-child(5){animation-delay:-.4s;top:9px;left:18px}.lwptocDarkSpinner div:nth-child(6){animation-delay:-.5s;top:18px;left:9px}.lwptocDarkSpinner div:nth-child(7){animation-delay:-.6s;top:29px;left:6px}.lwptocDarkSpinner div:nth-child(8){animation-delay:-.7s;top:41px;left:9px}.lwptocDarkSpinner div:nth-child(9){animation-delay:-.8s;top:50px;left:18px}.lwptocDarkSpinner div:nth-child(10){animation-delay:-.9s;top:53px;left:29px}.lwptocDarkSpinner div:nth-child(11){animation-delay:-1s;top:50px;left:41px}.lwptocDarkSpinner div:nth-child(12){animation-delay:-1.1s;top:41px;left:50px}.lwptocPreloaderWrapper{position:relative!important}.lwptocPreloaderOverlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:50;background:rgba(255,255,255,.7)}.lwptocPreloaderOverlay>DIV{position:absolute;top:50%;left:50%;margin-left:-32px;margin-top:-32px}.lwptocModal-container,.lwptocModal-overlay{position:fixed;left:0;top:0;right:0;bottom:0;z-index:1000}.lwptocModal-container{overflow:auto}.lwptocModal-container_i{display:table;height:100%;margin:0 auto}.lwptocModal-container_i2{display:table-cell;padding:24px}.lwptocModal-error{padding:20px;border-radius:10px;background:#000;color:#fff}.lwptocModal-preloader{width:80px;height:80px;border-radius:10px;background:#000 url(preloader.gif) no-repeat 50% 50%}.lwptocModalBox{position:relative;width:500px;background:#fff;color:#000;box-shadow:0 3px 6px rgba(0,0,0,.3)}.lwptocModalBox_close{position:absolute;top:4px;right:8px;color:#666;text-align:center;line-height:29px;width:29px;height:29px;cursor:pointer}.lwptocModalBox_close:before{content:'\f158';font:normal 20px/29px dashicons}.lwptocModalBox_close:hover{color:#00a0d2}.lwptocModalBox_title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;font-weight:600;font-size:13px;line-height:19px;padding:8px 29px 10px 18px}.lwptocModalBox_body{padding:18px 18px 22px 18px}.lwptocModalBox_footer{padding:18px;border-top:1px solid #dfdfdf}.lwptocModalBox_footer_buttons{text-align:right}.lwptocModalBox_footer_buttons .button{margin-left:4px}.lwptocModalBox_footer_buttons .button:first-child{margin-left:0}.lwptocModalBox_footer_buttons:after{content:".";display:block;height:0;font-size:0;line-height:0;clear:both;visibility:hidden}.lwptocMetabox P{padding:0;margin:12px 0 0!important}.lwptocMetabox P:first-child{margin-top:0}.lwptocMetabox .button-link{margin-left:12px}.lwptocMetabox_settings{margin:6px 0 18px;padding:6px 0 6px 4px;box-shadow:-2px 0 0 #fafafa,-4px 0 0 #ddd,4px 0 0 #fafafa;background:#fafafa}.lwptocMetabox_settings_item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}.lwptocMetabox_settings_item:first-child{margin-top:0}.lwptocMetabox_settings_item B{font-weight:400;color:#888}.lwptocMetabox_settings_item .lwptocColorBadge B{position:relative;top:1px;margin-left:2px}.lwptocWidget{padding-bottom:12px}.lwptocWidget P{padding:0;margin:12px 0 0!important}.lwptocWidget P:first-child{margin-top:0}.lwptocWidget_settings{margin:6px 0 18px;padding:6px 0 6px 4px;box-shadow:-2px 0 0 #fafafa,-4px 0 0 #ddd,4px 0 0 #fafafa;background:#fafafa}.lwptocWidget_settings_item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}.lwptocWidget_settings_item:first-child{margin-top:0}.lwptocWidget_settings_item B{font-weight:400;color:#888}.lwptocWidget_settings_item .lwptocColorBadge B{position:relative;top:1px;margin-left:2px}.lwptocCustomize .lwptocModalBox_body{padding:0 0 22px}.lwptocCustomize_errors{margin:14px;border-left:2px solid red;background:#fff4f6;padding:4px 12px 6px;color:red}.lwptocCustomize_errors P{margin:2px 0 0 0}.lwptocCustomize_errors P:first-child{margin-top:0}.lwptocCustomize_tabs{padding:0 14px;margin-top:12px;background:#f1f1f1}.lwptocCustomize_tabs:after{content:".";display:block;height:0;font-size:0;line-height:0;clear:both;visibility:hidden}.lwptocCustomize_tab{float:left;white-space:nowrap;padding:6px 12px 7px;cursor:pointer}.lwptocCustomize_tab:hover{background:#ddd}.lwptocCustomize_tab-active{background:#0073aa!important;color:#fff;cursor:default}.lwptocCustomize_fields{display:none;padding:16px 18px 0}.lwptocCustomize_field{position:relative;margin-top:12px}.lwptocCustomize_field:first-child{margin-top:0}.lwptocCustomize_field_label{font-weight:700}.lwptocCustomize_field_default{float:right;margin-left:4px;cursor:pointer;color:#0073aa;border-bottom:1px dotted #0073aa}.lwptocCustomize_field_default:hover{color:#00a0d2;border-color:#00a0d2}.lwptocCustomize_field_override{display:none;position:absolute;left:-4px;top:-4px;right:-4px;bottom:-4px;background:rgba(42,150,204,.8);color:#fff;font-size:16px;font-weight:700;text-align:center;padding-top:12px;cursor:pointer;-webkit-transition:.1s linear;-moz-transition:.1s linear;-o-transition:.1s linear;transition:.1s linear;opacity:0}.lwptocCustomize_field_defaultValue{display:none;font-size:16px;line-height:20px;font-style:italic;color:#aaa}.lwptocCustomize_field_el{margin-top:4px}.lwptocCustomize_field_el_select,.lwptocCustomize_field_el_textInput{width:100%}.lwptocCustomize_field_desc{margin-top:2px;font-size:90%;color:#888}.lwptocCustomize_field-default .lwptocCustomize_field_default,.lwptocCustomize_field-default .lwptocCustomize_field_el{display:none}.lwptocCustomize_field-default .lwptocCustomize_field_defaultValue,.lwptocCustomize_field-default .lwptocCustomize_field_override{display:block}.lwptocCustomize_field-default .lwptocCustomize_field_desc{margin-top:0}.lwptocCustomize_field-default:hover .lwptocCustomize_field_override{opacity:1}.lwptocWidthField_custom{display:inline}.lwptocWidthField_sizeInput{vertical-align:top;width:64px;padding-bottom:4px;text-align:center}.lwptocWidthField_unitInput{vertical-align:top}.lwptocFontSizeField_custom{display:inline}.lwptocFontSizeField_sizeInput{vertical-align:top;width:64px;padding-bottom:4px;text-align:center}.lwptocFontSizeField_unitInput{vertical-align:top}.lwptocSkipHeadingLevelField LABEL{margin-right:12px}.lwptocModalSuccess{text-align:center;cursor:default;color:#8bc34a}.lwptocModalSuccess_ico{font-family:dashicons;font-size:160px;line-height:124px}.lwptocModalSuccess_text{color:#fff;font-size:24px;line-height:30px}.lwptocColorBadge B{display:inline-block;margin-right:4px;width:12px;height:12px;border-radius:6px}.lwptocFloatLeft{float:left}.lwptocEditorBlock{display:block;padding:12px 16px 13px;border:2px dashed #ddd;background:#fff;color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.lwptocEditorBlock_title{font-size:14px;line-height:18px;font-weight:700}.lwptocEditorBlock_title-loading{color:#aaa}.lwptocEditorBlock_items{margin-top:4px;font-size:12px;line-height:16px}.lwptocEditorBlock_item{margin-top:2px}.lwptocEditorBlock_item:first-child{margin-top:0}.lwptocEditorBlock_item_label{color:#888}.lwptocEditorBlock .lwptocColorBadge B{position:relative;top:1px;margin-left:2px}.lwptocSettingsRate{float:right;margin-top:19px}@media screen and (max-width:960px){.lwptocSettingsRate{display:none}}.lwptocRate .button{margin-left:12px}.lwptocRate .button:first-child{margin-left:0}.mce-i-lwptocButton:before{font:400 20px/1 dashicons;content:"\f163"}
1
+ @keyframes lwptocLightSpinnerKeyFrames{0%,100%,20%,80%{transform:scale(.7)}50%{transform:scale(1.5)}}.lwptocLightSpinner{display:inline-block;position:relative;width:64px;height:64px}.lwptocLightSpinner div{position:absolute;width:5px;height:5px;background:#fff;border-radius:50%;animation:lwptocLightSpinnerKeyFrames 1.2s linear infinite}.lwptocLightSpinner div:nth-child(1){animation-delay:0s;top:29px;left:53px}.lwptocLightSpinner div:nth-child(2){animation-delay:-.1s;top:18px;left:50px}.lwptocLightSpinner div:nth-child(3){animation-delay:-.2s;top:9px;left:41px}.lwptocLightSpinner div:nth-child(4){animation-delay:-.3s;top:6px;left:29px}.lwptocLightSpinner div:nth-child(5){animation-delay:-.4s;top:9px;left:18px}.lwptocLightSpinner div:nth-child(6){animation-delay:-.5s;top:18px;left:9px}.lwptocLightSpinner div:nth-child(7){animation-delay:-.6s;top:29px;left:6px}.lwptocLightSpinner div:nth-child(8){animation-delay:-.7s;top:41px;left:9px}.lwptocLightSpinner div:nth-child(9){animation-delay:-.8s;top:50px;left:18px}.lwptocLightSpinner div:nth-child(10){animation-delay:-.9s;top:53px;left:29px}.lwptocLightSpinner div:nth-child(11){animation-delay:-1s;top:50px;left:41px}.lwptocLightSpinner div:nth-child(12){animation-delay:-1.1s;top:41px;left:50px}@keyframes lwptocDarkSpinnerKeyFrames{0%,100%,20%,80%{transform:scale(.7)}50%{transform:scale(1.5)}}.lwptocDarkSpinner{display:inline-block;position:relative;width:64px;height:64px}.lwptocDarkSpinner div{position:absolute;width:5px;height:5px;background:#aaa;border-radius:50%;animation:lwptocDarkSpinnerKeyFrames 1.2s linear infinite}.lwptocDarkSpinner div:nth-child(1){animation-delay:0s;top:29px;left:53px}.lwptocDarkSpinner div:nth-child(2){animation-delay:-.1s;top:18px;left:50px}.lwptocDarkSpinner div:nth-child(3){animation-delay:-.2s;top:9px;left:41px}.lwptocDarkSpinner div:nth-child(4){animation-delay:-.3s;top:6px;left:29px}.lwptocDarkSpinner div:nth-child(5){animation-delay:-.4s;top:9px;left:18px}.lwptocDarkSpinner div:nth-child(6){animation-delay:-.5s;top:18px;left:9px}.lwptocDarkSpinner div:nth-child(7){animation-delay:-.6s;top:29px;left:6px}.lwptocDarkSpinner div:nth-child(8){animation-delay:-.7s;top:41px;left:9px}.lwptocDarkSpinner div:nth-child(9){animation-delay:-.8s;top:50px;left:18px}.lwptocDarkSpinner div:nth-child(10){animation-delay:-.9s;top:53px;left:29px}.lwptocDarkSpinner div:nth-child(11){animation-delay:-1s;top:50px;left:41px}.lwptocDarkSpinner div:nth-child(12){animation-delay:-1.1s;top:41px;left:50px}.lwptocPreloaderWrapper{position:relative!important}.lwptocPreloaderOverlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:50;background:rgba(255,255,255,.7)}.lwptocPreloaderOverlay>DIV{position:absolute;top:50%;left:50%;margin-left:-32px;margin-top:-32px}.lwptocModal-container,.lwptocModal-overlay{position:fixed;left:0;top:0;right:0;bottom:0;z-index:1000}.lwptocModal-container{overflow:auto}.lwptocModal-container_i{display:table;height:100%;margin:0 auto}.lwptocModal-container_i2{display:table-cell;padding:24px}.lwptocModal-error{padding:20px;border-radius:10px;background:#000;color:#fff}.lwptocModal-preloader{width:80px;height:80px;border-radius:10px;background:#000 url(preloader.gif) no-repeat 50% 50%}.lwptocModalBox{position:relative;width:500px;background:#fff;color:#000;box-shadow:0 3px 6px rgba(0,0,0,.3)}.lwptocModalBox_close{position:absolute;top:4px;right:8px;color:#666;text-align:center;line-height:29px;width:29px;height:29px;cursor:pointer}.rtl .lwptocModalBox_close{right:auto;left:8px}.lwptocModalBox_close:before{content:'\f158';font:normal 20px/29px dashicons}.lwptocModalBox_close:hover{color:#00a0d2}.lwptocModalBox_title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;font-weight:600;font-size:13px;line-height:19px;padding:8px 29px 10px 18px}.rtl .lwptocModalBox_title{padding-left:29px;padding-right:18px}.lwptocModalBox_body{padding:18px 18px 22px 18px}.lwptocModalBox_footer{padding:18px;border-top:1px solid #dfdfdf}.lwptocModalBox_footer_buttons:after{content:".";display:block;height:0;font-size:0;line-height:0;clear:both;visibility:hidden}.lwptoc_colorPicker{direction:ltr}.lwptocMetabox P{padding:0;margin:12px 0 0!important}.lwptocMetabox P:first-child{margin-top:0}.lwptocMetabox .button-link{margin-left:12px}.rtl .lwptocMetabox .button-link{margin-left:0;margin-right:12px}.lwptocMetabox_settings{margin:6px 0 18px;padding:6px 0 6px 4px;box-shadow:-2px 0 0 #fafafa,-4px 0 0 #ddd,4px 0 0 #fafafa;background:#fafafa}.rtl .lwptocMetabox_settings{padding-left:0;padding-right:4px;box-shadow:2px 0 0 #fafafa,4px 0 0 #ddd,-4px 0 0 #fafafa}.lwptocMetabox_settings_item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}.lwptocMetabox_settings_item:first-child{margin-top:0}.lwptocMetabox_settings_item B{font-weight:400;color:#888}.lwptocMetabox_settings_item .lwptocColorBadge B{position:relative;top:1px;margin-left:2px}.rtl .lwptocMetabox_settings_item .lwptocColorBadge B{margin-left:4px;margin-right:2px}.lwptocWidget{padding-bottom:12px}.lwptocWidget P{padding:0;margin:12px 0 0!important}.lwptocWidget P:first-child{margin-top:0}.lwptocWidget_settings{margin:6px 0 18px;padding:6px 0 6px 4px;box-shadow:-2px 0 0 #fafafa,-4px 0 0 #ddd,4px 0 0 #fafafa;background:#fafafa}.rtl .lwptocWidget_settings{padding-left:0;padding-right:4px;box-shadow:2px 0 0 #fafafa,4px 0 0 #ddd,-4px 0 0 #fafafa}.lwptocWidget_settings_item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}.lwptocWidget_settings_item:first-child{margin-top:0}.lwptocWidget_settings_item B{font-weight:400;color:#888}.lwptocWidget_settings_item .lwptocColorBadge B{position:relative;top:1px;margin-left:2px}.lwptocCustomize .lwptocModalBox_body{padding:0 0 22px}.lwptocCustomize_errors{margin:14px;border-left:2px solid red;background:#fff4f6;padding:4px 12px 6px;color:red}.rtl .lwptocCustomize_errors{border-left:0;border-right:2px solid red}.lwptocCustomize_errors P{margin:2px 0 0 0}.lwptocCustomize_errors P:first-child{margin-top:0}.lwptocCustomize_tabs{padding:0 14px;margin-top:12px;background:#f1f1f1}.lwptocCustomize_tabs:after{content:".";display:block;height:0;font-size:0;line-height:0;clear:both;visibility:hidden}.lwptocCustomize_tab{float:left;white-space:nowrap;padding:6px 12px 7px;cursor:pointer}.rtl .lwptocCustomize_tab{float:right}.lwptocCustomize_tab:hover{background:#ddd}.lwptocCustomize_tab-active{background:#0073aa!important;color:#fff;cursor:default}.lwptocCustomize_fields{display:none;padding:16px 18px 0}.lwptocCustomize_field{position:relative;margin-top:12px}.lwptocCustomize_field:first-child{margin-top:0}.lwptocCustomize_field_label{font-weight:700}.lwptocCustomize_field_default{float:right;margin-left:4px;cursor:pointer;color:#0073aa;border-bottom:1px dotted #0073aa}.rtl .lwptocCustomize_field_default{float:left;margin-left:0;margin-right:4px}.lwptocCustomize_field_default:hover{color:#00a0d2;border-color:#00a0d2}.lwptocCustomize_field_override{display:none;position:absolute;left:-4px;top:-4px;right:-4px;bottom:-4px;background:rgba(42,150,204,.8);color:#fff;font-size:16px;font-weight:700;text-align:center;padding-top:12px;cursor:pointer;-webkit-transition:.1s linear;-moz-transition:.1s linear;-o-transition:.1s linear;transition:.1s linear;opacity:0}.lwptocCustomize_field_defaultValue{display:none;font-size:16px;line-height:20px;font-style:italic;color:#aaa}.lwptocCustomize_field_el{margin-top:4px}.lwptocCustomize_field_el_select,.lwptocCustomize_field_el_textInput{width:100%}.lwptocCustomize_field_desc{margin-top:2px;font-size:90%;color:#888}.lwptocCustomize_field-default .lwptocCustomize_field_default,.lwptocCustomize_field-default .lwptocCustomize_field_el{display:none}.lwptocCustomize_field-default .lwptocCustomize_field_defaultValue,.lwptocCustomize_field-default .lwptocCustomize_field_override{display:block}.lwptocCustomize_field-default .lwptocCustomize_field_desc{margin-top:0}.lwptocCustomize_field-default:hover .lwptocCustomize_field_override{opacity:1}.lwptocWidthField_custom{display:inline}.lwptocWidthField_sizeInput{vertical-align:top;width:64px;padding-bottom:4px;text-align:center}.lwptocWidthField_unitInput{vertical-align:top}.lwptocFontSizeField_custom{display:inline}.lwptocFontSizeField_sizeInput{vertical-align:top;width:64px;padding-bottom:4px;text-align:center}.lwptocFontSizeField_unitInput{vertical-align:top}.lwptocSkipHeadingLevelField{direction:ltr}.lwptocSkipHeadingLevelField LABEL{margin-right:12px}.rtl .lwptocSkipHeadingLevelField LABEL{margin-right:0;margin-left:12px}.rtl .lwptocSkipHeadingLevelField{text-align:right}.lwptocModalSuccess{text-align:center;cursor:default;color:#8bc34a}.lwptocModalSuccess_ico{font-family:dashicons;font-size:160px;line-height:124px}.lwptocModalSuccess_text{color:#fff;font-size:24px;line-height:30px}.lwptocColorBadge{display:inline-block;direction:ltr}.lwptocColorBadge B{display:inline-block;margin-right:4px;width:12px;height:12px;border-radius:6px}.rtl .lwptocColorBadge B{margin-right:0;margin-left:4px}.lwptocFloatLeft{float:left}.lwptocFloatRight{float:right}.lwptocEditorBlock{display:block;padding:12px 16px 13px;border:2px dashed #ddd;background:#fff;color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.lwptocEditorBlock_title{font-size:14px;line-height:18px;font-weight:700}.lwptocEditorBlock_title-loading{color:#aaa}.lwptocEditorBlock_items{margin-top:4px;font-size:12px;line-height:16px}.lwptocEditorBlock_item{margin-top:2px}.lwptocEditorBlock_item:first-child{margin-top:0}.lwptocEditorBlock_item_label{color:#888}.lwptocEditorBlock .lwptocColorBadge B{position:relative;top:1px;margin-left:2px}.rtl .lwptocEditorBlock .lwptocColorBadge B{margin-left:4px;margin-right:2px}.lwptocSettingsRate{float:right;margin-top:19px}.rtl .lwptocSettingsRate{float:left}@media screen and (max-width:960px){.lwptocSettingsRate{display:none}}.lwptocRate .button{margin-left:12px}.rtl .lwptocRate .button{margin-left:0;margin-right:12px}.rtl .lwptocRate .button:first-child{margin-right:0}.lwptocRate .button:first-child{margin-left:0}.mce-i-lwptocButton:before{font:400 20px/1 dashicons;content:"\f163"}
admin/assets/main.min.js CHANGED
@@ -1 +1 @@
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(r){r.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}}}),r(function(){var t=r(".js-lwptocSmoothScrollCheckbox");if(t.length){var e=r(".js-lwptocSmoothScrollIOffsetInput").closest("TR");t.change(function(){t.prop("checked")?e.show():e.hide()}).change()}var o=r(".js-lwptocToggleCheckbox");if(o.length){var n=r(".js-lwptocToggleEl").closest("TR");o.change(function(){o.prop("checked")?n.show():n.hide()}).change()}var i=r(".js-lwptocAutoInsertEnableCheckbox");if(i.length){var a=r(".js-lwptocAutoInsertEl").closest("TR");i.change(function(){i.prop("checked")?a.show():a.hide()}).change()}var c=r(".lwptoc_colorPicker");c.length&&c.wpColorPicker()}),r.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=r(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=r(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"),r(this).addClass("lwptocCustomize_tab-active"),e.find(".lwptocCustomize_fields").hide(),e.find(".lwptocCustomize_fields-"+r(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,r.lwptocModal({url:lwptocMain.ajaxUrl,closeOnOverlayClick:!1,verticalAlign:"top",ajax:{data:t},afterLoadingOnShow:function(t){r.lwptocCustomize.init(t.body.find(".lwptocCustomize"),function(){t.body.lwptocModal("close")})},afterClose:e})}};var o={reload:function(t){var e=r(t);o.$container.replaceWith(e),o.init(e)},setEnabled:function(t){r.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){r.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=r(".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(){r.lwptocCustomize.show({action:"lwptoc_metabox_customize",postId:o.$container.data("postId")},r.noop)}),r(document).on("lwptocMetaboxCustomized",function(t,e){r(".lwptocCustomize-metabox").lwptocModal("close"),o.reload(e.metabox)}))}};r(function(){o.init()});var e={oneInited:!1,oneInit:function(){r(document).on("lwptocWidgetCustomized",function(t,e){r(".lwptocCustomize-metabox").lwptocModal("close"),r(".lwptocWidget-"+e.id+" .lwptocWidget_override").html(e.override),r(".lwptocWidget-"+e.id+" .lwptocWidget_input").val(e.value).change()})},init:function(){r(".lwptocWidget").each(function(){var t=r(this);t.data("inited")||(t.find(".lwptocWidget_customize").click(function(){r.lwptocCustomize.show({action:"lwptoc_widget_customize",value:t.find(".lwptocWidget_input").val(),widgetId:t.data("id")},r.noop)}),t.data("inited",1),e.oneInited||e.oneInit())})}};r.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:r(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)})})}};r(function(){n.init(r(".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:r(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)})})}};r(function(){i.init(r(".lwptocFontSizeField"))}),r(function(){var t=r(".lwptocRate");t.length&&t.on("click",".button",function(){r.ajax({url:lwptocMain.ajaxUrl,method:"POST",data:{action:r(this).data("action")},beforeSend:function(){t.lwptocPreloaderShow()},success:function(){t.remove()}})})})}(jQuery);
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);
admin/controllers/EditorBlockController.php CHANGED
@@ -62,13 +62,13 @@ class EditorBlockController extends AdminController
62
  $attrs = [];
63
  }
64
  $rows = Core::$plugin->admin->overrideSettingsToRows($attrs);
65
- echo '<div class="lwptocEditorBlock_title">' . esc_html__('Table of Contents', 'lwptoc') . '</div>';
66
  if ($rows) {
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', 'lwptoc') . '</i>' : $row[1];
72
  echo '</div>';
73
  }
74
  echo '</div>';
62
  $attrs = [];
63
  }
64
  $rows = Core::$plugin->admin->overrideSettingsToRows($attrs);
65
+ echo '<div class="lwptocEditorBlock_title">' . esc_html__('Table of Contents', 'luckywp-table-of-contents') . '</div>';
66
  if ($rows) {
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
  }
74
  echo '</div>';
admin/controllers/ShortcodeController.php CHANGED
@@ -65,13 +65,13 @@ class ShortcodeController extends AdminController
65
  }
66
  $rows = Core::$plugin->admin->overrideSettingsToRows($attrs);
67
  echo '<div class="lwptocShortcode">';
68
- echo '<div class="lwptocShortcode_title">' . esc_html__('Table of Contents', 'lwptoc') . '</div>';
69
  if ($rows) {
70
  echo '<div class="lwptocShortcode_items">';
71
  foreach ($rows as $row) {
72
  echo '<div class="lwptocShortcode_item">';
73
  echo '<span class="lwptocShortcode_item_label">' . esc_html($row[0]) . ':</span> ';
74
- echo $row[1] === null ? '<i>' . __('empty', 'lwptoc') . '</i>' : $row[1];
75
  echo '</div>';
76
  }
77
  echo '</div>';
65
  }
66
  $rows = Core::$plugin->admin->overrideSettingsToRows($attrs);
67
  echo '<div class="lwptocShortcode">';
68
+ echo '<div class="lwptocShortcode_title">' . esc_html__('Table of Contents', 'luckywp-table-of-contents') . '</div>';
69
  if ($rows) {
70
  echo '<div class="lwptocShortcode_items">';
71
  foreach ($rows as $row) {
72
  echo '<div class="lwptocShortcode_item">';
73
  echo '<span class="lwptocShortcode_item_label">' . esc_html($row[0]) . ':</span> ';
74
+ echo $row[1] === null ? '<i>' . __('empty', 'luckywp-table-of-contents') . '</i>' : $row[1];
75
  echo '</div>';
76
  }
77
  echo '</div>';
admin/forms/CustomizeForm.php CHANGED
@@ -23,6 +23,9 @@ class CustomizeForm extends Model
23
  public $defaultNumeration;
24
  public $numeration;
25
 
 
 
 
26
  public $defaultTitle;
27
  public $title;
28
 
@@ -112,6 +115,7 @@ class CustomizeForm extends Model
112
  'depth',
113
  'hierarchical',
114
  'numeration',
 
115
  'title',
116
  'toggle',
117
  'labelShow',
@@ -178,6 +182,7 @@ class CustomizeForm extends Model
178
  ['depth', 'in', 'range' => array_keys(Core::$plugin->depthsList)],
179
  ['hierarchical', 'boolean'],
180
  ['numeration', 'in', 'range' => array_keys(Core::$plugin->numerationsList)],
 
181
  ['title', 'filter', 'filter' => 'trim'],
182
  ['toggle', 'boolean'],
183
  [['labelShow', 'labelHide'], 'filter', 'filter' => 'trim'],
@@ -228,14 +233,15 @@ class CustomizeForm extends Model
228
  public function attributeLabels()
229
  {
230
  return [
231
- 'depth' => esc_html__('Depth', 'lwptoc'),
232
- 'numeration' => esc_html__('Numeration', 'lwptoc'),
233
- 'labelShow' => esc_html__('Label Show', 'lwptoc'),
234
- 'labelHide' => esc_html__('Label Hide', 'lwptoc'),
235
- 'position' => esc_html__('Position', 'lwptoc'),
236
- 'float' => esc_html__('Float', 'lwptoc'),
237
- 'titleFontWeight' => esc_html__('Title Font Weight', 'lwptoc'),
238
- 'colorScheme' => esc_html__('Color Scheme', 'lwptoc'),
 
239
  ];
240
  }
241
 
@@ -268,6 +274,7 @@ class CustomizeForm extends Model
268
  'depth' => $this->defaultDepth ? null : $this->depth,
269
  'hierarchical' => $this->defaultHierarchical ? null : (bool)$this->hierarchical,
270
  'numeration' => $this->defaultNumeration ? null : $this->numeration,
 
271
  'title' => $this->defaultTitle ? null : $this->title,
272
  'toggle' => $this->defaultToggle ? null : (bool)$this->toggle,
273
  'labelShow' => $this->defaultLabelShow ? null : $this->labelShow,
23
  public $defaultNumeration;
24
  public $numeration;
25
 
26
+ public $defaultNumerationSuffix;
27
+ public $numerationSuffix;
28
+
29
  public $defaultTitle;
30
  public $title;
31
 
115
  'depth',
116
  'hierarchical',
117
  'numeration',
118
+ 'numerationSuffix',
119
  'title',
120
  'toggle',
121
  'labelShow',
182
  ['depth', 'in', 'range' => array_keys(Core::$plugin->depthsList)],
183
  ['hierarchical', 'boolean'],
184
  ['numeration', 'in', 'range' => array_keys(Core::$plugin->numerationsList)],
185
+ ['numerationSuffix', 'in', 'range' => array_keys(Core::$plugin->getNumerationSuffixsList())],
186
  ['title', 'filter', 'filter' => 'trim'],
187
  ['toggle', 'boolean'],
188
  [['labelShow', 'labelHide'], 'filter', 'filter' => 'trim'],
233
  public function attributeLabels()
234
  {
235
  return [
236
+ 'depth' => esc_html__('Depth', 'luckywp-table-of-contents'),
237
+ 'numeration' => esc_html__('Numeration', 'luckywp-table-of-contents'),
238
+ 'numerationSuffix' => esc_html__('Numeration Suffix', 'luckywp-table-of-contents'),
239
+ 'labelShow' => esc_html__('Label Show', 'luckywp-table-of-contents'),
240
+ 'labelHide' => esc_html__('Label Hide', 'luckywp-table-of-contents'),
241
+ 'position' => esc_html__('Position', 'luckywp-table-of-contents'),
242
+ 'float' => esc_html__('Float', 'luckywp-table-of-contents'),
243
+ 'titleFontWeight' => esc_html__('Title Font Weight', 'luckywp-table-of-contents'),
244
+ 'colorScheme' => esc_html__('Color Scheme', 'luckywp-table-of-contents'),
245
  ];
246
  }
247
 
274
  'depth' => $this->defaultDepth ? null : $this->depth,
275
  'hierarchical' => $this->defaultHierarchical ? null : (bool)$this->hierarchical,
276
  'numeration' => $this->defaultNumeration ? null : $this->numeration,
277
+ 'numerationSuffix' => $this->defaultNumerationSuffix ? null : $this->numerationSuffix,
278
  'title' => $this->defaultTitle ? null : $this->title,
279
  'toggle' => $this->defaultToggle ? null : (bool)$this->toggle,
280
  'labelShow' => $this->defaultLabelShow ? null : $this->labelShow,
admin/views/rate/notice.php CHANGED
@@ -6,30 +6,30 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
6
  ?>
7
  <div class="notice notice-info lwptocRate">
8
  <p>
9
- <?= esc_html__('Hello!', 'lwptoc') ?>
10
  <br>
11
  <?= sprintf(
12
- esc_html__('We are very pleased that you are using the %s plugin within a few days.', 'lwptoc'),
13
  '<b>LuckyWP Table of Contents</b>'
14
  ) ?>
15
  <br>
16
- <?= esc_html__('Please rate plugin. It will help us a lot.', 'lwptoc') ?>
17
  </p>
18
  <p>
19
- <?= AdminHtml::buttonLink(esc_html__('Rate the plugin', 'lwptoc'), Rate::LINK, [
20
  'attrs' => [
21
  'data-action' => 'lwptoc_rate',
22
  'target' => '_blank',
23
  ],
24
  'theme' => AdminHtml::BUTTON_THEME_PRIMARY,
25
  ]) ?>
26
- <?= AdminHtml::button(esc_html__('Remind later', 'lwptoc'), [
27
  'attrs' => [
28
  'data-action' => 'lwptoc_show_later',
29
  ],
30
  'theme' => AdminHtml::BUTTON_THEME_LINK,
31
  ]) ?>
32
- <?= AdminHtml::button(esc_html__('I\'ve already rated the plugin', 'lwptoc'), [
33
  'attrs' => [
34
  'data-action' => 'lwptoc_already_rate',
35
  ],
@@ -37,6 +37,6 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
37
  ]) ?>
38
  </p>
39
  <p>
40
- <b><?= esc_html__('Thank you very much!', 'lwptoc') ?></b>
41
  </p>
42
  </div>
6
  ?>
7
  <div class="notice notice-info lwptocRate">
8
  <p>
9
+ <?= esc_html__('Hello!', 'luckywp-table-of-contents') ?>
10
  <br>
11
  <?= sprintf(
12
+ esc_html__('We are very pleased that you are using the %s plugin within a few days.', 'luckywp-table-of-contents'),
13
  '<b>LuckyWP Table of Contents</b>'
14
  ) ?>
15
  <br>
16
+ <?= esc_html__('Please rate plugin. It will help us a lot.', 'luckywp-table-of-contents') ?>
17
  </p>
18
  <p>
19
+ <?= AdminHtml::buttonLink(esc_html__('Rate the plugin', 'luckywp-table-of-contents'), Rate::LINK, [
20
  'attrs' => [
21
  'data-action' => 'lwptoc_rate',
22
  'target' => '_blank',
23
  ],
24
  'theme' => AdminHtml::BUTTON_THEME_PRIMARY,
25
  ]) ?>
26
+ <?= AdminHtml::button(esc_html__('Remind later', 'luckywp-table-of-contents'), [
27
  'attrs' => [
28
  'data-action' => 'lwptoc_show_later',
29
  ],
30
  'theme' => AdminHtml::BUTTON_THEME_LINK,
31
  ]) ?>
32
+ <?= AdminHtml::button(esc_html__('I\'ve already rated the plugin', 'luckywp-table-of-contents'), [
33
  'attrs' => [
34
  'data-action' => 'lwptoc_already_rate',
35
  ],
37
  ]) ?>
38
  </p>
39
  <p>
40
+ <b><?= esc_html__('Thank you very much!', 'luckywp-table-of-contents') ?></b>
41
  </p>
42
  </div>
admin/views/settings/index.php CHANGED
@@ -6,9 +6,9 @@ use luckywp\tableOfContents\core\Core;
6
  ?>
7
  <div class="wrap">
8
  <a href="<?= Rate::LINK ?>" target="_blank" class="lwptocSettingsRate"><?= sprintf(
9
- esc_html__('Leave a %s plugin review on WordPress.org', 'lwptoc'),
10
  '★★★★★'
11
  ) ?></a>
12
- <h1><?= esc_html__('Table of Contents Settings', 'lwptoc') ?></h1>
13
  <?php Core::$plugin->settings->showPage(false) ?>
14
  </div>
6
  ?>
7
  <div class="wrap">
8
  <a href="<?= Rate::LINK ?>" target="_blank" class="lwptocSettingsRate"><?= sprintf(
9
+ esc_html__('Leave a %s plugin review on WordPress.org', 'luckywp-table-of-contents'),
10
  '★★★★★'
11
  ) ?></a>
12
+ <h1><?= esc_html__('Table of Contents Settings', 'luckywp-table-of-contents') ?></h1>
13
  <?php Core::$plugin->settings->showPage(false) ?>
14
  </div>
admin/widgets/OverrideColorBadge.php CHANGED
@@ -14,6 +14,10 @@ class OverrideColorBadge extends Widget
14
 
15
  public function run()
16
  {
17
- return $this->color ? '<span class="lwptocColorBadge"><b style="background:' . $this->color . '"></b>' . $this->color . '</span>' : esc_html__('from scheme', 'lwptoc');
 
 
 
 
18
  }
19
  }
14
 
15
  public function run()
16
  {
17
+ if ($this->color) {
18
+ $ico = '<b style="background:' . $this->color . '"></b>';
19
+ return '<span class="lwptocColorBadge">' . (is_rtl() ? ($this->color . $ico) : ($ico . $this->color)) . '</span>';
20
+ }
21
+ return esc_html__('from scheme', 'luckywp-table-of-contents');
22
  }
23
  }
admin/widgets/customizeModal/views/modal.php CHANGED
@@ -22,8 +22,8 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
22
  data-ajax-form="1"
23
  class="lwptocModalBox"
24
  >
25
- <div class="lwptocModalBox_close lwptocModal-close" title="<?= __('Cancel', 'lwptoc') ?>"></div>
26
- <div class="lwptocModalBox_title"><?= __('Customize Table of Contents', 'lwptoc') ?></div>
27
  <div class="lwptocModalBox_body">
28
 
29
  <?php
@@ -37,9 +37,9 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
37
  ?>
38
 
39
  <div class="lwptocCustomize_tabs">
40
- <div class="lwptocCustomize_tab lwptocCustomize_tab-active" data-tab="general"><?= esc_html__('General', 'lwptoc') ?></div>
41
- <div class="lwptocCustomize_tab" data-tab="appearance"><?= esc_html__('Appearance', 'lwptoc') ?></div>
42
- <div class="lwptocCustomize_tab" data-tab="misc"><?= esc_html__('Misc.', 'lwptoc') ?></div>
43
  </div>
44
 
45
  <div class="lwptocCustomize_fields lwptocCustomize_fields-general" style="display:block;">
@@ -47,11 +47,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
47
  <?php if ($model->isPostSettings) { ?>
48
  <div class="lwptocCustomize_field<?= $model->defaultPosition ? ' lwptocCustomize_field-default' : '' ?>">
49
  <div class="lwptocCustomize_field_header">
50
- <span class="lwptocCustomize_field_label"><?= __('Position', 'lwptoc') ?></span>
51
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
52
  </div>
53
  <div class="lwptocCustomize_field_override">
54
- <?= __('Click for override default value', 'lwptoc') ?>
55
  </div>
56
  <div class="lwptocCustomize_field_el">
57
  <?= Html::dropDownList(Html::getInputName($model, 'position'), $model->defaultPosition ? Core::$plugin->settings->autoInsertPosition : $model->position, Core::$plugin->positionsList, [
@@ -70,11 +70,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
70
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->min)) ? Core::$plugin->settings->generalMin : $model->postSettings->min ?>
71
  <div class="lwptocCustomize_field<?= $model->defaultMin ? ' lwptocCustomize_field-default' : '' ?>">
72
  <div class="lwptocCustomize_field_header">
73
- <span class="lwptocCustomize_field_label"><?= __('Minimal Count of Headers', 'lwptoc') ?></span>
74
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
75
  </div>
76
  <div class="lwptocCustomize_field_override">
77
- <?= __('Click for override default value', 'lwptoc') ?>
78
  </div>
79
  <div class="lwptocCustomize_field_el">
80
  <?= Html::textInput(Html::getInputName($model, 'min'), $model->defaultMin ? $defaultValue : $model->min, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -83,7 +83,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
83
  ]) ?>
84
  </div>
85
  <div class="lwptocCustomize_field_desc">
86
- <?= __('If the count of headers in the post is less, then table of contents is not displayed.', 'lwptoc') ?>
87
  </div>
88
  <div class="lwptocCustomize_field_defaultValue">
89
  <?= $defaultValue ?>
@@ -93,11 +93,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
93
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->depth)) ? Core::$plugin->settings->generalDepth : $model->postSettings->depth ?>
94
  <div class="lwptocCustomize_field<?= $model->defaultDepth ? ' lwptocCustomize_field-default' : '' ?>">
95
  <div class="lwptocCustomize_field_header">
96
- <span class="lwptocCustomize_field_label"><?= __('Depth', 'lwptoc') ?></span>
97
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
98
  </div>
99
  <div class="lwptocCustomize_field_override">
100
- <?= __('Click for override default value', 'lwptoc') ?>
101
  </div>
102
  <div class="lwptocCustomize_field_el">
103
  <?= Html::dropDownList(Html::getInputName($model, 'depth'), $model->defaultDepth ? $defaultValue : $model->depth, Core::$plugin->depthsList, [
@@ -115,34 +115,34 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
115
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->hierarchical)) ? Core::$plugin->settings->generalHierarchical : $model->postSettings->hierarchical ?>
116
  <div class="lwptocCustomize_field<?= $model->defaultHierarchical ? ' lwptocCustomize_field-default' : '' ?>">
117
  <div class="lwptocCustomize_field_header">
118
- <span class="lwptocCustomize_field_label"><?= __('Hierarchical View', 'lwptoc') ?></span>
119
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
120
  </div>
121
  <div class="lwptocCustomize_field_override">
122
- <?= __('Click for override default value', 'lwptoc') ?>
123
  </div>
124
  <div class="lwptocCustomize_field_el">
125
  <label>
126
  <?= Html::checkbox(Html::getInputName($model, 'hierarchical'), $model->defaultHierarchical ? $defaultValue : $model->hierarchical, ['uncheck' => 0]) ?>
127
- <?= __('Enable', 'lwptoc') ?>
128
  </label>
129
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultHierarchical'), $model->defaultHierarchical, [
130
  'class' => 'lwptocCustomize_field_inputDefault',
131
  ]) ?>
132
  </div>
133
  <div class="lwptocCustomize_field_defaultValue">
134
- <?= $defaultValue ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc') ?>
135
  </div>
136
  </div>
137
 
138
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->numeration)) ? Core::$plugin->settings->generalNumeration : $model->postSettings->numeration ?>
139
  <div class="lwptocCustomize_field<?= $model->defaultNumeration ? ' lwptocCustomize_field-default' : '' ?>">
140
  <div class="lwptocCustomize_field_header">
141
- <span class="lwptocCustomize_field_label"><?= __('Numeration', 'lwptoc') ?></span>
142
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
143
  </div>
144
  <div class="lwptocCustomize_field_override">
145
- <?= __('Click for override default value', 'lwptoc') ?>
146
  </div>
147
  <div class="lwptocCustomize_field_el">
148
  <?= Html::dropDownList(Html::getInputName($model, 'numeration'), $model->defaultNumeration ? $defaultValue : $model->numeration, Core::$plugin->numerationsList, [
@@ -157,14 +157,36 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
157
  </div>
158
  </div>
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->title)) ? Core::$plugin->settings->generalTitle : $model->postSettings->title ?>
161
  <div class="lwptocCustomize_field<?= $model->defaultTitle ? ' lwptocCustomize_field-default' : '' ?>">
162
  <div class="lwptocCustomize_field_header">
163
- <span class="lwptocCustomize_field_label"><?= __('Title', 'lwptoc') ?></span>
164
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
165
  </div>
166
  <div class="lwptocCustomize_field_override">
167
- <?= __('Click for override default value', 'lwptoc') ?>
168
  </div>
169
  <div class="lwptocCustomize_field_el">
170
  <?= Html::textInput(Html::getInputName($model, 'title'), $model->defaultTitle ? $defaultValue : $model->title, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -175,7 +197,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
175
  <div class="lwptocCustomize_field_defaultValue">
176
  <?php
177
  if ('' == $defaultValue) {
178
- echo '<i>' . __('Without title', 'lwptoc') . '</i>';
179
  } else {
180
  echo $defaultValue;
181
  }
@@ -186,34 +208,34 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
186
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->toggle)) ? Core::$plugin->settings->generalToggle : $model->postSettings->toggle ?>
187
  <div class="lwptocCustomize_field<?= $model->defaultToggle ? ' lwptocCustomize_field-default' : '' ?>">
188
  <div class="lwptocCustomize_field_header">
189
- <span class="lwptocCustomize_field_label"><?= __('Toggle Show/Hide', 'lwptoc') ?></span>
190
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
191
  </div>
192
  <div class="lwptocCustomize_field_override">
193
- <?= __('Click for override default value', 'lwptoc') ?>
194
  </div>
195
  <div class="lwptocCustomize_field_el">
196
  <label>
197
  <?= Html::checkbox(Html::getInputName($model, 'toggle'), $model->defaultToggle ? $defaultValue : $model->toggle, ['uncheck' => 0]) ?>
198
- <?= __('Enable', 'lwptoc') ?>
199
  </label>
200
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultToggle'), $model->defaultToggle, [
201
  'class' => 'lwptocCustomize_field_inputDefault',
202
  ]) ?>
203
  </div>
204
  <div class="lwptocCustomize_field_defaultValue">
205
- <?= $defaultValue ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc') ?>
206
  </div>
207
  </div>
208
 
209
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->labelShow)) ? Core::$plugin->settings->generalLabelShow : $model->postSettings->labelShow ?>
210
  <div class="lwptocCustomize_field<?= $model->defaultLabelShow ? ' lwptocCustomize_field-default' : '' ?>">
211
  <div class="lwptocCustomize_field_header">
212
- <span class="lwptocCustomize_field_label"><?= __('Label Show', 'lwptoc') ?></span>
213
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
214
  </div>
215
  <div class="lwptocCustomize_field_override">
216
- <?= __('Click for override default value', 'lwptoc') ?>
217
  </div>
218
  <div class="lwptocCustomize_field_el">
219
  <?= Html::textInput(Html::getInputName($model, 'labelShow'), $model->defaultLabelShow ? $defaultValue : $model->labelShow, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -229,11 +251,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
229
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->labelHide)) ? Core::$plugin->settings->generalLabelHide : $model->postSettings->labelHide ?>
230
  <div class="lwptocCustomize_field<?= $model->defaultLabelHide ? ' lwptocCustomize_field-default' : '' ?>">
231
  <div class="lwptocCustomize_field_header">
232
- <span class="lwptocCustomize_field_label"><?= __('Label Hide', 'lwptoc') ?></span>
233
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
234
  </div>
235
  <div class="lwptocCustomize_field_override">
236
- <?= __('Click for override default value', 'lwptoc') ?>
237
  </div>
238
  <div class="lwptocCustomize_field_el">
239
  <?= Html::textInput(Html::getInputName($model, 'labelHide'), $model->defaultLabelHide ? $defaultValue : $model->labelHide, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -249,57 +271,57 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
249
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->hideItems)) ? Core::$plugin->settings->generalHideItems : $model->postSettings->hideItems ?>
250
  <div class="lwptocCustomize_field<?= $model->defaultHideItems ? ' lwptocCustomize_field-default' : '' ?>">
251
  <div class="lwptocCustomize_field_header">
252
- <span class="lwptocCustomize_field_label"><?= __('By default, items of contents will be hidden', 'lwptoc') ?></span>
253
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
254
  </div>
255
  <div class="lwptocCustomize_field_override">
256
- <?= __('Click for override default value', 'lwptoc') ?>
257
  </div>
258
  <div class="lwptocCustomize_field_el">
259
  <label>
260
  <?= Html::checkbox(Html::getInputName($model, 'hideItems'), $model->defaultHideItems ? $defaultValue : $model->hideItems, ['uncheck' => 0]) ?>
261
- <?= __('Enable', 'lwptoc') ?>
262
  </label>
263
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultHideItems'), $model->defaultHideItems, [
264
  'class' => 'lwptocCustomize_field_inputDefault',
265
  ]) ?>
266
  </div>
267
  <div class="lwptocCustomize_field_defaultValue">
268
- <?= $defaultValue ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc') ?>
269
  </div>
270
  </div>
271
 
272
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->smoothScroll)) ? Core::$plugin->settings->generalSmoothScroll : $model->postSettings->smoothScroll ?>
273
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScroll ? ' lwptocCustomize_field-default' : '' ?>">
274
  <div class="lwptocCustomize_field_header">
275
- <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll', 'lwptoc') ?></span>
276
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
277
  </div>
278
  <div class="lwptocCustomize_field_override">
279
- <?= __('Click for override default value', 'lwptoc') ?>
280
  </div>
281
  <div class="lwptocCustomize_field_el">
282
  <label>
283
  <?= Html::checkbox(Html::getInputName($model, 'smoothScroll'), $model->defaultSmoothScroll ? $defaultValue : $model->smoothScroll, ['uncheck' => 0]) ?>
284
- <?= __('Enable', 'lwptoc') ?>
285
  </label>
286
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultSmoothScroll'), $model->defaultSmoothScroll, [
287
  'class' => 'lwptocCustomize_field_inputDefault',
288
  ]) ?>
289
  </div>
290
  <div class="lwptocCustomize_field_defaultValue">
291
- <?= $defaultValue ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc') ?>
292
  </div>
293
  </div>
294
 
295
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->smoothScrollOffset)) ? Core::$plugin->settings->generalSmoothScrollOffset : $model->postSettings->smoothScrollOffset ?>
296
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScrollOffset ? ' lwptocCustomize_field-default' : '' ?>">
297
  <div class="lwptocCustomize_field_header">
298
- <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll Offset Top', 'lwptoc') ?></span>
299
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
300
  </div>
301
  <div class="lwptocCustomize_field_override">
302
- <?= __('Click for override default value', 'lwptoc') ?>
303
  </div>
304
  <div class="lwptocCustomize_field_el">
305
  <?= Html::textInput(Html::getInputName($model, 'smoothScrollOffset'), $model->defaultSmoothScrollOffset ? $defaultValue : $model->smoothScrollOffset, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -319,11 +341,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
319
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->width)) ? Core::$plugin->settings->appearanceWidth : $model->postSettings->width ?>
320
  <div class="lwptocCustomize_field<?= $model->defaultWidth ? ' lwptocCustomize_field-default' : '' ?>">
321
  <div class="lwptocCustomize_field_header">
322
- <span class="lwptocCustomize_field_label"><?= esc_html__('Width', 'lwptoc') ?></span>
323
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
324
  </div>
325
  <div class="lwptocCustomize_field_override">
326
- <?= __('Click for override default value', 'lwptoc') ?>
327
  </div>
328
  <div class="lwptocCustomize_field_el">
329
  <?= WidthField::widget([
@@ -342,11 +364,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
342
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->float)) ? Core::$plugin->settings->appearanceFloat : $model->postSettings->float ?>
343
  <div class="lwptocCustomize_field<?= $model->defaultFloat ? ' lwptocCustomize_field-default' : '' ?>">
344
  <div class="lwptocCustomize_field_header">
345
- <span class="lwptocCustomize_field_label"><?= esc_html__('Float', 'lwptoc') ?></span>
346
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
347
  </div>
348
  <div class="lwptocCustomize_field_override">
349
- <?= __('Click for override default value', 'lwptoc') ?>
350
  </div>
351
  <div class="lwptocCustomize_field_el">
352
  <?= Html::dropDownList(Html::getInputName($model, 'float'), $model->defaultFloat ? $defaultValue : $model->float, Core::$plugin->floatsList, [
@@ -364,11 +386,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
364
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->titleFontSize)) ? Core::$plugin->settings->appearanceTitleFontSize : $model->postSettings->titleFontSize ?>
365
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontSize ? ' lwptocCustomize_field-default' : '' ?>">
366
  <div class="lwptocCustomize_field_header">
367
- <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Size', 'lwptoc') ?></span>
368
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
369
  </div>
370
  <div class="lwptocCustomize_field_override">
371
- <?= __('Click for override default value', 'lwptoc') ?>
372
  </div>
373
  <div class="lwptocCustomize_field_el">
374
  <?= FontSizeField::widget([
@@ -388,11 +410,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
388
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->titleFontWeight)) ? Core::$plugin->settings->appearanceTitleFontWeight : $model->postSettings->titleFontWeight ?>
389
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontWeight ? ' lwptocCustomize_field-default' : '' ?>">
390
  <div class="lwptocCustomize_field_header">
391
- <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Weight', 'lwptoc') ?></span>
392
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
393
  </div>
394
  <div class="lwptocCustomize_field_override">
395
- <?= __('Click for override default value', 'lwptoc') ?>
396
  </div>
397
  <div class="lwptocCustomize_field_el">
398
  <?= Html::dropDownList(Html::getInputName($model, 'titleFontWeight'), $model->defaultTitleFontWeight ? $defaultValue : $model->titleFontWeight, Core::$plugin->fontWeightsList, [
@@ -410,11 +432,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
410
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->itemsFontSize)) ? Core::$plugin->settings->appearanceItemsFontSize : $model->postSettings->itemsFontSize ?>
411
  <div class="lwptocCustomize_field<?= $model->defaultItemsFontSize ? ' lwptocCustomize_field-default' : '' ?>">
412
  <div class="lwptocCustomize_field_header">
413
- <span class="lwptocCustomize_field_label"><?= esc_html__('Items Font Size', 'lwptoc') ?></span>
414
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
415
  </div>
416
  <div class="lwptocCustomize_field_override">
417
- <?= __('Click for override default value', 'lwptoc') ?>
418
  </div>
419
  <div class="lwptocCustomize_field_el">
420
  <?= FontSizeField::widget([
@@ -434,11 +456,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
434
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->colorScheme)) ? Core::$plugin->settings->appearanceColorScheme : $model->postSettings->colorScheme ?>
435
  <div class="lwptocCustomize_field<?= $model->defaultColorScheme ? ' lwptocCustomize_field-default' : '' ?>">
436
  <div class="lwptocCustomize_field_header">
437
- <span class="lwptocCustomize_field_label"><?= esc_html__('Color Scheme', 'lwptoc') ?></span>
438
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
439
  </div>
440
  <div class="lwptocCustomize_field_override">
441
- <?= __('Click for override default value', 'lwptoc') ?>
442
  </div>
443
  <div class="lwptocCustomize_field_el">
444
  <?= Html::dropDownList(Html::getInputName($model, 'colorScheme'), $model->defaultColorScheme ? $defaultValue : $model->colorScheme, Core::$plugin->colorSchemesList, [
@@ -464,11 +486,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
464
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->$var)) ? Core::$plugin->settings->{'appearance' . ucfirst($var)} : $model->postSettings->$var ?>
465
  <div class="lwptocCustomize_field<?= $model->{'default' . ucfirst($var)} ? ' lwptocCustomize_field-default' : '' ?>">
466
  <div class="lwptocCustomize_field_header">
467
- <span class="lwptocCustomize_field_label"><?= esc_html__($label, 'lwptoc') ?></span>
468
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
469
  </div>
470
  <div class="lwptocCustomize_field_override">
471
- <?= esc_html__('Click for override default value', 'lwptoc') ?>
472
  </div>
473
  <div class="lwptocCustomize_field_defaultValue">
474
  <?= OverrideColorBadge::widget(['color' => $defaultValue]) ?>
@@ -489,34 +511,34 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
489
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->wrapNoindex)) ? Core::$plugin->settings->miscWrapNoindex : $model->postSettings->wrapNoindex ?>
490
  <div class="lwptocCustomize_field<?= $model->defaultWrapNoindex ? ' lwptocCustomize_field-default' : '' ?>">
491
  <div class="lwptocCustomize_field_header">
492
- <span class="lwptocCustomize_field_label"><?= esc_html__('Wrap table of contents with <!--noindex--> tag', 'lwptoc') ?></span>
493
- <span class="lwptocCustomize_field_default"><?= __('default', 'lwptoc') ?></span>
494
  </div>
495
  <div class="lwptocCustomize_field_override">
496
- <?= __('Click for override default value', 'lwptoc') ?>
497
  </div>
498
  <div class="lwptocCustomize_field_el">
499
  <label>
500
  <?= Html::checkbox(Html::getInputName($model, 'wrapNoindex'), $model->defaultWrapNoindex ? $defaultValue : $model->wrapNoindex, ['uncheck' => 0]) ?>
501
- <?= __('Enable', 'lwptoc') ?>
502
  </label>
503
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultWrapNoindex'), $model->defaultWrapNoindex, [
504
  'class' => 'lwptocCustomize_field_inputDefault',
505
  ]) ?>
506
  </div>
507
  <div class="lwptocCustomize_field_defaultValue">
508
- <?= $defaultValue ? __('Enabled', 'lwptoc') : __('Disabled', 'lwptoc') ?>
509
  </div>
510
  </div>
511
 
512
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->skipHeadingLevel)) ? Core::$plugin->settings->getMiscSkipHeadingLevel() : $model->postSettings->skipHeadingLevel ?>
513
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingLevel ? ' lwptocCustomize_field-default' : '' ?>">
514
  <div class="lwptocCustomize_field_header">
515
- <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by level', 'lwptoc') ?></span>
516
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
517
  </div>
518
  <div class="lwptocCustomize_field_override">
519
- <?= esc_html__('Click for override default value', 'lwptoc') ?>
520
  </div>
521
  <div class="lwptocCustomize_field_el">
522
  <?= SkipHeadingLevelField::widget([
@@ -535,11 +557,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
535
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->skipHeadingText)) ? Core::$plugin->settings->getMiscSkipHeadingText() : $model->postSettings->skipHeadingText ?>
536
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingText ? ' lwptocCustomize_field-default' : '' ?>">
537
  <div class="lwptocCustomize_field_header">
538
- <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by text', 'lwptoc') ?></span>
539
- <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'lwptoc') ?></span>
540
  </div>
541
  <div class="lwptocCustomize_field_override">
542
- <?= esc_html__('Click for override default value', 'lwptoc') ?>
543
  </div>
544
  <div class="lwptocCustomize_field_el">
545
  <?php
@@ -549,10 +571,10 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
549
  'rows' => 5,
550
  ]);
551
  echo '<div class="lwptocCustomize_field_desc">';
552
- echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'lwptoc');
553
  echo '<br>';
554
  echo sprintf(
555
- esc_html__('Use an asterisk %s as a wildcard to match any text.', 'lwptoc'),
556
  '<code>*</code>'
557
  );
558
  echo '</div>';
@@ -564,7 +586,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
564
  <div class="lwptocCustomize_field_defaultValue">
565
  <?php
566
  if ('' == $defaultValue) {
567
- echo '<i>' . esc_html__('empty', 'lwptoc') . '</i>';
568
  } else {
569
  echo $defaultValue;
570
  }
@@ -577,12 +599,13 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
577
  </div>
578
  <div class="lwptocModalBox_footer">
579
  <div class="lwptocModalBox_footer_buttons">
580
- <?= AdminHtml::button(__('Cancel', 'lwptoc'), [
581
- 'class' => 'lwptocModal-close lwptocFloatLeft'
582
  ]) ?>
583
- <?= AdminHtml::button(__('Save', 'lwptoc'), [
584
  'theme' => AdminHtml::BUTTON_THEME_PRIMARY,
585
  'submit' => true,
 
586
  ]) ?>
587
  </div>
588
  </div>
22
  data-ajax-form="1"
23
  class="lwptocModalBox"
24
  >
25
+ <div class="lwptocModalBox_close lwptocModal-close" title="<?= __('Cancel', 'luckywp-table-of-contents') ?>"></div>
26
+ <div class="lwptocModalBox_title"><?= __('Customize Table of Contents', 'luckywp-table-of-contents') ?></div>
27
  <div class="lwptocModalBox_body">
28
 
29
  <?php
37
  ?>
38
 
39
  <div class="lwptocCustomize_tabs">
40
+ <div class="lwptocCustomize_tab lwptocCustomize_tab-active" data-tab="general"><?= esc_html__('General', 'luckywp-table-of-contents') ?></div>
41
+ <div class="lwptocCustomize_tab" data-tab="appearance"><?= esc_html__('Appearance', 'luckywp-table-of-contents') ?></div>
42
+ <div class="lwptocCustomize_tab" data-tab="misc"><?= esc_html__('Misc.', 'luckywp-table-of-contents') ?></div>
43
  </div>
44
 
45
  <div class="lwptocCustomize_fields lwptocCustomize_fields-general" style="display:block;">
47
  <?php if ($model->isPostSettings) { ?>
48
  <div class="lwptocCustomize_field<?= $model->defaultPosition ? ' lwptocCustomize_field-default' : '' ?>">
49
  <div class="lwptocCustomize_field_header">
50
+ <span class="lwptocCustomize_field_label"><?= __('Position', 'luckywp-table-of-contents') ?></span>
51
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
52
  </div>
53
  <div class="lwptocCustomize_field_override">
54
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
55
  </div>
56
  <div class="lwptocCustomize_field_el">
57
  <?= Html::dropDownList(Html::getInputName($model, 'position'), $model->defaultPosition ? Core::$plugin->settings->autoInsertPosition : $model->position, Core::$plugin->positionsList, [
70
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->min)) ? Core::$plugin->settings->generalMin : $model->postSettings->min ?>
71
  <div class="lwptocCustomize_field<?= $model->defaultMin ? ' lwptocCustomize_field-default' : '' ?>">
72
  <div class="lwptocCustomize_field_header">
73
+ <span class="lwptocCustomize_field_label"><?= __('Minimal Count of Headers', 'luckywp-table-of-contents') ?></span>
74
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
75
  </div>
76
  <div class="lwptocCustomize_field_override">
77
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
78
  </div>
79
  <div class="lwptocCustomize_field_el">
80
  <?= Html::textInput(Html::getInputName($model, 'min'), $model->defaultMin ? $defaultValue : $model->min, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
83
  ]) ?>
84
  </div>
85
  <div class="lwptocCustomize_field_desc">
86
+ <?= __('If the count of headers in the post is less, then table of contents is not displayed.', 'luckywp-table-of-contents') ?>
87
  </div>
88
  <div class="lwptocCustomize_field_defaultValue">
89
  <?= $defaultValue ?>
93
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->depth)) ? Core::$plugin->settings->generalDepth : $model->postSettings->depth ?>
94
  <div class="lwptocCustomize_field<?= $model->defaultDepth ? ' lwptocCustomize_field-default' : '' ?>">
95
  <div class="lwptocCustomize_field_header">
96
+ <span class="lwptocCustomize_field_label"><?= __('Depth', 'luckywp-table-of-contents') ?></span>
97
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
98
  </div>
99
  <div class="lwptocCustomize_field_override">
100
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
101
  </div>
102
  <div class="lwptocCustomize_field_el">
103
  <?= Html::dropDownList(Html::getInputName($model, 'depth'), $model->defaultDepth ? $defaultValue : $model->depth, Core::$plugin->depthsList, [
115
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->hierarchical)) ? Core::$plugin->settings->generalHierarchical : $model->postSettings->hierarchical ?>
116
  <div class="lwptocCustomize_field<?= $model->defaultHierarchical ? ' lwptocCustomize_field-default' : '' ?>">
117
  <div class="lwptocCustomize_field_header">
118
+ <span class="lwptocCustomize_field_label"><?= __('Hierarchical View', 'luckywp-table-of-contents') ?></span>
119
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
120
  </div>
121
  <div class="lwptocCustomize_field_override">
122
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
123
  </div>
124
  <div class="lwptocCustomize_field_el">
125
  <label>
126
  <?= Html::checkbox(Html::getInputName($model, 'hierarchical'), $model->defaultHierarchical ? $defaultValue : $model->hierarchical, ['uncheck' => 0]) ?>
127
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
128
  </label>
129
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultHierarchical'), $model->defaultHierarchical, [
130
  'class' => 'lwptocCustomize_field_inputDefault',
131
  ]) ?>
132
  </div>
133
  <div class="lwptocCustomize_field_defaultValue">
134
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
135
  </div>
136
  </div>
137
 
138
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->numeration)) ? Core::$plugin->settings->generalNumeration : $model->postSettings->numeration ?>
139
  <div class="lwptocCustomize_field<?= $model->defaultNumeration ? ' lwptocCustomize_field-default' : '' ?>">
140
  <div class="lwptocCustomize_field_header">
141
+ <span class="lwptocCustomize_field_label"><?= __('Numeration', 'luckywp-table-of-contents') ?></span>
142
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
143
  </div>
144
  <div class="lwptocCustomize_field_override">
145
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
146
  </div>
147
  <div class="lwptocCustomize_field_el">
148
  <?= Html::dropDownList(Html::getInputName($model, 'numeration'), $model->defaultNumeration ? $defaultValue : $model->numeration, Core::$plugin->numerationsList, [
157
  </div>
158
  </div>
159
 
160
+ <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->numerationSuffix)) ? Core::$plugin->settings->getGeneralNumerationSuffix() : $model->postSettings->numerationSuffix ?>
161
+ <div class="lwptocCustomize_field<?= $model->defaultNumerationSuffix ? ' lwptocCustomize_field-default' : '' ?>">
162
+ <div class="lwptocCustomize_field_header">
163
+ <span class="lwptocCustomize_field_label"><?= __('Numeration Suffix', 'luckywp-table-of-contents') ?></span>
164
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
165
+ </div>
166
+ <div class="lwptocCustomize_field_override">
167
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
168
+ </div>
169
+ <div class="lwptocCustomize_field_el">
170
+ <?= Html::dropDownList(Html::getInputName($model, 'numerationSuffix'), $model->defaultNumerationSuffix ? $defaultValue : $model->numerationSuffix, Core::$plugin->getNumerationSuffixsList(), [
171
+ 'class' => 'lwptocCustomize_field_el_select',
172
+ ]) ?>
173
+ <?= Html::hiddenInput(Html::getInputName($model, 'defaultNumerationSuffix'), $model->defaultNumerationSuffix, [
174
+ 'class' => 'lwptocCustomize_field_inputDefault',
175
+ ]) ?>
176
+ </div>
177
+ <div class="lwptocCustomize_field_defaultValue">
178
+ <?= Core::$plugin->getNumerationSuffixsList()[$defaultValue] ?>
179
+ </div>
180
+ </div>
181
+
182
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->title)) ? Core::$plugin->settings->generalTitle : $model->postSettings->title ?>
183
  <div class="lwptocCustomize_field<?= $model->defaultTitle ? ' lwptocCustomize_field-default' : '' ?>">
184
  <div class="lwptocCustomize_field_header">
185
+ <span class="lwptocCustomize_field_label"><?= __('Title', 'luckywp-table-of-contents') ?></span>
186
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
187
  </div>
188
  <div class="lwptocCustomize_field_override">
189
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
190
  </div>
191
  <div class="lwptocCustomize_field_el">
192
  <?= Html::textInput(Html::getInputName($model, 'title'), $model->defaultTitle ? $defaultValue : $model->title, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
197
  <div class="lwptocCustomize_field_defaultValue">
198
  <?php
199
  if ('' == $defaultValue) {
200
+ echo '<i>' . __('Without title', 'luckywp-table-of-contents') . '</i>';
201
  } else {
202
  echo $defaultValue;
203
  }
208
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->toggle)) ? Core::$plugin->settings->generalToggle : $model->postSettings->toggle ?>
209
  <div class="lwptocCustomize_field<?= $model->defaultToggle ? ' lwptocCustomize_field-default' : '' ?>">
210
  <div class="lwptocCustomize_field_header">
211
+ <span class="lwptocCustomize_field_label"><?= __('Toggle Show/Hide', 'luckywp-table-of-contents') ?></span>
212
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
213
  </div>
214
  <div class="lwptocCustomize_field_override">
215
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
216
  </div>
217
  <div class="lwptocCustomize_field_el">
218
  <label>
219
  <?= Html::checkbox(Html::getInputName($model, 'toggle'), $model->defaultToggle ? $defaultValue : $model->toggle, ['uncheck' => 0]) ?>
220
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
221
  </label>
222
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultToggle'), $model->defaultToggle, [
223
  'class' => 'lwptocCustomize_field_inputDefault',
224
  ]) ?>
225
  </div>
226
  <div class="lwptocCustomize_field_defaultValue">
227
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
228
  </div>
229
  </div>
230
 
231
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->labelShow)) ? Core::$plugin->settings->generalLabelShow : $model->postSettings->labelShow ?>
232
  <div class="lwptocCustomize_field<?= $model->defaultLabelShow ? ' lwptocCustomize_field-default' : '' ?>">
233
  <div class="lwptocCustomize_field_header">
234
+ <span class="lwptocCustomize_field_label"><?= __('Label Show', 'luckywp-table-of-contents') ?></span>
235
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
236
  </div>
237
  <div class="lwptocCustomize_field_override">
238
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
239
  </div>
240
  <div class="lwptocCustomize_field_el">
241
  <?= Html::textInput(Html::getInputName($model, 'labelShow'), $model->defaultLabelShow ? $defaultValue : $model->labelShow, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
251
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->labelHide)) ? Core::$plugin->settings->generalLabelHide : $model->postSettings->labelHide ?>
252
  <div class="lwptocCustomize_field<?= $model->defaultLabelHide ? ' lwptocCustomize_field-default' : '' ?>">
253
  <div class="lwptocCustomize_field_header">
254
+ <span class="lwptocCustomize_field_label"><?= __('Label Hide', 'luckywp-table-of-contents') ?></span>
255
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
256
  </div>
257
  <div class="lwptocCustomize_field_override">
258
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
259
  </div>
260
  <div class="lwptocCustomize_field_el">
261
  <?= Html::textInput(Html::getInputName($model, 'labelHide'), $model->defaultLabelHide ? $defaultValue : $model->labelHide, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
271
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->hideItems)) ? Core::$plugin->settings->generalHideItems : $model->postSettings->hideItems ?>
272
  <div class="lwptocCustomize_field<?= $model->defaultHideItems ? ' lwptocCustomize_field-default' : '' ?>">
273
  <div class="lwptocCustomize_field_header">
274
+ <span class="lwptocCustomize_field_label"><?= __('By default, items of contents will be hidden', 'luckywp-table-of-contents') ?></span>
275
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
276
  </div>
277
  <div class="lwptocCustomize_field_override">
278
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
279
  </div>
280
  <div class="lwptocCustomize_field_el">
281
  <label>
282
  <?= Html::checkbox(Html::getInputName($model, 'hideItems'), $model->defaultHideItems ? $defaultValue : $model->hideItems, ['uncheck' => 0]) ?>
283
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
284
  </label>
285
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultHideItems'), $model->defaultHideItems, [
286
  'class' => 'lwptocCustomize_field_inputDefault',
287
  ]) ?>
288
  </div>
289
  <div class="lwptocCustomize_field_defaultValue">
290
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
291
  </div>
292
  </div>
293
 
294
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->smoothScroll)) ? Core::$plugin->settings->generalSmoothScroll : $model->postSettings->smoothScroll ?>
295
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScroll ? ' lwptocCustomize_field-default' : '' ?>">
296
  <div class="lwptocCustomize_field_header">
297
+ <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll', 'luckywp-table-of-contents') ?></span>
298
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
299
  </div>
300
  <div class="lwptocCustomize_field_override">
301
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
302
  </div>
303
  <div class="lwptocCustomize_field_el">
304
  <label>
305
  <?= Html::checkbox(Html::getInputName($model, 'smoothScroll'), $model->defaultSmoothScroll ? $defaultValue : $model->smoothScroll, ['uncheck' => 0]) ?>
306
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
307
  </label>
308
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultSmoothScroll'), $model->defaultSmoothScroll, [
309
  'class' => 'lwptocCustomize_field_inputDefault',
310
  ]) ?>
311
  </div>
312
  <div class="lwptocCustomize_field_defaultValue">
313
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
314
  </div>
315
  </div>
316
 
317
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->smoothScrollOffset)) ? Core::$plugin->settings->generalSmoothScrollOffset : $model->postSettings->smoothScrollOffset ?>
318
  <div class="lwptocCustomize_field<?= $model->defaultSmoothScrollOffset ? ' lwptocCustomize_field-default' : '' ?>">
319
  <div class="lwptocCustomize_field_header">
320
+ <span class="lwptocCustomize_field_label"><?= __('Smooth Scroll Offset Top', 'luckywp-table-of-contents') ?></span>
321
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
322
  </div>
323
  <div class="lwptocCustomize_field_override">
324
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
325
  </div>
326
  <div class="lwptocCustomize_field_el">
327
  <?= Html::textInput(Html::getInputName($model, 'smoothScrollOffset'), $model->defaultSmoothScrollOffset ? $defaultValue : $model->smoothScrollOffset, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
341
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->width)) ? Core::$plugin->settings->appearanceWidth : $model->postSettings->width ?>
342
  <div class="lwptocCustomize_field<?= $model->defaultWidth ? ' lwptocCustomize_field-default' : '' ?>">
343
  <div class="lwptocCustomize_field_header">
344
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Width', 'luckywp-table-of-contents') ?></span>
345
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
346
  </div>
347
  <div class="lwptocCustomize_field_override">
348
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
349
  </div>
350
  <div class="lwptocCustomize_field_el">
351
  <?= WidthField::widget([
364
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->float)) ? Core::$plugin->settings->appearanceFloat : $model->postSettings->float ?>
365
  <div class="lwptocCustomize_field<?= $model->defaultFloat ? ' lwptocCustomize_field-default' : '' ?>">
366
  <div class="lwptocCustomize_field_header">
367
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Float', 'luckywp-table-of-contents') ?></span>
368
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
369
  </div>
370
  <div class="lwptocCustomize_field_override">
371
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
372
  </div>
373
  <div class="lwptocCustomize_field_el">
374
  <?= Html::dropDownList(Html::getInputName($model, 'float'), $model->defaultFloat ? $defaultValue : $model->float, Core::$plugin->floatsList, [
386
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->titleFontSize)) ? Core::$plugin->settings->appearanceTitleFontSize : $model->postSettings->titleFontSize ?>
387
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontSize ? ' lwptocCustomize_field-default' : '' ?>">
388
  <div class="lwptocCustomize_field_header">
389
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Size', 'luckywp-table-of-contents') ?></span>
390
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
391
  </div>
392
  <div class="lwptocCustomize_field_override">
393
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
394
  </div>
395
  <div class="lwptocCustomize_field_el">
396
  <?= FontSizeField::widget([
410
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->titleFontWeight)) ? Core::$plugin->settings->appearanceTitleFontWeight : $model->postSettings->titleFontWeight ?>
411
  <div class="lwptocCustomize_field<?= $model->defaultTitleFontWeight ? ' lwptocCustomize_field-default' : '' ?>">
412
  <div class="lwptocCustomize_field_header">
413
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Title Font Weight', 'luckywp-table-of-contents') ?></span>
414
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
415
  </div>
416
  <div class="lwptocCustomize_field_override">
417
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
418
  </div>
419
  <div class="lwptocCustomize_field_el">
420
  <?= Html::dropDownList(Html::getInputName($model, 'titleFontWeight'), $model->defaultTitleFontWeight ? $defaultValue : $model->titleFontWeight, Core::$plugin->fontWeightsList, [
432
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->itemsFontSize)) ? Core::$plugin->settings->appearanceItemsFontSize : $model->postSettings->itemsFontSize ?>
433
  <div class="lwptocCustomize_field<?= $model->defaultItemsFontSize ? ' lwptocCustomize_field-default' : '' ?>">
434
  <div class="lwptocCustomize_field_header">
435
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Items Font Size', 'luckywp-table-of-contents') ?></span>
436
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
437
  </div>
438
  <div class="lwptocCustomize_field_override">
439
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
440
  </div>
441
  <div class="lwptocCustomize_field_el">
442
  <?= FontSizeField::widget([
456
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->colorScheme)) ? Core::$plugin->settings->appearanceColorScheme : $model->postSettings->colorScheme ?>
457
  <div class="lwptocCustomize_field<?= $model->defaultColorScheme ? ' lwptocCustomize_field-default' : '' ?>">
458
  <div class="lwptocCustomize_field_header">
459
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Color Scheme', 'luckywp-table-of-contents') ?></span>
460
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
461
  </div>
462
  <div class="lwptocCustomize_field_override">
463
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
464
  </div>
465
  <div class="lwptocCustomize_field_el">
466
  <?= Html::dropDownList(Html::getInputName($model, 'colorScheme'), $model->defaultColorScheme ? $defaultValue : $model->colorScheme, Core::$plugin->colorSchemesList, [
486
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->$var)) ? Core::$plugin->settings->{'appearance' . ucfirst($var)} : $model->postSettings->$var ?>
487
  <div class="lwptocCustomize_field<?= $model->{'default' . ucfirst($var)} ? ' lwptocCustomize_field-default' : '' ?>">
488
  <div class="lwptocCustomize_field_header">
489
+ <span class="lwptocCustomize_field_label"><?= esc_html__($label, 'luckywp-table-of-contents') ?></span>
490
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
491
  </div>
492
  <div class="lwptocCustomize_field_override">
493
+ <?= esc_html__('Click for override default value', 'luckywp-table-of-contents') ?>
494
  </div>
495
  <div class="lwptocCustomize_field_defaultValue">
496
  <?= OverrideColorBadge::widget(['color' => $defaultValue]) ?>
511
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->wrapNoindex)) ? Core::$plugin->settings->miscWrapNoindex : $model->postSettings->wrapNoindex ?>
512
  <div class="lwptocCustomize_field<?= $model->defaultWrapNoindex ? ' lwptocCustomize_field-default' : '' ?>">
513
  <div class="lwptocCustomize_field_header">
514
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Wrap table of contents with <!--noindex--> tag', 'luckywp-table-of-contents') ?></span>
515
+ <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
516
  </div>
517
  <div class="lwptocCustomize_field_override">
518
+ <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
519
  </div>
520
  <div class="lwptocCustomize_field_el">
521
  <label>
522
  <?= Html::checkbox(Html::getInputName($model, 'wrapNoindex'), $model->defaultWrapNoindex ? $defaultValue : $model->wrapNoindex, ['uncheck' => 0]) ?>
523
+ <?= __('Enable', 'luckywp-table-of-contents') ?>
524
  </label>
525
  <?= Html::hiddenInput(Html::getInputName($model, 'defaultWrapNoindex'), $model->defaultWrapNoindex, [
526
  'class' => 'lwptocCustomize_field_inputDefault',
527
  ]) ?>
528
  </div>
529
  <div class="lwptocCustomize_field_defaultValue">
530
+ <?= $defaultValue ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents') ?>
531
  </div>
532
  </div>
533
 
534
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->skipHeadingLevel)) ? Core::$plugin->settings->getMiscSkipHeadingLevel() : $model->postSettings->skipHeadingLevel ?>
535
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingLevel ? ' lwptocCustomize_field-default' : '' ?>">
536
  <div class="lwptocCustomize_field_header">
537
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by level', 'luckywp-table-of-contents') ?></span>
538
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
539
  </div>
540
  <div class="lwptocCustomize_field_override">
541
+ <?= esc_html__('Click for override default value', 'luckywp-table-of-contents') ?>
542
  </div>
543
  <div class="lwptocCustomize_field_el">
544
  <?= SkipHeadingLevelField::widget([
557
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->skipHeadingText)) ? Core::$plugin->settings->getMiscSkipHeadingText() : $model->postSettings->skipHeadingText ?>
558
  <div class="lwptocCustomize_field<?= $model->defaultSkipHeadingText ? ' lwptocCustomize_field-default' : '' ?>">
559
  <div class="lwptocCustomize_field_header">
560
+ <span class="lwptocCustomize_field_label"><?= esc_html__('Skip heading by text', 'luckywp-table-of-contents') ?></span>
561
+ <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
562
  </div>
563
  <div class="lwptocCustomize_field_override">
564
+ <?= esc_html__('Click for override default value', 'luckywp-table-of-contents') ?>
565
  </div>
566
  <div class="lwptocCustomize_field_el">
567
  <?php
571
  'rows' => 5,
572
  ]);
573
  echo '<div class="lwptocCustomize_field_desc">';
574
+ echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'luckywp-table-of-contents');
575
  echo '<br>';
576
  echo sprintf(
577
+ esc_html__('Use an asterisk %s as a wildcard to match any text.', 'luckywp-table-of-contents'),
578
  '<code>*</code>'
579
  );
580
  echo '</div>';
586
  <div class="lwptocCustomize_field_defaultValue">
587
  <?php
588
  if ('' == $defaultValue) {
589
+ echo '<i>' . esc_html__('empty', 'luckywp-table-of-contents') . '</i>';
590
  } else {
591
  echo $defaultValue;
592
  }
599
  </div>
600
  <div class="lwptocModalBox_footer">
601
  <div class="lwptocModalBox_footer_buttons">
602
+ <?= AdminHtml::button(__('Cancel', 'luckywp-table-of-contents'), [
603
+ 'class' => 'lwptocModal-close' . (is_rtl() ? 'lwptocFloatRight' : ' lwptocFloatLeft')
604
  ]) ?>
605
+ <?= AdminHtml::button(__('Save', 'luckywp-table-of-contents'), [
606
  'theme' => AdminHtml::BUTTON_THEME_PRIMARY,
607
  'submit' => true,
608
+ 'class' => is_rtl() ? 'lwptocFloatLeft' : 'lwptocFloatRight',
609
  ]) ?>
610
  </div>
611
  </div>
admin/widgets/customizeSuccess/views/widget.php CHANGED
@@ -6,7 +6,7 @@
6
  <div class="lwptocModalSuccess lwptocModal-close">
7
  <div class="lwptocModalSuccess_ico"></div>
8
  <div class="lwptocModalSuccess_text">
9
- <?= __('Saved!', 'lwptoc') ?>
10
  </div>
11
  </div>
12
  <?= $after ?>
6
  <div class="lwptocModalSuccess lwptocModal-close">
7
  <div class="lwptocModalSuccess_ico"></div>
8
  <div class="lwptocModalSuccess_text">
9
+ <?= __('Saved!', 'luckywp-table-of-contents') ?>
10
  </div>
11
  </div>
12
  <?= $after ?>
admin/widgets/fontSizeField/views/widget.php CHANGED
@@ -13,8 +13,8 @@ use luckywp\tableOfContents\core\helpers\Html;
13
  ?>
14
  <div class="lwptocFontSizeField">
15
  <?= Html::dropDownList(null, $type, [
16
- 'default' => esc_html__('Default', 'lwptoc'),
17
- 'custom' => esc_html__('Custom Value', 'lwptoc'),
18
  ], [
19
  'class' => 'lwptocFontSizeField_typeInput',
20
  ]) ?>
13
  ?>
14
  <div class="lwptocFontSizeField">
15
  <?= Html::dropDownList(null, $type, [
16
+ 'default' => esc_html__('Default', 'luckywp-table-of-contents'),
17
+ 'custom' => esc_html__('Custom Value', 'luckywp-table-of-contents'),
18
  ], [
19
  'class' => 'lwptocFontSizeField_typeInput',
20
  ]) ?>
admin/widgets/metabox/views/box.php CHANGED
@@ -11,11 +11,11 @@ use luckywp\tableOfContents\core\Core;
11
  <div class="lwptocMetabox" data-post-id="<?= $post->ID ?>">
12
  <?php if ($settings->enabled) { ?>
13
  <p>
14
- <?= __('The table of contents will be automatic added to this post.', 'lwptoc') ?>
15
  </p>
16
  <?php } elseif ($settings->processHeadings) { ?>
17
  <p>
18
- <?= __('The headings will be processing in this post for use in Table of Contens in widget or custom shortcode.', 'lwptoc') ?>
19
  </p>
20
  <?php } ?>
21
 
@@ -24,29 +24,29 @@ use luckywp\tableOfContents\core\Core;
24
  $rows = Core::$plugin->admin->overrideSettingsToRows($settings);
25
  if ($rows) { ?>
26
  <p>
27
- <?= __('Overridden settings:', 'lwptoc') ?>
28
  </p>
29
  <div class="lwptocMetabox_settings">
30
  <?php foreach ($rows as $row) { ?>
31
  <div class="lwptocMetabox_settings_item">
32
  <b><?= $row[0] ?>:</b>
33
- <?= $row[1] === null ? '<i>' . __('empty', 'lwptoc') . '</i>' : $row[1] ?>
34
  </div>
35
  <?php } ?>
36
  </div>
37
  <?php } ?>
38
  <p>
39
- <?= AdminHtml::button(__('Customize', 'lwptoc'), [
40
  'class' => 'lwptocMetabox_customize',
41
  ]) ?>
42
  <?php
43
  if ($settings->enabled) {
44
- echo AdminHtml::button(__('Disable TOC', 'lwptoc'), [
45
  'theme' => AdminHtml::BUTTON_THEME_LINK_DELETE,
46
  'class' => 'lwptocMetabox_disable',
47
  ]);
48
  } elseif ($settings->processHeadings) {
49
- echo AdminHtml::button(__('Disable Processing', 'lwptoc'), [
50
  'theme' => AdminHtml::BUTTON_THEME_LINK_DELETE,
51
  'class' => 'lwptocMetabox_disableProcessing',
52
  ]);
@@ -58,10 +58,10 @@ use luckywp\tableOfContents\core\Core;
58
 
59
  <?php if (!$settings->processHeadings && !$settings->enabled) { ?>
60
  <p>
61
- <?= __('Click "Enable Processing" for headings processing in this post.', 'lwptoc') ?>
62
  </p>
63
  <p>
64
- <?= AdminHtml::button(__('Enable Processing', 'lwptoc'), [
65
  'class' => 'lwptocMetabox_enableProcessing',
66
  ]) ?>
67
  </p>
@@ -69,10 +69,10 @@ use luckywp\tableOfContents\core\Core;
69
 
70
  <?php if (!$settings->enabled) { ?>
71
  <p>
72
- <?= __('Click "Enable TOC" for automatic add table of contents to this post.', 'lwptoc') ?>
73
  </p>
74
  <p>
75
- <?= AdminHtml::button(__('Enable TOC', 'lwptoc'), [
76
  'class' => 'lwptocMetabox_enable',
77
  ]) ?>
78
  </p>
11
  <div class="lwptocMetabox" data-post-id="<?= $post->ID ?>">
12
  <?php if ($settings->enabled) { ?>
13
  <p>
14
+ <?= __('The table of contents will be automatic added to this post.', 'luckywp-table-of-contents') ?>
15
  </p>
16
  <?php } elseif ($settings->processHeadings) { ?>
17
  <p>
18
+ <?= __('The headings will be processing in this post for use in Table of Contens in widget or custom shortcode.', 'luckywp-table-of-contents') ?>
19
  </p>
20
  <?php } ?>
21
 
24
  $rows = Core::$plugin->admin->overrideSettingsToRows($settings);
25
  if ($rows) { ?>
26
  <p>
27
+ <?= __('Overridden settings:', 'luckywp-table-of-contents') ?>
28
  </p>
29
  <div class="lwptocMetabox_settings">
30
  <?php foreach ($rows as $row) { ?>
31
  <div class="lwptocMetabox_settings_item">
32
  <b><?= $row[0] ?>:</b>
33
+ <?= $row[1] === null ? '<i>' . __('empty', 'luckywp-table-of-contents') . '</i>' : $row[1] ?>
34
  </div>
35
  <?php } ?>
36
  </div>
37
  <?php } ?>
38
  <p>
39
+ <?= AdminHtml::button(__('Customize', 'luckywp-table-of-contents'), [
40
  'class' => 'lwptocMetabox_customize',
41
  ]) ?>
42
  <?php
43
  if ($settings->enabled) {
44
+ echo AdminHtml::button(__('Disable TOC', 'luckywp-table-of-contents'), [
45
  'theme' => AdminHtml::BUTTON_THEME_LINK_DELETE,
46
  'class' => 'lwptocMetabox_disable',
47
  ]);
48
  } elseif ($settings->processHeadings) {
49
+ echo AdminHtml::button(__('Disable Processing', 'luckywp-table-of-contents'), [
50
  'theme' => AdminHtml::BUTTON_THEME_LINK_DELETE,
51
  'class' => 'lwptocMetabox_disableProcessing',
52
  ]);
58
 
59
  <?php if (!$settings->processHeadings && !$settings->enabled) { ?>
60
  <p>
61
+ <?= __('Click "Enable Processing" for headings processing in this post.', 'luckywp-table-of-contents') ?>
62
  </p>
63
  <p>
64
+ <?= AdminHtml::button(__('Enable Processing', 'luckywp-table-of-contents'), [
65
  'class' => 'lwptocMetabox_enableProcessing',
66
  ]) ?>
67
  </p>
69
 
70
  <?php if (!$settings->enabled) { ?>
71
  <p>
72
+ <?= __('Click "Enable TOC" for automatic add table of contents to this post.', 'luckywp-table-of-contents') ?>
73
  </p>
74
  <p>
75
+ <?= AdminHtml::button(__('Enable TOC', 'luckywp-table-of-contents'), [
76
  'class' => 'lwptocMetabox_enable',
77
  ]) ?>
78
  </p>
admin/widgets/skipHeadingLevelField/views/field.php CHANGED
@@ -11,10 +11,14 @@ use luckywp\tableOfContents\core\helpers\Html;
11
  <div class="lwptocSkipHeadingLevelField">
12
  <?php
13
  echo Html::hiddenInput($name);
 
 
 
14
  foreach ($items as $id => $label) {
15
  $options = [
16
  'label' => $label,
17
  'value' => $id,
 
18
  ];
19
  echo Html::checkbox($name . '[]', in_array($id, $value), $options) . ' ';
20
  }
11
  <div class="lwptocSkipHeadingLevelField">
12
  <?php
13
  echo Html::hiddenInput($name);
14
+ if (is_rtl()) {
15
+ $items = array_reverse($items);
16
+ }
17
  foreach ($items as $id => $label) {
18
  $options = [
19
  'label' => $label,
20
  'value' => $id,
21
+ 'rtl' => is_rtl(),
22
  ];
23
  echo Html::checkbox($name . '[]', in_array($id, $value), $options) . ' ';
24
  }
admin/widgets/widget/views/_override.php CHANGED
@@ -9,13 +9,13 @@ $rows = Core::$plugin->admin->overrideSettingsToRows($attrs);
9
  if ($rows) {
10
  ?>
11
  <p>
12
- <?= __('Overridden settings:', 'lwptoc') ?>
13
  </p>
14
  <div class="lwptocWidget_settings">
15
  <?php foreach ($rows as $row) { ?>
16
  <div class="lwptocWidget_settings_item">
17
  <b><?= $row[0] ?>:</b>
18
- <?= $row[1] === null ? '<i>' . __('empty', 'lwptoc') . '</i>' : $row[1] ?>
19
  </div>
20
  <?php } ?>
21
  </div>
9
  if ($rows) {
10
  ?>
11
  <p>
12
+ <?= __('Overridden settings:', 'luckywp-table-of-contents') ?>
13
  </p>
14
  <div class="lwptocWidget_settings">
15
  <?php foreach ($rows as $row) { ?>
16
  <div class="lwptocWidget_settings_item">
17
  <b><?= $row[0] ?>:</b>
18
+ <?= $row[1] === null ? '<i>' . __('empty', 'luckywp-table-of-contents') . '</i>' : $row[1] ?>
19
  </div>
20
  <?php } ?>
21
  </div>
admin/widgets/widget/views/form.php CHANGED
@@ -16,7 +16,7 @@ use luckywp\tableOfContents\core\helpers\Html;
16
  <?= Widget::overrideHtml($attrs) ?>
17
  </div>
18
  <p>
19
- <?= AdminHtml::button(__('Customize', 'lwptoc'), [
20
  'class' => 'lwptocWidget_customize',
21
  ]) ?>
22
  </p>
16
  <?= Widget::overrideHtml($attrs) ?>
17
  </div>
18
  <p>
19
+ <?= AdminHtml::button(__('Customize', 'luckywp-table-of-contents'), [
20
  'class' => 'lwptocWidget_customize',
21
  ]) ?>
22
  </p>
config/plugin.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  return [
3
- 'textDomain' => 'lwptoc',
4
  'bootstrap' => [
5
  'activation',
6
  'admin',
1
  <?php
2
  return [
3
+ 'textDomain' => 'luckywp-table-of-contents',
4
  'bootstrap' => [
5
  'activation',
6
  'admin',
config/settings.php CHANGED
@@ -13,13 +13,13 @@ return [
13
 
14
  // Основные настройки
15
  'general' => [
16
- 'label' => esc_html__('General', 'lwptoc'),
17
  'sections' => [
18
  'main' => [
19
  'fields' => [
20
 
21
  'min' => [
22
- 'label' => esc_html__('Minimal Count of Headers', 'lwptoc'),
23
  'widget' => 'textInput',
24
  'params' => [
25
  'inputOptions' => [
@@ -27,11 +27,11 @@ return [
27
  ],
28
  ],
29
  'default' => 2,
30
- 'desc' => esc_html__('If the count of headers in the post is less, then table of contents is not displayed.', 'lwptoc'),
31
  ],
32
 
33
  'depth' => [
34
- 'label' => esc_html__('Depth', 'lwptoc'),
35
  'widget' => 'select',
36
  'params' => [
37
  'items' => Core::$plugin->depthsList,
@@ -40,43 +40,62 @@ return [
40
  ],
41
 
42
  'hierarchical' => [
43
- 'label' => esc_html__('Hierarchical View', 'lwptoc'),
44
  'widget' => 'checkbox',
45
  'params' => [
46
  'checkboxOptions' => [
47
- 'label' => esc_html__('Enable', 'lwptoc'),
48
  ],
49
  ],
50
  'default' => true,
51
  ],
52
 
53
  'numeration' => [
54
- 'label' => esc_html__('Numeration', 'lwptoc'),
55
  'widget' => 'select',
56
  'params' => [
57
  'items' => Core::$plugin->numerationsList,
 
 
 
58
  ],
59
  'default' => 'decimalnested',
60
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  ],
62
  ],
63
 
64
  'header' => [
65
- 'title' => esc_html__('Header', 'lwptoc'),
66
  'fields' => [
67
 
68
  'title' => [
69
- 'label' => esc_html__('Title', 'lwptoc'),
70
  'widget' => 'textInput',
71
- 'default' => __('Contents', 'lwptoc'),
72
  ],
73
 
74
  'toggle' => [
75
- 'label' => esc_html__('Toggle Show/Hide', 'lwptoc'),
76
  'widget' => 'checkbox',
77
  'params' => [
78
  'checkboxOptions' => [
79
- 'label' => esc_html__('Enable', 'lwptoc'),
80
  'class' => 'js-lwptocToggleCheckbox',
81
  ],
82
  ],
@@ -84,25 +103,25 @@ return [
84
  ],
85
 
86
  'labelShow' => [
87
- 'label' => esc_html__('Label Show', 'lwptoc'),
88
  'widget' => 'textInput',
89
  'params' => [
90
  'inputOptions' => [
91
  'class' => 'js-lwptocToggleEl'
92
  ],
93
  ],
94
- 'default' => __('show', 'lwptoc'),
95
  ],
96
 
97
  'labelHide' => [
98
- 'label' => esc_html__('Label Hide', 'lwptoc'),
99
  'widget' => 'textInput',
100
  'params' => [
101
  'inputOptions' => [
102
  'class' => 'js-lwptocToggleEl'
103
  ],
104
  ],
105
- 'default' => __('hide', 'lwptoc'),
106
  ],
107
 
108
  'hideItems' => [
@@ -110,7 +129,7 @@ return [
110
  'widget' => 'checkbox',
111
  'params' => [
112
  'checkboxOptions' => [
113
- 'label' => esc_html__('By default, items of contents will be hidden', 'lwptoc'),
114
  'class' => 'js-lwptocToggleEl',
115
  ],
116
  ],
@@ -119,15 +138,15 @@ return [
119
  ],
120
  ],
121
  'behavior' => [
122
- 'title' => esc_html__('Behavior', 'lwptoc'),
123
  'fields' => [
124
 
125
  'smoothScroll' => [
126
- 'label' => esc_html__('Smooth Scroll', 'lwptoc'),
127
  'widget' => 'checkbox',
128
  'params' => [
129
  'checkboxOptions' => [
130
- 'label' => esc_html__('Enable', 'lwptoc'),
131
  'class' => 'js-lwptocSmoothScrollCheckbox',
132
  ],
133
  ],
@@ -135,7 +154,7 @@ return [
135
  ],
136
 
137
  'smoothScrollOffset' => [
138
- 'label' => esc_html__('Scroll Offset Top', 'lwptoc'),
139
  'widget' => 'textInput',
140
  'params' => [
141
  'inputOptions' => [
@@ -153,13 +172,13 @@ return [
153
 
154
  // Внешний вид
155
  'appearance' => [
156
- 'label' => esc_html__('Appearance', 'lwptoc'),
157
  'sections' => [
158
  'main' => [
159
  'fields' => [
160
 
161
  'width' => [
162
- 'label' => esc_html__('Width', 'lwptoc'),
163
  'widget' => function ($field) {
164
  echo WidthField::widget([
165
  'name' => $field['name'],
@@ -171,7 +190,7 @@ return [
171
  ],
172
 
173
  'float' => [
174
- 'label' => esc_html__('Float', 'lwptoc'),
175
  'widget' => 'select',
176
  'params' => [
177
  'items' => Core::$plugin->floatsList,
@@ -180,7 +199,7 @@ return [
180
  ],
181
 
182
  'titleFontSize' => [
183
- 'label' => esc_html__('Title Font Size', 'lwptoc'),
184
  'widget' => function ($field) {
185
  echo FontSizeField::widget([
186
  'name' => $field['name'],
@@ -193,7 +212,7 @@ return [
193
  ],
194
 
195
  'titleFontWeight' => [
196
- 'label' => esc_html__('Title Font Weight', 'lwptoc'),
197
  'widget' => 'select',
198
  'params' => [
199
  'items' => Core::$plugin->fontWeightsList,
@@ -202,7 +221,7 @@ return [
202
  ],
203
 
204
  'itemsFontSize' => [
205
- 'label' => esc_html__('Items Font Size', 'lwptoc'),
206
  'widget' => function ($field) {
207
  echo FontSizeField::widget([
208
  'name' => $field['name'],
@@ -215,7 +234,7 @@ return [
215
  ],
216
 
217
  'colorScheme' => [
218
- 'label' => esc_html__('Color Scheme', 'lwptoc'),
219
  'widget' => 'select',
220
  'params' => [
221
  'items' => Core::$plugin->colorSchemesList,
@@ -225,37 +244,37 @@ return [
225
  ],
226
  ],
227
  'overrideColors' => [
228
- 'title' => esc_html__('Override Color Scheme Colors', 'lwptoc'),
229
  'fields' => [
230
 
231
  'backgroundColor' => [
232
  'widget' => 'color',
233
- 'label' => esc_html__('Background Color', 'lwptoc'),
234
  ],
235
 
236
  'borderColor' => [
237
  'widget' => 'color',
238
- 'label' => esc_html__('Border Color', 'lwptoc'),
239
  ],
240
 
241
  'titleColor' => [
242
  'widget' => 'color',
243
- 'label' => esc_html__('Title Color', 'lwptoc'),
244
  ],
245
 
246
  'linkColor' => [
247
  'widget' => 'color',
248
- 'label' => esc_html__('Link Color', 'lwptoc'),
249
  ],
250
 
251
  'hoverLinkColor' => [
252
  'widget' => 'color',
253
- 'label' => esc_html__('Hover Link Color', 'lwptoc'),
254
  ],
255
 
256
  'visitedLinkColor' => [
257
  'widget' => 'color',
258
- 'label' => esc_html__('Visited Link Color', 'lwptoc'),
259
  ],
260
  ],
261
  ],
@@ -264,17 +283,17 @@ return [
264
 
265
  // Автоматическая вставка
266
  'autoInsert' => [
267
- 'label' => esc_html__('Auto Insert', 'lwptoc'),
268
  'sections' => [
269
  'main' => [
270
  'fields' => [
271
 
272
  'enable' => [
273
- 'label' => esc_html__('Auto Insert Table of Contents', 'lwptoc'),
274
  'widget' => 'checkbox',
275
  'params' => [
276
  'checkboxOptions' => [
277
- 'label' => esc_html__('Enable', 'lwptoc'),
278
  'class' => 'js-lwptocAutoInsertEnableCheckbox',
279
  ],
280
  ],
@@ -282,7 +301,7 @@ return [
282
  ],
283
 
284
  'position' => [
285
- 'label' => esc_html__('Position', 'lwptoc'),
286
  'widget' => 'select',
287
  'params' => [
288
  'items' => Core::$plugin->positionsList,
@@ -294,7 +313,7 @@ return [
294
  ],
295
 
296
  'postTypes' => [
297
- 'label' => esc_html__('Post Types', 'lwptoc'),
298
  'widget' => function ($field) {
299
  echo PostTypes::widget([
300
  'field' => $field,
@@ -312,12 +331,12 @@ return [
312
 
313
  // Обработка заголовков
314
  'processingHeadings' => [
315
- 'label' => esc_html__('Processing Headings', 'lwptoc'),
316
  'sections' => [
317
  'main' => [
318
  'fields' => [
319
  'postTypes' => [
320
- 'label' => esc_html__('Always for Post Types', 'lwptoc'),
321
  'widget' => function ($field) {
322
  echo PostTypes::widget([
323
  'field' => $field,
@@ -331,12 +350,12 @@ return [
331
 
332
  // Прочее
333
  'misc' => [
334
- 'label' => esc_html__('Misc.', 'lwptoc'),
335
  'sections' => [
336
  'main' => [
337
  'fields' => [
338
  'hashFormat' => [
339
- 'label' => esc_html__('Hash Format', 'lwptoc'),
340
  'widget' => 'select',
341
  'params' => [
342
  'items' => Core::$plugin->getHashFormatsList(),
@@ -349,7 +368,7 @@ return [
349
  'widget' => 'checkbox',
350
  'params' => [
351
  'checkboxOptions' => [
352
- 'label' => esc_html__('Wrap table of contents with <!--noindex--> tag', 'lwptoc'),
353
  ],
354
  ],
355
  'default' => false,
@@ -357,10 +376,10 @@ return [
357
  ],
358
  ],
359
  'skipHeading' => [
360
- 'title' => esc_html__('Skip Headings', 'lwptoc'),
361
  'fields' => [
362
  'skipHeadingLevel' => [
363
- 'label' => esc_html__('By Level', 'lwptoc'),
364
  'widget' => function ($field) {
365
  echo SkipHeadingLevelField::widget([
366
  'name' => $field['name'],
@@ -370,7 +389,7 @@ return [
370
  'sanitizeCallback' => [Settings::className(), 'sanitizeSkipHeadingLevel'],
371
  ],
372
  'skipHeadingText' => [
373
- 'label' => esc_html__('By Text', 'lwptoc'),
374
  'widget' => function ($field) {
375
  $value = Core::$plugin->settings->getValue($field['group'], $field['id'], '', false);
376
  echo Html::textarea($field['name'], Core::$plugin->skipHeadingTextToMultipleString((string)$value), [
@@ -378,10 +397,10 @@ return [
378
  'rows' => 5,
379
  ]);
380
  echo '<p class="description">';
381
- echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'lwptoc');
382
  echo '<br>';
383
  echo sprintf(
384
- esc_html__('Use an asterisk %s as a wildcard to match any text.', 'lwptoc'),
385
  '<code>*</code>'
386
  );
387
  echo '</p>';
@@ -393,10 +412,10 @@ return [
393
  ],
394
  ],
395
  'postSettings' => [
396
- 'title' => esc_html__('Post Settings', 'lwptoc'),
397
  'fields' => [
398
  'showMetaboxPostTypes' => [
399
- 'label' => esc_html__('Show Panel "Table of Contents" in Post Types', 'lwptoc'),
400
  'widget' => function ($field) {
401
  echo PostTypes::widget([
402
  'field' => $field,
13
 
14
  // Основные настройки
15
  'general' => [
16
+ 'label' => esc_html__('General', 'luckywp-table-of-contents'),
17
  'sections' => [
18
  'main' => [
19
  'fields' => [
20
 
21
  'min' => [
22
+ 'label' => esc_html__('Minimal Count of Headers', 'luckywp-table-of-contents'),
23
  'widget' => 'textInput',
24
  'params' => [
25
  'inputOptions' => [
27
  ],
28
  ],
29
  'default' => 2,
30
+ 'desc' => esc_html__('If the count of headers in the post is less, then table of contents is not displayed.', 'luckywp-table-of-contents'),
31
  ],
32
 
33
  'depth' => [
34
+ 'label' => esc_html__('Depth', 'luckywp-table-of-contents'),
35
  'widget' => 'select',
36
  'params' => [
37
  'items' => Core::$plugin->depthsList,
40
  ],
41
 
42
  'hierarchical' => [
43
+ 'label' => esc_html__('Hierarchical View', 'luckywp-table-of-contents'),
44
  'widget' => 'checkbox',
45
  'params' => [
46
  'checkboxOptions' => [
47
+ 'label' => esc_html__('Enable', 'luckywp-table-of-contents'),
48
  ],
49
  ],
50
  'default' => true,
51
  ],
52
 
53
  'numeration' => [
54
+ 'label' => esc_html__('Numeration', 'luckywp-table-of-contents'),
55
  'widget' => 'select',
56
  'params' => [
57
  'items' => Core::$plugin->numerationsList,
58
+ 'selectOptions' => [
59
+ 'class' => 'js-lwptocNumerationSelect',
60
+ ],
61
  ],
62
  'default' => 'decimalnested',
63
  ],
64
+
65
+ 'numerationSuffix' => [
66
+ 'label' => esc_html__('Numeration Suffix', 'luckywp-table-of-contents'),
67
+ 'widget' => 'select',
68
+ 'params' => [
69
+ 'items' => Core::$plugin->getNumerationSuffixsList(),
70
+ 'selectOptions' => [
71
+ 'class' => 'js-lwptocNumerationSuffixSelect',
72
+ ],
73
+ ],
74
+ 'default' => 'none',
75
+ 'desc' => sprintf(
76
+ esc_html__('The symbol will be added after numeration. For example, %s', 'luckywp-table-of-contents'),
77
+ '<code>1.3)</code>'
78
+ ),
79
+ ],
80
  ],
81
  ],
82
 
83
  'header' => [
84
+ 'title' => esc_html__('Header', 'luckywp-table-of-contents'),
85
  'fields' => [
86
 
87
  'title' => [
88
+ 'label' => esc_html__('Title', 'luckywp-table-of-contents'),
89
  'widget' => 'textInput',
90
+ 'default' => __('Contents', 'luckywp-table-of-contents'),
91
  ],
92
 
93
  'toggle' => [
94
+ 'label' => esc_html__('Toggle Show/Hide', 'luckywp-table-of-contents'),
95
  'widget' => 'checkbox',
96
  'params' => [
97
  'checkboxOptions' => [
98
+ 'label' => esc_html__('Enable', 'luckywp-table-of-contents'),
99
  'class' => 'js-lwptocToggleCheckbox',
100
  ],
101
  ],
103
  ],
104
 
105
  'labelShow' => [
106
+ 'label' => esc_html__('Label Show', 'luckywp-table-of-contents'),
107
  'widget' => 'textInput',
108
  'params' => [
109
  'inputOptions' => [
110
  'class' => 'js-lwptocToggleEl'
111
  ],
112
  ],
113
+ 'default' => __('show', 'luckywp-table-of-contents'),
114
  ],
115
 
116
  'labelHide' => [
117
+ 'label' => esc_html__('Label Hide', 'luckywp-table-of-contents'),
118
  'widget' => 'textInput',
119
  'params' => [
120
  'inputOptions' => [
121
  'class' => 'js-lwptocToggleEl'
122
  ],
123
  ],
124
+ 'default' => __('hide', 'luckywp-table-of-contents'),
125
  ],
126
 
127
  'hideItems' => [
129
  'widget' => 'checkbox',
130
  'params' => [
131
  'checkboxOptions' => [
132
+ 'label' => esc_html__('By default, items of contents will be hidden', 'luckywp-table-of-contents'),
133
  'class' => 'js-lwptocToggleEl',
134
  ],
135
  ],
138
  ],
139
  ],
140
  'behavior' => [
141
+ 'title' => esc_html__('Behavior', 'luckywp-table-of-contents'),
142
  'fields' => [
143
 
144
  'smoothScroll' => [
145
+ 'label' => esc_html__('Smooth Scroll', 'luckywp-table-of-contents'),
146
  'widget' => 'checkbox',
147
  'params' => [
148
  'checkboxOptions' => [
149
+ 'label' => esc_html__('Enable', 'luckywp-table-of-contents'),
150
  'class' => 'js-lwptocSmoothScrollCheckbox',
151
  ],
152
  ],
154
  ],
155
 
156
  'smoothScrollOffset' => [
157
+ 'label' => esc_html__('Scroll Offset Top', 'luckywp-table-of-contents'),
158
  'widget' => 'textInput',
159
  'params' => [
160
  'inputOptions' => [
172
 
173
  // Внешний вид
174
  'appearance' => [
175
+ 'label' => esc_html__('Appearance', 'luckywp-table-of-contents'),
176
  'sections' => [
177
  'main' => [
178
  'fields' => [
179
 
180
  'width' => [
181
+ 'label' => esc_html__('Width', 'luckywp-table-of-contents'),
182
  'widget' => function ($field) {
183
  echo WidthField::widget([
184
  'name' => $field['name'],
190
  ],
191
 
192
  'float' => [
193
+ 'label' => esc_html__('Float', 'luckywp-table-of-contents'),
194
  'widget' => 'select',
195
  'params' => [
196
  'items' => Core::$plugin->floatsList,
199
  ],
200
 
201
  'titleFontSize' => [
202
+ 'label' => esc_html__('Title Font Size', 'luckywp-table-of-contents'),
203
  'widget' => function ($field) {
204
  echo FontSizeField::widget([
205
  'name' => $field['name'],
212
  ],
213
 
214
  'titleFontWeight' => [
215
+ 'label' => esc_html__('Title Font Weight', 'luckywp-table-of-contents'),
216
  'widget' => 'select',
217
  'params' => [
218
  'items' => Core::$plugin->fontWeightsList,
221
  ],
222
 
223
  'itemsFontSize' => [
224
+ 'label' => esc_html__('Items Font Size', 'luckywp-table-of-contents'),
225
  'widget' => function ($field) {
226
  echo FontSizeField::widget([
227
  'name' => $field['name'],
234
  ],
235
 
236
  'colorScheme' => [
237
+ 'label' => esc_html__('Color Scheme', 'luckywp-table-of-contents'),
238
  'widget' => 'select',
239
  'params' => [
240
  'items' => Core::$plugin->colorSchemesList,
244
  ],
245
  ],
246
  'overrideColors' => [
247
+ 'title' => esc_html__('Override Color Scheme Colors', 'luckywp-table-of-contents'),
248
  'fields' => [
249
 
250
  'backgroundColor' => [
251
  'widget' => 'color',
252
+ 'label' => esc_html__('Background Color', 'luckywp-table-of-contents'),
253
  ],
254
 
255
  'borderColor' => [
256
  'widget' => 'color',
257
+ 'label' => esc_html__('Border Color', 'luckywp-table-of-contents'),
258
  ],
259
 
260
  'titleColor' => [
261
  'widget' => 'color',
262
+ 'label' => esc_html__('Title Color', 'luckywp-table-of-contents'),
263
  ],
264
 
265
  'linkColor' => [
266
  'widget' => 'color',
267
+ 'label' => esc_html__('Link Color', 'luckywp-table-of-contents'),
268
  ],
269
 
270
  'hoverLinkColor' => [
271
  'widget' => 'color',
272
+ 'label' => esc_html__('Hover Link Color', 'luckywp-table-of-contents'),
273
  ],
274
 
275
  'visitedLinkColor' => [
276
  'widget' => 'color',
277
+ 'label' => esc_html__('Visited Link Color', 'luckywp-table-of-contents'),
278
  ],
279
  ],
280
  ],
283
 
284
  // Автоматическая вставка
285
  'autoInsert' => [
286
+ 'label' => esc_html__('Auto Insert', 'luckywp-table-of-contents'),
287
  'sections' => [
288
  'main' => [
289
  'fields' => [
290
 
291
  'enable' => [
292
+ 'label' => esc_html__('Auto Insert Table of Contents', 'luckywp-table-of-contents'),
293
  'widget' => 'checkbox',
294
  'params' => [
295
  'checkboxOptions' => [
296
+ 'label' => esc_html__('Enable', 'luckywp-table-of-contents'),
297
  'class' => 'js-lwptocAutoInsertEnableCheckbox',
298
  ],
299
  ],
301
  ],
302
 
303
  'position' => [
304
+ 'label' => esc_html__('Position', 'luckywp-table-of-contents'),
305
  'widget' => 'select',
306
  'params' => [
307
  'items' => Core::$plugin->positionsList,
313
  ],
314
 
315
  'postTypes' => [
316
+ 'label' => esc_html__('Post Types', 'luckywp-table-of-contents'),
317
  'widget' => function ($field) {
318
  echo PostTypes::widget([
319
  'field' => $field,
331
 
332
  // Обработка заголовков
333
  'processingHeadings' => [
334
+ 'label' => esc_html__('Processing Headings', 'luckywp-table-of-contents'),
335
  'sections' => [
336
  'main' => [
337
  'fields' => [
338
  'postTypes' => [
339
+ 'label' => esc_html__('Always for Post Types', 'luckywp-table-of-contents'),
340
  'widget' => function ($field) {
341
  echo PostTypes::widget([
342
  'field' => $field,
350
 
351
  // Прочее
352
  'misc' => [
353
+ 'label' => esc_html__('Misc.', 'luckywp-table-of-contents'),
354
  'sections' => [
355
  'main' => [
356
  'fields' => [
357
  'hashFormat' => [
358
+ 'label' => esc_html__('Hash Format', 'luckywp-table-of-contents'),
359
  'widget' => 'select',
360
  'params' => [
361
  'items' => Core::$plugin->getHashFormatsList(),
368
  'widget' => 'checkbox',
369
  'params' => [
370
  'checkboxOptions' => [
371
+ 'label' => esc_html__('Wrap table of contents with <!--noindex--> tag', 'luckywp-table-of-contents'),
372
  ],
373
  ],
374
  'default' => false,
376
  ],
377
  ],
378
  'skipHeading' => [
379
+ 'title' => esc_html__('Skip Headings', 'luckywp-table-of-contents'),
380
  'fields' => [
381
  'skipHeadingLevel' => [
382
+ 'label' => esc_html__('By Level', 'luckywp-table-of-contents'),
383
  'widget' => function ($field) {
384
  echo SkipHeadingLevelField::widget([
385
  'name' => $field['name'],
389
  'sanitizeCallback' => [Settings::className(), 'sanitizeSkipHeadingLevel'],
390
  ],
391
  'skipHeadingText' => [
392
+ 'label' => esc_html__('By Text', 'luckywp-table-of-contents'),
393
  'widget' => function ($field) {
394
  $value = Core::$plugin->settings->getValue($field['group'], $field['id'], '', false);
395
  echo Html::textarea($field['name'], Core::$plugin->skipHeadingTextToMultipleString((string)$value), [
397
  'rows' => 5,
398
  ]);
399
  echo '<p class="description">';
400
+ echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'luckywp-table-of-contents');
401
  echo '<br>';
402
  echo sprintf(
403
+ esc_html__('Use an asterisk %s as a wildcard to match any text.', 'luckywp-table-of-contents'),
404
  '<code>*</code>'
405
  );
406
  echo '</p>';
412
  ],
413
  ],
414
  'postSettings' => [
415
+ 'title' => esc_html__('Post Settings', 'luckywp-table-of-contents'),
416
  'fields' => [
417
  'showMetaboxPostTypes' => [
418
+ 'label' => esc_html__('Show Panel "Table of Contents" in Post Types', 'luckywp-table-of-contents'),
419
  'widget' => function ($field) {
420
  echo PostTypes::widget([
421
  'field' => $field,
core/admin/AdminController.php CHANGED
@@ -43,6 +43,6 @@ class AdminController extends Controller
43
 
44
  public function notAllowed()
45
  {
46
- wp_die(esc_html__('Sorry, you are not allowed to access this page.', 'lwptoc'), 403);
47
  }
48
  }
43
 
44
  public function notAllowed()
45
  {
46
+ wp_die(esc_html__('Sorry, you are not allowed to access this page.', 'luckywp-table-of-contents'), 403);
47
  }
48
  }
core/helpers/Html.php CHANGED
@@ -188,8 +188,13 @@ class Html
188
  $label = $options['label'];
189
  $labelOptions = isset($options['labelOptions']) ? $options['labelOptions'] : [];
190
  unset($options['label'], $options['labelOptions']);
191
- $content = static::label(static::input($type, $name, $value, $options) . ' ' . $label, null, $labelOptions);
192
- return $hidden . $content;
 
 
 
 
 
193
  }
194
  return $hidden . static::input($type, $name, $value, $options);
195
  }
188
  $label = $options['label'];
189
  $labelOptions = isset($options['labelOptions']) ? $options['labelOptions'] : [];
190
  unset($options['label'], $options['labelOptions']);
191
+
192
+ $input = static::input($type, $name, $value, $options);
193
+
194
+ $items = ArrayHelper::getValue($options, 'rtl') ? [$label, $input] : [$input, $label];
195
+ unset($options['rtl']);
196
+
197
+ return $hidden . static::label(implode(' ', $items), null, $labelOptions);
198
  }
199
  return $hidden . static::input($type, $name, $value, $options);
200
  }
core/validators/BooleanValidator.php CHANGED
@@ -24,7 +24,7 @@ class BooleanValidator extends Validator
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
- $this->message = __('{attribute} must be either "{true}" or "{false}".', 'lwptoc');
28
  }
29
  }
30
 
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
+ $this->message = __('{attribute} must be either "{true}" or "{false}".', 'luckywp-table-of-contents');
28
  }
29
  }
30
 
core/validators/RangeValidator.php CHANGED
@@ -24,7 +24,7 @@ class RangeValidator extends Validator
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
- $this->message = __('{attribute} is invalid.', 'lwptoc');
28
  }
29
  }
30
 
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
+ $this->message = __('{attribute} is invalid.', 'luckywp-table-of-contents');
28
  }
29
  }
30
 
core/validators/RequiredValidator.php CHANGED
@@ -13,7 +13,7 @@ class RequiredValidator extends Validator
13
  {
14
  parent::init();
15
  if ($this->message === null) {
16
- $this->message = __('{attribute} cannot be blank.', 'lwptoc');
17
  }
18
  }
19
 
13
  {
14
  parent::init();
15
  if ($this->message === null) {
16
+ $this->message = __('{attribute} cannot be blank.', 'luckywp-table-of-contents');
17
  }
18
  }
19
 
front/Front.php CHANGED
@@ -104,6 +104,7 @@ class Front extends BaseFront
104
  $attrs['depth'] = $settings->depth;
105
  $attrs['hierarchical'] = $settings->hierarchical;
106
  $attrs['numeration'] = $settings->numeration;
 
107
  $attrs['title'] = $settings->title;
108
  $attrs['toggle'] = $settings->toggle;
109
  $attrs['labelShow'] = $settings->labelShow;
104
  $attrs['depth'] = $settings->depth;
105
  $attrs['hierarchical'] = $settings->hierarchical;
106
  $attrs['numeration'] = $settings->numeration;
107
+ $attrs['numerationSuffix'] = $settings->numerationSuffix;
108
  $attrs['title'] = $settings->title;
109
  $attrs['toggle'] = $settings->toggle;
110
  $attrs['labelShow'] = $settings->labelShow;
front/Toc.php CHANGED
@@ -74,6 +74,7 @@ class Toc
74
  'id' => $heading['id'],
75
  'index' => $heading['index'],
76
  'number' => null,
 
77
  'label' => $heading['label'],
78
  'childrens' => [],
79
  ];
@@ -132,6 +133,19 @@ class Toc
132
  };
133
  $fn($items);
134
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
136
 
137
  // Без иерархии
74
  'id' => $heading['id'],
75
  'index' => $heading['index'],
76
  'number' => null,
77
+ 'numberSuffix' => null,
78
  'label' => $heading['label'],
79
  'childrens' => [],
80
  ];
133
  };
134
  $fn($items);
135
  }
136
+
137
+ // Суффикс
138
+ $suffix = ArrayHelper::getValue([
139
+ 'dot' => '.',
140
+ 'roundbracket' => ')',
141
+ ], ArrayHelper::getValue($attrs, 'numerationsuffix', Core::$plugin->settings->getGeneralNumerationSuffix()), '');
142
+ $fn = function (&$items) use (&$fn, $suffix) {
143
+ foreach ($items as $key => $item) {
144
+ $items[$key]['numberSuffix'] = $suffix;
145
+ $fn($items[$key]['childrens']);
146
+ }
147
+ };
148
+ $fn($items);
149
  }
150
 
151
  // Без иерархии
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_i DIV A{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc_i DIV A:active,.lwptoc_i DIV A:focus,.lwptoc_i DIV A:hover{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc_i DIV A:hover{border-bottom:1px dotted!important}.lwptoc_header{margin-bottom:6px}.lwptoc_toggle{margin-left:4px;font-size:80%}.lwptoc_toggle:before{content:'['}.lwptoc_toggle:after{content:']'}.lwptoc_toggle_label{margin:0 1px}.lwptoc_item_number{margin-right:2px}.lwptoc_itemWrap .lwptoc_itemWrap{margin:2px 0 0 14px}.lwptoc_item{margin-top:2px}.lwptoc_item:first-child{margin-top:0}.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-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_i DIV A{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc_i DIV A:active,.lwptoc_i DIV A:focus,.lwptoc_i DIV A:hover{box-shadow:none!important;border:none!important;text-decoration:none!important}.lwptoc_i DIV A:hover{border-bottom:1px dotted!important}.lwptoc_header{margin-bottom:6px}.rtl .lwptoc_header{text-align:right}.lwptoc_toggle{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_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}.lwptoc_item{margin-top:2px}.rtl .lwptoc_item{text-align:right}.lwptoc_item:first-child{margin-top:0}.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-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/views/items.php CHANGED
@@ -9,7 +9,7 @@
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'] ?></span>
13
  <?php } ?>
14
  <span class="lwptoc_item_label"><?= $item['label'] ?></span>
15
  </a>
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 } ?>
14
  <span class="lwptoc_item_label"><?= $item['label'] ?></span>
15
  </a>
integrations/BeaverBuilder.php CHANGED
@@ -10,6 +10,8 @@ class BeaverBuilder extends BaseObject
10
 
11
  public function init()
12
  {
13
- add_filter('fl_builder_before_render_shortcodes', [Core::$plugin->shortcode, 'theContent'], 9999);
 
 
14
  }
15
  }
10
 
11
  public function init()
12
  {
13
+ add_filter('fl_builder_before_render_shortcodes', [Core::$plugin, 'onTheContentTrue'], 1);
14
+ add_filter('fl_builder_after_render_shortcodes', [Core::$plugin->shortcode, 'theContent'], 9999);
15
+ add_filter('fl_builder_after_render_shortcodes', [Core::$plugin, 'onTheContentFalse'], 10000);
16
  }
17
  }
languages/luckywp-table-of-contents-ru_RU.mo ADDED
Binary file
languages/{lwptoc.pot → luckywp-table-of-contents.pot} RENAMED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2019-06-17 22:31+0300\n"
5
- "PO-Revision-Date: 2019-06-17 22:33+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.1\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"
@@ -31,8 +31,8 @@ msgstr ""
31
  msgid "Edit"
32
  msgstr ""
33
 
34
- #: admin/Admin.php:127 admin/forms/CustomizeForm.php:235
35
- #: admin/widgets/customizeModal/views/modal.php:50 config/settings.php:285
36
  msgid "Position"
37
  msgstr ""
38
 
@@ -41,7 +41,7 @@ msgstr ""
41
  msgid "Minimal Count of Headers"
42
  msgstr ""
43
 
44
- #: admin/Admin.php:133 admin/forms/CustomizeForm.php:231
45
  #: admin/widgets/customizeModal/views/modal.php:96 config/settings.php:34
46
  msgid "Depth"
47
  msgstr ""
@@ -51,106 +51,111 @@ msgstr ""
51
  msgid "Hierarchical View"
52
  msgstr ""
53
 
54
- #: admin/Admin.php:136 admin/Admin.php:145 admin/Admin.php:154
55
- #: admin/Admin.php:157 admin/Admin.php:193
56
  #: admin/widgets/customizeModal/views/modal.php:134
57
- #: admin/widgets/customizeModal/views/modal.php:205
58
- #: admin/widgets/customizeModal/views/modal.php:268
59
- #: admin/widgets/customizeModal/views/modal.php:291
60
- #: admin/widgets/customizeModal/views/modal.php:508
61
  msgid "Enabled"
62
  msgstr ""
63
 
64
- #: admin/Admin.php:136 admin/Admin.php:145 admin/Admin.php:154
65
- #: admin/Admin.php:157 admin/Admin.php:193
66
  #: admin/widgets/customizeModal/views/modal.php:134
67
- #: admin/widgets/customizeModal/views/modal.php:205
68
- #: admin/widgets/customizeModal/views/modal.php:268
69
- #: admin/widgets/customizeModal/views/modal.php:291
70
- #: admin/widgets/customizeModal/views/modal.php:508
71
  msgid "Disabled"
72
  msgstr ""
73
 
74
- #: admin/Admin.php:139 admin/forms/CustomizeForm.php:232
75
  #: admin/widgets/customizeModal/views/modal.php:141 config/settings.php:54
76
  msgid "Numeration"
77
  msgstr ""
78
 
79
- #: admin/Admin.php:142 admin/widgets/customizeModal/views/modal.php:163
80
- #: config/settings.php:69
 
 
 
 
 
81
  msgid "Title"
82
  msgstr ""
83
 
84
- #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:189
85
- #: config/settings.php:75
86
  msgid "Toggle Show/Hide"
87
  msgstr ""
88
 
89
- #: admin/Admin.php:148 admin/forms/CustomizeForm.php:233
90
- #: admin/widgets/customizeModal/views/modal.php:212 config/settings.php:87
91
  msgid "Label Show"
92
  msgstr ""
93
 
94
- #: admin/Admin.php:151 admin/forms/CustomizeForm.php:234
95
- #: admin/widgets/customizeModal/views/modal.php:232 config/settings.php:98
96
  msgid "Label Hide"
97
  msgstr ""
98
 
99
- #: admin/Admin.php:154
100
  msgid "Hide Items"
101
  msgstr ""
102
 
103
- #: admin/Admin.php:157 admin/widgets/customizeModal/views/modal.php:275
104
- #: config/settings.php:126
105
  msgid "Smooth Scroll"
106
  msgstr ""
107
 
108
- #: admin/Admin.php:160 admin/widgets/customizeModal/views/modal.php:298
109
  msgid "Smooth Scroll Offset Top"
110
  msgstr ""
111
 
112
- #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:322
113
- #: config/settings.php:162
114
  msgid "Width"
115
  msgstr ""
116
 
117
- #: admin/Admin.php:166 admin/forms/CustomizeForm.php:236
118
- #: admin/widgets/customizeModal/views/modal.php:345 config/settings.php:174
119
  msgid "Float"
120
  msgstr ""
121
 
122
- #: admin/Admin.php:169 admin/widgets/customizeModal/views/modal.php:367
123
- #: config/settings.php:183
124
  msgid "Title Font Size"
125
  msgstr ""
126
 
127
- #: admin/Admin.php:172 admin/forms/CustomizeForm.php:237
128
- #: admin/widgets/customizeModal/views/modal.php:391 config/settings.php:196
129
  msgid "Title Font Weight"
130
  msgstr ""
131
 
132
- #: admin/Admin.php:175 admin/widgets/customizeModal/views/modal.php:413
133
- #: config/settings.php:205
134
  msgid "Items Font Size"
135
  msgstr ""
136
 
137
- #: admin/Admin.php:178 admin/forms/CustomizeForm.php:238
138
- #: admin/widgets/customizeModal/views/modal.php:437 config/settings.php:218
139
  msgid "Color Scheme"
140
  msgstr ""
141
 
142
- #: admin/Admin.php:193 admin/widgets/customizeModal/views/modal.php:492
143
- #: config/settings.php:352
144
  msgid "Wrap table of contents with <!--noindex--> tag"
145
  msgstr ""
146
 
147
- #: admin/Admin.php:196 admin/Admin.php:199
148
  msgid "Skip headings"
149
  msgstr ""
150
 
151
  #: admin/controllers/EditorBlockController.php:71
152
  #: admin/controllers/ShortcodeController.php:74
153
- #: admin/widgets/customizeModal/views/modal.php:567
154
  #: admin/widgets/metabox/views/box.php:33
155
  #: admin/widgets/widget/views/_override.php:18
156
  msgid "empty"
@@ -186,20 +191,20 @@ msgid "Thank you very much!"
186
  msgstr ""
187
 
188
  #: admin/views/settings/index.php:9
189
- msgid "Table of Contents Settings"
190
- msgstr ""
191
-
192
- #: admin/views/settings/index.php:11
193
  #, php-format
194
  msgid "Leave a %s plugin review on WordPress.org"
195
  msgstr ""
196
 
197
- #: admin/widgets/OverrideColorBadge.php:17
 
 
 
 
198
  msgid "from scheme"
199
  msgstr ""
200
 
201
  #: admin/widgets/customizeModal/views/modal.php:25
202
- #: admin/widgets/customizeModal/views/modal.php:580
203
  msgid "Cancel"
204
  msgstr ""
205
 
@@ -211,11 +216,11 @@ msgstr ""
211
  msgid "General"
212
  msgstr ""
213
 
214
- #: admin/widgets/customizeModal/views/modal.php:41 config/settings.php:156
215
  msgid "Appearance"
216
  msgstr ""
217
 
218
- #: admin/widgets/customizeModal/views/modal.php:42 config/settings.php:334
219
  msgid "Misc."
220
  msgstr ""
221
 
@@ -225,22 +230,23 @@ msgstr ""
225
  #: admin/widgets/customizeModal/views/modal.php:119
226
  #: admin/widgets/customizeModal/views/modal.php:142
227
  #: admin/widgets/customizeModal/views/modal.php:164
228
- #: admin/widgets/customizeModal/views/modal.php:190
229
- #: admin/widgets/customizeModal/views/modal.php:213
230
- #: admin/widgets/customizeModal/views/modal.php:233
231
- #: admin/widgets/customizeModal/views/modal.php:253
232
- #: admin/widgets/customizeModal/views/modal.php:276
233
- #: admin/widgets/customizeModal/views/modal.php:299
234
- #: admin/widgets/customizeModal/views/modal.php:323
235
- #: admin/widgets/customizeModal/views/modal.php:346
236
  #: admin/widgets/customizeModal/views/modal.php:368
237
- #: admin/widgets/customizeModal/views/modal.php:392
238
  #: admin/widgets/customizeModal/views/modal.php:414
239
- #: admin/widgets/customizeModal/views/modal.php:438
240
- #: admin/widgets/customizeModal/views/modal.php:468
241
- #: admin/widgets/customizeModal/views/modal.php:493
242
- #: admin/widgets/customizeModal/views/modal.php:516
243
- #: admin/widgets/customizeModal/views/modal.php:539
 
244
  msgid "default"
245
  msgstr ""
246
 
@@ -250,22 +256,23 @@ msgstr ""
250
  #: admin/widgets/customizeModal/views/modal.php:122
251
  #: admin/widgets/customizeModal/views/modal.php:145
252
  #: admin/widgets/customizeModal/views/modal.php:167
253
- #: admin/widgets/customizeModal/views/modal.php:193
254
- #: admin/widgets/customizeModal/views/modal.php:216
255
- #: admin/widgets/customizeModal/views/modal.php:236
256
- #: admin/widgets/customizeModal/views/modal.php:256
257
- #: admin/widgets/customizeModal/views/modal.php:279
258
- #: admin/widgets/customizeModal/views/modal.php:302
259
- #: admin/widgets/customizeModal/views/modal.php:326
260
- #: admin/widgets/customizeModal/views/modal.php:349
261
  #: admin/widgets/customizeModal/views/modal.php:371
262
- #: admin/widgets/customizeModal/views/modal.php:395
263
  #: admin/widgets/customizeModal/views/modal.php:417
264
- #: admin/widgets/customizeModal/views/modal.php:441
265
- #: admin/widgets/customizeModal/views/modal.php:471
266
- #: admin/widgets/customizeModal/views/modal.php:496
267
- #: admin/widgets/customizeModal/views/modal.php:519
268
- #: admin/widgets/customizeModal/views/modal.php:542
 
269
  msgid "Click for override default value"
270
  msgstr ""
271
 
@@ -276,41 +283,41 @@ msgid ""
276
  msgstr ""
277
 
278
  #: admin/widgets/customizeModal/views/modal.php:127
279
- #: admin/widgets/customizeModal/views/modal.php:198
280
- #: admin/widgets/customizeModal/views/modal.php:261
281
- #: admin/widgets/customizeModal/views/modal.php:284
282
- #: admin/widgets/customizeModal/views/modal.php:501 config/settings.php:47
283
- #: config/settings.php:79 config/settings.php:130 config/settings.php:277
284
  msgid "Enable"
285
  msgstr ""
286
 
287
- #: admin/widgets/customizeModal/views/modal.php:178
288
  msgid "Without title"
289
  msgstr ""
290
 
291
- #: admin/widgets/customizeModal/views/modal.php:252 config/settings.php:113
292
  msgid "By default, items of contents will be hidden"
293
  msgstr ""
294
 
295
- #: admin/widgets/customizeModal/views/modal.php:515
296
  msgid "Skip heading by level"
297
  msgstr ""
298
 
299
- #: admin/widgets/customizeModal/views/modal.php:538
300
  msgid "Skip heading by text"
301
  msgstr ""
302
 
303
- #: admin/widgets/customizeModal/views/modal.php:552 config/settings.php:381
304
  msgid ""
305
  "Specify headings (one per line) to be excluded from the table of contents."
306
  msgstr ""
307
 
308
- #: admin/widgets/customizeModal/views/modal.php:555 config/settings.php:384
309
  #, php-format
310
  msgid "Use an asterisk %s as a wildcard to match any text."
311
  msgstr ""
312
 
313
- #: admin/widgets/customizeModal/views/modal.php:583
314
  msgid "Save"
315
  msgstr ""
316
 
@@ -318,11 +325,11 @@ msgstr ""
318
  msgid "Saved!"
319
  msgstr ""
320
 
321
- #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:266
322
  msgid "Default"
323
  msgstr ""
324
 
325
- #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:231
326
  msgid "Custom Value"
327
  msgstr ""
328
 
@@ -370,99 +377,104 @@ msgstr ""
370
  msgid "Enable TOC"
371
  msgstr ""
372
 
373
- #: config/settings.php:65
 
 
 
 
 
374
  msgid "Header"
375
  msgstr ""
376
 
377
- #: config/settings.php:71 plugin/Settings.php:88
378
  msgid "Contents"
379
  msgstr ""
380
 
381
- #: config/settings.php:94 plugin/Settings.php:104
382
  msgid "show"
383
  msgstr ""
384
 
385
- #: config/settings.php:105 plugin/Settings.php:112
386
  msgid "hide"
387
  msgstr ""
388
 
389
- #: config/settings.php:122
390
  msgid "Behavior"
391
  msgstr ""
392
 
393
- #: config/settings.php:138
394
  msgid "Scroll Offset Top"
395
  msgstr ""
396
 
397
- #: config/settings.php:228
398
  msgid "Override Color Scheme Colors"
399
  msgstr ""
400
 
401
- #: config/settings.php:233
402
  msgid "Background Color"
403
  msgstr ""
404
 
405
- #: config/settings.php:238
406
  msgid "Border Color"
407
  msgstr ""
408
 
409
- #: config/settings.php:243
410
  msgid "Title Color"
411
  msgstr ""
412
 
413
- #: config/settings.php:248
414
  msgid "Link Color"
415
  msgstr ""
416
 
417
- #: config/settings.php:253
418
  msgid "Hover Link Color"
419
  msgstr ""
420
 
421
- #: config/settings.php:258
422
  msgid "Visited Link Color"
423
  msgstr ""
424
 
425
- #: config/settings.php:267
426
  msgid "Auto Insert"
427
  msgstr ""
428
 
429
- #: config/settings.php:273
430
  msgid "Auto Insert Table of Contents"
431
  msgstr ""
432
 
433
- #: config/settings.php:297
434
  msgid "Post Types"
435
  msgstr ""
436
 
437
- #: config/settings.php:315
438
  msgid "Processing Headings"
439
  msgstr ""
440
 
441
- #: config/settings.php:320
442
  msgid "Always for Post Types"
443
  msgstr ""
444
 
445
- #: config/settings.php:339
446
  msgid "Hash Format"
447
  msgstr ""
448
 
449
- #: config/settings.php:360
450
  msgid "Skip Headings"
451
  msgstr ""
452
 
453
- #: config/settings.php:363
454
  msgid "By Level"
455
  msgstr ""
456
 
457
- #: config/settings.php:373
458
  msgid "By Text"
459
  msgstr ""
460
 
461
- #: config/settings.php:396
462
  msgid "Post Settings"
463
  msgstr ""
464
 
465
- #: config/settings.php:399
466
  msgid "Show Panel \"Table of Contents\" in Post Types"
467
  msgstr ""
468
 
@@ -482,135 +494,135 @@ msgstr ""
482
  msgid "{attribute} cannot be blank."
483
  msgstr ""
484
 
485
- #: plugin/Plugin.php:101
486
  msgid "Without numeration"
487
  msgstr ""
488
 
489
- #: plugin/Plugin.php:102
490
  msgid "Decimal numbers (nested)"
491
  msgstr ""
492
 
493
- #: plugin/Plugin.php:103
494
  msgid "Decimal numbers"
495
  msgstr ""
496
 
497
- #: plugin/Plugin.php:104
498
  msgid "Roman numbers (nested)"
499
  msgstr ""
500
 
501
- #: plugin/Plugin.php:105
502
  msgid "Roman numbers"
503
  msgstr ""
504
 
505
- #: plugin/Plugin.php:115
 
 
 
 
506
  msgid "Before first heading"
507
  msgstr ""
508
 
509
- #: plugin/Plugin.php:116
510
  msgid "After first heading"
511
  msgstr ""
512
 
513
- #: plugin/Plugin.php:117
514
  msgid "After first block (paragraph, list or heading)"
515
  msgstr ""
516
 
517
- #: plugin/Plugin.php:118
518
  msgid "Top"
519
  msgstr ""
520
 
521
- #: plugin/Plugin.php:119
522
  msgid "Bottom"
523
  msgstr ""
524
 
525
- #: plugin/Plugin.php:153
526
  msgid "Thin"
527
  msgstr ""
528
 
529
- #: plugin/Plugin.php:154
530
  msgid "Extra Light"
531
  msgstr ""
532
 
533
- #: plugin/Plugin.php:155
534
  msgid "Light"
535
  msgstr ""
536
 
537
- #: plugin/Plugin.php:156
538
  msgid "Normal"
539
  msgstr ""
540
 
541
- #: plugin/Plugin.php:157
542
  msgid "Medium"
543
  msgstr ""
544
 
545
- #: plugin/Plugin.php:158
546
  msgid "Semi Bold"
547
  msgstr ""
548
 
549
- #: plugin/Plugin.php:159
550
  msgid "Bold"
551
  msgstr ""
552
 
553
- #: plugin/Plugin.php:160
554
  msgid "Extra Bold"
555
  msgstr ""
556
 
557
- #: plugin/Plugin.php:161
558
  msgid "Heavy"
559
  msgstr ""
560
 
561
- #: plugin/Plugin.php:190 plugin/Plugin.php:317
562
- msgid "None"
563
- msgstr ""
564
-
565
- #: plugin/Plugin.php:191
566
  msgid "Left"
567
  msgstr ""
568
 
569
- #: plugin/Plugin.php:192
570
  msgid "Right"
571
  msgstr ""
572
 
573
- #: plugin/Plugin.php:193
574
  msgid "Right without flow"
575
  msgstr ""
576
 
577
- #: plugin/Plugin.php:194
578
  msgid "Center"
579
  msgstr ""
580
 
581
- #: plugin/Plugin.php:204
582
  msgid "Light Colors"
583
  msgstr ""
584
 
585
- #: plugin/Plugin.php:205
586
  msgid "Dark Colors"
587
  msgstr ""
588
 
589
- #: plugin/Plugin.php:206
590
  msgid "White"
591
  msgstr ""
592
 
593
- #: plugin/Plugin.php:207
594
  msgid "Transparent"
595
  msgstr ""
596
 
597
- #: plugin/Plugin.php:217
598
  msgid "As heading (#Example_Heading_Text)"
599
  msgstr ""
600
 
601
- #: plugin/Plugin.php:218
602
  msgid "Counter (#lpwtoc1, #lwptoc2, …)"
603
  msgstr ""
604
 
605
- #: plugin/Plugin.php:229
606
  msgid "Auto"
607
  msgstr ""
608
 
609
- #: plugin/Plugin.php:230
610
  msgid "Full Width"
611
  msgstr ""
612
 
613
- #: plugin/Plugin.php:393
614
  msgid ""
615
  "Creates a table of contents for your posts/pages. Works automatically or "
616
  "manually (via shortcode, Gutenberg block or widget)."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2019-07-13 10:48+0300\n"
5
+ "PO-Revision-Date: 2019-07-13 10:54+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.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"
31
  msgid "Edit"
32
  msgstr ""
33
 
34
+ #: admin/Admin.php:127 admin/forms/CustomizeForm.php:241
35
+ #: admin/widgets/customizeModal/views/modal.php:50 config/settings.php:304
36
  msgid "Position"
37
  msgstr ""
38
 
41
  msgid "Minimal Count of Headers"
42
  msgstr ""
43
 
44
+ #: admin/Admin.php:133 admin/forms/CustomizeForm.php:236
45
  #: admin/widgets/customizeModal/views/modal.php:96 config/settings.php:34
46
  msgid "Depth"
47
  msgstr ""
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:196
56
  #: admin/widgets/customizeModal/views/modal.php:134
57
+ #: admin/widgets/customizeModal/views/modal.php:227
58
+ #: admin/widgets/customizeModal/views/modal.php:290
59
+ #: admin/widgets/customizeModal/views/modal.php:313
60
+ #: admin/widgets/customizeModal/views/modal.php:530
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:196
66
  #: admin/widgets/customizeModal/views/modal.php:134
67
+ #: admin/widgets/customizeModal/views/modal.php:227
68
+ #: admin/widgets/customizeModal/views/modal.php:290
69
+ #: admin/widgets/customizeModal/views/modal.php:313
70
+ #: admin/widgets/customizeModal/views/modal.php:530
71
  msgid "Disabled"
72
  msgstr ""
73
 
74
+ #: admin/Admin.php:139 admin/forms/CustomizeForm.php:237
75
  #: admin/widgets/customizeModal/views/modal.php:141 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:163 config/settings.php:66
81
+ msgid "Numeration Suffix"
82
+ msgstr ""
83
+
84
+ #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:185
85
+ #: config/settings.php:88
86
  msgid "Title"
87
  msgstr ""
88
 
89
+ #: admin/Admin.php:148 admin/widgets/customizeModal/views/modal.php:211
90
+ #: config/settings.php:94
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:234 config/settings.php:106
96
  msgid "Label Show"
97
  msgstr ""
98
 
99
+ #: admin/Admin.php:154 admin/forms/CustomizeForm.php:240
100
+ #: admin/widgets/customizeModal/views/modal.php:254 config/settings.php:117
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:297
109
+ #: config/settings.php:145
110
  msgid "Smooth Scroll"
111
  msgstr ""
112
 
113
+ #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:320
114
  msgid "Smooth Scroll Offset Top"
115
  msgstr ""
116
 
117
+ #: admin/Admin.php:166 admin/widgets/customizeModal/views/modal.php:344
118
+ #: config/settings.php:181
119
  msgid "Width"
120
  msgstr ""
121
 
122
+ #: admin/Admin.php:169 admin/forms/CustomizeForm.php:242
123
+ #: admin/widgets/customizeModal/views/modal.php:367 config/settings.php:193
124
  msgid "Float"
125
  msgstr ""
126
 
127
+ #: admin/Admin.php:172 admin/widgets/customizeModal/views/modal.php:389
128
+ #: config/settings.php:202
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:413 config/settings.php:215
134
  msgid "Title Font Weight"
135
  msgstr ""
136
 
137
+ #: admin/Admin.php:178 admin/widgets/customizeModal/views/modal.php:435
138
+ #: config/settings.php:224
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:459 config/settings.php:237
144
  msgid "Color Scheme"
145
  msgstr ""
146
 
147
+ #: admin/Admin.php:196 admin/widgets/customizeModal/views/modal.php:514
148
+ #: config/settings.php:371
149
  msgid "Wrap table of contents with <!--noindex--> tag"
150
  msgstr ""
151
 
152
+ #: admin/Admin.php:199 admin/Admin.php:202
153
  msgid "Skip headings"
154
  msgstr ""
155
 
156
  #: admin/controllers/EditorBlockController.php:71
157
  #: admin/controllers/ShortcodeController.php:74
158
+ #: admin/widgets/customizeModal/views/modal.php:589
159
  #: admin/widgets/metabox/views/box.php:33
160
  #: admin/widgets/widget/views/_override.php:18
161
  msgid "empty"
191
  msgstr ""
192
 
193
  #: admin/views/settings/index.php:9
 
 
 
 
194
  #, php-format
195
  msgid "Leave a %s plugin review on WordPress.org"
196
  msgstr ""
197
 
198
+ #: admin/views/settings/index.php:12
199
+ msgid "Table of Contents Settings"
200
+ msgstr ""
201
+
202
+ #: admin/widgets/OverrideColorBadge.php:21
203
  msgid "from scheme"
204
  msgstr ""
205
 
206
  #: admin/widgets/customizeModal/views/modal.php:25
207
+ #: admin/widgets/customizeModal/views/modal.php:602
208
  msgid "Cancel"
209
  msgstr ""
210
 
216
  msgid "General"
217
  msgstr ""
218
 
219
+ #: admin/widgets/customizeModal/views/modal.php:41 config/settings.php:175
220
  msgid "Appearance"
221
  msgstr ""
222
 
223
+ #: admin/widgets/customizeModal/views/modal.php:42 config/settings.php:353
224
  msgid "Misc."
225
  msgstr ""
226
 
230
  #: admin/widgets/customizeModal/views/modal.php:119
231
  #: admin/widgets/customizeModal/views/modal.php:142
232
  #: admin/widgets/customizeModal/views/modal.php:164
233
+ #: admin/widgets/customizeModal/views/modal.php:186
234
+ #: admin/widgets/customizeModal/views/modal.php:212
235
+ #: admin/widgets/customizeModal/views/modal.php:235
236
+ #: admin/widgets/customizeModal/views/modal.php:255
237
+ #: admin/widgets/customizeModal/views/modal.php:275
238
+ #: admin/widgets/customizeModal/views/modal.php:298
239
+ #: admin/widgets/customizeModal/views/modal.php:321
240
+ #: admin/widgets/customizeModal/views/modal.php:345
241
  #: admin/widgets/customizeModal/views/modal.php:368
242
+ #: admin/widgets/customizeModal/views/modal.php:390
243
  #: admin/widgets/customizeModal/views/modal.php:414
244
+ #: admin/widgets/customizeModal/views/modal.php:436
245
+ #: admin/widgets/customizeModal/views/modal.php:460
246
+ #: admin/widgets/customizeModal/views/modal.php:490
247
+ #: admin/widgets/customizeModal/views/modal.php:515
248
+ #: admin/widgets/customizeModal/views/modal.php:538
249
+ #: admin/widgets/customizeModal/views/modal.php:561
250
  msgid "default"
251
  msgstr ""
252
 
256
  #: admin/widgets/customizeModal/views/modal.php:122
257
  #: admin/widgets/customizeModal/views/modal.php:145
258
  #: admin/widgets/customizeModal/views/modal.php:167
259
+ #: admin/widgets/customizeModal/views/modal.php:189
260
+ #: admin/widgets/customizeModal/views/modal.php:215
261
+ #: admin/widgets/customizeModal/views/modal.php:238
262
+ #: admin/widgets/customizeModal/views/modal.php:258
263
+ #: admin/widgets/customizeModal/views/modal.php:278
264
+ #: admin/widgets/customizeModal/views/modal.php:301
265
+ #: admin/widgets/customizeModal/views/modal.php:324
266
+ #: admin/widgets/customizeModal/views/modal.php:348
267
  #: admin/widgets/customizeModal/views/modal.php:371
268
+ #: admin/widgets/customizeModal/views/modal.php:393
269
  #: admin/widgets/customizeModal/views/modal.php:417
270
+ #: admin/widgets/customizeModal/views/modal.php:439
271
+ #: admin/widgets/customizeModal/views/modal.php:463
272
+ #: admin/widgets/customizeModal/views/modal.php:493
273
+ #: admin/widgets/customizeModal/views/modal.php:518
274
+ #: admin/widgets/customizeModal/views/modal.php:541
275
+ #: admin/widgets/customizeModal/views/modal.php:564
276
  msgid "Click for override default value"
277
  msgstr ""
278
 
283
  msgstr ""
284
 
285
  #: admin/widgets/customizeModal/views/modal.php:127
286
+ #: admin/widgets/customizeModal/views/modal.php:220
287
+ #: admin/widgets/customizeModal/views/modal.php:283
288
+ #: admin/widgets/customizeModal/views/modal.php:306
289
+ #: admin/widgets/customizeModal/views/modal.php:523 config/settings.php:47
290
+ #: config/settings.php:98 config/settings.php:149 config/settings.php:296
291
  msgid "Enable"
292
  msgstr ""
293
 
294
+ #: admin/widgets/customizeModal/views/modal.php:200
295
  msgid "Without title"
296
  msgstr ""
297
 
298
+ #: admin/widgets/customizeModal/views/modal.php:274 config/settings.php:132
299
  msgid "By default, items of contents will be hidden"
300
  msgstr ""
301
 
302
+ #: admin/widgets/customizeModal/views/modal.php:537
303
  msgid "Skip heading by level"
304
  msgstr ""
305
 
306
+ #: admin/widgets/customizeModal/views/modal.php:560
307
  msgid "Skip heading by text"
308
  msgstr ""
309
 
310
+ #: admin/widgets/customizeModal/views/modal.php:574 config/settings.php:400
311
  msgid ""
312
  "Specify headings (one per line) to be excluded from the table of contents."
313
  msgstr ""
314
 
315
+ #: admin/widgets/customizeModal/views/modal.php:577 config/settings.php:403
316
  #, php-format
317
  msgid "Use an asterisk %s as a wildcard to match any text."
318
  msgstr ""
319
 
320
+ #: admin/widgets/customizeModal/views/modal.php:605
321
  msgid "Save"
322
  msgstr ""
323
 
325
  msgid "Saved!"
326
  msgstr ""
327
 
328
+ #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:301
329
  msgid "Default"
330
  msgstr ""
331
 
332
+ #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:266
333
  msgid "Custom Value"
334
  msgstr ""
335
 
377
  msgid "Enable TOC"
378
  msgstr ""
379
 
380
+ #: config/settings.php:76
381
+ #, php-format
382
+ msgid "The symbol will be added after numeration. For example, %s"
383
+ msgstr ""
384
+
385
+ #: config/settings.php:84
386
  msgid "Header"
387
  msgstr ""
388
 
389
+ #: config/settings.php:90 plugin/Settings.php:100
390
  msgid "Contents"
391
  msgstr ""
392
 
393
+ #: config/settings.php:113 plugin/Settings.php:116
394
  msgid "show"
395
  msgstr ""
396
 
397
+ #: config/settings.php:124 plugin/Settings.php:124
398
  msgid "hide"
399
  msgstr ""
400
 
401
+ #: config/settings.php:141
402
  msgid "Behavior"
403
  msgstr ""
404
 
405
+ #: config/settings.php:157
406
  msgid "Scroll Offset Top"
407
  msgstr ""
408
 
409
+ #: config/settings.php:247
410
  msgid "Override Color Scheme Colors"
411
  msgstr ""
412
 
413
+ #: config/settings.php:252
414
  msgid "Background Color"
415
  msgstr ""
416
 
417
+ #: config/settings.php:257
418
  msgid "Border Color"
419
  msgstr ""
420
 
421
+ #: config/settings.php:262
422
  msgid "Title Color"
423
  msgstr ""
424
 
425
+ #: config/settings.php:267
426
  msgid "Link Color"
427
  msgstr ""
428
 
429
+ #: config/settings.php:272
430
  msgid "Hover Link Color"
431
  msgstr ""
432
 
433
+ #: config/settings.php:277
434
  msgid "Visited Link Color"
435
  msgstr ""
436
 
437
+ #: config/settings.php:286
438
  msgid "Auto Insert"
439
  msgstr ""
440
 
441
+ #: config/settings.php:292
442
  msgid "Auto Insert Table of Contents"
443
  msgstr ""
444
 
445
+ #: config/settings.php:316
446
  msgid "Post Types"
447
  msgstr ""
448
 
449
+ #: config/settings.php:334
450
  msgid "Processing Headings"
451
  msgstr ""
452
 
453
+ #: config/settings.php:339
454
  msgid "Always for Post Types"
455
  msgstr ""
456
 
457
+ #: config/settings.php:358
458
  msgid "Hash Format"
459
  msgstr ""
460
 
461
+ #: config/settings.php:379
462
  msgid "Skip Headings"
463
  msgstr ""
464
 
465
+ #: config/settings.php:382
466
  msgid "By Level"
467
  msgstr ""
468
 
469
+ #: config/settings.php:392
470
  msgid "By Text"
471
  msgstr ""
472
 
473
+ #: config/settings.php:415
474
  msgid "Post Settings"
475
  msgstr ""
476
 
477
+ #: config/settings.php:418
478
  msgid "Show Panel \"Table of Contents\" in Post Types"
479
  msgstr ""
480
 
494
  msgid "{attribute} 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:352
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 "Counter (#lpwtoc1, #lwptoc2, …)"
615
  msgstr ""
616
 
617
+ #: plugin/Plugin.php:264
618
  msgid "Auto"
619
  msgstr ""
620
 
621
+ #: plugin/Plugin.php:265
622
  msgid "Full Width"
623
  msgstr ""
624
 
625
+ #: plugin/Plugin.php:428
626
  msgid ""
627
  "Creates a table of contents for your posts/pages. Works automatically or "
628
  "manually (via shortcode, Gutenberg block or widget)."
languages/lwptoc-ru_RU.mo DELETED
Binary file
luckywp-table-of-contents.php CHANGED
@@ -3,10 +3,10 @@
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.5.7
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
- Text Domain: lwptoc
10
  Domain Path: /languages
11
 
12
  LuckyWP Table of Contents is free software: you can redistribute it and/or modify
@@ -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.5.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.6
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
+ Text Domain: luckywp-table-of-contents
10
  Domain Path: /languages
11
 
12
  LuckyWP Table of Contents is free software: you can redistribute it and/or modify
29
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
30
 
31
  $config = require(__DIR__ . '/config/plugin.php');
32
+ (new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.6', __FILE__, 'lwptoc_');
33
 
34
  require_once __DIR__ . '/functions.php';
plugin/Plugin.php CHANGED
@@ -121,11 +121,23 @@ class Plugin extends BasePlugin
121
  public function getNumerationsList()
122
  {
123
  return [
124
- 'none' => esc_html__('Without numeration', 'lwptoc'),
125
- 'decimalnested' => esc_html__('Decimal numbers (nested)', 'lwptoc'),
126
- 'decimal' => esc_html__('Decimal numbers', 'lwptoc'),
127
- 'romannested' => esc_html__('Roman numbers (nested)', 'lwptoc'),
128
- 'roman' => esc_html__('Roman numbers', 'lwptoc'),
 
 
 
 
 
 
 
 
 
 
 
 
129
  ];
130
  }
131
 
@@ -135,11 +147,11 @@ class Plugin extends BasePlugin
135
  public function getPositionsList()
136
  {
137
  return [
138
- 'beforefirstheading' => esc_html__('Before first heading', 'lwptoc'),
139
- 'afterfirstheading' => esc_html__('After first heading', 'lwptoc'),
140
- 'afterfirstblock' => esc_html__('After first block (paragraph, list or heading)', 'lwptoc'),
141
- 'top' => esc_html__('Top', 'lwptoc'),
142
- 'bottom' => esc_html__('Bottom', 'lwptoc'),
143
  ];
144
  }
145
 
@@ -173,15 +185,15 @@ class Plugin extends BasePlugin
173
  public function getFontWeightsList()
174
  {
175
  return [
176
- 'thin' => esc_html__('Thin', 'lwptoc'),
177
- 'extralight' => esc_html__('Extra Light', 'lwptoc'),
178
- 'light' => esc_html__('Light', 'lwptoc'),
179
- 'normal' => esc_html__('Normal', 'lwptoc'),
180
- 'medium' => esc_html__('Medium', 'lwptoc'),
181
- 'semibold' => esc_html__('Semi Bold', 'lwptoc'),
182
- 'bold' => esc_html__('Bold', 'lwptoc'),
183
- 'extrabold' => esc_html__('Extra Bold', 'lwptoc'),
184
- 'heavy' => esc_html__('Heavy', 'lwptoc'),
185
  ];
186
  }
187
 
@@ -210,11 +222,11 @@ class Plugin extends BasePlugin
210
  public function getFloatsList()
211
  {
212
  return [
213
- 'none' => esc_html__('None', 'lwptoc'),
214
- 'left' => esc_html__('Left', 'lwptoc'),
215
- 'right' => esc_html__('Right', 'lwptoc'),
216
- 'rightwithoutflow' => esc_html__('Right without flow', 'lwptoc'),
217
- 'center' => esc_html__('Center', 'lwptoc'),
218
  ];
219
  }
220
 
@@ -224,10 +236,10 @@ class Plugin extends BasePlugin
224
  public function getColorSchemesList()
225
  {
226
  return [
227
- 'light' => esc_html__('Light Colors', 'lwptoc'),
228
- 'dark' => esc_html__('Dark Colors', 'lwptoc'),
229
- 'white' => esc_html__('White', 'lwptoc'),
230
- 'transparent' => esc_html__('Transparent', 'lwptoc'),
231
  ];
232
  }
233
 
@@ -237,8 +249,8 @@ class Plugin extends BasePlugin
237
  public function getHashFormatsList()
238
  {
239
  return [
240
- 'asheading' => esc_html__('As heading (#Example_Heading_Text)', 'lwptoc'),
241
- 'counter' => esc_html__('Counter (#lpwtoc1, #lwptoc2, …)', 'lwptoc'),
242
  ];
243
  }
244
 
@@ -249,9 +261,9 @@ class Plugin extends BasePlugin
249
  public function getWidthsList($withCustom = true)
250
  {
251
  $widths = [
252
- 'auto' => esc_html__('Auto', 'lwptoc'),
253
- 'full' => esc_html__('Full Width', 'lwptoc'),
254
- 'custom' => esc_html__('Custom Value', 'lwptoc'),
255
  ];
256
  if (!$withCustom) {
257
  unset($widths['custom']);
@@ -286,7 +298,7 @@ class Plugin extends BasePlugin
286
  */
287
  public function fontSizeToLabel($fontSize)
288
  {
289
- return $fontSize == 'default' ? esc_html__('Default', 'lwptoc') : $fontSize;
290
  }
291
 
292
  /**
@@ -337,7 +349,7 @@ class Plugin extends BasePlugin
337
  $labels[] = $list[$id];
338
  }
339
  }
340
- return $labels ? implode(', ', $labels) : esc_html__('None', 'lwptoc');
341
  }
342
 
343
  /**
@@ -413,6 +425,6 @@ class Plugin extends BasePlugin
413
 
414
  private function pluginI18n()
415
  {
416
- __('Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).', 'lwptdr');
417
  }
418
  }
121
  public function getNumerationsList()
122
  {
123
  return [
124
+ 'none' => esc_html__('Without numeration', 'luckywp-table-of-contents'),
125
+ 'decimalnested' => esc_html__('Decimal numbers (nested)', 'luckywp-table-of-contents'),
126
+ 'decimal' => esc_html__('Decimal numbers', 'luckywp-table-of-contents'),
127
+ 'romannested' => esc_html__('Roman numbers (nested)', 'luckywp-table-of-contents'),
128
+ 'roman' => esc_html__('Roman numbers', 'luckywp-table-of-contents'),
129
+ ];
130
+ }
131
+
132
+ /**
133
+ * @return array
134
+ */
135
+ public function getNumerationSuffixsList()
136
+ {
137
+ return [
138
+ 'none' => esc_html__('None', 'luckywp-table-of-contents'),
139
+ 'dot' => '.',
140
+ 'roundbracket' => ')',
141
  ];
142
  }
143
 
147
  public function getPositionsList()
148
  {
149
  return [
150
+ 'beforefirstheading' => esc_html__('Before first heading', 'luckywp-table-of-contents'),
151
+ 'afterfirstheading' => esc_html__('After first heading', 'luckywp-table-of-contents'),
152
+ 'afterfirstblock' => esc_html__('After first block (paragraph, list or heading)', 'luckywp-table-of-contents'),
153
+ 'top' => esc_html__('Top', 'luckywp-table-of-contents'),
154
+ 'bottom' => esc_html__('Bottom', 'luckywp-table-of-contents'),
155
  ];
156
  }
157
 
185
  public function getFontWeightsList()
186
  {
187
  return [
188
+ 'thin' => esc_html__('Thin', 'luckywp-table-of-contents'),
189
+ 'extralight' => esc_html__('Extra Light', 'luckywp-table-of-contents'),
190
+ 'light' => esc_html__('Light', 'luckywp-table-of-contents'),
191
+ 'normal' => esc_html__('Normal', 'luckywp-table-of-contents'),
192
+ 'medium' => esc_html__('Medium', 'luckywp-table-of-contents'),
193
+ 'semibold' => esc_html__('Semi Bold', 'luckywp-table-of-contents'),
194
+ 'bold' => esc_html__('Bold', 'luckywp-table-of-contents'),
195
+ 'extrabold' => esc_html__('Extra Bold', 'luckywp-table-of-contents'),
196
+ 'heavy' => esc_html__('Heavy', 'luckywp-table-of-contents'),
197
  ];
198
  }
199
 
222
  public function getFloatsList()
223
  {
224
  return [
225
+ 'none' => esc_html__('None', 'luckywp-table-of-contents'),
226
+ 'left' => esc_html__('Left', 'luckywp-table-of-contents'),
227
+ 'right' => esc_html__('Right', 'luckywp-table-of-contents'),
228
+ 'rightwithoutflow' => esc_html__('Right without flow', 'luckywp-table-of-contents'),
229
+ 'center' => esc_html__('Center', 'luckywp-table-of-contents'),
230
  ];
231
  }
232
 
236
  public function getColorSchemesList()
237
  {
238
  return [
239
+ 'light' => esc_html__('Light Colors', 'luckywp-table-of-contents'),
240
+ 'dark' => esc_html__('Dark Colors', 'luckywp-table-of-contents'),
241
+ 'white' => esc_html__('White', 'luckywp-table-of-contents'),
242
+ 'transparent' => esc_html__('Transparent', 'luckywp-table-of-contents'),
243
  ];
244
  }
245
 
249
  public function getHashFormatsList()
250
  {
251
  return [
252
+ 'asheading' => esc_html__('As heading (#Example_Heading_Text)', 'luckywp-table-of-contents'),
253
+ 'counter' => esc_html__('Counter (#lpwtoc1, #lwptoc2, …)', 'luckywp-table-of-contents'),
254
  ];
255
  }
256
 
261
  public function getWidthsList($withCustom = true)
262
  {
263
  $widths = [
264
+ 'auto' => esc_html__('Auto', 'luckywp-table-of-contents'),
265
+ 'full' => esc_html__('Full Width', 'luckywp-table-of-contents'),
266
+ 'custom' => esc_html__('Custom Value', 'luckywp-table-of-contents'),
267
  ];
268
  if (!$withCustom) {
269
  unset($widths['custom']);
298
  */
299
  public function fontSizeToLabel($fontSize)
300
  {
301
+ return $fontSize == 'default' ? esc_html__('Default', 'luckywp-table-of-contents') : $fontSize;
302
  }
303
 
304
  /**
349
  $labels[] = $list[$id];
350
  }
351
  }
352
+ return $labels ? implode(', ', $labels) : esc_html__('None', 'luckywp-table-of-contents');
353
  }
354
 
355
  /**
425
 
426
  private function pluginI18n()
427
  {
428
+ __('Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).', 'luckywp-table-of-contents');
429
  }
430
  }
plugin/PostSettings.php CHANGED
@@ -49,6 +49,11 @@ class PostSettings extends BaseObject
49
  */
50
  public $numeration;
51
 
 
 
 
 
 
52
  /**
53
  * @var string|null
54
  */
@@ -188,6 +193,7 @@ class PostSettings extends BaseObject
188
  $this->depth = ArrayHelper::getValue($data, 'depth');
189
  $this->hierarchical = ArrayHelper::getValue($data, 'hierarchical');
190
  $this->numeration = ArrayHelper::getValue($data, 'numeration');
 
191
  $this->title = ArrayHelper::getValue($data, 'title');
192
  $this->toggle = ArrayHelper::getValue($data, 'toggle');
193
  $this->labelShow = ArrayHelper::getValue($data, 'labelShow');
@@ -230,6 +236,9 @@ class PostSettings extends BaseObject
230
  if ($this->numeration !== null) {
231
  $data['numeration'] = $this->numeration;
232
  }
 
 
 
233
  if ($this->title !== null) {
234
  $data['title'] = wp_slash($this->title);
235
  }
49
  */
50
  public $numeration;
51
 
52
+ /**
53
+ * @var string|null
54
+ */
55
+ public $numerationSuffix;
56
+
57
  /**
58
  * @var string|null
59
  */
193
  $this->depth = ArrayHelper::getValue($data, 'depth');
194
  $this->hierarchical = ArrayHelper::getValue($data, 'hierarchical');
195
  $this->numeration = ArrayHelper::getValue($data, 'numeration');
196
+ $this->numerationSuffix = ArrayHelper::getValue($data, 'numerationSuffix');
197
  $this->title = ArrayHelper::getValue($data, 'title');
198
  $this->toggle = ArrayHelper::getValue($data, 'toggle');
199
  $this->labelShow = ArrayHelper::getValue($data, 'labelShow');
236
  if ($this->numeration !== null) {
237
  $data['numeration'] = $this->numeration;
238
  }
239
+ if ($this->numerationSuffix !== null) {
240
+ $data['numerationSuffix'] = $this->numerationSuffix;
241
+ }
242
  if ($this->title !== null) {
243
  $data['title'] = wp_slash($this->title);
244
  }
plugin/Settings.php CHANGED
@@ -80,12 +80,24 @@ class Settings extends \luckywp\tableOfContents\core\wp\Settings
80
  return $numeration;
81
  }
82
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /**
84
  * @return string
85
  */
86
  public function getGeneralTitle()
87
  {
88
- return (string)$this->getValue('general', 'title', __('Contents', 'lwptoc'));
89
  }
90
 
91
  /**
@@ -101,7 +113,7 @@ class Settings extends \luckywp\tableOfContents\core\wp\Settings
101
  */
102
  public function getGeneralLabelShow()
103
  {
104
- return (string)$this->getValue('general', 'labelShow', __('show', 'lwptoc'));
105
  }
106
 
107
  /**
@@ -109,7 +121,7 @@ class Settings extends \luckywp\tableOfContents\core\wp\Settings
109
  */
110
  public function getGeneralLabelHide()
111
  {
112
- return (string)$this->getValue('general', 'labelHide', __('hide', 'lwptoc'));
113
  }
114
 
115
  /**
80
  return $numeration;
81
  }
82
 
83
+ /**
84
+ * @return string
85
+ */
86
+ public function getGeneralNumerationSuffix()
87
+ {
88
+ $suffix = $this->getValue('general', 'numerationSuffix');
89
+ if (!array_key_exists($suffix, Core::$plugin->getNumerationSuffixsList())) {
90
+ $suffix = 'none';
91
+ }
92
+ return $suffix;
93
+ }
94
+
95
  /**
96
  * @return string
97
  */
98
  public function getGeneralTitle()
99
  {
100
+ return (string)$this->getValue('general', 'title', __('Contents', 'luckywp-table-of-contents'));
101
  }
102
 
103
  /**
113
  */
114
  public function getGeneralLabelShow()
115
  {
116
+ return (string)$this->getValue('general', 'labelShow', __('show', 'luckywp-table-of-contents'));
117
  }
118
 
119
  /**
121
  */
122
  public function getGeneralLabelHide()
123
  {
124
+ return (string)$this->getValue('general', 'labelHide', __('hide', 'luckywp-table-of-contents'));
125
  }
126
 
127
  /**
plugin/Shortcode.php CHANGED
@@ -74,6 +74,7 @@ class Shortcode extends BaseObject
74
  'depth',
75
  'hierarchical',
76
  'numeration',
 
77
  'title',
78
  'toggle',
79
  'labelShow',
74
  'depth',
75
  'hierarchical',
76
  'numeration',
77
+ 'numerationSuffix',
78
  'title',
79
  'toggle',
80
  'labelShow',
plugin/WpWidget.php CHANGED
@@ -17,7 +17,7 @@ class WpWidget extends WP_Widget
17
  {
18
  parent::__construct(
19
  'lpwtoc_widget',
20
- esc_html__('Table of Contents', 'lwptoc')
21
  );
22
  }
23
 
17
  {
18
  parent::__construct(
19
  'lpwtoc_widget',
20
+ esc_html__('Table of Contents', 'luckywp-table-of-contents')
21
  );
22
  }
23
 
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"},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 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}})}]);
plugin/mcePlugin/mce.min.css CHANGED
@@ -1 +1 @@
1
- .lwptocShortcode{display:block;padding:12px 16px;border:2px dashed #ddd;background:#fff;color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.block-editor .lwptocShortcode{margin-bottom:1.5em}.lwptocShortcode-loading{color:#aaa}.lwptocShortcode_title{font-size:14px;line-height:18px;font-weight:700}.lwptocShortcode_items{margin-top:4px;font-size:12px;line-height:16px}.lwptocShortcode_item{margin-top:2px}.lwptocShortcode_item:first-child{margin-top:0}.lwptocShortcode_item_label{color:#888}.lwptocShortcode .lwptocColorBadge B{position:relative;top:1px;margin-left:2px;display:inline-block;margin-right:4px;width:12px;height:12px;border-radius:6px}
1
+ .lwptocShortcode{display:block;padding:12px 16px;border:2px dashed #ddd;background:#fff;color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.block-editor .lwptocShortcode{margin-bottom:1.5em}.lwptocShortcode-loading{color:#aaa}.lwptocShortcode_title{font-size:14px;line-height:18px;font-weight:700}.lwptocShortcode_items{margin-top:4px;font-size:12px;line-height:16px}.lwptocShortcode_item{margin-top:2px}.lwptocShortcode_item:first-child{margin-top:0}.lwptocShortcode_item_label{color:#888}.lwptocShortcode .lwptocColorBadge{display:inline-block;direction:ltr}.lwptocShortcode .lwptocColorBadge B{position:relative;top:1px;display:inline-block;margin-left:2px;margin-right:4px;width:12px;height:12px;border-radius:6px}.rtl .lwptocShortcode .lwptocColorBadge B{margin-right:2px;margin-left:4px}
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.5.7
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -35,6 +35,7 @@ Creates SEO-friendly table of contents for your posts, pages or custom post type
35
  * Setting offset top for smooth scroll.
36
  * Wrap table of contents with &lt;!--noindex--&gt; tag (optionally).
37
  * Pretty hash in URL (like `example.com/faq/#how_do_this`).
 
38
  * Available override global settings for a particular post.
39
  * Highly compatible with WordPress themes and plugins.
40
 
@@ -138,77 +139,83 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
138
 
139
  == Changelog ==
140
 
141
- = 1.5.7 =
 
 
 
 
 
 
142
  * Imporvement smooth scroll implementation for support lazy loading images in content.
143
  * Fix: in some cases, incorrectly worked smooth scroll to headings.
144
 
145
- = 1.5.6 =
146
  * Fix: in some cases, incorrectly worked option "Minimal Count of Headers".
147
 
148
- = 1.5.5 =
149
  * Modified code for compatibility with Toolset Access plugin.
150
 
151
- = 1.5.4 =
152
  * Added support Beaver Builder plugin.
153
  * Fix: in some cases, headings processing did not work correctly.
154
 
155
- = 1.5.3 =
156
  * Fix: when auto insert TOC do not overrided settings "Wrap table of contents with &lt;!--noindex--&gt; tag" and "Skip headings".
157
  * Fix: in some cases, auto insert after first block did not work.
158
 
159
- = 1.5.2 =
160
  + Added hook filter `lwptoc_heading_id`.
161
  + Implemented classic behavior on click "Back" in browser.
162
 
163
- = 1.5.1 =
164
  * Bug fix
165
 
166
- = 1.5 =
167
  + Enhancements for search engines (Google and other).
168
 
169
- = 1.4.1 =
170
  * Bug fix
171
 
172
- = 1.4 =
173
  + Added widget "Table of Contents".
174
  + Added support output table of contents via `do_shortcode('[lwptoc]')`.
175
  * Enhancements for more compatible with themes.
176
 
177
- = 1.3.1 =
178
  * Bug fix
179
 
180
- = 1.3.0 =
181
  + Skip headings by level or text.
182
 
183
- = 1.2.2 =
184
  * Bug fix
185
 
186
- = 1.2.1 =
187
  * Enhancements for more compatible with themes.
188
 
189
- = 1.2.0 =
190
  + Added float options: "Center" and "Right without flow".
191
  + Added setting "Hash Format".
192
  * In anchors instead "name" attribute used "id".
193
  * Minor enhancements in CSS for more compatible with themes.
194
 
195
- = 1.1.1 =
196
  * Tag &lt;noindex&gt; replaced to &lt;!--noindex--&gt;.
197
 
198
- = 1.1.0 =
199
  + Added option "Wrap table of contents with &lt;noindex&gt; tag".
200
  + Added hook filters `lwptoc_before`, `lwptoc_after`, `lwptoc_shortcode_tag`.
201
  * Fix: into Gutenberg editor in block "Classic editor" don't loaded CSS for shortcode.
202
 
203
- = 1.0.4 =
204
  * Bug fix
205
 
206
- = 1.0.3 =
207
  * Minor appearance changes
208
  * Bug fix
209
 
210
- = 1.0.2 =
211
  * Bug fix
212
 
213
- = 1.0.1 =
214
  * Bug fix
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.6
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
35
  * Setting offset top for smooth scroll.
36
  * Wrap table of contents with &lt;!--noindex--&gt; tag (optionally).
37
  * Pretty hash in URL (like `example.com/faq/#how_do_this`).
38
+ * RTL support.
39
  * Available override global settings for a particular post.
40
  * Highly compatible with WordPress themes and plugins.
41
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.6 — 2019-07-13 =
143
+ + Added RTL support.
144
+ + Added option "Numeration Suffix".
145
+ * Changed text domain to "luckywp-table-of-contents".
146
+ * Improved Beaver Builder plugin support.
147
+
148
+ = 1.5.7 — 2019-07-10 =
149
  * Imporvement smooth scroll implementation for support lazy loading images in content.
150
  * Fix: in some cases, incorrectly worked smooth scroll to headings.
151
 
152
+ = 1.5.6 — 2019-07-06 =
153
  * Fix: in some cases, incorrectly worked option "Minimal Count of Headers".
154
 
155
+ = 1.5.5 — 2019-07-06 =
156
  * Modified code for compatibility with Toolset Access plugin.
157
 
158
+ = 1.5.4 — 2019-06-29 =
159
  * Added support Beaver Builder plugin.
160
  * Fix: in some cases, headings processing did not work correctly.
161
 
162
+ = 1.5.3 — 2019-06-27 =
163
  * Fix: when auto insert TOC do not overrided settings "Wrap table of contents with &lt;!--noindex--&gt; tag" and "Skip headings".
164
  * Fix: in some cases, auto insert after first block did not work.
165
 
166
+ = 1.5.2 — 2019-06-17 =
167
  + Added hook filter `lwptoc_heading_id`.
168
  + Implemented classic behavior on click "Back" in browser.
169
 
170
+ = 1.5.1 — 2019-06-05 =
171
  * Bug fix
172
 
173
+ = 1.5 — 2019-06-04 =
174
  + Enhancements for search engines (Google and other).
175
 
176
+ = 1.4.1 — 2019-06-01 =
177
  * Bug fix
178
 
179
+ = 1.4 — 2019-06-01 =
180
  + Added widget "Table of Contents".
181
  + Added support output table of contents via `do_shortcode('[lwptoc]')`.
182
  * Enhancements for more compatible with themes.
183
 
184
+ = 1.3.1 — 2019-05-09 =
185
  * Bug fix
186
 
187
+ = 1.3.0 — 2019-05-08 =
188
  + Skip headings by level or text.
189
 
190
+ = 1.2.2 — 2019-04-24 =
191
  * Bug fix
192
 
193
+ = 1.2.1 — 2019-04-24 =
194
  * Enhancements for more compatible with themes.
195
 
196
+ = 1.2.0 — 2019-04-23 =
197
  + Added float options: "Center" and "Right without flow".
198
  + Added setting "Hash Format".
199
  * In anchors instead "name" attribute used "id".
200
  * Minor enhancements in CSS for more compatible with themes.
201
 
202
+ = 1.1.1 — 2019-04-15 =
203
  * Tag &lt;noindex&gt; replaced to &lt;!--noindex--&gt;.
204
 
205
+ = 1.1.0 — 2019-04-14 =
206
  + Added option "Wrap table of contents with &lt;noindex&gt; tag".
207
  + Added hook filters `lwptoc_before`, `lwptoc_after`, `lwptoc_shortcode_tag`.
208
  * Fix: into Gutenberg editor in block "Classic editor" don't loaded CSS for shortcode.
209
 
210
+ = 1.0.4 — 2019-11-18 =
211
  * Bug fix
212
 
213
+ = 1.0.3 — 2019-11-17 =
214
  * Minor appearance changes
215
  * Bug fix
216
 
217
+ = 1.0.2 — 2019-11-16 =
218
  * Bug fix
219
 
220
+ = 1.0.1 — 2019-11-15 =
221
  * Bug fix