-
Notifications
You must be signed in to change notification settings - Fork 115
Add Clear VPI #827
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
base: v7.2
Are you sure you want to change the base?
Add Clear VPI #827
Conversation
VPI class add constants
90ab288
to
29af4c7
Compare
@timotei-litespeed Is there any request for this feature? |
src/media.cls.php
Outdated
@@ -646,7 +646,7 @@ private function _parse_img_for_preload() | |||
{ | |||
// Load VPI setting | |||
$is_mobile = $this->_separate_mobile(); | |||
$vpi_files = $this->cls('Metabox')->setting($is_mobile ? 'litespeed_vpi_list_mobile' : 'litespeed_vpi_list'); | |||
$vpi_files = $this->cls('Metabox')->setting($is_mobile ? $this->cls('Vpi')::POST_META_MOBILE : $this->cls('Vpi')::POST_META); |
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.
This is a weird const usage approach. Please don't use this way anymore
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.
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.
Another way: constant($className . '::' . $constantName)
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 I think is better
tpl/toolbox/purge.tpl.php
Outdated
@@ -93,6 +93,15 @@ | |||
); | |||
} | |||
|
|||
if ($this->has_cache_folder('vpi')) { | |||
$_panels[] = array( | |||
'title' => __('Purge All', 'litespeed-cache') . ' - ' . __('VPI', 'litespeed-cache'), |
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.
VPI shouldn't be translated @timotei-litespeed
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.
Removed translation
src/gui.cls.php
Outdated
$wp_admin_bar->add_menu(array( | ||
'parent' => 'litespeed-menu', | ||
'id' => 'litespeed-purge-placeholder', | ||
'title' => __('Purge All', 'litespeed-cache') . ' - ' . __('VPI data', 'litespeed-cache'), |
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.
Why is this menu different than the FE one?
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.
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.
By mistake, fixed
We had a few request past few months |
Add Purge VPI data
Move VPI meta fields names to constants in VPI class