0

I am working on a site and sometimes I run into an error when logging out and on the site tab it says 'Wordpress Failure Notice'. I am trying to remove all instances of wordpress so users dont know Im using it, but I can not figure out how to remove the text from the tab. I dont have no code to try and show because Im not even sure where to start. The text shows up on the wp-login.php page and happens when trying to log out. That's all I know. So my question is how would I remove this, and change the text to something different?

Thanks

2
  • 2
    There are a dozen different ways to identify a site as a WordPress site. Trying to hide that is a waste of effort.
    – s_ha_dum
    Commented Oct 28, 2013 at 3:58
  • @s_ha_dum I just need to hide a few things from the average user.
    – 730wavy
    Commented Nov 11, 2013 at 5:32

4 Answers 4

3

this string is displayed when you get a nonce mismatch, something that should not happen much under normal usage. If it does haen enough to make you aware to it then you should investigate the cause.

Anyway, no easy filter for that string so you will have to use the translation api to replace it.

add_filter ( 'gettext', 'wpse_120304', 10, 3 );
function wpse_120304($translated, $original, $domain) {
  if ($original == 'WordPress Failure Notice')
    return 'Failure Notice'; // or something else
  else
    return $translated;
}

or just use the "say what" plugin http://wordpress.org/plugins/say-what/ from which I have lifted the idea to this piece of code.

0

You'll probably want to take over all wp_die() messages and, as we can see, there are some hooks for that. Here, changing only the default one (not Ajax or XMLRPC):

add_filter( 'wp_die_handler', 'change_die_wpse_120304' );

# Modify wp_die_handler
function change_die_wpse_120304()
{
    return 'do_wp_die_wpse_120304';
}

# Make a copy of _default_wp_die_handler and adapt
# http://core.trac.wordpress.org/browser/tags/3.6/wp-includes/functions.php#L2067
function do_wp_die_wpse_120304( $message, $title, $args )
{
    // a new way to die()
}
0

This very simple code works for me on both Admin Pages and also Login Page

// Pages Titles
function my_admin_title($admin_title, $title)
{
    return get_bloginfo('name').' • '.$title;
}
add_filter('admin_title', 'my_admin_title', 10, 2);
add_filter('login_title', 'my_admin_title', 10, 2);
-1

find the page end with extension ".php" , example wp login page is "wp-login.php ". Remove the following code from code:

<title><?php echo $login_title; ?></title>
2
  • You mean modifying the core WordPress files? You'll lose any changes you make when you update the version (or when it updates itself automatically)
    – Rup
    Commented May 21, 2022 at 13:00
  • The correct way for doing this is using filters - see Filters|Plugin Handbook - do not let me ever catch you editing core files
    – Bysander
    Commented May 23, 2022 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.