Titan Framework offers you two methods for including it in your themes or plugins. You can either embed it or include it.
Including it means you can simply include a checker that makes sure Titan Framework exists in your site, but for your theme or plugin to work, Titan Framework must be downloaded and activated first. Embedding it, on the other hand, copies the entire framework to your plugin or theme directory, meaning you can run your theme or plugin without downloading Titan Framework.
But we here at Titan Framework recommends that you simply include the Titan Framework and not embed it. Here’s why:
- Embedding freezes your version of Titan Framework, making it miss out on updates and possible security fixes. It’s not far off that you’ll need to update Titan Framework periodically to keep abreast with security issues or to support new features. Leaving a vulnerability open for unscrupulous people to exploit is the last thing responsible developers would ever do.
- If Titan Framework updates, the ones in your embedded version stay outdated. You’ll have to copy the new updated Titan Framework files all the time to update it, complicating plugin maintenance. Every embedded plugin and modules suffer from this pitfall.
- Embedding is now considered a bad practice, especially in WordPress.org. And it’s not just for Titan Framework. We’ve heard of customer nightmares regarding embedded plugins and this too poses problems for us, as most of the time embedded plugins end up being modified, creating unnecessary coding and consuming unwanted time for it.
- It bloats your theme and plugin filesize by including the entire Titan Framework files in your own plugin. This may not seem much, but there are situations where every byte in the filesize counts, particularly if you’re selling your plugin or theme.
- Embedding and Including are done in the same way apart from copying. One is simpler and less headaches, the other can be complicated.
Remember, starting the line of code right would spare you the trouble of constantly finding bugs and updating your creation!