WordPress.org

Plugin Directory

Changeset 561522


Ignore:
Timestamp:
06/21/12 06:54:09 (22 months ago)
Author:
sLaNGjI
Message:
 
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-toolbar-node-removal/trunk/wp-toolbar-node-removal.php

    r561395 r561522  
    4141 * Completely Disable ToolBar Node, Frontend, Backend, free memory and speedup dasboard. 
    4242 */ 
     43if(!function_exists('add_action')){header('HTTP/1.0 403 Forbidden');header('HTTP/1.1 403 Forbidden');exit();} 
     44 
    4345function wptbnr( $wp_toolbar ) { 
    4446 
  • wp-toolbar-removal/trunk/wp-toolbar-removal.php

    r561451 r561522  
    5353 * Completely Disable ToolBar Frontend, Backend, related User Profile Settings, without loosing logout functionality, and Remove Code for minimal memory load with new approach. 
    5454 */ 
     55if(!function_exists('add_action')){header('HTTP/1.0 403 Forbidden');header('HTTP/1.1 403 Forbidden');exit();} 
     56 
     57//add_filter('init','wptbr_init'); 
    5558 
    5659$wp_scripts = new WP_Scripts(); 
     
    5962wp_deregister_style( 'admin-bar' ); 
    6063 
    61 if(!function_exists('add_action')){header('HTTP/1.0 403 Forbidden');header('HTTP/1.1 403 Forbidden');exit();}add_filter('init','wptbr_init');//header('Status 403 Forbidden'); 
    6264function wptbr_rsb(){echo'<style type="text/css">html.wp-toolbar,html.wp-toolbar #wpcontent,html.wp-toolbar #adminmenu,html.wp-toolbar #wpadminbar,body.admin-bar,body.admin-bar #wpcontent,body.admin-bar #adminmenu,body.admin-bar #wpadminbar{padding-top:0px !important}</style>';}add_action('admin_print_styles','wptbr_rsb',21); 
     65 
     66function wptbr_rbcb() {  
     67    if ( has_filter( 'wp_head', '_admin_bar_bump_cb' ) ) {  
     68    remove_filter( 'wp_head', '_admin_bar_bump_cb' ); 
     69    } 
     70} 
     71add_filter( 'wp_head', 'wptbr_rbcb', 1 ); 
    6372 
    6473function wptbr_ngr( $wp_toolbar ) { 
     
    149158    add_action( 'admin_bar_menu', 'wptbr_ngr', 999 ); 
    150159 
    151 function wptbr_abngr () { global $wp_admin_bar; 
     160function wptbr_ab_ngr () { global $wp_admin_bar; 
    152161 
    153162    $wp_admin_bar->remove_menu( 'root-default' ); 
     
    157166 
    158167    } 
    159     add_action( 'wp_before_admin_bar_render', 'wptbr_abngr', 999 ); 
     168    add_action( 'wp_before_admin_bar_render', 'wptbr_ab_ngr', 999 ); 
    160169 
    161170function wptbr_hdr(){?><style type="text/css">table#wptbr td#wptbr_ttl a:link,table#wptbr td#wptbr_ttl a:visited{text-decoration:none}table#wptbr td#wptbr_lgt,table#wptbr td#wptbr_lgt a{text-decoration:none}</style><table style="margin-left:6px;float:left;z-index:100;position:relative;left:0px;top:0px;background:none;padding:0px;border:0px;border-bottom:1px solid #DFDFDF" id="wptbr" border=0 cols=4 width="97%" height="33"><tr><td align=left valign=center id="wptbr_ttl"><?php echo'<a href="'.home_url().'">'.__(get_bloginfo()).'</a>'?></td><td align=right valign=center id="wptbr_lgt"><div style="padding-top:2px"><?php wp_get_current_user();$current_user=wp_get_current_user();if(!($current_user instanceof WP_User))return;echo''.$current_user->display_name.''?><?php if(is_multisite()&&is_super_admin()){if(!is_network_admin()){echo' | <a href="'.network_admin_url(). '">'. __('Network Admin'). '</a>';}else{echo' | <a href="' .get_dashboard_url(get_current_user_id()). '">'.__('Site Admin') . '</a>';}}?> | <?php echo'<a href="' .wp_logout_url(home_url()). '">'.__('Log Out'). '</a>'?></div></td><td width="8"></td></tr></table><?php }add_action('in_admin_header','wptbr_hdr'); 
Note: See TracChangeset for help on using the changeset viewer.