11<?php
22/**
3- * Customizer Options
3+ * Customizer Options
44 *
55 * @package Bootstrap for Genesis
66 * @since 1.0
1515function bfg_customizer_options () {
1616 // Stores all the controls that will be added
1717 $ options = array ();
18-
18+
1919 // Stores all the sections to be added
2020 $ sections = array ();
21-
21+
2222 // Stores all the panels to be added
2323 $ panels = array ();
24-
24+
2525 // Adds the sections to the $options array
2626 $ options ['sections ' ] = $ sections ;
27-
27+
2828 // Logo
2929 $ section = 'logo ' ;
3030 $ sections [] = array (
3131 'id ' => $ section ,
3232 'title ' => __ ( 'Logo ' , 'bfg ' ),
3333 'priority ' => '25 '
3434 );
35-
35+
3636 $ options ['logo ' ] = array (
3737 'id ' => 'logo ' ,
3838 'label ' => __ ( 'Upload logo ' , 'bfg ' ),
3939 'type ' => 'upload ' ,
4040 'section ' => $ section ,
4141 'default ' => ''
4242 );
43-
43+
4444 // Typography
4545 $ section = 'typography ' ;
4646 $ font_choices = customizer_library_get_font_choices ();
@@ -65,10 +65,10 @@ function bfg_customizer_options() {
6565 'choices ' => $ font_choices ,
6666 'default ' => 'Roboto '
6767 );
68-
68+
6969 // Footer
7070 $ section = 'footer ' ;
71-
71+
7272 $ sections [] = array (
7373 'id ' => $ section ,
7474 'title ' => __ ( 'Footer ' , 'bfg ' ),
@@ -82,15 +82,15 @@ function bfg_customizer_options() {
8282 'type ' => 'text ' ,
8383 'default ' => ''
8484 );
85-
85+
8686 // Adds the sections to the $options array
8787 $ options ['sections ' ] = $ sections ;
88-
88+
8989 // Adds the panels to the $options array
9090 $ options ['panels ' ] = $ panels ;
9191 $ customizer_library = Customizer_Library::Instance ();
9292 $ customizer_library ->add_options ( $ options );
93-
93+
9494 // To delete custom mods use: customizer_library_remove_theme_mods();
9595}
9696
@@ -103,13 +103,13 @@ function bfg_customizer_fonts() {
103103 get_theme_mod ( 'body-font ' , customizer_library_get_default ( 'heading-font ' ) )
104104 );
105105 $ font_uri = customizer_library_get_google_font_uri ( $ fonts );
106-
106+
107107 // Load Google Fonts
108108 wp_enqueue_style ( 'customizer-fonts ' , $ font_uri , array (), null , 'screen ' );
109109}
110110
111111if ( ! function_exists ( 'bfg_customizer_build_styles ' ) && class_exists ( 'Customizer_Library_Styles ' ) ) {
112-
112+
113113 add_action ( 'customizer_library_styles ' , 'bfg_customizer_build_styles ' );
114114 function bfg_customizer_build_styles () {
115115 // Heading font
@@ -140,7 +140,7 @@ function bfg_customizer_build_styles() {
140140 )
141141 ) );
142142 }
143-
143+
144144 // Body Font
145145 $ setting = 'body-font ' ;
146146 $ mod = get_theme_mod ( $ setting , customizer_library_get_default ( $ setting ) );
@@ -167,13 +167,13 @@ function bfg_customizer_build_styles() {
167167 add_action ( 'wp_head ' , 'bfg_library_styles ' );
168168 function bfg_library_styles () {
169169 do_action ( 'customizer_library_styles ' );
170-
170+
171171 $ css = Customizer_Library_Styles ()->build ();
172-
172+
173173 if ( !empty ( $ css ) ) {
174174 echo "\n<!-- Begin Custom CSS --> \n<style type= \"text/css \" id= \"bfg-custom-css \"> \n" ;
175175 echo $ css ;
176176 echo "\n</style> \n<!-- End Custom CSS --> \n" ;
177177 }
178178 }
179- }
179+ }
0 commit comments