$menuName = "Members Only Menu";
$menuSlug = "members-only-menu";
+
// Does the menu exist already?
register_nav_menu($menuSlug, $menuName);
set_theme_mod('nav_menu_locations', $locations);
}
-
add_action( 'add_meta_boxes', function() {
function custom_js_css() {
wp_enqueue_script('your-meta-box', GLM_MEMBERS_PLUGIN_URL. '/js/shortcodeBuilder.js', array('jquery'), null, true);
);
} );
-// This function below needs to be defined in the theme's functions.php
-//
-//if ( ! function_exists( 'glm_members_only_menu' ) && class_exists('GLM_Members_Only_Walker')) {
-// function glm_members_only_menu() {
-// wp_nav_menu(array(
-// 'container' => false, // remove nav container
-// 'container_class' => 'members-only-menu', // class of container
-// 'menu' => '', // menu name
-// 'menu_class' => 'members-only-menu', // adding custom nav class
-// 'theme_location' => 'members-only-menu', // where it's located in the theme
-// 'before' => '', // before each link <a>
-// 'after' => '', // after each link </a>
-// 'link_before' => '', // before each link text
-// 'link_after' => '', // after each link text
-// 'depth' => 2, // limit the depth of the nav
-// 'fallback_cb' => false, // fallback function (see below)
-// 'walker' => new GLM_Members_Only_Walker()
-// ));
-// }
-//}
-
-
// If not administrator, don't show or permit access to the main dashboard
function glmRemoveDashboard () {
global $current_user, $menu, $submenu;