Code Manas theme has been updated to
1.1.7 on May 6, 2019 with some major code refactoring. The major update is that the code for theme options added using Kirki framework has been refactored to
Object Oriented Programming(OOP). All the code for the Kirki fields are now moved to a newly defined class
Code_Manas_Kirki_Fields which is defined in a new file inside
For the users using the child theme please note that
code_manas_get_theme_mods_defaults has been removed. If you are using this function in your child theme, it may cause isssue.
To resolve the issue replace
Following are the details of the class:
- Singleton class meaning a single instance of the class can be used throughout the theme which is instansiated by
- Add sections, panels, settings, controls using Kirki framework.
$_instance– private static which contains the instance of the class
instance()– Creates an instance of the class
__construct()– Calls the main methods in the class
control_styles()– Add style for controls which is loaded only on Customizer preview.
kirki_config()– Add Kirki config for this theme
add_panels()– Add panels for the theme
sections_data()– Returns an array of sections to be added.
add_sections()– Add sections to the panels using the data returned by
get_theme_mods_defaults()– Returns all the default theme mods value in an array
fields_data()– Returns an array of fields( theme options settings ) to be added.
add_fields()– Add fields to the sections using data returned by
Other minor updates include:
Updated: Update pot file.
Added: Add $ver variable for versioning of customizer script.
Added: Add option to change the header background color.
Fixed: Fix padding issue when Featured section and secondary menu is disabled.
A new feature is also added in the theme. Now you can change the background of the header from the customizer in a simple click.