-
Notifications
You must be signed in to change notification settings - Fork 18
/
genesis-header-nav.php
73 lines (67 loc) · 1.81 KB
/
genesis-header-nav.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* Genesis Header Nav
*
* @package Gamajo\GenesisHeaderNav
* @author Gary Jones
* @license GPL-2.0-or-later
* @copyright 2013 Gary Jones, Gamajo
*
* @wordpress-plugin
* Plugin Name: Genesis Header Nav
* Plugin URI: https://github.com/GaryJones/genesis-header-nav
* Description: Registers a menu location and displays it inside the header for a Genesis Framework child theme.
* Version: 2.1.0
* Author: Gary Jones
* Author URI: https://gamajo.com
* Text Domain: genesis-header-nav
* License: GPL-2.0-or-later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/GaryJones/genesis-header-nav
* GitHub Branch: master
* Requires WP: 3.9
* Requires PHP: 5.3
*/
namespace Gamajo\GenesisHeaderNav;
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Main class file.
require_once plugin_dir_path( __FILE__ ) . 'includes/class-genesis-header-nav.php';
/**
* Get plugin object.
*
* Instantiates it if necessary.
*
* @since 2.0.0
*
* @return Gamajo\GenesisHeaderNav\Plugin
*/
function get_plugin() {
static $plugin = NULL;
if ( is_null( $plugin ) ) {
$plugin = new Plugin;
}
return $plugin;
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\\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( 'after_setup_theme', __NAMESPACE__ . '\\genesis_header_nav_run' );
/**
* Run Genesis Header Nav plugin.
*
* @since 2.0.0
*/
function genesis_header_nav_run() {
$plugin = get_plugin();
$plugin->run();
}