Textpattern CMS support forum
Re: Vendors Folder
It’s a place for PHP classes to live and be autoloaded. So instead of having a tonne of
include commands at the top of each major file, or introducing more global functions, we’re migrating our code there.
Along with third party libraries (like Textile from Netcarver, and jquery) Textpattern itself is a ‘vendor’ where we put our own library code, separated into folders by its functionality.
If you take a look through some of our functions in files such as
txplib_misc.php, you’ll see that many of them are deprecated or have only one line in them now: a call to
Longer term I suspect most of our code will move there — even Admin panel code because we can make a base ‘admin panel’ class and then extend it to make specific instances such as ‘admin side table’ type panels or ‘admin side grid’ panels, etc and benefit from code reuse. As it stands, there’s a lot of duplication in the panels that we could design out.