I’m not sure how difficult you think it is ?? I say go ahead and give it a go. Whatever struggles you encounter from lack of experience will be useful learning opportunities.
Where would this list of check boxes occur? Logical places are the customizer or a separate plugin page accessed from the left side admin menu. The latter is probably easier, but the customizer would be considered a more up to date way to get user input. You can add a plugin admin page using add_menu_page()
.
The callback function passed to add_menu_page()
will be responsible for not only getting any saved data and outputting the checkbox list within a HTML form, but also for handling the form submission when the user saves their selections. All selections can be collected into an array which is then saved as a specific option value with update_option()
.
With selections saved as an option, you now need to generate inline CSS based on them. Output the CSS from a callback added to the “wp_head” action. Add while passing a large priority argument so that your CSS is output late, thus overriding any earlier CSS that established default values. The callback would get the saved option value and output appropriate CSS within <style>
tags.
I suggest starting with only a couple checkbox items. Develop the needed code to get those fully working before adding the rest. Focus on developing small functional parts at a time and test your code very frequently.