Put the add action in correct place for Event Reg
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 18 Nov 2016 15:00:21 +0000 (10:00 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 18 Nov 2016 15:00:21 +0000 (10:00 -0500)
Putting the menu add action part into the Event Registration page from
lib directory.

functions.php
lib/EventRegistration.php

index 600b687..ca98cbb 100644 (file)
     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 );
index e2e68d5..b1c97ab 100644 (file)
@@ -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 );