Skip to content

Commit 1bd574a

Browse files
Merge branch 'develop'
2 parents 72eca98 + fe9aada commit 1bd574a

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

lib/bootstrap.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,16 @@ function bfg_modify_classes_based_on_template( $classes_to_add, $context, $attr
139139
$classes_to_add = bfg_layout_options_modify_classes_to_add( $classes_to_add );
140140

141141
return $classes_to_add;
142+
}
143+
144+
// Skip Navigation
145+
add_action( 'genesis_before', 'bfg_skip_navigation' );
146+
function bfg_skip_navigation() {
147+
echo '<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>';
148+
}
149+
150+
add_filter( 'genesis_attr_content', 'bfg_attr_content' );
151+
function bfg_attr_content( $attr ) {
152+
$attr['id'] = 'content';
153+
return $attr;
142154
}

lib/customizer.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Customizer Options
3+
* Customizer Options
44
*
55
* @package Bootstrap for Genesis
66
* @since 1.0
@@ -15,32 +15,32 @@
1515
function 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

111111
if ( ! 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

Comments
 (0)