Create Topic

WP Tavern Forums Create Topic

Create New Topic

M

Hi guys,
Your two comments here summed up all what I was thinking about this situation, and here is my further input which I hope will help clear things up and figure them out:

1- At first, when reading the article, I was a bit angry and thinking to myself “how stupid these theme reviewers are for wanting to break end users sites” but a few seconds later I came to realize that if you guys have a hard time to migrate the content from when version to the next, then how will those end users be able to migrate their content from this theme to an other.

2- Still, as you pointed out, moving the problem from theme to plugins only seems to move it further or to displace it, those plugins’ output wouldn’t be styled properly on third parties’ themes and more likely, won’t even show up in them. So this seems like a dead end, BUT… in practice, it is much easier to migrate content from one plugin to an other than from one theme to an other, simply because you can have those two plugins activated at the same time to manually migrate the content while you can’t have those two themes activated on the same site at the same time for the same page. It’s of course still possible to migrate the content in the case of themes but that involves some advanced browser multi-tab working logic.

3- Now that we have, hopefully established that plugins are good for any non-core functionality, here is a workflow/hack that I hope will help you fix the situation:
— You need to implement that functionality in the plugin as requested by the TRT.
— Then, in both the theme and plugin you need to use some sort of global boolean (to be set by one of them only) to decide which part is being run by wrapping the functionality code in “if” blocks.
— Or from the theme, you could simply check if the corresponding plugin has been activated or not and wrap the code in an “if” block like above. (Here is something that my help you further: is_plugin_active and don’t forget to require plugin.php when using it in your templates)

Let me know if you have any questions, I will check this thread tomorrow just in case.

Cordially, M.






Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.