From 3f67f09aaccab331c809840e628effa782d7b765 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 18 Nov 2016 10:00:21 -0500 Subject: [PATCH] Put the add action in correct place for Event Reg Putting the menu add action part into the Event Registration page from lib directory. --- functions.php | 13 ------------- lib/EventRegistration.php | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/functions.php b/functions.php index 600b687..ca98cbb 100644 --- a/functions.php +++ b/functions.php @@ -12,16 +12,3 @@ include_once 'lib/force-template-functions.php'; include_once 'lib/EventRegistration.php'; - add_action( 'admin_bar_menu', function( $wp_admin_bar ){ - $args = array( - 'id' => 'eventregistrations', - 'title' => 'Event Registrations', - 'href' => 'http://dev53.gaslightmedia.com/www.harborcountry.org/admin/', - 'meta' => array( - 'class' => 'eventregistrations', - 'title' => 'Event Registrations', - 'target' => '_blank' - ) - ); - $wp_admin_bar->add_node( $args ); - }, 999 ); diff --git a/lib/EventRegistration.php b/lib/EventRegistration.php index e2e68d5..b1c97ab 100644 --- a/lib/EventRegistration.php +++ b/lib/EventRegistration.php @@ -17,3 +17,16 @@ add_action( 'init', function(){ session_start(); } }); +add_action( 'admin_bar_menu', function( $wp_admin_bar ){ + $args = array( + 'id' => 'eventregistrations', + 'title' => 'Event Registrations', + 'href' => 'http://dev53.gaslightmedia.com/www.harborcountry.org/admin/', + 'meta' => array( + 'class' => 'eventregistrations', + 'title' => 'Event Registrations', + 'target' => '_blank' + ) + ); + $wp_admin_bar->add_node( $args ); +}, 999 ); -- 2.17.1