607 posts
  • Member of the Envato Team
  • Had an item featured in an Envato Bundle
  • Made it to the Authors' Hall of Fame
  • Contributed a blog post
+10 more
Siddharth Envato team says

Doesn’t the TGM class require the plugin be hosted on a free repository in order to be “automagically” installed?
IIRC, plugins can be pre-packaged with themes. Public repos are an option, not a necessity.
117 posts
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+5 more
nagaemas says

I have a question: By using plugin for functionality, if I have 2 portfolio features for 2 themes and both portfolios are totally different in functions, it means that I need to create 2 separate plugins for each portfolio as well? Then I need to use TGM to point to the plugin zip that bundled with the theme. Am I correct about this? Does the whole concept mean to just moving any functionality into the plugin? Just like that?

Just create a basic portfolio plugin, no need for multiple plugins. Just filter the portfolio fields you want added on the theme, and you can get creative as much as you want on the theme ;) No limitations I think.

10 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says


As @Astoundify mentioned, perhaps Justin Tadlock’s Custom Content Portfolio plugin could work for some authors?
Perhaps for some authors, but last I checked (which has been a while), it was a very generic plugin that didn’t support the fields I use.

So use the plugin as a spine for the CPT, but add your own custom fields to it via a custom meta box.




Even though you modified the plugin you can still use your version > zip it up and utilize the TGM class. I have plugins I’ve written and I still use the activation class instead of including them directly in the theme files.
Yes, exactly! Nice work :)
Doesn’t the TGM class require the plugin be hosted on a free repository in order to be “automagically” installed? If I’m an author and I’m selling functionality on TF, I wouldn’t want it available for free. Otherwise, what am I selling?
http://tgmpluginactivation.com/#features

The plugins for TGM can be bundled with the theme. Yay googling!





Also by placing your major features in a plugin, you can really easily include those features in all of the themes you build. Update the plugin once and all of your themes have the update. So much easier to maintain.
This statement right here should at least strike something in the heads of those theme developers here that don’t think they should be using plugins. If nothing else, think of the amount of hours you will save using (even your own) plugins when developing your themes.
I’m actually surprised this wasn’t raised earlier in the discussion. It seems to make a lot of sense to me, I’d be interested to know more about you guys’ thoughts on it. Why might you think this isn’t easier / better?
Personally, I think it a wash. You can make valid arguments for and against its usefulness.

But if you just need to push a security release to the plugin component, your options are: Either update the plugin once, or deploy a theme update to all your users, and hope they’re willing to upgrade, and didn’t just happen to have an idiot developer that hacked your theme instead of using a child theme. A theme update is much simpler.




can we also add a SSL check for all external scripts/styles loaded, Ive had some cases where assets fail because of SSL.
function prefix_styles(){
//Check if is ssl
$schema = is_ssl() ? 'https://' : 'http://'; 
wp_register_style( 'cw-font', $schema . 'fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic' , array(), 1.0 , false  );    
}

Perhaps it would make more sense for these assets to be loaded without the protocol so they adopt whatever the current protocol is? Thoughts?
I believe scripts should ideally be loaded with no protocol specified ex:
//domain.tld/filename.ext
, but keep in mind that that doesn’t work on local (MAMP-based) servers where the protocol is
file://dir/dir2/filename.ext
.

If something is being generated by WordPress and served by Apache (the A in MAMP) it’s being generated and served over HTTP or HTTPS protocols. file: just views static html files.

49 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 1+ items on Envato Market
carlhancock says

Does the whole concept mean to just moving any functionality into the plugin? Just like that?

If your theme requires the user to install a ton of logins you are doing it wrong.

A theme should just be the design for the site. Plugins are for adding functionality to WordPress.

That seems to be a hard concept for some to grasp because ThemeForest allowed things to be out of control for so long that now that they are finally taking the steps needed to follow best practices, developers who don’t know how to do things the correct way are going complaining and pushing back.

Theme = Design. Plugin = Functinality. Unless the theme is HIGHLY specialized (ex. A theme built specifically for a site using WooCommerce) then it shouldn’t be built with a lot of plugin dependencies.

I know this is a tough concept for theme developers used to being able to do things however they want, and customers used to buying themes that could make their bed and make them coffee in the morning… but it’s about damn time ThemeForest and Envato began doing things the correct way and implemented more stringent guidelines and best practices. This change was long overdue.

For those that don’t like it… i’d say sell your themes elsewhere or suck it up and build your themes the right way using best practices and the new guidelines put in place by Envato.

98 posts
  • Has been part of the Envato Community for over 3 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
hainug says

It’s theme user choice and own responsibility as if you want to change a theme. wordpress API is also can be change, plugin will/can not guaranty always be updated.
Many people move from joomla to wordpress, are they complaining?
Every choice have their own risk, everybody know that, so what is the problem?

Just my thought

366 posts WordPress Guy
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Member of the Envato Team
+5 more
Japh Envato team says

CodeCanyon is great, but I don’t think it’s a viable solution here. If I’m a user and I buy a theme on TF that has some certain functionality, then I find out I have to buy a plugin on CC, I’m going to be very upset. Selling functionality twice is very dishonest, IMHO.

It would be dishonest, and it’s not what I’m suggesting. In this scenario, the theme would say something like “supports X functionality with [linkhere]Plugin Y[/linkhere]”. Modularity FTW!



I’m actually surprised this wasn’t raised earlier in the discussion. It seems to make a lot of sense to me, I’d be interested to know more about you guys’ thoughts on it. Why might you think this isn’t easier / better?
Personally, I think it a wash. You can make valid arguments for and against its usefulness.

What are the valid arguments against?


I believe scripts should ideally be loaded with no protocol specified ex:
//domain.tld/filename.ext
, but keep in mind that that doesn’t work on local (MAMP-based) servers where the protocol is
file://dir/dir2/filename.ext
.

Unless you configure your MAMP server to support it ;)


Because as Siddarth stated above, the reason you’re doing this in the first place is flexibility and modularity. ;)

Hmmm… that doesn’t make sense to me… using CodeCanyon is just as flexbile and modular!

24 posts
  • Located in Europe
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
neutrico says

Hello! This is my first post on TF forums as I was just hours before my first theme release.

And now.. suprise ;) I have to refactor a bunch of code and rethink my workflow.

Thankfully I’ve invested a lot of time to double check my theme. I cleaned almost all errors and notifications thrown by Theme Check and Theme Mentor.

Sadly TF requirements are not consistent in few points:

1. TGM Plugin activation. I know that there is some rework on this class but it uses variable as text domain. So, it’s “broken by design”.

Is there a permission to use custom class for plugin activation?

2.
wp_head() – Present just before </head>
Theme Mentor throws an error if you don’t have </head>. I reported this behavior as issue but it’s still unresolved. https://github.com/mpeshev/Theme-Mentor/issues/5

Thing is that HTML 5 code without closing tags for head and body is still perfectly valid.

3. Is there a permission to provide and maintain custom repository for plugins dedicated to theme?

4. What about page/layout builders? This is an unanswered question, and it is very important while this feature is essential to many advanced themes.

632 posts
  • Has been part of the Envato Community for over 3 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
ChapterThemes says

Are the shortcodes given in the Inadmissible list not allowed in themes anymore??

But what about a pagebuilder who uses shortcodes to create a layout or something?

Or is it only allowed when the shortcodes are inside a plugin??

117 posts
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+5 more
nagaemas says

Are the shortcodes given in the Inadmissible list not allowed in themes anymore??

But what about a pagebuilder who uses shortcodes to create a layout or something?

Or is it only allowed when the shortcodes are inside a plugin??

Yes, inadmissible shortcodes aren’t allowed anymore in the theme, they should reside in a plugin ;)

632 posts
  • Has been part of the Envato Community for over 3 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
ChapterThemes says

Another questions: Is it OK to pack your own set of plugins inside the theme folder for buyers to upload and activate? Like said in the TGM instructions:

'source'                => get_stylesheet_directory() . '/lib/plugins/tgm-example-plugin.zip', // The plugin source

Does this mean every theme folder will be packed with plugin files? If so… is that a good thing since a plugin should be in de plugins folder ?

by
by
by
by
by
by