From b9e752770cb5c8c26762e0613b4a1a6995cb5e91 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 9 Jan 2019 00:11:25 +0000 Subject: [PATCH] Admin: Add a "Set up your homepage" link to the Welcome panel. As many WordPress sites use a static homepage rather than a blog, this link gives a natural next step for new sites owners wanting to configure their site in this manner. Props professor44, joyously, nielslange, mukesh27, melchoyce. Fixes #45019. git-svn-id: https://develop.svn.wordpress.org/trunk@44485 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/dashboard.css | 5 +++++ src/wp-admin/includes/dashboard.php | 1 + 2 files changed, 6 insertions(+) diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 19c6bf2266..0fcc52e78c 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -245,6 +245,11 @@ top: -1px; } +.welcome-panel .welcome-setup-home:before { + content: "\f102"; + top: -1px; +} + .welcome-panel .welcome-view-site:before { content: "\f115"; top: -2px; diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 73181282e4..e8a0004617 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1766,6 +1766,7 @@ function wp_welcome_panel() {
  • ' . __( 'Write your first blog post' ) . '', admin_url( 'post-new.php' ) ); ?>
  • ' . __( 'Add an About page' ) . '', admin_url( 'post-new.php?post_type=page' ) ); ?>
  • +
  • ' . __( 'Set up your homepage' ) . '', current_user_can( 'customize' ) ? add_query_arg( 'autofocus[section]', 'static_front_page', admin_url( 'customize.php' ) ) : admin_url( 'options-reading.php' ) ); ?>
  • ' . __( 'View your site' ) . '', home_url( '/' ) ); ?>