/*
Plugin Name: 052b Base
Version: 1.3
Author: 052b
Author URI: http://www.052b.com
Description: Czyści WP admin, wyłącza aktualizacje, branding stopki admina i logowania
*/
function remove_admin_bar_links()
{
global $wp_admin_bar;
$wp_admin_bar->remove_menu( 'wp-logo' );
$wp_admin_bar->remove_menu( 'about' );
$wp_admin_bar->remove_menu( 'wporg' );
$wp_admin_bar->remove_menu( 'documentation' );
$wp_admin_bar->remove_menu( 'support-forums' );
$wp_admin_bar->remove_menu( 'feedback' );
$wp_admin_bar->remove_menu( 'updates' );
$wp_admin_bar->remove_menu( 'comments' );
$wp_admin_bar->remove_menu( 'w3tc' );
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );
function remove_footer_admin()
{
?>
© 2024 052b Creative Agency
}
add_filter('admin_footer_text', 'remove_footer_admin');
function replace_footer_version()
{
return ' ';
}
add_filter( 'update_footer', 'replace_footer_version', 1234 );
function remove_update_notifications()
{
remove_action( 'admin_notices', 'update_nag', 3 );
}
add_action( 'admin_menu', 'remove_update_notifications' );
function __disable_updates()
{
return null;
}
add_filter( 'pre_site_transient_update_core', '__disable_updates' );
function custom_fonts()
{
?>
}
add_action('login_head', 'custom_fonts');
function custom_login_css()
{
?>
}
add_action( 'login_head', 'custom_login_css' );
function remove_wp_from_admin_title( $title )
{
return str_replace( ' — WordPress', '', $title );
}
add_filter( 'admin_title', 'remove_wp_from_admin_title', 999 );
// Dodane 1.2
add_filter('show_admin_bar', '__return_false');
// Dodane 1.3
function ca052b_theme_js()
{
wp_register_script( 'cssbrowser', '//css-browser-selector.googlecode.com/git/css_browser_selector.js', array('jquery'), '1' );
wp_enqueue_script( 'cssbrowser' );
}
add_action( 'wp_enqueue_scripts', 'ca052b_theme_js' );
/* End of file plugin.php */