I am looking for a way to remove theme, change theme button and WP version from the "right now" admin dashboard, but using only functions. Any help?


Ah, one of those things that seem easy until admin dashboard internals throw you into depths of despair. :)

Basically there is no easy and intended way to do this, so need to get creative. My idea would be to override temporarily couple of capabilities that control parts of output and kill the rest with filters in translation mechanisms.

PS ehm, while I was messing with this it slipped me that you want to change some part and not remove everything. Well you can just remove and produce your own output or build on top of translation filter. See wp_dashboard_right_now() source for what is inside that widget.


function turn_off_caps() {


function turn_on_caps() {


function disable_caps($caps,$cap) {

    if( 'update_core' == $cap )
            $caps[] = 'do_not_allow';

    if( 'switch_themes' == $cap )
            $caps[] = 'do_not_allow';

    return $caps;

function disable_theme($text) {

    if('Theme' == substr($text,0,5))
        return '';

    return $text;
  • I looked briefly but didn't see a quick clean way, i'd have also opted for capability juggling to get rid of the unwanted parts to, nicely done... +1 – t31os Apr 12 '11 at 13:45
  • Thanks and well done! It hide everything, except the "You are using x" bit - but will do. Cheers! – PauloP Apr 13 '11 at 8:53
  • @PauloP hm, that should be removed as well from my tests... well, as long as it works for you :) – Rarst Apr 13 '11 at 11:25

I found an easy way to kill the update in the right now section, and it doesn't break anyting. Here it is (I am working with wordpress 3.3.1 and it worked just fine without breaking anything. Find this line of code:

    // Called directly from dashboard
    function update_right_now_message() {
$msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] );
if ( current_user_can('update_core') ) {
    $cur = get_preferred_from_update_core();
    if ( isset( $cur->response ) && $cur->response == 'upgrade'  )
        $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
echo "<span id='wp-version-message'>$msg</span>";

Now, replace the bottom line of that code at the very bottom with whatever you want, or leave it blank. I used the following:

echo "<p>Stef Stole The Update Button!?!?</p>";

this works without breaking anything, and helps to stop accidental updates I have found

  • Now you have created a fork of WordPress that cannot be updated automatically anymore with the built-in updater. Please add detailed update instructions (and you should really update your own site too). – fuxia Nov 7 '12 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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