186 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $1+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
ThemeBuddies says

I think usually plugins have a class structure to them. If it is a good idea to include our custom functions or shortcodes in a plugin. Do they all need to be in a class? I just threw them in the file as I would in the functions.php file.

6 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in Serbia
freelancerrs says

It is not a good idea to change the basic plugin code, because of its updating. Try to handle the plugin output with your functions from functions.php.

186 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $1+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
ThemeBuddies says

sorry, I read your comment a few times and I don’t understand what you are saying. I am not changing anything. I am adding functions that would normally be in the functions.php file into a plugin file because themeforest wants these functions in a plugin so if the customer changes themes, they can take their content with them. I was just wondering the best way to code that plugin.

475 posts WordPress Gurus!
  • Has referred 200+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
ThemeBeans says

If it’s something they would want to carry with them among different themes, then yes I would use a plugin to create/manage it – such as post types/specialized widgets/shortcodes.

by
by
by
by
by
by