Comments (9)
I completely agree. Having a plugin automatically installed is one thing - having it installed and activated is another. That would begin to scare people away if all of a sudden they activate a theme and they have 5 new plugins installed and activated.
If we go this route, I think there should be some type of message by either us or the developer to let users know that when their theme is installed, if X plugin is installed but not activated, X will be activated upon theme activation. Otherwise I think it does have its uses, especially for multisite.
from tgm-plugin-activation.
Considering our code (and the registered plugins) isn't parsed until the theme is activated, how do you plan to pre-warn users?
from tgm-plugin-activation.
Magic, of course. :)
Touche - then I suppose it would land upon the developers to do that when the user purchased the theme. At any rate, having a plugin automatically installed and activated without them knowing is a no go.
from tgm-plugin-activation.
I would recommend hooking in the page that display all the themes and display each theme's plugin dependencies on there [not sure if there's a hook for it, but hopefully yes]
from tgm-plugin-activation.
Even if there was a hook, again, we can only show the plugins registered for the currently active theme, since that's the only set of files that will be getting parsed.
We don't really want to be manually reading the whole theme folders on the off-chance that they've got a class-tgm-plugin-activation
(which they could rename) present, which might indicate they've registered some plugins, somewhere within all the theme files.
from tgm-plugin-activation.
That's definitely a good point. Perhaps you could implement something in the plugin stylesheet header like:
/*
Theme Name: Some name
Author URL: http://example.com
....
Plugin dependencies: optionsframework, wp-e-commerce, etc...
*/
What do you think?
from tgm-plugin-activation.
That's an interesting idea - but it would also mean the theme author / site administrator having to keep two lists of required plugins (and no way to mark your list as only recommended).
I'd also rather not have the public .css file being used to indicate what .php plugins are needed for the theme - that seems like a mis-use.
As things currently stand, it would be possible for a site administrator effectively drop the class file, and plugin registration for all the different themes the site supports, into a separate plugin, and activate it network-wide - meaning no themes (especially if they are automatically updatable) need to be edited to take advantage of the class. You solution requires that all themes that need required plugins registering, are edited manually.
from tgm-plugin-activation.
That's a pretty cool use-case actually.
I agree that the style.css header implementation is probably not the best solution, just an idea :)
I guess if a theme author absolutely wants to indicate that a plugin is required to run the theme, they can always just put it in the description of the theme.
from tgm-plugin-activation.
Assigning this to Gary as well. I guess I can see the use behind this if the user already has the plugin installed but not activated, but again I still don't think it's a good idea. It's one thing to de-activate a plugin when activating a new theme because of potential issues or whatever the case may be, but it's another to re-activate something that they have already de-activated for whatever reason.
Again, it's up to the developers ultimately, so I'll trust your judgment on this one.
from tgm-plugin-activation.
Related Issues (20)
- Allow add_submenu_page for WordPress.org themes via Generator HOT 3
- Improve pl_PL translation
- Too few arguments, still happening HOT 3
- Why is TGM not compatible with sanitize_textarea_field?
- Dynamic Content for Elementor HOT 1
- Wordpress 5.5 - Automatic Plugin Updates
- Fails on PHP 8.0 HOT 22
- Improve Separation of Concerns HOT 5
- Instal, activate buttons showing a full URL
- Failing latest Theme Check HOT 6
- Generator Does Not Create Text Domain
- tgm plugin does not work on php version 8 HOT 3
- Warning: sprintf(): Too few arguments in \wp-admin\includes\class-bulk-upgrader-skin.php on line 156 HOT 3
- Is this dead? HOT 6
- Declaration of TGM_Bulk_Installer_Skin::before() must be compatible with Bulk_Upgrader_Skin::before($title = '') and other php warnings HOT 1
- Bulk plugin installation and activation error HOT 4
- Theme demo import error HOT 1
- Improve translation sv_SE
- Can this library help me auto-update a premium plugin? HOT 2
- Download failed. Forbidden
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tgm-plugin-activation.