A WordPress theme I use as a parent theme for my sites.
This section covers all theme root directory files. If you are at all familiar with how a WordPress theme works, then what the majority of these files are, and how they work, should already be known to you. You should skip to the section on classes.
These are the files used for specific or general pages.
Handles all 404 occurrences.
Default template for displaying a post or page.
Default template for displaying a page.
Not currently used. This was originally written to utilize the TCPDF library, but that project is no longer being developed or supported. It's replacement, tc-lib-pdf, is, at the time of this writing, not yet ready for primetime. In the end I decided not to use the library at all, but have kept this file around for when I change my mind.
Main template I use for pages. In fact, index.php and page.php are just dups of this file.
These are those files required by WordPress to handle specific tasks. Again, if you know WordPress, you'll know about these.
Handles the comment area on a post page.
Displays the footer area.
This makes the theme work. :)
Displays the header area.
Displays the searchform.
Displays the sidebar widget areas.
Main css file.
The image that shows up in the tab of the browser.
The theme uses a variety of classes, all residing in the classes/ directory, and organized mainly via sub-directories. Wordpress frowns on this type of organization, which is okay. I'll do it how I want, and they can do it the way they want, and never the twain shall meet.
Most, not quite all, classes are loaded via the includes/loader.php file. Take a look at that file to see which classes can be replaced/extended by a child theme. All class names use the same format, i.e.: the class TCC_Form_Admin is located in the file classes/Form/Admin.php, which means if you know the class name, then you should not have any trouble finding the file that contains the class.
The form classes deal with admin page forms, customizer controls, comment forms, and the login form.
The class 'TCC_Form_Admin' is an abstract class used a basis for all admin forms, and uses the WordPress Settings API. Currently, the only class the theme uses this for is the TCC_Options_Fluidity class, which is a tabbed form. I have used it in some plugins, although only the Privacy My Way plugin is available to be viewed by the general public. I still consider this class to be a work in progress in many ways. I kept hoping WordPress will make it easier to create Admin screens, but with the advent of the Customizer, they actually went in the opposite direction.
TCC_Customizer_Customizer handles adding each individual control to the WordPress customizer. The TCC_Customizer_Control_Control class extends the WP_Customize_Control class, and serves as the parent class of all other theme customizer controls.
I wrote the TCC_Customizer_Control_Checkbox class because the WordPress control wouldn't allow a title for the checkbox.
TCC_Customizer_Control_Content simply displays a title and some text on the screen, no inputs at all.
TCC_Customizer_Control_HTMLRadio evolved because I wanted to be able to display some font awesome icons in the radio choices, which required using HTML, something WordPress doesn't play nice with.
TCC_Customizer_Control_MultipleCB will display a title, followed by multiple checkboxes.
TCC_Customizer_Control_MultipleSel will display a select field that allows multiple choices.
I wrote the TCC_Form_Comment class to give myself somewhat better control over how the comment form is displayed. It makes heavy use of my TCC_Trait_Attributes trait.
TCC_Theme_CommentNav, child class of TCC_Theme_Navigation, handles showing the user the comment navigation buttons.
The theme's login form, suitable for use in a navbar or a widget. Can also be used in a modal.
The theme includes an abstract class, TCC_Metabox_Metabox, which I use for admin metaboxes, although it gets used mainly in plugins. Testing has indicated these work with the new block editor, although I do intend to convert them.
TCC_MetaBox_FontType allows a post editor to control what font the post is displayed with. Still needs some work though...
TCC_MetaBox_PostDate works with the post edit page, controlling how the date/author is displayed with each individual post.
TCC_MetaBox_Sidebar is also for the post edit page. It allows the author to control whether the sidebar is displayed with the post.
Modals are a Bootstrap feature. The theme has an abstract class TCC_Modal_Bootstrap, used as a basis for all modal classes. I have used this class in other projects, but...
TCC_Modal_Login will display the login form in a modal form.
The theme currently uses TCC_NavWalker_Bootstrap, loosely based on this one on github.
TCC_NavWalker_Taxonomy is used to dynamically add taxonomy terms to a menu.
In addition to the customizer options, the theme provides a tabbed option screen, using TCC_Form_Admin as the parent class. I have shifted many options to the customizer where possible. Take a look at the files in the classes/Options directory for an idea of what's going on there.
I use Bootstrap as the basis for my CSS. Currently stuck on an old 3.3.7 version...
I use Sass instead of Less, although I understand the new version 4 has moved to Sass now.
The theme has a variety of pre-set color schemes available, although I seem to be having a problem getting the Customizer to properly display the chosen color inside of the Customizer. I'm sure I am the issue, it certainly can't be the Customizer.
Here I intend to cover the files in the includes/ directory...someday...
Javascript files will be described here.
English only at the moment.
Will cover files contained in the page-template directory.
Recently removed a gallery plugin. It was no longer being maintained.
Currently uses Bootstrap 3.3.7, with plans to upgrade to version 4 as time permits.
Currently uses Font Awesome 4.7.0, with no plans to upgrade to version 5 at this time.
Release updates are handled using Plugin Update Checker, so everything should work the WordPress way. I know it says Plugin, but it works just fine for themes as well.
Comes from this gist. Used by TCC_NavWalker_Taxonomy to add taxonomy terms to a menu.
Any pull request made within the spirit of the theme may be accepted.