Skip to content
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

Whitelist meta info #66

Open
AndreiIgna opened this issue Nov 29, 2019 · 3 comments
Open

Whitelist meta info #66

AndreiIgna opened this issue Nov 29, 2019 · 3 comments

Comments

@AndreiIgna
Copy link

Hi,

Haven't checked too much the plugin, but does it have functionality to whitelist and not delete specified meta info for posts? From a quick look the impression is that it deletes everything, which may break some websites.

For example it deletes meta data for nav_item created with this plugin https://wordpress.org/support/topic/wp-sweep-delets-if-menus/
Is there a possibility that plugins can do something like this?

<?php

add_filter('wp_sweep_whitelist_meta_keys', function($metas = []) {
  $metas[] = 'this-meta-key';
  $metas[] = 'that-meta-key';
  return $metas;
});

Cheers

@lesterchan
Copy link
Owner

Right now the plugin can't do whitelisted of post meta. But that is a good idea though I might not have time to do it anytime soon.

@AndreiIgna
Copy link
Author

Ah okay.

Would be good to add a disclaimer text in meantime, to show that the plugin may break some websites and plugins.

The current text shown says about how data is deleted and only the good things about this. But while deleting those bits of info from database, some other parts may not work properly.

@lesterchan
Copy link
Owner

Agreed. There are improvements to be made WRT to working nice with other plugins. The use-case for this plugin when I built it is to clear as much data as possible and revert WP back to the original state. That is the reason why I did not include ways to play nice with plugins.

Some plugins left behind a lot of data as they don't clean up if the user uninstall them, so I wrote this plugin to fix that for my previous company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants