Post by account_disabled on Mar 12, 2024 4:51:18 GMT
Far the template has allowed you to use text fields, checkboxes, radio buttons and selection fields in the theme customizer, this article shows how it can be extended. Note. Before proceeding, download the latest Boilerplate version of the WordPress theme customizer from its Github repository. I've made some improvements since the last tutorial, and it's important to keep your code up to date. Take a look at the previous post for more notes on the changes, but in a nutshell, once you copy the template into your theme folder, you don't need to edit its files at all all editing is done using filters and action hooks.
Connecting to a Theme Customizer Template Boilerplate of the WordPress theme Phone Number List customizer has several action hooks and filters. You can connect to any of these from your theme's functions.php file using the addaction and addfilter functions 'thspcbpdirectoryuri' is a filter hook defined in helpers.php that allows you to change the location of the Customizer Boilerplate in your theme folder. By default, the template path looks like this gettemplatedirectoryuri. 'customizer-markerplate' but if you'd rather move it to a different location, this is a trap that might help you. 'thspcbpmenulinktext.
A filter hook defined in helpers.php allows you to change the text link of a menu. Boilerplate adds a link under Appearance in the WordPress dashboard, allowing users to easily access the this link will say "Theme Customizer" and you can change the text using the thspcbpmenulinktext filter hook. 'thspcbpcapability' is a filter hook defined in helpers.php. Allows you to change the default required capability used in the $wpcustomize->addsetting method. 'thspcbpoption' is a filter hook defined in helpers.php. If you use 'option' in your settings arguments, use this hook to change the name of the entry that will store your theme's settings values in the wpoptions table.
Connecting to a Theme Customizer Template Boilerplate of the WordPress theme Phone Number List customizer has several action hooks and filters. You can connect to any of these from your theme's functions.php file using the addaction and addfilter functions 'thspcbpdirectoryuri' is a filter hook defined in helpers.php that allows you to change the location of the Customizer Boilerplate in your theme folder. By default, the template path looks like this gettemplatedirectoryuri. 'customizer-markerplate' but if you'd rather move it to a different location, this is a trap that might help you. 'thspcbpmenulinktext.
A filter hook defined in helpers.php allows you to change the text link of a menu. Boilerplate adds a link under Appearance in the WordPress dashboard, allowing users to easily access the this link will say "Theme Customizer" and you can change the text using the thspcbpmenulinktext filter hook. 'thspcbpcapability' is a filter hook defined in helpers.php. Allows you to change the default required capability used in the $wpcustomize->addsetting method. 'thspcbpoption' is a filter hook defined in helpers.php. If you use 'option' in your settings arguments, use this hook to change the name of the entry that will store your theme's settings values in the wpoptions table.