• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Common header for multisite

LPH

Flight Director
Flight Instructor
I found it easier to start modifying the admin bar in WordPress. This doesn't give me the bar in XenForo but it is a start.

I modified scripts found on different websites and started adding, subtracting, and modifying. You are welcome to do the same.

Code:
<?php
/*
Plugin Name: WordPress Admin Bar Modifications
Plugin URI: http://www.layneheiny.com
Description: Remove WP Logo from the admin bar, remove my sites, add new links for tuxreports network.
Version: 0.1
Author: Layne P. Heiny
Author URI: http://www.layneheiny.com/
*/
 
function annointed_admin_bar_remove() {
        global $wp_admin_bar;
 
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
        $wp_admin_bar->remove_menu('my-sites');
}
 
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
 
 
function add_trn_admin_bar_link() {
    global $wp_admin_bar;
    if ( !is_super_admin() || !is_admin_bar_showing() )
        return;
    $wp_admin_bar->add_menu( array(
    'id' => 'trn_link',
    'title' => __( 'Tux Reports Network'),
    'href' => __('http://www.tuxreportsnetwork.com'),
    ));
 
    // Add sub menu link "View All Posts"
    $wp_admin_bar->add_menu( array(
        'parent' => 'trn_link',
        'id'    => 'trn_all',
        'title' => __( 'Communmity'),
        'href' => __('http://www.tuxreportsdebates.com'),
    ));
 
    // Add sub menu link "Downloads"
    $wp_admin_bar->add_menu( array(
        'parent' => 'trn_link',
        'id'    => 'trn_technology',
        'title' => __( 'Technology'),
        'href' => __('http://www.tuxreportstech.com'),
        'meta'  => array(
            'class' => 'st_menu_download',),
    ));
        $wp_admin_bar->add_menu( array(
            'parent' => 'trn_technology',
            'id'    => 'trn_amd',
            'title' => __( 'AMD Views'),
            'href' => __('http://www.amdviews.com'),
        ));
}
add_action('admin_bar_menu', 'add_trn_admin_bar_link',25);
 
?>
 
Top