WordCamp Sunshine Coast 2016 was the first time the Sunshine Coast had hosted a WordCamp, and the third region in Queensland so far after the Gold Coast and Brisbane.
It was a wonderful experience to stand alongside so many people I look up to and admire within the WordPress community. We are really blessed with so many amazing contributors to WordPress here in Australia.
It was incredibly humbling to be contacted by Weston Ruter, the lead developer of the Customizer, following my presentation. I had a lot of encouragement and support from a number of the XWP team which was very much appreciated.
Register a function to manage your Customizer settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a setting that changes the colour of the links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The setting is now registered, but we can’t interact with it until without a control. A control creates the interface to change the setting. In this instance we want a colour picker
Create a control to manage the setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some people will still be running < 4.5 (and should upgrade) but need to be catered for
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That’s everything for managing the setting, but we still need to actually output the styles.
Display the style tag in the head for us to target with our Customizer styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let’s move that into it’s own function for consistency and to remain DRY.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cameron Jones is a professional Web Developer and DevOps Engineer specialising in all things WordPress, and is the author of the popular Mongoose Page Plugin. When he's not working on a new website or WordPress plugin, he can be found on the sports field or in the mosh pit at a metal concert.
Subscribe To The Newsletter
Get the latest updates and exclusive offers direct to your inbox