-
Notifications
You must be signed in to change notification settings - Fork 19
Customizing Category Colors Plugin
Andy Fragen edited this page Feb 27, 2020
·
10 revisions
We have created several filters, hooks, and settings functions to assist in customizing The Events Calendar Category Colors plugin. These customizations will need to be placed in your functions.php file.
You should enclose all settings functions in the following code block to prevent any errors.
if ( class_exists( '\\Fragen\\Category_Colors\\Main' ) ) {
...
}
As an example,
if ( class_exists( '\\Fragen\\Category_Colors\\Main' ) ) {
teccc_add_text_color( 'Red', '#f00' );
teccc_add_legend_view( 'list' );
}
This will prevent any unnecessary errors if the plugin is ever deactivated.
As an example plugin to hold all these settings take a look at Category Colors Options. Fork it to create your own.