478 ) ); |
480 ) ); |
479 |
481 |
480 if ( $drafts_query->posts ) |
482 if ( $drafts_query->posts ) |
481 $drafts =& $drafts_query->posts; |
483 $drafts =& $drafts_query->posts; |
482 } |
484 } |
483 printf('<p class="textright">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url( admin_url( 'tools.php' ) ) . '">' . __('Press This') . '</a>' ); |
485 printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url( admin_url( 'tools.php' ) ) . '">' . __('Press This') . '</a>' ); |
484 $_REQUEST = array(); // hack for get_default_post_to_edit() |
486 $_REQUEST = array(); // hack for get_default_post_to_edit() |
485 } |
487 } |
486 |
488 |
487 /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */ |
489 /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */ |
488 $last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID |
490 $last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID |
489 if ( $last_post_id ) { |
491 if ( $last_post_id ) { |
490 $post = get_post( $last_post_id ); |
492 $post = get_post( $last_post_id ); |
491 if ( empty( $post ) || $post->post_status != 'auto-draft' ) { // auto-draft doesn't exists anymore |
493 if ( empty( $post ) || $post->post_status != 'auto-draft' ) { // auto-draft doesn't exists anymore |
492 $post = get_default_post_to_edit('post', true); |
494 $post = get_default_post_to_edit('post', true); |
493 update_user_option( (int) $GLOBALS['current_user']->ID, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID |
495 update_user_option( get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID |
494 } else { |
496 } else { |
495 $post->post_title = ''; // Remove the auto draft title |
497 $post->post_title = ''; // Remove the auto draft title |
496 } |
498 } |
497 } else { |
499 } else { |
498 $post = get_default_post_to_edit('post', true); |
500 $post = get_default_post_to_edit( 'post' , true); |
499 update_user_option( (int) $GLOBALS['current_user']->ID, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID |
501 $user_id = get_current_user_id(); |
|
502 // Don't create an option if this is a super admin who does not belong to this site. |
|
503 if ( ! ( is_super_admin( $user_id ) && ! in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) ) ) |
|
504 update_user_option( $user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID |
500 } |
505 } |
501 |
506 |
502 $post_ID = (int) $post->ID; |
507 $post_ID = (int) $post->ID; |
|
508 |
|
509 $media_settings = array( |
|
510 'id' => $post->ID, |
|
511 'nonce' => wp_create_nonce( 'update-post_' . $post->ID ), |
|
512 ); |
|
513 |
|
514 if ( current_theme_supports( 'post-thumbnails', $post->post_type ) && post_type_supports( $post->post_type, 'thumbnail' ) ) { |
|
515 $featured_image_id = get_post_meta( $post->ID, '_thumbnail_id', true ); |
|
516 $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1; |
|
517 } |
503 ?> |
518 ?> |
504 |
519 |
505 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press"> |
520 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press"> |
506 <h4 id="quick-post-title"><label for="title"><?php _e('Title') ?></label></h4> |
521 <div class="input-text-wrap" id="title-wrap"> |
507 <div class="input-text-wrap"> |
522 <label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php _e( 'Enter title here' ); ?></label> |
508 <input type="text" name="post_title" id="title" tabindex="1" autocomplete="off" value="<?php echo esc_attr( $post->post_title ); ?>" /> |
523 <input type="text" name="post_title" id="title" autocomplete="off" value="<?php echo esc_attr( $post->post_title ); ?>" /> |
509 </div> |
524 </div> |
510 |
525 |
511 <?php if ( current_user_can( 'upload_files' ) ) : ?> |
526 <?php if ( current_user_can( 'upload_files' ) ) : ?> |
512 <div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons"> |
527 <div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons"> |
513 <?php do_action( 'media_buttons', 'content' ); ?> |
528 <?php do_action( 'media_buttons', 'content' ); ?> |
514 </div> |
529 </div> |
515 <?php endif; ?> |
530 <?php endif; ?> |
516 |
531 |
517 <h4 id="content-label"><label for="content"><?php _e('Content') ?></label></h4> |
|
518 <div class="textarea-wrap"> |
532 <div class="textarea-wrap"> |
519 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15" tabindex="2"><?php echo esc_textarea( $post->post_content ); ?></textarea> |
533 <label class="screen-reader-text" for="content"><?php _e( 'Content' ); ?></label> |
|
534 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo esc_textarea( $post->post_content ); ?></textarea> |
520 </div> |
535 </div> |
521 |
536 |
522 <script type="text/javascript">edCanvas = document.getElementById('content');edInsertContent = null;</script> |
537 <script type="text/javascript"> |
523 |
538 edCanvas = document.getElementById('content'); |
524 <h4><label for="tags-input"><?php _e('Tags') ?></label></h4> |
539 edInsertContent = null; |
525 <div class="input-text-wrap"> |
540 <?php if ( $_POST ) : ?> |
526 <input type="text" name="tags_input" id="tags-input" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /> |
541 wp.media.editor.remove('content'); |
|
542 wp.media.view.settings.post = <?php echo json_encode( $media_settings ); // big juicy hack. ?>; |
|
543 wp.media.editor.add('content'); |
|
544 <?php endif; ?> |
|
545 </script> |
|
546 |
|
547 <div class="input-text-wrap" id="tags-input-wrap"> |
|
548 <label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php _e( 'Tags (separate with commas)' ); ?></label> |
|
549 <input type="text" name="tags_input" id="tags-input" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /> |
527 </div> |
550 </div> |
528 |
551 |
529 <p class="submit"> |
552 <p class="submit"> |
|
553 <span id="publishing-action"> |
|
554 <input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review'); ?>" /> |
|
555 <span class="spinner"></span> |
|
556 </span> |
530 <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> |
557 <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> |
531 <input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" /> |
558 <input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" /> |
532 <input type="hidden" name="post_type" value="post" /> |
559 <input type="hidden" name="post_type" value="post" /> |
533 <?php wp_nonce_field('add-post'); ?> |
560 <?php wp_nonce_field('add-post'); ?> |
534 <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post', 'tabindex'=> 4 ) ); ?> |
561 <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post' ) ); ?> |
535 <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> |
562 <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> |
536 <span id="publishing-action"> |
|
537 <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review'); ?>" /> |
|
538 <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /> |
|
539 </span> |
|
540 <br class="clear" /> |
563 <br class="clear" /> |
541 </p> |
564 </p> |
542 |
565 |
543 </form> |
566 </form> |
544 |
567 |
655 $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); |
678 $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); |
656 $spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); |
679 $spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); |
657 $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); |
680 $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); |
658 $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); |
681 $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); |
659 |
682 |
660 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; |
683 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; |
661 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; |
684 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; |
662 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>'; |
685 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>'; |
663 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; |
686 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; |
664 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; |
687 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; |
665 if ( !EMPTY_TRASH_DAYS ) |
688 if ( !EMPTY_TRASH_DAYS ) |
666 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>'; |
689 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>'; |
667 else |
690 else |
668 $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>'; |
691 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>'; |
669 |
692 |
670 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); |
693 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); |
671 |
694 |
672 $i = 0; |
695 $i = 0; |
673 foreach ( $actions as $action => $link ) { |
696 foreach ( $actions as $action => $link ) { |
811 $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' ); |
834 $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' ); |
812 else |
835 else |
813 /* translators: incoming links feed, %1$s is other person, %3$s is content */ |
836 /* translators: incoming links feed, %1$s is other person, %3$s is content */ |
814 $text = __( '%1$s linked here saying, "%3$s"' ); |
837 $text = __( '%1$s linked here saying, "%3$s"' ); |
815 |
838 |
816 if ( !empty($show_date) ) { |
839 if ( !empty( $show_date ) ) { |
817 if ( !empty($show_author) || !empty($show_summary) ) |
840 if ( $link ) |
818 /* translators: incoming links feed, %4$s is the date */ |
841 /* translators: incoming links feed, %1$s is other person, %3$s is content, %4$s is the date */ |
819 $text .= ' ' . __( 'on %4$s' ); |
842 $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s" on %4$s' ); |
|
843 else |
|
844 /* translators: incoming links feed, %1$s is other person, %3$s is content, %4$s is the date */ |
|
845 $text = __( '%1$s linked here saying, "%3$s" on %4$s' ); |
820 $date = esc_html( strip_tags( $item->get_date() ) ); |
846 $date = esc_html( strip_tags( $item->get_date() ) ); |
821 $date = strtotime( $date ); |
847 $date = strtotime( $date ); |
822 $date = gmdate( get_option( 'date_format' ), $date ); |
848 $date = gmdate( get_option( 'date_format' ), $date ); |
823 } |
849 } |
824 |
850 |
1232 * Displays a welcome panel to introduce users to WordPress. |
1253 * Displays a welcome panel to introduce users to WordPress. |
1233 * |
1254 * |
1234 * @since 3.3.0 |
1255 * @since 3.3.0 |
1235 */ |
1256 */ |
1236 function wp_welcome_panel() { |
1257 function wp_welcome_panel() { |
1237 global $wp_version; |
|
1238 |
|
1239 if ( ! current_user_can( 'edit_theme_options' ) ) |
|
1240 return; |
|
1241 |
|
1242 $classes = 'welcome-panel'; |
|
1243 |
|
1244 $option = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); |
|
1245 // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner |
|
1246 $hide = 0 == $option || ( 2 == $option && wp_get_current_user()->user_email != get_option( 'admin_email' ) ); |
|
1247 if ( $hide ) |
|
1248 $classes .= ' hidden'; |
|
1249 |
|
1250 list( $display_version ) = explode( '-', $wp_version ); |
|
1251 ?> |
1258 ?> |
1252 <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>"> |
|
1253 <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?> |
|
1254 <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>"><?php _e('Dismiss'); ?></a> |
|
1255 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div> |
|
1256 |
|
1257 <div class="welcome-panel-content"> |
1259 <div class="welcome-panel-content"> |
1258 <h3><?php _e( 'Welcome to your new WordPress site!' ); ?></h3> |
1260 <h3><?php _e( 'Welcome to WordPress!' ); ?></h3> |
1259 <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’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> |
1261 <p class="about-description"><?php _e( 'We’ve assembled some links to get you started:' ); ?></p> |
1260 <div class="welcome-panel-column-container"> |
1262 <div class="welcome-panel-column-container"> |
1261 <div class="welcome-panel-column"> |
1263 <div class="welcome-panel-column"> |
1262 <h4><span class="icon16 icon-settings"></span> <?php _e( 'Basic Settings' ); ?></h4> |
1264 <h4><?php _e( 'Get Started' ); ?></h4> |
1263 <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> |
1265 <a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a> |
1264 <ul> |
1266 <a class="button button-primary button-hero hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a> |
1265 <li><?php echo sprintf( __( '<a href="%s">Choose your privacy setting</a>' ), esc_url( admin_url('options-privacy.php') ) ); ?></li> |
1267 <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?> |
1266 <li><?php echo sprintf( __( '<a href="%s">Select your tagline and time zone</a>' ), esc_url( admin_url('options-general.php') ) ); ?></li> |
1268 <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p> |
1267 <li><?php echo sprintf( __( '<a href="%s">Turn comments on or off</a>' ), esc_url( admin_url('options-discussion.php') ) ); ?></li> |
1269 <?php endif; ?> |
1268 <li><?php echo sprintf( __( '<a href="%s">Fill in your profile</a>' ), esc_url( admin_url('profile.php') ) ); ?></li> |
|
1269 </ul> |
|
1270 </div> |
1270 </div> |
1271 <div class="welcome-panel-column"> |
1271 <div class="welcome-panel-column"> |
1272 <h4><span class="icon16 icon-page"></span> <?php _e( 'Add Real Content' ); ?></h4> |
1272 <h4><?php _e( 'Next Steps' ); ?></h4> |
1273 <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> |
|
1274 <ul> |
1273 <ul> |
1275 <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> |
1274 <?php if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_for_posts' ) ) : ?> |
1276 <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> |
1275 <li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li> |
1277 <li><?php echo sprintf( __( '<a href="%s">Create an About Me page</a>' ), esc_url( admin_url('edit.php?post_type=page') ) ); ?></li> |
1276 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li> |
1278 <li><?php echo sprintf( __( '<a href="%s">Write your first post</a>' ), esc_url( admin_url('post-new.php') ) ); ?></li> |
1277 <?php elseif ( 'page' == get_option( 'show_on_front' ) ) : ?> |
|
1278 <li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li> |
|
1279 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li> |
|
1280 <li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Add a blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li> |
|
1281 <?php else : ?> |
|
1282 <li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Write your first blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li> |
|
1283 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add an About page' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li> |
|
1284 <?php endif; ?> |
|
1285 <li><?php printf( '<a href="%s" class="welcome-icon welcome-view-site">' . __( 'View your site' ) . '</a>', home_url( '/' ) ); ?></li> |
1279 </ul> |
1286 </ul> |
1280 </div> |
1287 </div> |
1281 <div class="welcome-panel-column welcome-panel-last"> |
1288 <div class="welcome-panel-column welcome-panel-last"> |
1282 <h4><span class="icon16 icon-appearance"></span> <?php _e( 'Customize Your Site' ); ?></h4> |
1289 <h4><?php _e( 'More Actions' ); ?></h4> |
1283 <?php |
1290 <ul> |
1284 $theme = wp_get_theme(); |
1291 <li><?php printf( '<div class="welcome-icon welcome-widgets-menus">' . __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ) . '</div>', admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) ); ?></li> |
1285 if ( $theme->errors() ) : |
1292 <li><?php printf( '<a href="%s" class="welcome-icon welcome-comments">' . __( 'Turn comments on or off' ) . '</a>', admin_url( 'options-discussion.php' ) ); ?></li> |
1286 echo '<p>'; |
1293 <li><?php printf( '<a href="%s" class="welcome-icon welcome-learn-more">' . __( 'Learn more about getting started' ) . '</a>', __( 'http://codex.wordpress.org/First_Steps_With_WordPress' ) ); ?></li> |
1287 printf( __( '<a href="%s">Install a theme</a> to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) ); |
1294 </ul> |
1288 echo '</p>'; |
|
1289 else: |
|
1290 $customize_links = array(); |
|
1291 if ( 'twentyeleven' == $theme->get_stylesheet() ) |
|
1292 $customize_links[] = sprintf( __( '<a href="%s">Choose light or dark</a>' ), esc_url( admin_url( 'themes.php?page=theme_options' ) ) ); |
|
1293 |
|
1294 if ( current_theme_supports( 'custom-background' ) ) |
|
1295 $customize_links[] = sprintf( __( '<a href="%s">Set a background color</a>' ), esc_url( admin_url( 'themes.php?page=custom-background' ) ) ); |
|
1296 |
|
1297 if ( current_theme_supports( 'custom-header' ) ) |
|
1298 $customize_links[] = sprintf( __( '<a href="%s">Select a new header image</a>' ), esc_url( admin_url( 'themes.php?page=custom-header' ) ) ); |
|
1299 |
|
1300 if ( current_theme_supports( 'widgets' ) ) |
|
1301 $customize_links[] = sprintf( __( '<a href="%s">Add some widgets</a>' ), esc_url( admin_url( 'widgets.php' ) ) ); |
|
1302 |
|
1303 if ( ! empty( $customize_links ) ) { |
|
1304 echo '<p>'; |
|
1305 printf( __( 'Use the current theme — %1$s — or <a href="%2$s">choose a new one</a>. If you stick with %1$s, here are a few ways to make your site look unique.' ), $theme->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); |
|
1306 echo '</p>'; |
|
1307 ?> |
|
1308 <ul> |
|
1309 <?php foreach ( $customize_links as $customize_link ) : ?> |
|
1310 <li><?php echo $customize_link ?></li> |
|
1311 <?php endforeach; ?> |
|
1312 </ul> |
|
1313 <?php |
|
1314 } else { |
|
1315 echo '<p>'; |
|
1316 printf( __( 'Use the current theme — %1$s — or <a href="%2$s">choose a new one</a>.' ), $theme->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); |
|
1317 echo '</p>'; |
|
1318 } |
|
1319 endif; ?> |
|
1320 </div> |
1295 </div> |
1321 </div> |
|
1322 <p class="welcome-panel-dismiss"><?php printf( __( 'Already know what you’re doing? <a href="%s">Dismiss this message</a>.' ), esc_url( admin_url( '?welcome=0' ) ) ); ?></p> |
|
1323 </div> |
1296 </div> |
1324 </div> |
1297 </div> |
1325 <?php |
1298 <?php |
1326 } |
1299 } |