Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevsuperfast committed Sep 7, 2015
2 parents 72eca98 + fe9aada commit 1bd574a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
12 changes: 12 additions & 0 deletions lib/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,16 @@ function bfg_modify_classes_based_on_template( $classes_to_add, $context, $attr
$classes_to_add = bfg_layout_options_modify_classes_to_add( $classes_to_add );

return $classes_to_add;
}

// Skip Navigation
add_action( 'genesis_before', 'bfg_skip_navigation' );
function bfg_skip_navigation() {
echo '<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>';
}

add_filter( 'genesis_attr_content', 'bfg_attr_content' );
function bfg_attr_content( $attr ) {
$attr['id'] = 'content';
return $attr;
}
36 changes: 18 additions & 18 deletions lib/customizer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Customizer Options
* Customizer Options
*
* @package Bootstrap for Genesis
* @since 1.0
Expand All @@ -15,32 +15,32 @@
function bfg_customizer_options() {
// Stores all the controls that will be added
$options = array();

// Stores all the sections to be added
$sections = array();

// Stores all the panels to be added
$panels = array();

// Adds the sections to the $options array
$options['sections'] = $sections;

// Logo
$section = 'logo';
$sections[] = array(
'id' => $section,
'title' => __( 'Logo', 'bfg' ),
'priority' => '25'
);

$options['logo'] = array(
'id' => 'logo',
'label' => __( 'Upload logo', 'bfg' ),
'type' => 'upload',
'section' => $section,
'default' => ''
);

// Typography
$section = 'typography';
$font_choices = customizer_library_get_font_choices();
Expand All @@ -65,10 +65,10 @@ function bfg_customizer_options() {
'choices' => $font_choices,
'default' => 'Roboto'
);

// Footer
$section = 'footer';

$sections[] = array(
'id' => $section,
'title' => __( 'Footer', 'bfg' ),
Expand All @@ -82,15 +82,15 @@ function bfg_customizer_options() {
'type' => 'text',
'default' => ''
);

// Adds the sections to the $options array
$options['sections'] = $sections;

// Adds the panels to the $options array
$options['panels'] = $panels;
$customizer_library = Customizer_Library::Instance();
$customizer_library->add_options( $options );

// To delete custom mods use: customizer_library_remove_theme_mods();
}

Expand All @@ -103,13 +103,13 @@ function bfg_customizer_fonts() {
get_theme_mod( 'body-font', customizer_library_get_default( 'heading-font' ) )
);
$font_uri = customizer_library_get_google_font_uri( $fonts );

// Load Google Fonts
wp_enqueue_style( 'customizer-fonts', $font_uri, array(), null, 'screen' );
}

if ( ! function_exists( 'bfg_customizer_build_styles' ) && class_exists( 'Customizer_Library_Styles' ) ) {

add_action( 'customizer_library_styles', 'bfg_customizer_build_styles' );
function bfg_customizer_build_styles() {
// Heading font
Expand Down Expand Up @@ -140,7 +140,7 @@ function bfg_customizer_build_styles() {
)
) );
}

// Body Font
$setting = 'body-font';
$mod = get_theme_mod( $setting, customizer_library_get_default( $setting ) );
Expand All @@ -167,13 +167,13 @@ function bfg_customizer_build_styles() {
add_action( 'wp_head', 'bfg_library_styles' );
function bfg_library_styles() {
do_action( 'customizer_library_styles' );

$css = Customizer_Library_Styles()->build();

if ( !empty( $css ) ) {
echo "\n<!-- Begin Custom CSS -->\n<style type=\"text/css\" id=\"bfg-custom-css\">\n";
echo $css;
echo "\n</style>\n<!-- End Custom CSS -->\n";
}
}
}
}

0 comments on commit 1bd574a

Please # to comment.