$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>dashboard - change the words "Wordpress running on theme" in "At a glance",especially the li|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

dashboard - change the words "Wordpress running on theme" in "At a glance",especially the li

matteradmin12PV0评论

l just wanna change words "wordpress x.x.x running on theme"in "At a glance",actually l wanna remove the link "theme.php".l added the code in my function.php:

    add_filter('gettext', 'remove_admin_stuff', 20, 3);

function remove_admin_stuff( $translated_text, $untranslated_text, $domain ) {

    $custom_field_text = 'You are using <span class="b">WordPress %s</span>.';

    if ( is_admin() && $untranslated_text === $custom_field_text ) {
        return '';
    }

    return $translated_text;
}

wanna make a trick.but it failed .please help me.

l just wanna change words "wordpress x.x.x running on theme"in "At a glance",actually l wanna remove the link "theme.php".l added the code in my function.php:

    add_filter('gettext', 'remove_admin_stuff', 20, 3);

function remove_admin_stuff( $translated_text, $untranslated_text, $domain ) {

    $custom_field_text = 'You are using <span class="b">WordPress %s</span>.';

    if ( is_admin() && $untranslated_text === $custom_field_text ) {
        return '';
    }

    return $translated_text;
}

wanna make a trick.but it failed .please help me.

Share Improve this question asked Mar 15, 2019 at 9:53 Leon ZhaoLeon Zhao 11 bronze badge 1
  • 1 Your function returns empty string or $translated_text which was not modified. – Max Yudin Commented Mar 15, 2019 at 10:18
Add a comment  | 

1 Answer 1

Reset to default 0

This code may help you.

function wpfi_change_text( $translated_text ) {
        if ( $translated_text == 'ORIGINAL TEXT' ) {
            $translated_text = '';
        }
        return $translated_text;
    }
    add_filter( 'gettext', 'wpfi_change_text', 20 );
Post a comment

comment list (0)

  1. No comments so far