Make WordPress Core

Changeset 19345


Ignore:
Timestamp:
11/19/2011 12:42:22 AM (15 years ago)
Author:
azaozz
Message:

Welcome Screen: remove white space, make the second dismiss link work, see #11651

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r19342 r19345  
    12831283        ?>
    12841284        <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
    1285 
    1286                 <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
    1287 
    1288                 <a class="welcome-panel-close" href="#"><?php _e('Dismiss'); ?></a>
    1289 
    1290                 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
    1291 
    1292                 <div class="welcome-panel-content">
    1293 
    1294                 <h3><?php _e( 'Welcome to your new WordPress site! ' ); ?></h3>
    1295                 <p class="about-description"><?php _e( 'If you need help getting started, check out our documentation on <a href="http://codex.wordpress.org/First_Steps_With_WordPress">First Steps with WordPress</a>. If you&#8217;d rather dive right in, here are a few things most people do first when they set up a new WordPress site. If you need help, use the Help tabs in the upper right corner to get information on how to use your current screen and where to go for more assistance.' ); ?></p>
    1296                
    1297                 <div class="welcome-panel-column-container">
    1298                         <div class="welcome-panel-column">
    1299                                 <h4>
    1300                                         <span class="icon16 icon-settings"></span>
    1301                                         <?php _e( 'Basic Settings' ); ?>
    1302                                 </h4>
    1303                                 <p><?php _e( 'Here are a few easy things you can do to get your feet wet. Make sure to click Save on each Settings screen.' ); ?></p>
    1304                                 <ul>
    1305                                         <li>
    1306                                                 <?php echo sprintf(
    1307                                                         __( '<a href="%s">Choose your privacy setting</a>' ),
    1308                                                         esc_url( admin_url('options-privacy.php') )
    1309                                                 ); ?>
    1310                                         </li>
    1311                                         <li>
    1312                                                 <?php echo sprintf(
    1313                                                         __( '<a href="%s">Select your tagline and time zone</a>' ),
    1314                                                         esc_url( admin_url('options-general.php') )
    1315                                                 ); ?>
    1316                                         </li>
    1317                                         <li>
    1318                                                 <?php echo sprintf(
    1319                                                         __( '<a href="%s">Turn comments on or off</a>' ),
    1320                                                         esc_url( admin_url('options-discussion.php') )
    1321                                                 ); ?>
    1322                                         </li>
    1323                                         <li>
    1324                                                 <?php echo sprintf(
    1325                                                         __( '<a href="%s">Fill in your profile</a>' ),
    1326                                                         esc_url( admin_url('profile.php') )
    1327                                                 ); ?>
    1328                                         </li>
    1329                                 </ul>
    1330                         </div>
    1331                         <div class="welcome-panel-column">
    1332                                 <h4>
    1333                                         <span class="icon16 icon-page"></span>
    1334                                         <?php _e( 'Add Real Content' ); ?>
    1335                                 </h4>
    1336                                 <p><?php _e( 'Check out the sample page & post editors to see how it all works, then delete the default content and write your own!' ); ?></p>
    1337                                 <ul>
    1338                                         <li>
    1339                                                 <?php echo sprintf(
    1340                                                         __( 'View the <a href="%1$s">sample page</a> and <a href="%2$s">post</a>' ),
    1341                                                         esc_url( get_permalink( 2 ) ),
    1342                                                         esc_url( get_permalink( 1 ) )
    1343                                                 ); ?>
    1344                                         </li>
    1345                                         <li>
    1346                                                 <?php echo sprintf(
    1347                                                         __( 'Delete the <a href="%1$s">sample page</a> and <a href="%2$s">post</a>' ),
    1348                                                         esc_url( admin_url('edit.php?post_type=page') ),
    1349                                                         esc_url( admin_url('edit.php') )
    1350                                                 ); ?>
    1351                                         </li>
    1352                                         <li>
    1353                                                 <?php echo sprintf(
    1354                                                         __( '<a href="%s">Create an About Me page</a>' ),
    1355                                                         esc_url( admin_url('edit.php?post_type=page') )
    1356                                                 ); ?>
    1357                                         </li>
    1358                                         <li>
    1359                                                 <?php echo sprintf(
    1360                                                         __( '<a href="%s">Write your first post</a>' ),
    1361                                                         esc_url( admin_url('post-new.php') )
    1362                                                 ); ?>
    1363                                         </li>
    1364                                 </ul>
    1365                         </div>
    1366                         <div class="welcome-panel-column">
    1367                                 <h4>
    1368                                         <span class="icon16 icon-appearance"></span>
    1369                                         <?php _e( 'Customize Your Site' ); ?>
    1370                                 </h4>
    1371                                 <?php
    1372                                 $ct = current_theme_info();
    1373                                 if ( empty ( $ct->stylesheet_dir ) ) :
    1374                                 echo '<p>';
    1375                                 printf( __( '<a href="%s">Install a theme</a> to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) );
    1376                                 echo '</p>';
    1377                                 else:
    1378                                 echo '<p>';
    1379                                 printf( __( 'Use the current theme &mdash; %1$s &mdash; or <a href="%2$s">choose a new one</a>. If you stick with %3$s, here are a few ways to make your site look unique.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ), $ct->title );
    1380                                 echo '</p>';
    1381                                 ?>
    1382                                 <ul>
    1383                                         <?php if ( 'twentyeleven' == $ct->stylesheet ) : ?>
    1384                                         <li>
    1385                                                 <?php echo sprintf(
    1386                                                         __( '<a href="%s">Choose light or dark</a>' ),
    1387                                                         esc_url( admin_url( 'themes.php?page=theme_options' ) )
    1388                                                 ); ?>
    1389                                         </li>
    1390                                         <?php
    1391                                         endif;
    1392                                         if ( current_theme_supports( 'custom-background' ) ) :
    1393                                         ?>
    1394                                         <li>
    1395                                                 <?php echo sprintf(
    1396                                                         __( '<a href="%s">Set a background color</a>' ),
    1397                                                         esc_url( admin_url( 'themes.php?page=custom-background' ) )
    1398                                                 ); ?>
    1399                                         </li>
    1400                                         <?php
    1401                                         endif;
    1402                                         if ( current_theme_supports( 'custom-header' ) ) :
    1403                                         ?>
    1404                                         <li>
    1405                                                 <?php echo sprintf(
    1406                                                         __( '<a href="%s">Select a new header image</a>' ),
    1407                                                         esc_url( admin_url( 'themes.php?page=custom-header' ) )
    1408                                                 ); ?>
    1409                                         </li>
    1410                                         <?php
    1411                                         endif;
    1412                                         if ( current_theme_supports( 'widgets' ) ) :
    1413                                         ?>
    1414                                         <li>
    1415                                                 <?php echo sprintf(
    1416                                                         __( '<a href="%s">Add some widgets</a>' ),
    1417                                                         esc_url( admin_url( 'widgets.php' ) )
    1418                                                 ); ?>
    1419                                         </li>
    1420                                         <?php endif; ?>
    1421                                 </ul>
    1422                                 <?php endif; ?>
    1423                         </div>
    1424                 </div>
    1425                 <p class="welcome-panel-dismiss"><?php printf( __( 'Already know what you&#8217;re doing? <a href="%s">Dismiss this message</a>.' ), '#' ) ?></p>
    1426                 </div>
     1285        <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
     1286        <a class="welcome-panel-close" href="#"><?php _e('Dismiss'); ?></a>
     1287        <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
     1288
     1289        <div class="welcome-panel-content">
     1290        <h3><?php _e( 'Welcome to your new WordPress site! ' ); ?></h3>
     1291        <p class="about-description"><?php _e( 'If you need help getting started, check out our documentation on <a href="http://codex.wordpress.org/First_Steps_With_WordPress">First Steps with WordPress</a>. If you&#8217;d rather dive right in, here are a few things most people do first when they set up a new WordPress site. If you need help, use the Help tabs in the upper right corner to get information on how to use your current screen and where to go for more assistance.' ); ?></p>
     1292        <div class="welcome-panel-column-container">
     1293        <div class="welcome-panel-column">
     1294                <h4><span class="icon16 icon-settings"></span> <?php _e( 'Basic Settings' ); ?></h4>
     1295                <p><?php _e( 'Here are a few easy things you can do to get your feet wet. Make sure to click Save on each Settings screen.' ); ?></p>
     1296                <ul>
     1297                <li><?php echo sprintf( __( '<a href="%s">Choose your privacy setting</a>' ), esc_url( admin_url('options-privacy.php') ) ); ?></li>
     1298                <li><?php echo sprintf( __( '<a href="%s">Select your tagline and time zone</a>' ), esc_url( admin_url('options-general.php') ) ); ?></li>
     1299                <li><?php echo sprintf( __( '<a href="%s">Turn comments on or off</a>' ), esc_url( admin_url('options-discussion.php') ) ); ?></li>
     1300                <li><?php echo sprintf( __( '<a href="%s">Fill in your profile</a>' ), esc_url( admin_url('profile.php') ) ); ?></li>
     1301                </ul>
     1302        </div>
     1303        <div class="welcome-panel-column">
     1304                <h4><span class="icon16 icon-page"></span> <?php _e( 'Add Real Content' ); ?></h4>
     1305                <p><?php _e( 'Check out the sample page & post editors to see how it all works, then delete the default content and write your own!' ); ?></p>
     1306                <ul>
     1307                <li><?php echo sprintf( __( 'View the <a href="%1$s">sample page</a> and <a href="%2$s">post</a>' ), esc_url( get_permalink( 2 ) ), esc_url( get_permalink( 1 ) ) ); ?></li>
     1308                <li><?php echo sprintf( __( 'Delete the <a href="%1$s">sample page</a> and <a href="%2$s">post</a>' ), esc_url( admin_url('edit.php?post_type=page') ), esc_url( admin_url('edit.php') ) ); ?></li>
     1309                <li><?php echo sprintf( __( '<a href="%s">Create an About Me page</a>' ), esc_url( admin_url('edit.php?post_type=page') ) ); ?></li>
     1310                <li><?php echo sprintf( __( '<a href="%s">Write your first post</a>' ), esc_url( admin_url('post-new.php') ) ); ?></li>
     1311                </ul>
     1312        </div>
     1313        <div class="welcome-panel-column">
     1314                <h4><span class="icon16 icon-appearance"></span> <?php _e( 'Customize Your Site' ); ?></h4>
     1315                <?php
     1316                $ct = current_theme_info();
     1317                if ( empty ( $ct->stylesheet_dir ) ) :
     1318                        echo '<p>';
     1319                        printf( __( '<a href="%s">Install a theme</a> to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) );
     1320                        echo '</p>';
     1321                        else:
     1322                        echo '<p>';
     1323                        printf( __( 'Use the current theme &mdash; %1$s &mdash; or <a href="%2$s">choose a new one</a>. If you stick with %3$s, here are a few ways to make your site look unique.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ), $ct->title );
     1324                        echo '</p>';
     1325                        ?>
     1326                        <ul>
     1327                        <?php
     1328                        if ( 'twentyeleven' == $ct->stylesheet ) : ?>
     1329                                <li><?php echo sprintf( __( '<a href="%s">Choose light or dark</a>' ), esc_url( admin_url( 'themes.php?page=theme_options' ) ) ); ?></li>
     1330                        <?php
     1331                        endif;
     1332
     1333                        if ( current_theme_supports( 'custom-background' ) ) : ?>
     1334                                <li><?php echo sprintf( __( '<a href="%s">Set a background color</a>' ), esc_url( admin_url( 'themes.php?page=custom-background' ) ) ); ?></li>
     1335                        <?php
     1336                        endif;
     1337
     1338                        if ( current_theme_supports( 'custom-header' ) ) : ?>
     1339                                <li><?php echo sprintf( __( '<a href="%s">Select a new header image</a>' ), esc_url( admin_url( 'themes.php?page=custom-header' ) ) ); ?></li>
     1340                        <?php
     1341                        endif;
     1342       
     1343                        if ( current_theme_supports( 'widgets' ) ) : ?>
     1344                                <li><?php echo sprintf( __( '<a href="%s">Add some widgets</a>' ), esc_url( admin_url( 'widgets.php' ) ) ); ?></li>
     1345                        <?php
     1346                        endif; ?>
     1347                        </ul>
     1348                <?php
     1349                endif; ?>
     1350        </div>
     1351        </div>
     1352        <p class="welcome-panel-dismiss"><?php _e( 'Already know what you&#8217;re doing? <a href="#">Dismiss this message</a>.' ); ?></p>
     1353        </div>
    14271354        </div>
    14281355        <?php
  • trunk/wp-admin/js/dashboard.dev.js

    r19134 r19345  
    1616                welcomePanel.removeClass('hidden');
    1717
    18         $('.welcome-panel-close', welcomePanel).click( function() {
     18        $('.welcome-panel-close, .welcome-panel-dismiss a', welcomePanel).click( function() {
    1919                welcomePanel.addClass('hidden');
    2020                updateWelcomePanel( 0 );
  • trunk/wp-admin/js/dashboard.js

    r19134 r19345  
    1 var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(c){var d=c("#welcome-panel"),a=c("#wp_welcome_panel-hide"),b=function(e){c.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:c("#welcomepanelnonce").val()})};if(d.hasClass("hidden")&&a.prop("checked")){d.removeClass("hidden")}c(".welcome-panel-close",d).click(function(){d.addClass("hidden");b(0);c("#wp_welcome_panel-hide").prop("checked",false)});a.click(function(){d.toggleClass("hidden",!this.checked);b(this.checked?1:0)});ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];ajaxPopulateWidgets=function(f){function e(g,k){var j,h=c("#"+k+" div.inside:visible").find(".widget-loading");if(h.length){j=h.parent();setTimeout(function(){j.load(ajaxurl.replace("/admin-ajax.php","")+"/index-extra.php?jax="+k,"",function(){j.hide().slideDown("normal",function(){c(this).css("display","")})})},g*500)}}if(f){f=f.toString();if(c.inArray(f,ajaxWidgets)!=-1){e(0,f)}}else{c.each(ajaxWidgets,e)}};ajaxPopulateWidgets();postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","visible");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",true);if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","hidden");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",false);c("#dashboard_quick_press ul").next("p").remove();c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();quickPressLoad()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};quickPressLoad()});
     1var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(c){var d=c("#welcome-panel"),a=c("#wp_welcome_panel-hide"),b=function(e){c.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:c("#welcomepanelnonce").val()})};if(d.hasClass("hidden")&&a.prop("checked")){d.removeClass("hidden")}c(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(){d.addClass("hidden");b(0);c("#wp_welcome_panel-hide").prop("checked",false)});a.click(function(){d.toggleClass("hidden",!this.checked);b(this.checked?1:0)});ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];ajaxPopulateWidgets=function(f){function e(g,k){var j,h=c("#"+k+" div.inside:visible").find(".widget-loading");if(h.length){j=h.parent();setTimeout(function(){j.load(ajaxurl.replace("/admin-ajax.php","")+"/index-extra.php?jax="+k,"",function(){j.hide().slideDown("normal",function(){c(this).css("display","")})})},g*500)}}if(f){f=f.toString();if(c.inArray(f,ajaxWidgets)!=-1){e(0,f)}}else{c.each(ajaxWidgets,e)}};ajaxPopulateWidgets();postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","visible");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",true);if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","hidden");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",false);c("#dashboard_quick_press ul").next("p").remove();c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();quickPressLoad()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};quickPressLoad()});
  • trunk/wp-includes/script-loader.php

    r19343 r19345  
    368368                $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
    369369
    370                 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), '20111103', 1 );
     370                $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), '20111118', 1 );
    371371
    372372                $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '20090102', 1 );
Note: See TracChangeset for help on using the changeset viewer.