Skip to content

Commit

Permalink
Merge pull request #61 from copyblogger/develop
Browse files Browse the repository at this point in the history
Merge 2.3.0 to master
  • Loading branch information
nathanrice authored Jan 30, 2017
2 parents cec0039 + d38b61e commit 00b47ed
Show file tree
Hide file tree
Showing 20 changed files with 2,103 additions and 491 deletions.
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Genesis Sample Theme Changelog

## [Unreleased][unreleased]

_No changes._
## [2.3.0] - 2017-01-30
* Add WooCommerce support to the theme and customizer
* Add an updated and improved responsive menu script
* Updated the file structure
* Updated documentation
* Updated code standards

## [2.2.4] - 2016-06-08
* Reorder font size on breadcrumbs
Expand All @@ -24,6 +27,6 @@ _No changes._
* Set localization
* Update XML file

[unreleased]: https://github.com/copyblogger/genesis-sample/compare/2.2.4...HEAD
[2.3.0]: https://github.com/copyblogger/genesis-sample/compare/2.2.4...2.3.0
[2.2.4]: https://github.com/copyblogger/genesis-sample/compare/2.2.3...2.2.4
[2.2.3]: https://github.com/copyblogger/genesis-sample/compare/014deb3689323b7bbd4ddbfff4f5f9279a38f741...2.2.3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Genesis Sample Theme

Github project link: https://github.com/copyblogger/genesis-sample
Github project link: https://github.com/copyblogger/genesis-sample/


## Installation Instructions
Expand Down
95 changes: 65 additions & 30 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,89 @@
* @link http://www.studiopress.com/
*/

//* Start the engine
// Start the engine.
include_once( get_template_directory() . '/lib/init.php' );

//* Setup Theme
// Setup Theme.
include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );

//* Set Localization (do not remove)
load_child_theme_textdomain( 'genesis-sample', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'genesis-sample' ) );
// Set Localization (do not remove).
add_action( 'after_setup_theme', 'genesis_sample_localization_setup' );
function genesis_sample_localization_setup(){
load_child_theme_textdomain( 'genesis-sample', get_stylesheet_directory() . '/languages' );
}

// Add the helper functions.
include_once( get_stylesheet_directory() . '/lib/helper-functions.php' );

//* Add Image upload and Color select to WordPress Theme Customizer
// Add Image upload and Color select to WordPress Theme Customizer.
require_once( get_stylesheet_directory() . '/lib/customize.php' );

//* Include Customizer CSS
// Include Customizer CSS.
include_once( get_stylesheet_directory() . '/lib/output.php' );

//* Child theme (do not remove)
// Add WooCommerce support.
include_once( get_stylesheet_directory() . '/lib/woocommerce/woocommerce-setup.php' );

// Add the required WooCommerce styles and Customizer CSS.
include_once( get_stylesheet_directory() . '/lib/woocommerce/woocommerce-output.php' );

// Add the Genesis Connect WooCommerce notice.
include_once( get_stylesheet_directory() . '/lib/woocommerce/woocommerce-notice.php' );

// Child theme (do not remove).
define( 'CHILD_THEME_NAME', 'Genesis Sample' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
define( 'CHILD_THEME_VERSION', '2.2.4' );
define( 'CHILD_THEME_VERSION', '2.3.0' );

//* Enqueue Scripts and Styles
// Enqueue Scripts and Styles.
add_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' );
function genesis_sample_enqueue_scripts_styles() {

wp_enqueue_style( 'genesis-sample-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700', array(), CHILD_THEME_VERSION );
wp_enqueue_style( 'dashicons' );

wp_enqueue_script( 'genesis-sample-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true );
$output = array(
'mainMenu' => __( 'Menu', 'genesis-sample' ),
'subMenu' => __( 'Menu', 'genesis-sample' ),
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_script( 'genesis-sample-responsive-menu', get_stylesheet_directory_uri() . "/js/responsive-menus{$suffix}.js", array( 'jquery' ), CHILD_THEME_VERSION, true );
wp_localize_script(
'genesis-sample-responsive-menu',
'genesis_responsive_menu',
genesis_sample_responsive_menu_settings()
);

}

// Define our responsive menu settings.
function genesis_sample_responsive_menu_settings() {

$settings = array(
'mainMenu' => __( 'Menu', 'genesis-sample' ),
'menuIconClass' => 'dashicons-before dashicons-menu',
'subMenu' => __( 'Submenu', 'genesis-sample' ),
'subMenuIconsClass' => 'dashicons-before dashicons-arrow-down-alt2',
'menuClasses' => array(
'combine' => array(
'.nav-primary',
'.nav-header',
),
'others' => array(),
),
);
wp_localize_script( 'genesis-sample-responsive-menu', 'genesisSampleL10n', $output );

return $settings;

}

//* Add HTML5 markup structure
// Add HTML5 markup structure.
add_theme_support( 'html5', array( 'caption', 'comment-form', 'comment-list', 'gallery', 'search-form' ) );

//* Add Accessibility support
// Add Accessibility support.
add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );

//* Add viewport meta tag for mobile browsers
// Add viewport meta tag for mobile browsers.
add_theme_support( 'genesis-responsive-viewport' );

//* Add support for custom header
// Add support for custom header.
add_theme_support( 'custom-header', array(
'width' => 600,
'height' => 160,
Expand All @@ -64,26 +101,26 @@ function genesis_sample_enqueue_scripts_styles() {
'flex-height' => true,
) );

//* Add support for custom background
// Add support for custom background.
add_theme_support( 'custom-background' );

//* Add support for after entry widget
// Add support for after entry widget.
add_theme_support( 'genesis-after-entry-widget-area' );

//* Add support for 3-column footer widgets
// Add support for 3-column footer widgets.
add_theme_support( 'genesis-footer-widgets', 3 );

//* Add Image Sizes
// Add Image Sizes.
add_image_size( 'featured-image', 720, 400, TRUE );

//* Rename primary and secondary navigation menus
add_theme_support( 'genesis-menus' , array( 'primary' => __( 'After Header Menu', 'genesis-sample' ), 'secondary' => __( 'Footer Menu', 'genesis-sample' ) ) );
// Rename primary and secondary navigation menus.
add_theme_support( 'genesis-menus', array( 'primary' => __( 'After Header Menu', 'genesis-sample' ), 'secondary' => __( 'Footer Menu', 'genesis-sample' ) ) );

//* Reposition the secondary navigation menu
// Reposition the secondary navigation menu.
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_footer', 'genesis_do_subnav', 5 );

//* Reduce the secondary navigation menu to one level depth
// Reduce the secondary navigation menu to one level depth.
add_filter( 'wp_nav_menu_args', 'genesis_sample_secondary_menu_args' );
function genesis_sample_secondary_menu_args( $args ) {

Expand All @@ -97,15 +134,13 @@ function genesis_sample_secondary_menu_args( $args ) {

}

//* Modify size of the Gravatar in the author box
// Modify size of the Gravatar in the author box.
add_filter( 'genesis_author_box_gravatar_size', 'genesis_sample_author_box_gravatar' );
function genesis_sample_author_box_gravatar( $size ) {

return 90;

}

//* Modify size of the Gravatar in the entry comments
// Modify size of the Gravatar in the entry comments.
add_filter( 'genesis_comment_list_args', 'genesis_sample_comments_gravatar' );
function genesis_sample_comments_gravatar( $args ) {

Expand Down
18 changes: 18 additions & 0 deletions js/jquery.matchHeight.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 00b47ed

Please sign in to comment.