WordPress.org

Plugin Directory

Changeset 562080


Ignore:
Timestamp:
06/21/12 23:31:33 (22 months ago)
Author:
sLaNGjI
Message:
 
File:
1 edited

Legend:

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

    r561522 r562080  
    5555if(!function_exists('add_action')){header('HTTP/1.0 403 Forbidden');header('HTTP/1.1 403 Forbidden');exit();} 
    5656 
    57 //add_filter('init','wptbr_init'); 
    58  
    59 $wp_scripts = new WP_Scripts(); 
    60 wp_deregister_script( 'admin-bar' ); 
    61 $wp_styles = new WP_Styles(); 
    62 wp_deregister_style( 'admin-bar' ); 
    63  
    6457function 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); 
    6558 
    66 function wptbr_rbcb() {  
    67     if ( has_filter( 'wp_head', '_admin_bar_bump_cb' ) ) {  
    68     remove_filter( 'wp_head', '_admin_bar_bump_cb' ); 
    69     } 
    70 } 
    71 add_filter( 'wp_head', 'wptbr_rbcb', 1 ); 
     59//function wptbr_rbcb(){if(has_filter('wp_head','_admin_bar_bump_cb')){remove_filter('wp_head','_admin_bar_bump_cb');}}add_filter('wp_head','wptbr_rbcb',1); 
    7260 
    7361function wptbr_ngr( $wp_toolbar ) { 
     
    170158function 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'); 
    171159 
    172 function wptbr_init(){add_filter('show_admin_bar','__return_false');} 
    173 function wptbr_ruppoabpc(){echo'<style type="text/css">.show-admin-bar{display:none}</style>';}add_action('admin_print_styles-profile.php','wptbr_ruppoabpc');show_admin_bar(false);function wptbr_rsf(){echo'<style type="text/css">html{margin-top:0px !important}* html body{margin-top:0px !important}</style>';}add_filter('wp_head','wptbr_rsf',99); 
     160//add_filter('init','wptbr_init'); 
     161 
     162$wp_scripts = new WP_Scripts(); 
     163wp_deregister_script( 'admin-bar' ); 
     164$wp_styles = new WP_Styles(); 
     165wp_deregister_style( 'admin-bar' ); 
    174166 
    175167//wp_deregister_script('wp-admin-bar'); 
     
    183175//wp_deregister_style('nacin_promote_network_admin_in_toolbar'); 
    184176 
    185 remove_action('admin_head','nacin_promote_network_admin_in_toolbar',25);remove_action('admin_head','admin_bar_menu');remove_filter('wp_head','wp_admin_bar_wp_menu');remove_filter('wp_head','wp_admin_bar_add_secondary_groups');remove_filter('wp_head','wp_admin_bar');remove_filter('wp_footer','wp_admin_bar');remove_filter('admin_head','wp_admin_bar');remove_filter('admin_footer','wp_admin_bar');remove_filter('wp_head','wp_admin_bar_class');remove_filter('wp_footer','wp_admin_bar_class');remove_filter('admin_head','wp_admin_bar_class');remove_filter('admin_footer','wp_admin_bar_class');remove_action('wp_head','wp_admin_bar_render',1000);remove_filter('wp_head','wp_admin_bar_render',1000);remove_action('wp_footer','wp_admin_bar_render',1000);remove_filter('wp_footer','wp_admin_bar_render',1000);remove_action('admin_head','wp_admin_bar_render',1000);remove_filter('admin_head','wp_admin_bar_render',1000);remove_action('admin_footer','wp_admin_bar_render',1000);remove_filter('admin_footer','wp_admin_bar_render',1000);remove_action('init','wp_admin_bar_init');remove_filter('init','wp_admin_bar_init');remove_action('wp_head','wp_admin_bar_css');remove_action('wp_head','wp_admin_bar_dev_css');remove_action('wp_head','wp_admin_bar_rtl_css');remove_action('wp_head','wp_admin_bar_rtl_dev_css');remove_action('admin_head','wp_admin_bar_css');remove_action('admin_head','wp_admin_bar_dev_css');remove_action('admin_head','wp_admin_bar_rtl_css');remove_action('admin_head','wp_admin_bar_rtl_dev_css');remove_action('wp_footer','wp_admin_bar_js');remove_action('wp_footer','wp_admin_bar_dev_js');remove_action('admin_footer','wp_admin_bar_js');remove_action('admin_footer','wp_admin_bar_dev_js');remove_action('wp_ajax_adminbar_render','wp_admin_bar_ajax_render');remove_filter('wp_ajax_adminbar_render','wp_admin_bar_ajax_render');remove_action('admin_bar_menu','nacin_promote_network_admin_in_toolbar',25);remove_filter('admin_bar_menu','nacin_promote_network_admin_in_toolbar',25);remove_action('personal_options','_admin_bar_pref');remove_filter('personal_options','_admin_bar_pref');remove_action('personal_options','_get_admin_bar_pref');remove_filter('personal_options','_get_admin_bar_pref');remove_filter('locale','wp_admin_bar_lang');remove_filter('admin_footer','wp_admin_bar_render'); 
    186  
    187 function wptbr_nfo(){echo"\n<!--Plugin ToolBar Removal 2012-VERSION.0621-BUGFIX.0433-DEVELOPMENT Active-->";}add_action('wp_head','wptbr_nfo');add_action('wp_footer','wptbr_nfo'); 
     177remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); 
     178//remove_filter( 'wp_footer', 'wp_admin_bar_render', 1000 ); 
     179remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); 
     180//remove_filter( 'admin_footer', 'wp_admin_bar_render', 1000 ); 
     181 
     182//remove_action('admin_footer','wp_admin_bar_render'); 
     183//remove_filter('admin_footer','wp_admin_bar_render'); 
     184 
     185//remove_action('wp_head','wp_admin_bar_render',1000); 
     186//remove_filter('wp_head','wp_admin_bar_render',1000); 
     187//remove_action('admin_head','wp_admin_bar_render',1000); 
     188//remove_filter('admin_head','wp_admin_bar_render',1000); 
     189 
     190remove_action('init','wp_admin_bar_init'); 
     191remove_filter('init','wp_admin_bar_init'); 
     192 
     193remove_action( 'wp_head', 'wp_admin_bar_css' ); 
     194remove_action( 'admin_head', 'wp_admin_bar_css' ); 
     195remove_action( 'wp_footer', 'wp_admin_bar_js' ); 
     196remove_action( 'admin_footer', 'wp_admin_bar_js' ); 
     197remove_action( 'wp_ajax_adminbar_render', 'wp_admin_bar_ajax_render' ); 
     198//remove_filter( 'wp_ajax_adminbar_render', 'wp_admin_bar_ajax_render' ); 
     199 
     200remove_filter( 'locale', 'wp_admin_bar_lang' ); 
     201 
     202//remove_action('admin_head','nacin_promote_network_admin_in_toolbar',25); 
     203//remove_action('admin_head','admin_bar_menu'); 
     204 
     205//remove_filter('wp_head','wp_admin_bar_wp_menu'); 
     206//remove_filter('wp_head','wp_admin_bar_add_secondary_groups'); 
     207 
     208//remove_filter('wp_head','wp_admin_bar'); 
     209//remove_filter('wp_footer','wp_admin_bar'); 
     210//remove_filter('admin_head','wp_admin_bar'); 
     211//remove_filter('admin_footer','wp_admin_bar'); 
     212//remove_filter('wp_head','wp_admin_bar_class'); 
     213//remove_filter('wp_footer','wp_admin_bar_class'); 
     214//remove_filter('admin_head','wp_admin_bar_class'); 
     215//remove_filter('admin_footer','wp_admin_bar_class'); 
     216 
     217remove_action('wp_head','wp_admin_bar_dev_css'); 
     218remove_action('wp_head','wp_admin_bar_rtl_css'); 
     219remove_action('wp_head','wp_admin_bar_rtl_dev_css'); 
     220 
     221remove_action('admin_head','wp_admin_bar_dev_css'); 
     222remove_action('admin_head','wp_admin_bar_rtl_css'); 
     223remove_action('admin_head','wp_admin_bar_rtl_dev_css'); 
     224 
     225remove_action('wp_footer','wp_admin_bar_dev_js'); 
     226remove_action('admin_footer','wp_admin_bar_dev_js'); 
     227 
     228//remove_action('admin_bar_menu','nacin_promote_network_admin_in_toolbar',25); 
     229//remove_filter('admin_bar_menu','nacin_promote_network_admin_in_toolbar',25); 
     230 
     231//remove_action('personal_options','_admin_bar_pref'); 
     232//remove_filter('personal_options','_admin_bar_pref'); 
     233 
     234//remove_action('personal_options','_get_admin_bar_pref'); 
     235//remove_filter('personal_options','_get_admin_bar_pref'); 
     236 
     237//function wptbr_init(){add_filter('show_admin_bar','__return_false');} 
     238function wptbr_spab_init(){add_filter( 'show_wp_pointer_admin_bar', '__return_false' );} 
     239 
     240function wptbr_rsf(){echo'<style type="text/css">html{margin-top:0px !important}* html body{margin-top:0px !important}</style>';}add_filter('wp_head','wptbr_rsf',99); 
     241function wptbr_ruppoabpc(){echo'<style type="text/css">.show-admin-bar{display:none}</style>';}add_action('admin_print_styles-profile.php','wptbr_ruppoabpc');show_admin_bar(false); 
     242function wptbr_nfo(){echo"\n<!--Plugin ToolBar Removal 2012.0621.0341 RC Active-->";}add_action('wp_head','wptbr_nfo');add_action('wp_footer','wptbr_nfo'); 
    188243?> 
Note: See TracChangeset for help on using the changeset viewer.