Skip to content

Commit 56a5a87

Browse files
committed
Allow filter to work
Fixes #3
1 parent 841fd08 commit 56a5a87

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

class-genesis-header-nav.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class Genesis_Header_Nav {
3636
* @since 1.0.0
3737
*/
3838
private function __construct() {
39-
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
40-
add_action( 'genesis_setup', array( $this, 'register_nav_menu' ), 15 );
39+
add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) );
40+
add_action( 'init', array( $this, 'register_nav_menu' ) );
4141
add_action( 'genesis_header', array( $this, 'show_menu' ), apply_filters( 'genesis_header_nav_priority', 12 ) );
4242
add_filter( 'body_class', array( $this, 'body_classes' ), 15 );
4343
}

genesis-header-nav.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,12 @@
3030

3131
require_once plugin_dir_path( __FILE__ ) . 'class-genesis-header-nav.php';
3232

33-
Genesis_Header_Nav::get_instance();
33+
add_action( 'after_setup_theme', 'genesis_header_nav_run' );
34+
/**
35+
* Run the plugin.
36+
*
37+
* @since 1.3.1
38+
*/
39+
function genesis_header_nav_run() {
40+
Genesis_Header_Nav::get_instance();
41+
}

0 commit comments

Comments
 (0)