How to remove the WordPress title from the panel title?

1

How can I remove the "WordPress" name from the titles inside the admin panel?

Ex: When you enter the Dashboard, all the pages in the title are named WordPress , how could I remove that word?

It looks something like this: Painel < Meu Site -- WordPress

I just wanted to: Painel < Meu Site

    
asked by anonymous 02.08.2014 / 06:06

2 answers

5

Here's the correct way to do this using the admin_title filter:

function custom_admin_title( $admin_title ) {
    return str_replace( ' &#8212; WordPress', '', $admin_title );
}

add_filter( 'admin_title', 'custom_admin_title' );
    
02.08.2014 / 06:41
0

I do not use WordPress, but I have it here. I do not know if it is done in the translation package, but I found it in the wp-admin/admin-header file.

Lines 31 - 34

if ( $admin_title == $title )
    $admin_title = sprintf( __( '%1$s &#8212; WordPress' ), $title );
else
    $admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
    
02.08.2014 / 06:11