Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer registration of responsive menus #412

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,19 @@ function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingCon
require_once get_stylesheet_directory() . '/lib/gutenberg/init.php';
}

// Registers the responsive menus.
if ( function_exists( 'genesis_register_responsive_menus' ) ) {
genesis_register_responsive_menus( genesis_get_config( 'responsive-menus' ) );
add_action( 'after_setup_theme', 'genesis_sample_register_responsive_menus' );
/**
* Registers the responsive menus.
*
* @since 3.4.3 Moved from file root to prevent notices about using translations
* before the after_setup_theme hook under WP 6.7+.
*/
function genesis_sample_register_responsive_menus() {

if ( function_exists( 'genesis_register_responsive_menus' ) ) {
genesis_register_responsive_menus( genesis_get_config( 'responsive-menus' ) );
}

}

add_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' );
Expand Down