-
Notifications
You must be signed in to change notification settings - Fork 117
Add deactivation modal #822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add survey modal on plugin deactivation. Add questions about why deactivating and possibility to clear settings(Multisite supported)
tpl/inc/modal.header.php
Outdated
<div class="litespeed litespeed-modal<?php | ||
if(isset($_progress) && $_progress ) { | ||
echo ' litespeed-progress'; | ||
} | ||
?>"<?php if($_id ) { echo ' id="' . $_id . '"'; | ||
} ?>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WordPress core lacks a template engine.
I would introduce a very tiny engine to build HTML.
e.g. https://github.com/szepeviktor/SentencePress/tree/master/src/Html
( ?>"<?
looks like ASCII art)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Can consider a generic tpl engine like smart template if needed. Can just keep as is for current templates as long as we resolved the syntax format checker reports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$modal = new SzepeViktor\SentencePress\Html\Element(
'div',
[],
'The Content'
);
$modal_classes = [
'litespeed',
'litespeed-modal',
];
if (isset($_progress) && $_progress) {
$modal_classes[] = 'litespeed-progress';
}
$modal->setAttribute('class', implode(' ', $modal_classes));
if ($_id) {
$modal->setAttribute('id', $_id);
}
print $modal->render();
src/activation.cls.php
Outdated
self::delete_site_tables(); | ||
|
||
// Cloud uninstall | ||
Cloud::version_check('uninstall'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timotei-litespeed Uninstall
shouldn't be called in deactivation.
src/activation.cls.php
Outdated
$wpdb->query($wpdb->prepare("DELETE FROM `$wpdb->options` WHERE option_name LIKE '%s'", array('litespeed.%'))); | ||
} | ||
|
||
private static function delete_site_tables() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timotei-litespeed What is this func for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hi-hai The function is used to delete all settings that are related to LSCWP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see nowhere it is used.
4bcb6f3
to
b9d4e98
Compare
b9d4e98
to
2c7fed8
Compare
bade44a
to
41f6955
Compare
41f6955
to
485c762
Compare
Add survey modal on plugin deactivation.
In multisite will show the modal just in main site.