Open danyj opened 6 years ago
It's not possible :-)
I've been waiting for a long time for this feature. But unfortunately there are no new releases for a long time by the author. The last one was 2016.
But you can add a workaround with #733
@CreativeDive I saw your post but I would have to list each plugin and we are dealing with framework here and some demos might require different plugin.
has_notices
on plugin levels would be favorable
'bbpress'=> array(
'name' => 'bbPress',
'slug' => 'bbpress',
'required' => false,
'force_activation' => false,
'has_notices' => false
),
And even worse is that the notice is yellow for recommended plugins where in fact should be green because they do not affect the theme functionality.
I'm wondering about envato's decision to treat this plugin as a required plugin for themeforest themes. There are so many issues that make the user experience seem like a nightmare. I also do not understand why there were no new releases in the past.
I also do not understand why there were no new releases in the past.
https://github.com/TGMPA/TGM-Plugin-Activation/issues/741
im digging in to code for has_notices on plugin level , might submit PR
@danyj it's really a nightmare :-(
no is not ,
add here https://github.com/TGMPA/TGM-Plugin-Activation/blob/develop/class-tgm-plugin-activation.php#L1156
if(isset($plugin['has_notices']) && false === $plugin['has_notices']){
continue;
}
in plugin array set
'has_notices' => false
@danyj But it is a nightmare. I need the notice for required plugins only. With 'has_notices' => false notices will never displayed. It's not the solution.
bud , I just showed you how to do it on plugin level , not global
add the code I advised and in your plugin array ( not $config ) set the has_notices like this
'bbpress'=> array(
'name' => 'bbPress',
'slug' => 'bbpress',
'required' => false,
'force_activation' => false,
'has_notices' => false // This plugin wont be listed in the notice
),
@danyj you are fabulous :-) Yes, it does solve one problem, but the user can dismiss this notice for required plugins. He should not.
So i will use a combination of your and my solution #733
Thanks so much!
I would not use this on required plugins , only on recommended
And this does not touch any dismiss settings, it simply removes the plugin from the notice array and if there are no plugins in that array no notice is displayed either way.
@danyj Yes you can use 'force_activation' => true
, to activate required plugins after theme activation. Therefore you don't need this notice. But I think it's a user decision to activate plugins. Also the notice should be visible, if the user deactivate a required plugin of a theme.
But the user does not get a notice again if the user has dismissed it in the past.
Also the notice should be visible, if the user deactivate a required plugin of a them
Not sure what you have setup , but here ,
first 3 required , other recommended
Assigned Widgets ( required ) disabled and notice showed up
tested dismissable, works as it should
@danyj I don't know what is wrong in my file. But if I dismiss the required plugin notice before activating and deactivate the plugin again, I do not get the notice again.
@danyj But I means the "Dismiss this notice" link, not the close button.
I dont see that anymore , http://prntscr.com/k3z1o3
using the actual dev . Watch this please https://github.com/TGMPA/TGM-Plugin-Activation/pull/749
But if I dismiss the required plugin notice before activating and deactivate the plugin again, I do not get the notice again.
@CreativeDive This is a known bug - see #353, #482
@danyj I think you can't see it, because you have set 'dismissable' => false,
or 'dismissable' => '',
@jrfnl Thanks for the response. Yes I know, it's a bug. But it's not fixed and ready for a new release. Why?
@CreativeDive Because it's darn bloody complex to fix. You're welcome to have a go.
@jrfnl If my knowledge were sufficient, I would like to help. But they do not do it. I love ❤️this plugin, but this bug is a nightmare for the user experience. 🤕
The recommended plugins shouldn't be green, I think the required should be red and the optionnal yellow..
I just have a question, why would you have suggested plugins in the list if you don't want to show the notice ?
The user cannot install them without the notice so they might as well not be in the list, or do you have your plugin using this array to display recommended plugins somewhere ?
Thanks for the clarification
why would you have suggested plugins i
Recommended and required should not belong to same array. We dont have only recommended ones , if that were the case we would not bother but we have 3 required and depending on demo we have recommended. Recommended do not have to be used for theme to function properly.
The user cannot install them
yes user can still install recommended plugins http://prntscr.com/kddhle
Ok thanks for the clarification and forgive my ignorance, I didn't know this menu was here
Don't worry about it, all valid questions. Things is that users HATE the popups , and one theme can recommend 5 so with yellow notice and no distinction between recommended and required users thik this guy wants me to install dozen of plugins for this theme. Hope this makes sense.
Ah yeah I got what your saying, I have the same issue indeed, some users think all the recommended plugins are required and install everything, while only one is required, and 2 are recommended
We have a theme that uses different plugins depending on install. 2 plugins are always required other 5
are only recommended
How can we display notice only for required plugins?