Skip to content

Commit

Permalink
Create admin-bar.php and move a snippet into it
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanpatten committed Nov 20, 2012
1 parent 9ab15eb commit 59ea407
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
17 changes: 17 additions & 0 deletions admin-bar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* function vpm_admin_bar_remove
* Remove the WordPress menu from the admin bar.
*
* This will remove the WordPress logo from the admin bar; you
* may wish to add your own alternative menu in its place.
*
* @since 1.0
*/
function my_admin_bar_remove() {
global $wp_admin_bar;

$wp_admin_bar->remove_node('wp-logo');
}
add_action('wp_before_admin_bar_render', 'vmy_admin_bar_remove');
16 changes: 0 additions & 16 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,3 @@ function my_alert() {
echo '</div>';
}
add_action('admin_notices', 'my_alert');

/**
* function vpm_admin_bar_remove
* Remove the WordPress menu from the admin bar.
*
* This will remove the WordPress logo from the admin bar; you
* may wish to add your own alternative menu in its place.
*
* @since 1.0
*/
function my_admin_bar_remove() {
global $wp_admin_bar;

$wp_admin_bar->remove_node('wp-logo');
}
add_action('wp_before_admin_bar_render', 'vmy_admin_bar_remove');

0 comments on commit 59ea407

Please sign in to comment.