diff --git a/genesis-header-nav.php b/genesis-header-nav.php index 9247c9f..0825cd1 100644 --- a/genesis-header-nav.php +++ b/genesis-header-nav.php @@ -33,13 +33,21 @@ $genesis_header_nav = new Genesis_Header_Nav; add_action( 'plugins_loaded', 'genesis_header_nav_i18n' ); - +/** + * Load Genesis Header Nav plugin text domain. + * + * @since 2.0.0 + */ function genesis_header_nav_i18n() { load_plugin_textdomain( 'genesis-header-nav', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } -add_action( 'init', 'genesis_header_nav_run' ); - +add_action( 'after_setup_theme', 'genesis_header_nav_run' ); +/** + * Run Genesis Header Nav plugin. + * + * @since 2.0.0 + */ function genesis_header_nav_run() { global $genesis_header_nav; $genesis_header_nav->run(); diff --git a/includes/class-genesis-header-nav.php b/includes/class-genesis-header-nav.php index 40e86cc..e55cdeb 100644 --- a/includes/class-genesis-header-nav.php +++ b/includes/class-genesis-header-nav.php @@ -26,7 +26,7 @@ class Genesis_Header_Nav { * @since 1.0.0 */ public function run() { - add_action( 'init', array( $this, 'register_nav_menu' ), 15 ); + add_action( 'init', array( $this, 'register_nav_menu' ) ); add_action( 'genesis_header', array( $this, 'show_menu' ), apply_filters( 'genesis_header_nav_priority', 12 ) ); add_filter( 'body_class', array( $this, 'body_classes' ), 15 ); } @@ -37,7 +37,7 @@ public function run() { * @since 1.0.0 */ public function register_nav_menu() { - register_nav_menus( array( 'header' => __( 'Header', 'genesis-header-nav' ) ) ); + register_nav_menu( 'header', __( 'Header', 'genesis-header-nav' ) ); } /**