Version Description
2019-08-11 = + Added support Elementor plugin.
Download this release
Release Info
Developer | theluckywp |
Plugin | LuckyWP Table of Contents |
Version | 1.9.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 1.9.2
- admin/Admin.php +13 -2
- admin/assets/main.min.css +1 -1
- admin/assets/main.min.js +1 -1
- admin/controllers/WidgetController.php +6 -2
- admin/widgets/customizeModal/CustomizeModal.php +6 -0
- admin/widgets/customizeModal/views/modal.php +3 -0
- core/admin/helpers/AdminHtml.php +2 -0
- integrations/elementor/Elementor.php +46 -0
- integrations/elementor/assets/editor.min.js +1 -0
- luckywp-table-of-contents.php +2 -2
- plugin/Plugin.php +4 -0
- readme.txt +4 -1
admin/Admin.php
CHANGED
@@ -85,7 +85,18 @@ class Admin extends BaseObject
|
|
85 |
public function assets($hook)
|
86 |
{
|
87 |
global $post;
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
wp_enqueue_style('wp-color-picker');
|
90 |
wp_enqueue_script('wp-color-picker');
|
91 |
}
|
@@ -94,7 +105,7 @@ class Admin extends BaseObject
|
|
94 |
wp_localize_script(Core::$plugin->prefix . 'adminMain', 'lwptocMain', [
|
95 |
'ajaxUrl' => admin_url('admin-ajax.php'),
|
96 |
'nonce' => wp_create_nonce(Core::$plugin->prefix . 'adminMain'),
|
97 |
-
'postId' =>
|
98 |
'shortcodeTag' => Core::$plugin->shortcode->getTag(),
|
99 |
'tableOfContents' => esc_html__('Table of Contents', 'luckywp-table-of-contents'),
|
100 |
/* translators: verb */
|
85 |
public function assets($hook)
|
86 |
{
|
87 |
global $post;
|
88 |
+
$this->enqueueAssets([
|
89 |
+
'enqueueWpColorPicker' => in_array($hook, [$this->pageSettingsHook, 'post.php', 'post-new.php', 'widgets.php', 'settings_page_lwptoc_settings']),
|
90 |
+
'postId' => in_array($hook, ['post.php', 'post-new.php']) ? ArrayHelper::getValue($post, 'ID') : null,
|
91 |
+
]);
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @param array $args
|
96 |
+
*/
|
97 |
+
public function enqueueAssets($args)
|
98 |
+
{
|
99 |
+
if (ArrayHelper::getValue($args, 'enqueueWpColorPicker', false)) {
|
100 |
wp_enqueue_style('wp-color-picker');
|
101 |
wp_enqueue_script('wp-color-picker');
|
102 |
}
|
105 |
wp_localize_script(Core::$plugin->prefix . 'adminMain', 'lwptocMain', [
|
106 |
'ajaxUrl' => admin_url('admin-ajax.php'),
|
107 |
'nonce' => wp_create_nonce(Core::$plugin->prefix . 'adminMain'),
|
108 |
+
'postId' => ArrayHelper::getValue($args, 'postId'),
|
109 |
'shortcodeTag' => Core::$plugin->shortcode->getTag(),
|
110 |
'tableOfContents' => esc_html__('Table of Contents', 'luckywp-table-of-contents'),
|
111 |
/* translators: verb */
|
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}.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"}
|
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{font-size:13px;line-height:1.4em}.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}.lwptocCustomize .wp-picker-container{float:none!important}.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){var o="lwptocPreloader";e.fn[o+"Show"]=function(){var t=e(this);t.addClass(o+"Wrapper"),t.append('<div class="'+o+'Overlay"><div class="lwptocDarkSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>')},e.fn[o+"Hide"]=function(){var t=e(this);t.removeClass(o+"Wrapper"),t.find("."+o+"Overlay").remove()}}(jQuery),function(l){var r="lwptocModal",e={type:"html",content:"",url:"",ajax:{},ajaxRequest:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="'+r+'-overlay"></div>',css:{backgroundColor:"#000",opacity:.6,zIndex:1e5}},container:{block:void 0,tpl:'<div class="'+r+'-container"><div class="'+r+'-container_i"><div class="'+r+'-container_i2"></div></div></div>'},preloader:{verticalAlign:void 0,tpl:'<div class="'+r+'-preloader" />'},wrap:void 0,body:void 0,errors:{tpl:'<div class="'+r+"-error "+r+'-close"></div>',autocloseDelay:2e3,ajaxUnsuccessfulLoad:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},width:"auto",verticalAlign:"middle",beforeOpen:l.noop,afterOpen:l.noop,beforeClose:l.noop,afterClose:l.noop,afterLoading:l.noop,afterLoadingOnShow:l.noop,errorLoading:l.noop},d=0,s=l([]),u=function(t,e){var o=!0;return l(t).each(function(){l(e.target).get(0)==l(this).get(0)&&(o=!1),0==l(e.target).closest("HTML",l(this).get(0)).length&&(o=!1)}),o},i={getParentEl:function(t){var e=l(t);return e.data(r)?e:(e=l(t).closest("."+r+"-container").data(r+"ParentEl"))||!1},transition:function(t,e,o,n){switch(n=null==n?l.noop:n,o.type){case"fade":"show"==e?t.fadeIn(o.speed,n):t.fadeOut(o.speed,n);break;case"none":"show"==e?t.show():t.hide(),n()}},setWrapMarginRight:function(t,e){t.wrap.css("marginRight",e+"px"),l(document).trigger(r+"_setWrapMarginRight",e)},initEl:function(e,t){var o=e.data(r);if(!o){if(d++,(o=t).modalID=d,o.overlay.block=l(o.overlay.tpl),o.overlay.block.css(o.overlay.css),o.container.block=l(o.container.tpl),o.body=l("."+r+"-container_i2",o.container.block),t.clone?o.body.html(e.clone(!0)):(e.before('<div id="'+r+"Reserve"+o.modalID+'" style="display: none" />'),o.body.html(e)),o.body.on("click","."+r+"-close",function(){return e[r]("close"),!1}),o.closeOnOverlayClick&&o.overlay.block.add(o.container.block).click(function(t){u(l(">*",o.body),t)&&e[r]("close")}),o.container.block.data(r+"ParentEl",e),e.data(r,o),s=l.merge(s,e),l.proxy(p.show,e)(),"html"==o.type)return e;if(null!=o.ajax.beforeSend){var n=o.ajax.beforeSend;delete o.ajax.beforeSend}if(null!=o.ajax.success){var i=o.ajax.success;delete o.ajax.success}if(null!=o.ajax.error){var a=o.ajax.error;delete o.ajax.error}var c=l.extend(!0,{url:o.url,beforeSend:function(){o.body.html(o.preloader.tpl).css("verticalAlign",void 0===o.preloader.verticalAlign?o.verticalAlign:o.preloader.verticalAlign),void 0!==n&&n(o,e)},success:function(t){e.trigger("afterLoading."+r),t=o.afterLoading(o,e,t)||t,o.body.css("verticalAlign",o.verticalAlign),null==i?o.body.html(t):i(o,e,t),e.trigger("afterLoadingOnShow."+r),o.afterLoadingOnShow(o,e,t)},error:function(){e.trigger("errorLoading."+r),o.errorLoading(o,e),null==a?(o.body.html(o.errors.tpl),l("."+r+"-error",o.body).html(o.errors.ajaxUnsuccessfulLoad),l("."+r+"-close",o.body).click(function(){return e[r]("close"),!1}),o.errors.autocloseDelay&&setTimeout(function(){e[r]("close")},o.errors.autocloseDelay)):a(o,e)}},o.ajax);o.ajaxRequest=l.ajax(c),e.data(r,o)}},init:function(t){return t=l.extend(!0,{},e,t),l.isFunction(this)?null==t?void l.error(r+": Uncorrect parameters"):""!=t.url?(t.type="ajax",i.initEl(l("<div />"),t)):""!=t.content?(t.type="html",i.initEl(l(t.content),t)):void l.error(r+': Set parameter "url" or "content"'):this.each(function(){i.initEl(l(this),l.extend(!0,{},t))})}},p={show:function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(r);if(e.overlay.block.hide(),e.container.block.hide(),l("BODY").append(e.overlay.block),l("BODY").append(e.container.block),e.container.block.css("zIndex",e.overlay.block.css("zIndex")),e.beforeOpen(e,t),t.trigger("beforeOpen."+r),"hidden"!=e.wrap.css("overflow-y")){e.wrap.data(r+"Overflow",e.wrap.css("overflow-y"));var o=e.wrap.outerWidth(!0);e.wrap.css("overflow-y","hidden");var n=e.wrap.outerWidth(!0);n!=o&&i.setWrapMarginRight(e,n-o)}return s.not(t).each(function(){l(this).data(r).overlay.block.hide()}),e.body.css("verticalAlign",e.verticalAlign),e.body.parent().css("width",e.width),i.transition(e.overlay.block,"show",1<s.length?{type:"none"}:e.openEffect),i.transition(e.container.block,"show",1<s.length?{type:"none"}:e.openEffect,function(){e.afterOpen(e,t),t.trigger("afterOpen."+r)}),t}l.error(r+": Uncorrect call")},close:function(){if(!l.isFunction(this))return this.each(function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(r);!1!==e.beforeClose(e,t)&&(t.trigger("beforeClose."+r),s.not(t).last().each(function(){l(this).data(r).overlay.block.show()}),i.transition(e.overlay.block,"hide",1<s.length?{type:"none"}:e.closeEffect),i.transition(e.container.block,"hide",1<s.length?{type:"none"}:e.closeEffect,function(){e.afterClose(e,t),t.trigger("afterClose."+r),e.clone||l("#"+r+"Reserve"+e.modalID).replaceWith(e.body.find(">*")),e.overlay.block.remove(),e.container.block.remove(),t.data(r,null),l("."+r+"-container").length||(e.wrap.data(r+"Overflow")&&e.wrap.css("overflow-y",e.wrap.data(r+"Overflow")),i.setWrapMarginRight(e,0))}),"ajax"==e.type&&e.ajaxRequest.abort(),s=s.not(t))}else l.error(r+": Uncorrect call")});s.each(function(){l(this)[r]("close")})},getActive:function(){var t=l("."+r+"-container").last();return!!t.length&&t.data(r+"ParentEl").data(r)},setDefault:function(t){l.extend(!0,e,t)}};l(function(){e.wrap=l(document.all&&!document.querySelector?"html":"body")}),l(document).bind("keyup."+r,function(t){var e=s.last();e.length&&e.data(r).closeOnEsc&&27===t.keyCode&&e[r]("close")}),l[r]=l.fn[r]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void l.error(r+": Method "+t+" does not exist"):i.init.apply(this,arguments)}}(jQuery),function(n){var i="lwptocAjaxForm",e={afterInit:n.noop,beforeSend:n.noop,success:n.noop,error:function(){alert("Failed to execute the query. Reload the page and try again.")},b:{}},a={isForm:function(t){return"form"==t.get(0).tagName.toLowerCase()},makeData:function(t){return a.isForm(t)?t.serialize():(e=t.clone().wrap("<form/>"),t.find("select").each(function(t){e.find("select").eq(t).val(n(this).val())}),e.serialize());var e},submit:function(t,e){n.ajax({type:"POST",cache:!1,data:a.makeData(t),url:a.isForm(t)?t.attr("action"):t.data("action"),beforeSend:function(){e.beforeSend(e,t)},success:function(t){e.b.container.html(t),e.success(e)},error:function(){e.error(e,t)}})},initContainer:function(t,e){var o=t.data(i);o||(o=e,t.data(i,o),(o.b.container=t).on("submit","[data-ajax-form]",function(){return a.submit(n(this),o),!1}),o.afterInit(o))},init:function(t){return t=n.extend(!0,{},e,t),n.isFunction(this)?(n.error(i+": Uncorrect call"),!1):this.each(function(){a.initContainer(n(this),n.extend(!0,{},t))})}},o={setDefault:function(t){n.extend(!0,e,t)}};n[i]=n.fn[i]=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?(n.error(i+": Method "+t+" does not exist"),!1):a.init.apply(this,arguments)}}(jQuery),function(d){d.lwptocModal("setDefault",{preloader:{tpl:'<div class="lwptocLightSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>'},overlay:{css:{zIndex:999999}}}),d(function(){var t=d(".js-lwptocSmoothScrollCheckbox");if(t.length){var e=d(".js-lwptocSmoothScrollIOffsetInput").closest("TR");t.change(function(){t.prop("checked")?e.show():e.hide()}).change()}var o=d(".js-lwptocToggleCheckbox");if(o.length){var n=d(".js-lwptocToggleEl").closest("TR");o.change(function(){o.prop("checked")?n.show():n.hide()}).change()}var i=d(".js-lwptocAutoInsertEnableCheckbox");if(i.length){var a=d(".js-lwptocAutoInsertEl").closest("TR");i.change(function(){i.prop("checked")?a.show():a.hide()}).change()}var c=d(".js-lwptocNumerationSelect");if(c.length){var l=d(".js-lwptocNumerationSuffixSelect").closest("TR");c.change(function(){"none"==c.val()?l.hide():l.show()}).change()}var r=d(".lwptoc_colorPicker");r.length&&r.wpColorPicker()}),d.lwptocCustomize={init:function(e,o){n.init(e.find(".lwptocWidthField")),i.init(e.find(".lwptocFontSizeField")),e.find(".lwptoc_colorPicker").wpColorPicker(),e.on("click",".lwptocCustomize_field_override",function(){var t=d(this).closest(".lwptocCustomize_field");t.removeClass("lwptocCustomize_field-default"),t.find("INPUT[type=text]").focus(),t.find(".lwptocCustomize_field_inputDefault").val(0)}),e.on("click",".lwptocCustomize_field_default",function(){var t=d(this).closest(".lwptocCustomize_field");t.addClass("lwptocCustomize_field-default"),t.find(".lwptocCustomize_field_inputDefault").val(1)}),e.on("click",".lwptocCustomize_tab",function(){e.find(".lwptocCustomize_tab-active").removeClass("lwptocCustomize_tab-active"),d(this).addClass("lwptocCustomize_tab-active"),e.find(".lwptocCustomize_fields").hide(),e.find(".lwptocCustomize_fields-"+d(this).data("tab")).show()}),e.lwptocAjaxForm({beforeSend:function(){e.lwptocPreloaderShow()},success:function(t){e.lwptocPreloaderHide(),o()}})},show:function(t,e){t._ajax_nonce=lwptocMain.nonce,d.lwptocModal({url:lwptocMain.ajaxUrl,closeOnOverlayClick:!1,verticalAlign:"top",ajax:{data:t},afterLoadingOnShow:function(t){d.lwptocCustomize.init(t.body.find(".lwptocCustomize"),function(){t.body.lwptocModal("close")})},afterClose:e})}};var o={reload:function(t){var e=d(t);o.$container.replaceWith(e),o.init(e)},setEnabled:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_enabled",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},setProcessing:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_processing",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},init:function(){o.$container=d(".lwptocMetabox"),o.$container.length&&(o.$container.find(".lwptocMetabox_disable").click(function(){o.setEnabled(!1)}),o.$container.find(".lwptocMetabox_enable").click(function(){o.setEnabled(!0)}),o.$container.find(".lwptocMetabox_disableProcessing").click(function(){o.setProcessing(!1)}),o.$container.find(".lwptocMetabox_enableProcessing").click(function(){o.setProcessing(!0)}),o.$container.find(".lwptocMetabox_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_metabox_customize",postId:o.$container.data("postId")},d.noop)}),d(document).on("lwptocMetaboxCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),o.reload(e.metabox)}))}};d(function(){o.init()});var e={oneInited:!1,oneInit:function(){d(document).on("lwptocWidgetCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),d(".lwptocWidget-"+e.id+" .lwptocWidget_override").html(e.override),d(".lwptocWidget-"+e.id+" .lwptocWidget_input").val(e.value).change()})},init:function(){d(".lwptocWidget").each(function(){var t=d(this);t.data("inited")||(t.find(".lwptocWidget_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_widget_customize",value:t.find(".lwptocWidget_input").val(),widgetId:t.data("id")},d.noop)}),t.data("inited",1),e.oneInited||e.oneInit())})}};d.lwptocWidget=e;var n={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocWidthField_typeInput"),t.$sizeInput=t.$container.find(".lwptocWidthField_sizeInput"),t.$unitInput=t.$container.find(".lwptocWidthField_unitInput"),t.$input=t.$container.find(".lwptocWidthField_input"),t.$custom=t.$container.find(".lwptocWidthField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){n.update(t)})})}};d(function(){n.init(d(".lwptocWidthField"))});var i={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocFontSizeField_typeInput"),t.$sizeInput=t.$container.find(".lwptocFontSizeField_sizeInput"),t.$unitInput=t.$container.find(".lwptocFontSizeField_unitInput"),t.$input=t.$container.find(".lwptocFontSizeField_input"),t.$custom=t.$container.find(".lwptocFontSizeField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){i.update(t)})})}};d(function(){i.init(d(".lwptocFontSizeField"))}),d(function(){var t=d(".lwptocRate");t.length&&t.on("click",".button",function(){d.ajax({url:lwptocMain.ajaxUrl,method:"POST",data:{action:d(this).data("action")},beforeSend:function(){t.lwptocPreloaderShow()},success:function(){t.remove()}})})})}(jQuery);
|
1 |
+
!function(e){var o="lwptocPreloader";e.fn[o+"Show"]=function(){var t=e(this);t.addClass(o+"Wrapper"),t.append('<div class="'+o+'Overlay"><div class="lwptocDarkSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>')},e.fn[o+"Hide"]=function(){var t=e(this);t.removeClass(o+"Wrapper"),t.find("."+o+"Overlay").remove()}}(jQuery),function(r){var l="lwptocModal",e={type:"html",content:"",url:"",ajax:{},ajaxRequest:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="'+l+'-overlay"></div>',css:{backgroundColor:"#000",opacity:.6,zIndex:1e5}},container:{block:void 0,tpl:'<div class="'+l+'-container"><div class="'+l+'-container_i"><div class="'+l+'-container_i2"></div></div></div>'},preloader:{verticalAlign:void 0,tpl:'<div class="'+l+'-preloader" />'},wrap:void 0,body:void 0,errors:{tpl:'<div class="'+l+"-error "+l+'-close"></div>',autocloseDelay:2e3,ajaxUnsuccessfulLoad:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},width:"auto",verticalAlign:"middle",beforeOpen:r.noop,afterOpen:r.noop,beforeClose:r.noop,afterClose:r.noop,afterLoading:r.noop,afterLoadingOnShow:r.noop,errorLoading:r.noop},d=0,s=r([]),u=function(t,e){var o=!0;return r(t).each(function(){r(e.target).get(0)==r(this).get(0)&&(o=!1),0==r(e.target).closest("HTML",r(this).get(0)).length&&(o=!1)}),o},i={getParentEl:function(t){var e=r(t);return e.data(l)?e:(e=r(t).closest("."+l+"-container").data(l+"ParentEl"))||!1},transition:function(t,e,o,n){switch(n=null==n?r.noop:n,o.type){case"fade":"show"==e?t.fadeIn(o.speed,n):t.fadeOut(o.speed,n);break;case"none":"show"==e?t.show():t.hide(),n()}},setWrapMarginRight:function(t,e){t.wrap.css("marginRight",e+"px"),r(document).trigger(l+"_setWrapMarginRight",e)},initEl:function(e,t){var o=e.data(l);if(!o){if(d++,(o=t).modalID=d,o.overlay.block=r(o.overlay.tpl),o.overlay.block.css(o.overlay.css),o.container.block=r(o.container.tpl),o.body=r("."+l+"-container_i2",o.container.block),t.clone?o.body.html(e.clone(!0)):(e.before('<div id="'+l+"Reserve"+o.modalID+'" style="display: none" />'),o.body.html(e)),o.body.on("click","."+l+"-close",function(){return e[l]("close"),!1}),o.closeOnOverlayClick&&o.overlay.block.add(o.container.block).click(function(t){u(r(">*",o.body),t)&&e[l]("close")}),o.container.block.data(l+"ParentEl",e),e.data(l,o),s=r.merge(s,e),r.proxy(p.show,e)(),"html"==o.type)return e;if(null!=o.ajax.beforeSend){var n=o.ajax.beforeSend;delete o.ajax.beforeSend}if(null!=o.ajax.success){var i=o.ajax.success;delete o.ajax.success}if(null!=o.ajax.error){var a=o.ajax.error;delete o.ajax.error}var c=r.extend(!0,{url:o.url,beforeSend:function(){o.body.html(o.preloader.tpl).css("verticalAlign",void 0===o.preloader.verticalAlign?o.verticalAlign:o.preloader.verticalAlign),void 0!==n&&n(o,e)},success:function(t){e.trigger("afterLoading."+l),t=o.afterLoading(o,e,t)||t,o.body.css("verticalAlign",o.verticalAlign),null==i?o.body.html(t):i(o,e,t),e.trigger("afterLoadingOnShow."+l),o.afterLoadingOnShow(o,e,t)},error:function(){e.trigger("errorLoading."+l),o.errorLoading(o,e),null==a?(o.body.html(o.errors.tpl),r("."+l+"-error",o.body).html(o.errors.ajaxUnsuccessfulLoad),r("."+l+"-close",o.body).click(function(){return e[l]("close"),!1}),o.errors.autocloseDelay&&setTimeout(function(){e[l]("close")},o.errors.autocloseDelay)):a(o,e)}},o.ajax);o.ajaxRequest=r.ajax(c),e.data(l,o)}},init:function(t){return t=r.extend(!0,{},e,t),r.isFunction(this)?null==t?void r.error(l+": Uncorrect parameters"):""!=t.url?(t.type="ajax",i.initEl(r("<div />"),t)):""!=t.content?(t.type="html",i.initEl(r(t.content),t)):void r.error(l+': Set parameter "url" or "content"'):this.each(function(){i.initEl(r(this),r.extend(!0,{},t))})}},p={show:function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(l);if(e.overlay.block.hide(),e.container.block.hide(),r("BODY").append(e.overlay.block),r("BODY").append(e.container.block),e.container.block.css("zIndex",e.overlay.block.css("zIndex")),e.beforeOpen(e,t),t.trigger("beforeOpen."+l),"hidden"!=e.wrap.css("overflow-y")){e.wrap.data(l+"Overflow",e.wrap.css("overflow-y"));var o=e.wrap.outerWidth(!0);e.wrap.css("overflow-y","hidden");var n=e.wrap.outerWidth(!0);n!=o&&i.setWrapMarginRight(e,n-o)}return s.not(t).each(function(){r(this).data(l).overlay.block.hide()}),e.body.css("verticalAlign",e.verticalAlign),e.body.parent().css("width",e.width),i.transition(e.overlay.block,"show",1<s.length?{type:"none"}:e.openEffect),i.transition(e.container.block,"show",1<s.length?{type:"none"}:e.openEffect,function(){e.afterOpen(e,t),t.trigger("afterOpen."+l)}),t}r.error(l+": Uncorrect call")},close:function(){if(!r.isFunction(this))return this.each(function(){var t=i.getParentEl(this);if(!1!==t){var e=t.data(l);!1!==e.beforeClose(e,t)&&(t.trigger("beforeClose."+l),s.not(t).last().each(function(){r(this).data(l).overlay.block.show()}),i.transition(e.overlay.block,"hide",1<s.length?{type:"none"}:e.closeEffect),i.transition(e.container.block,"hide",1<s.length?{type:"none"}:e.closeEffect,function(){e.afterClose(e,t),t.trigger("afterClose."+l),e.clone||r("#"+l+"Reserve"+e.modalID).replaceWith(e.body.find(">*")),e.overlay.block.remove(),e.container.block.remove(),t.data(l,null),r("."+l+"-container").length||(e.wrap.data(l+"Overflow")&&e.wrap.css("overflow-y",e.wrap.data(l+"Overflow")),i.setWrapMarginRight(e,0))}),"ajax"==e.type&&e.ajaxRequest.abort(),s=s.not(t))}else r.error(l+": Uncorrect call")});s.each(function(){r(this)[l]("close")})},getActive:function(){var t=r("."+l+"-container").last();return!!t.length&&t.data(l+"ParentEl").data(l)},setDefault:function(t){r.extend(!0,e,t)}};r(function(){e.wrap=r(document.all&&!document.querySelector?"html":"body")}),r(document).bind("keyup."+l,function(t){var e=s.last();e.length&&e.data(l).closeOnEsc&&27===t.keyCode&&e[l]("close")}),r[l]=r.fn[l]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void r.error(l+": Method "+t+" does not exist"):i.init.apply(this,arguments)}}(jQuery),function(n){var i="lwptocAjaxForm",e={afterInit:n.noop,beforeSend:n.noop,success:n.noop,error:function(){alert("Failed to execute the query. Reload the page and try again.")},b:{}},a={isForm:function(t){return"form"==t.get(0).tagName.toLowerCase()},makeData:function(t){return a.isForm(t)?t.serialize():(e=t.clone().wrap("<form/>"),t.find("select").each(function(t){e.find("select").eq(t).val(n(this).val())}),e.serialize());var e},submit:function(t,e){n.ajax({type:"POST",cache:!1,data:a.makeData(t),url:a.isForm(t)?t.attr("action"):t.data("action"),beforeSend:function(){e.beforeSend(e,t)},success:function(t){e.b.container.html(t),e.success(e)},error:function(){e.error(e,t)}})},initContainer:function(t,e){var o=t.data(i);o||(o=e,t.data(i,o),(o.b.container=t).on("submit","[data-ajax-form]",function(){return a.submit(n(this),o),!1}),o.afterInit(o))},init:function(t){return t=n.extend(!0,{},e,t),n.isFunction(this)?(n.error(i+": Uncorrect call"),!1):this.each(function(){a.initContainer(n(this),n.extend(!0,{},t))})}},o={setDefault:function(t){n.extend(!0,e,t)}};n[i]=n.fn[i]=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?(n.error(i+": Method "+t+" does not exist"),!1):a.init.apply(this,arguments)}}(jQuery),function(d){d.lwptocModal("setDefault",{preloader:{tpl:'<div class="lwptocLightSpinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>'},overlay:{css:{zIndex:999999}}}),d(function(){var t=d(".js-lwptocSmoothScrollCheckbox");if(t.length){var e=d(".js-lwptocSmoothScrollIOffsetInput").closest("TR");t.change(function(){t.prop("checked")?e.show():e.hide()}).change()}var o=d(".js-lwptocToggleCheckbox");if(o.length){var n=d(".js-lwptocToggleEl").closest("TR");o.change(function(){o.prop("checked")?n.show():n.hide()}).change()}var i=d(".js-lwptocAutoInsertEnableCheckbox");if(i.length){var a=d(".js-lwptocAutoInsertEl").closest("TR");i.change(function(){i.prop("checked")?a.show():a.hide()}).change()}var c=d(".js-lwptocNumerationSelect");if(c.length){var r=d(".js-lwptocNumerationSuffixSelect").closest("TR");c.change(function(){"none"==c.val()?r.hide():r.show()}).change()}var l=d(".lwptoc_colorPicker");l.length&&l.wpColorPicker()}),d.lwptocCustomize={extraData:{},init:function(e,o){n.init(e.find(".lwptocWidthField")),i.init(e.find(".lwptocFontSizeField")),e.find(".lwptoc_colorPicker").wpColorPicker(),e.on("click",".lwptocCustomize_field_override",function(){var t=d(this).closest(".lwptocCustomize_field");t.removeClass("lwptocCustomize_field-default"),t.find("INPUT[type=text]").focus(),t.find(".lwptocCustomize_field_inputDefault").val(0)}),e.on("click",".lwptocCustomize_field_default",function(){var t=d(this).closest(".lwptocCustomize_field");t.addClass("lwptocCustomize_field-default"),t.find(".lwptocCustomize_field_inputDefault").val(1)}),e.on("click",".lwptocCustomize_tab",function(){e.find(".lwptocCustomize_tab-active").removeClass("lwptocCustomize_tab-active"),d(this).addClass("lwptocCustomize_tab-active"),e.find(".lwptocCustomize_fields").hide(),e.find(".lwptocCustomize_fields-"+d(this).data("tab")).show()}),e.lwptocAjaxForm({beforeSend:function(){e.lwptocPreloaderShow()},success:function(t){e.lwptocPreloaderHide(),o()}})},show:function(t,e){t._ajax_nonce=lwptocMain.nonce,t.extra=d.lwptocCustomize.extraData,d.lwptocModal({url:lwptocMain.ajaxUrl,closeOnOverlayClick:!1,verticalAlign:"top",ajax:{data:t},afterLoadingOnShow:function(t){d.lwptocCustomize.init(t.body.find(".lwptocCustomize"),function(){t.body.lwptocModal("close")})},afterClose:e})}};var o={reload:function(t){var e=d(t);o.$container.replaceWith(e),o.init(e)},setEnabled:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_enabled",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},setProcessing:function(t){d.ajax({url:lwptocMain.ajaxUrl,data:{_ajax_nonce:lwptocMain.nonce,action:"lwptoc_metabox_set_processing",postId:o.$container.data("postId"),enabled:t?1:0},beforeSend:function(){o.$container.lwptocPreloaderShow()},success:function(t){o.$container.lwptocPreloaderHide(),o.reload(t)}})},init:function(){o.$container=d(".lwptocMetabox"),o.$container.length&&(o.$container.find(".lwptocMetabox_disable").click(function(){o.setEnabled(!1)}),o.$container.find(".lwptocMetabox_enable").click(function(){o.setEnabled(!0)}),o.$container.find(".lwptocMetabox_disableProcessing").click(function(){o.setProcessing(!1)}),o.$container.find(".lwptocMetabox_enableProcessing").click(function(){o.setProcessing(!0)}),o.$container.find(".lwptocMetabox_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_metabox_customize",postId:o.$container.data("postId")},d.noop)}),d(document).on("lwptocMetaboxCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),o.reload(e.metabox)}))}};d(function(){o.init()});var e={oneInited:!1,oneInit:function(){d(document).on("lwptocWidgetCustomized",function(t,e){d(".lwptocCustomize-metabox").lwptocModal("close"),d(".lwptocWidget-"+e.id+" .lwptocWidget_override").html(e.override),d(".lwptocWidget-"+e.id+" .lwptocWidget_input").val(e.value).change()})},init:function(){d(".lwptocWidget").each(function(){var t=d(this);t.data("inited")||(t.find(".lwptocWidget_customize").click(function(){d.lwptocCustomize.show({action:"lwptoc_widget_customize",value:t.find(".lwptocWidget_input").val(),widgetId:t.data("id")},d.noop)}),t.data("inited",1),e.oneInited||e.oneInit())})}};d.lwptocWidget=e;var n={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocWidthField_typeInput"),t.$sizeInput=t.$container.find(".lwptocWidthField_sizeInput"),t.$unitInput=t.$container.find(".lwptocWidthField_unitInput"),t.$input=t.$container.find(".lwptocWidthField_input"),t.$custom=t.$container.find(".lwptocWidthField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){n.update(t)})})}};d(function(){n.init(d(".lwptocWidthField"))});var i={update:function(t){"custom"==t.$typeInput.val()?(t.$input.val(t.$sizeInput.val()+t.$unitInput.val()),t.$custom.show()):(t.$input.val(t.$typeInput.val()),t.$custom.hide())},init:function(t){t.each(function(){var t={$container:d(this)};t.$typeInput=t.$container.find(".lwptocFontSizeField_typeInput"),t.$sizeInput=t.$container.find(".lwptocFontSizeField_sizeInput"),t.$unitInput=t.$container.find(".lwptocFontSizeField_unitInput"),t.$input=t.$container.find(".lwptocFontSizeField_input"),t.$custom=t.$container.find(".lwptocFontSizeField_custom"),t.$typeInput.add(t.$sizeInput).add(t.$unitInput).change(function(){i.update(t)})})}};d(function(){i.init(d(".lwptocFontSizeField"))}),d(function(){var t=d(".lwptocRate");t.length&&t.on("click",".button",function(){d.ajax({url:lwptocMain.ajaxUrl,method:"POST",data:{action:d(this).data("action")},beforeSend:function(){t.lwptocPreloaderShow()},success:function(){t.remove()}})})})}(jQuery);
|
admin/controllers/WidgetController.php
CHANGED
@@ -9,6 +9,7 @@ use luckywp\tableOfContents\admin\widgets\widget\Widget;
|
|
9 |
use luckywp\tableOfContents\core\admin\AdminController;
|
10 |
use luckywp\tableOfContents\core\Core;
|
11 |
use luckywp\tableOfContents\core\helpers\Json;
|
|
|
12 |
use luckywp\tableOfContents\plugin\Shortcode;
|
13 |
|
14 |
class WidgetController extends AdminController
|
@@ -52,19 +53,22 @@ class WidgetController extends AdminController
|
|
52 |
'id' => $widgetId,
|
53 |
'override' => Widget::overrideHtml($attrs),
|
54 |
'value' => Json::encode($attrs),
|
55 |
-
]) . ')
|
56 |
]);
|
57 |
wp_die();
|
58 |
}
|
59 |
$onlyBody = true;
|
60 |
}
|
61 |
|
62 |
-
|
|
|
63 |
'onlyBody' => $onlyBody,
|
64 |
'action' => 'lwptoc_widget_customize',
|
65 |
'widgetId' => $widgetId,
|
66 |
'model' => $model,
|
67 |
]);
|
|
|
|
|
68 |
wp_die();
|
69 |
}
|
70 |
}
|
9 |
use luckywp\tableOfContents\core\admin\AdminController;
|
10 |
use luckywp\tableOfContents\core\Core;
|
11 |
use luckywp\tableOfContents\core\helpers\Json;
|
12 |
+
use luckywp\tableOfContents\core\helpers\ValueHelper;
|
13 |
use luckywp\tableOfContents\plugin\Shortcode;
|
14 |
|
15 |
class WidgetController extends AdminController
|
53 |
'id' => $widgetId,
|
54 |
'override' => Widget::overrideHtml($attrs),
|
55 |
'value' => Json::encode($attrs),
|
56 |
+
]) . ')</script>',
|
57 |
]);
|
58 |
wp_die();
|
59 |
}
|
60 |
$onlyBody = true;
|
61 |
}
|
62 |
|
63 |
+
$config = apply_filters('lwptoc_widget_customize_modal_config', []);
|
64 |
+
$config = array_merge(ValueHelper::assertArray($config), [
|
65 |
'onlyBody' => $onlyBody,
|
66 |
'action' => 'lwptoc_widget_customize',
|
67 |
'widgetId' => $widgetId,
|
68 |
'model' => $model,
|
69 |
]);
|
70 |
+
|
71 |
+
echo CustomizeModal::widget($config);
|
72 |
wp_die();
|
73 |
}
|
74 |
}
|
admin/widgets/customizeModal/CustomizeModal.php
CHANGED
@@ -29,6 +29,11 @@ class CustomizeModal extends Widget
|
|
29 |
*/
|
30 |
public $model;
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* @var bool
|
34 |
*/
|
@@ -41,6 +46,7 @@ class CustomizeModal extends Widget
|
|
41 |
'widgetId' => $this->widgetId,
|
42 |
'action' => $this->action,
|
43 |
'model' => $this->model,
|
|
|
44 |
'onlyBody' => $this->onlyBody,
|
45 |
]);
|
46 |
}
|
29 |
*/
|
30 |
public $model;
|
31 |
|
32 |
+
/**
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
public $context = 'default';
|
36 |
+
|
37 |
/**
|
38 |
* @var bool
|
39 |
*/
|
46 |
'widgetId' => $this->widgetId,
|
47 |
'action' => $this->action,
|
48 |
'model' => $this->model,
|
49 |
+
'context' => $this->context,
|
50 |
'onlyBody' => $this->onlyBody,
|
51 |
]);
|
52 |
}
|
admin/widgets/customizeModal/views/modal.php
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
* @var $widgetId string|null
|
5 |
* @var $action string
|
6 |
* @var $model \luckywp\tableOfContents\admin\forms\CustomizeForm
|
|
|
7 |
* @var $onlyBody bool
|
8 |
*/
|
9 |
|
@@ -634,9 +635,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
|
|
634 |
<div class="lwptocModalBox_footer">
|
635 |
<div class="lwptocModalBox_footer_buttons">
|
636 |
<?= AdminHtml::button(__('Cancel', 'luckywp-table-of-contents'), [
|
|
|
637 |
'class' => 'lwptocModal-close' . (is_rtl() ? 'lwptocFloatRight' : ' lwptocFloatLeft')
|
638 |
]) ?>
|
639 |
<?= AdminHtml::button(__('Save', 'luckywp-table-of-contents'), [
|
|
|
640 |
'theme' => AdminHtml::BUTTON_THEME_PRIMARY,
|
641 |
'submit' => true,
|
642 |
'class' => is_rtl() ? 'lwptocFloatLeft' : 'lwptocFloatRight',
|
4 |
* @var $widgetId string|null
|
5 |
* @var $action string
|
6 |
* @var $model \luckywp\tableOfContents\admin\forms\CustomizeForm
|
7 |
+
* @var $context string
|
8 |
* @var $onlyBody bool
|
9 |
*/
|
10 |
|
635 |
<div class="lwptocModalBox_footer">
|
636 |
<div class="lwptocModalBox_footer_buttons">
|
637 |
<?= AdminHtml::button(__('Cancel', 'luckywp-table-of-contents'), [
|
638 |
+
'context' => $context,
|
639 |
'class' => 'lwptocModal-close' . (is_rtl() ? 'lwptocFloatRight' : ' lwptocFloatLeft')
|
640 |
]) ?>
|
641 |
<?= AdminHtml::button(__('Save', 'luckywp-table-of-contents'), [
|
642 |
+
'context' => $context,
|
643 |
'theme' => AdminHtml::BUTTON_THEME_PRIMARY,
|
644 |
'submit' => true,
|
645 |
'class' => is_rtl() ? 'lwptocFloatLeft' : 'lwptocFloatRight',
|
core/admin/helpers/AdminHtml.php
CHANGED
@@ -61,6 +61,8 @@ class AdminHtml
|
|
61 |
$attrs['type'] = $submit ? 'submit' : 'button';
|
62 |
}
|
63 |
|
|
|
|
|
64 |
return Html::tag($tag, $content, $attrs);
|
65 |
}
|
66 |
|
61 |
$attrs['type'] = $submit ? 'submit' : 'button';
|
62 |
}
|
63 |
|
64 |
+
$attrs = apply_filters('lwptoc_admin_html_button_attrs', $attrs, $options);
|
65 |
+
|
66 |
return Html::tag($tag, $content, $attrs);
|
67 |
}
|
68 |
|
integrations/elementor/Elementor.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace luckywp\tableOfContents\integrations\elementor;
|
4 |
+
|
5 |
+
use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
|
6 |
+
use luckywp\tableOfContents\core\base\BaseObject;
|
7 |
+
use luckywp\tableOfContents\core\Core;
|
8 |
+
use luckywp\tableOfContents\core\helpers\ArrayHelper;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @see https://developers.elementor.com/
|
12 |
+
*/
|
13 |
+
class Elementor extends BaseObject
|
14 |
+
{
|
15 |
+
|
16 |
+
public function init()
|
17 |
+
{
|
18 |
+
add_action('elementor/editor/after_enqueue_scripts', function () {
|
19 |
+
Core::$plugin->admin->enqueueAssets([
|
20 |
+
'enqueueWpColorPicker' => true,
|
21 |
+
]);
|
22 |
+
wp_enqueue_script(Core::$plugin->prefix . 'elementor', Core::$plugin->url . '/integrations/elementor/assets/editor.min.js', [Core::$plugin->prefix . 'adminMain'], Core::$plugin->version);
|
23 |
+
});
|
24 |
+
add_filter('lwptoc_widget_customize_modal_config', function ($config) {
|
25 |
+
if (Core::$plugin->request->get('extra.isElementorEditor', false)) {
|
26 |
+
$config['context'] = 'elementor';
|
27 |
+
}
|
28 |
+
return $config;
|
29 |
+
});
|
30 |
+
add_filter('lwptoc_admin_html_button_attrs', function ($attrs, $options) {
|
31 |
+
if (ArrayHelper::getValue($options, 'context') === 'elementor') {
|
32 |
+
$theme = isset($options['theme']) ? $options['theme'] : false;
|
33 |
+
|
34 |
+
$attrs['class'][] = 'elementor-button';
|
35 |
+
$attrs['class'][] = 'elementor-button-default';
|
36 |
+
ArrayHelper::remove($attrs['class'], 'button');
|
37 |
+
|
38 |
+
if ($theme == AdminHtml::BUTTON_THEME_PRIMARY) {
|
39 |
+
$attrs['class'][] = 'elementor-button-success';
|
40 |
+
ArrayHelper::remove($attrs['class'], 'button-primary');
|
41 |
+
}
|
42 |
+
}
|
43 |
+
return $attrs;
|
44 |
+
}, 10, 2);
|
45 |
+
}
|
46 |
+
}
|
integrations/elementor/assets/editor.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery.lwptocCustomize.extraData.isElementorEditor=1;
|
luckywp-table-of-contents.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: LuckyWP Table of Contents
|
4 |
Plugin URI: https://theluckywp.com/product/table-of-contents/
|
5 |
Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
|
6 |
-
Version: 1.9.
|
7 |
Author: LuckyWP
|
8 |
Author URI: https://theluckywp.com/
|
9 |
Text Domain: luckywp-table-of-contents
|
@@ -29,6 +29,6 @@ $lwptocAutoloader->register();
|
|
29 |
$lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
|
30 |
|
31 |
$config = require(__DIR__ . '/config/plugin.php');
|
32 |
-
(new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.9.
|
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.9.2
|
7 |
Author: LuckyWP
|
8 |
Author URI: https://theluckywp.com/
|
9 |
Text Domain: luckywp-table-of-contents
|
29 |
$lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
|
30 |
|
31 |
$config = require(__DIR__ . '/config/plugin.php');
|
32 |
+
(new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.9.2', __FILE__, 'lwptoc_');
|
33 |
|
34 |
require_once __DIR__ . '/functions.php';
|
plugin/Plugin.php
CHANGED
@@ -12,6 +12,7 @@ use luckywp\tableOfContents\core\helpers\ArrayHelper;
|
|
12 |
use luckywp\tableOfContents\core\wp\Options;
|
13 |
use luckywp\tableOfContents\front\Front;
|
14 |
use luckywp\tableOfContents\integrations\BeaverBuilder;
|
|
|
15 |
use luckywp\tableOfContents\integrations\RankMath;
|
16 |
use luckywp\tableOfContents\integrations\ToolsetViews;
|
17 |
use luckywp\tableOfContents\plugin\editorBlock\EditorBlock;
|
@@ -70,6 +71,9 @@ class Plugin extends BasePlugin
|
|
70 |
if (defined('WPV_VERSION')) {
|
71 |
Core::createObject(ToolsetViews::className());
|
72 |
}
|
|
|
|
|
|
|
73 |
});
|
74 |
}
|
75 |
|
12 |
use luckywp\tableOfContents\core\wp\Options;
|
13 |
use luckywp\tableOfContents\front\Front;
|
14 |
use luckywp\tableOfContents\integrations\BeaverBuilder;
|
15 |
+
use luckywp\tableOfContents\integrations\elementor\Elementor;
|
16 |
use luckywp\tableOfContents\integrations\RankMath;
|
17 |
use luckywp\tableOfContents\integrations\ToolsetViews;
|
18 |
use luckywp\tableOfContents\plugin\editorBlock\EditorBlock;
|
71 |
if (defined('WPV_VERSION')) {
|
72 |
Core::createObject(ToolsetViews::className());
|
73 |
}
|
74 |
+
if (defined('ELEMENTOR_VERSION')) {
|
75 |
+
Core::createObject(Elementor::className());
|
76 |
+
}
|
77 |
});
|
78 |
}
|
79 |
|
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.9.
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -139,6 +139,9 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
142 |
= 1.9.1 — 2019-08-04 =
|
143 |
+ Added support Toolset Views plugin.
|
144 |
|
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.9.2
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 1.9.2 — 2019-08-11 =
|
143 |
+
+ Added support Elementor plugin.
|
144 |
+
|
145 |
= 1.9.1 — 2019-08-04 =
|
146 |
+ Added support Toolset Views plugin.
|
147 |
|