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

Merging config confict instead overwirte it #666

Open
lwszaremba opened this issue Jun 2, 2017 · 1 comment
Open

Merging config confict instead overwirte it #666

lwszaremba opened this issue Jun 2, 2017 · 1 comment

Comments

@lwszaremba
Copy link

I experiment conflict between a theme, third-party plugins and my own pluging i'm writing. All using TGM_Plugin_Activation (since it is a great tool, thanks folk).

I require not dismissable notice since my dependency is required.
But the theme set its own dismissable=true. And TGM remembers only the last who talked.
In addition, if I already dismiss the theme notice, mine will never appear (I spend a lot of time figure it).

So, actual solution is hook with low priority. But when all plugins ends with php_int_max, we fail back in trouble.

The best (in my mind) solution should be to have one config by given "id" (actually not very usefull key) and independent notice (install page still can be merged).

What do you think about that?

For now, what I plan to do is extend your class, overload config() function to keep, for each key, the most restrictive value instead erasing previous one.
Then, I set an instance of my extended class in $GLOBALS['tgmpa'].

This second method could be a good compromise too if implemented by default.

I got the most recent version of TGM (actually 2.6.1)

@jrfnl
Copy link
Contributor

jrfnl commented Jun 3, 2017

This is a known issue and will - eventually - be addressed by TGMPA v3.0. See #394

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