Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have found discussions and solutions on hiding or removing the lately introduced Welcome screen.

But we DO find the screen, as a whole, very useful and an excellent addition. So, what we are looking for is quite different.


We just want to change parts of it on a multisite/subfolders network.

To be exact. The wp logo image (wp-badge.png) on the left, as well as the header next to it (.welcome-panel-content .about-description, .welcome-panel h3) and the text under it included in (.about-text, .about-description, .about-wrap li.wp-person a.web).

Proposed Welcome Panel

I am aware that most of it is hardcoded. Still.... There must be a way. :)

PS: 1) We already use a plugin that can add css on the admin screens. But I don't think it would solve anything. 2) If there is a way, please be as specific/descriptive as possible. My coding skills suck. :(

Update

After following brasofilo's instructions I have compiled the code to a mu-plugin. I placed it in our mu-plugins folder, have tested it on our test-multisite and works like a charm. :)

I have it uploaded to my dropbox so anyone can benefit. Feel free to Right Click Here, download it and customize it to your needs. I hope it helps others as well.

PS: @brasofilo Please let me know whether I have credited it correctly.

share|improve this question
    
@toscho Thank you for editing (putting up the image) the post for me. Could you probably add a new tag "welcome screen"? I think it could be useful –  marikamitsos Jul 4 '12 at 0:08
2  
The welcome screen is under discussion currently. I would rather wait until we have at least four questions about it before we add yet another tag. –  toscho Jul 4 '12 at 0:11
    
Everything cool, marikamisos, glad to help :o) . . . . . But I think that, for a broader and more direct benefit, you can post your code as an Answer here (if not, a Gist would be better than a DropBox). And if you go and earn an Analytical Badge, you'll understand what I mean by posting your own Answer ;o) –  brasofilo Jul 11 '12 at 2:52

1 Answer 1

up vote 6 down vote accepted

Whenever we find ourselves in the situation "there must be a way to overcome this hard-code", jQuery comes to rescue...

The Result

enter image description here

The Code

The following code must be pasted at the end of the active Theme functions.php file.
Or it can be used in a custom plugin, which will make the code "theme-independent".

add_action('admin_head-index.php', 'wpse_57350_script_enqueuer');

function wpse_57350_script_enqueuer()
{
    // Check if Welcome Panel is being displayed
    $option = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
    if( !$option )
        return;
    ?>
    <style type="text/css">
        /*
         * Hide the Welcome Panel and the "dismiss" message at the bottom
         */ 
        #welcome-panel {opacity:0.01;} 
        p.welcome-panel-dismiss {display:none}
    </style>
    <script type="text/javascript">
    jQuery(document).ready( function($) 
    {
        /*
         * Left side image and text
         * - changing CSS properties and raw Html content of the Div
         */
        $('div.wp-badge').css('background-image','url(http://lifelabsnewyork.com/sitebuilder/images/brain-filled-173x192.jpg)');
        $('div.wp-badge').css('color','#000000');
        $('div.wp-badge').html('Custom Welcome');

        // Right side H3 (change raw Html content)
        $('div.welcome-panel-content h3').html('By StackExchange WordPress Answers');

        // Right side paragraph (idem)
        $('p.about-description').html('To be exact. The wp logo image (wp-badge.png) on the left, as well as the header next to it (.welcome-panel-content .about-description, .welcome-panel h3) and the text under it included in (.about-text, .about-description, .about-wrap li.wp-person a.web).');

        /*
         * Everything modified, fade in the whole Div
         * The fade in effect can be removed deleting this and the CSS opacity property
         */
        $('#welcome-panel').delay(300).fadeTo('slow',1);
    });     
    </script>
    <?php
}

Note that I'm being lazy and printing the Styles and Scripts directly in the admin header.
Please refer to the following Q&A on how to do it in a proper/formal fashion.
How do I enqueue styles/scripts on certain /wp-admin pages?
Where is the right place to register/enqueue scripts & styles

share|improve this answer
    
WOW !!!! Brasofilo. I canNOT THANK YOU ENOUGH. And because (as mentioned before) my coding skills suck, let me ask for a couple of clarifications: 1. –  marikamitsos Jul 4 '12 at 11:39
    
@marikamitsos : Haven't welcomed you to WPSE, consider it so! Please take a moment to read this Stack's FAQ. . . . . . Didn't mentioned in my answer, but it was easy after this one :) –  brasofilo Jul 4 '12 at 11:47
    
Thank you for the welcome :) Sorry. I didn't realize I canNOT do paragraphs and I also am a slow writer. So the clarifications: 1. I take it that all the text as well as the link to the image will be "hardcoded". 2. The whole "thing" sits as a blanket on top of the actual welcome screen so on the page source the two coexist (quite fine with me). 3. I must keep the wpse_57350_script_enqueuer intact???? I will be waiting for your answer. In the meantime I am off to the links you provided for some reading on how/where to apply your code -I don't have a clue. :( Thank you again –  marikamitsos Jul 4 '12 at 11:54
1  
@marikamitsos : Yeah, apologies, you did said that in your Q. I've added relevant info and comments in the code... 1)Yes, it's all being re-written/re-styled inside that jQuery block. 2) No, we are making "live" changes in the Html using jQuery. 3) After pasting it in your theme's functions.php, you have to adapt the lines that contain $('div.wp-badge'), $('div.welcome-panel-content h3') and $('p.about-description') to suit your needs. –  brasofilo Jul 4 '12 at 12:14
    
I do understand this is not an "Ignorants Support Forum" (like myself) but... So. The wpse_57350_script_enqueuer will be changed according to what? Also, since I try to use it on a multisite/subfolders, is there someway we could turn this to a mu-plugin (so it registers with all themes for all sites) instead of putting the code to every theme's functions.php? If so how can I do that? I am off to give it a try. Thanks again :) –  marikamitsos Jul 4 '12 at 12:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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