1459 <li class="event-none"> |
1460 <li class="event-none"> |
1460 <# if ( data.location.description ) { #> |
1461 <# if ( data.location.description ) { #> |
1461 <?php |
1462 <?php |
1462 printf( |
1463 printf( |
1463 /* translators: 1: The city the user searched for, 2: Meetup organization documentation URL. */ |
1464 /* translators: 1: The city the user searched for, 2: Meetup organization documentation URL. */ |
1464 __( 'There aren’t any events scheduled near %1$s at the moment. Would you like to <a href="%2$s">organize a WordPress event</a>?' ), |
1465 __( 'There are no events scheduled near %1$s at the moment. Would you like to <a href="%2$s">organize a WordPress event</a>?' ), |
1465 '{{ data.location.description }}', |
1466 '{{ data.location.description }}', |
1466 __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' ) |
1467 __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' ) |
1467 ); |
1468 ); |
1468 ?> |
1469 ?> |
1469 |
1470 |
1470 <# } else { #> |
1471 <# } else { #> |
1471 <?php |
1472 <?php |
1472 printf( |
1473 printf( |
1473 /* translators: %s: Meetup organization documentation URL. */ |
1474 /* translators: %s: Meetup organization documentation URL. */ |
1474 __( 'There aren’t any events scheduled near you at the moment. Would you like to <a href="%s">organize a WordPress event</a>?' ), |
1475 __( 'There are no events scheduled near you at the moment. Would you like to <a href="%s">organize a WordPress event</a>?' ), |
1475 __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' ) |
1476 __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' ) |
1476 ); |
1477 ); |
1477 ?> |
1478 ?> |
1478 <# } #> |
1479 <# } #> |
1479 </li> |
1480 </li> |
1983 |
1985 |
1984 /** |
1986 /** |
1985 * Displays a welcome panel to introduce users to WordPress. |
1987 * Displays a welcome panel to introduce users to WordPress. |
1986 * |
1988 * |
1987 * @since 3.3.0 |
1989 * @since 3.3.0 |
|
1990 * @since 5.9.0 Send users to the Site Editor if the active theme is block-based. |
1988 */ |
1991 */ |
1989 function wp_welcome_panel() { |
1992 function wp_welcome_panel() { |
|
1993 list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); |
|
1994 $can_customize = current_user_can( 'customize' ); |
|
1995 $is_block_theme = wp_is_block_theme(); |
1990 ?> |
1996 ?> |
1991 <div class="welcome-panel-content"> |
1997 <div class="welcome-panel-content"> |
1992 <h2><?php _e( 'Welcome to WordPress!' ); ?></h2> |
1998 <div class="welcome-panel-header"> |
1993 <p class="about-description"><?php _e( 'We’ve assembled some links to get you started:' ); ?></p> |
1999 <div class="welcome-panel-header-image"> |
|
2000 <?php echo file_get_contents( dirname( __DIR__ ) . '/images/about-header-about.svg' ); ?> |
|
2001 </div> |
|
2002 <h2><?php _e( 'Welcome to WordPress!' ); ?></h2> |
|
2003 <p> |
|
2004 <a href="<?php echo esc_url( admin_url( 'about.php' ) ); ?>"> |
|
2005 <?php |
|
2006 /* translators: %s: Current WordPress version. */ |
|
2007 printf( __( 'Learn more about the %s version.' ), $display_version ); |
|
2008 ?> |
|
2009 </a> |
|
2010 </p> |
|
2011 </div> |
1994 <div class="welcome-panel-column-container"> |
2012 <div class="welcome-panel-column-container"> |
1995 <div class="welcome-panel-column"> |
2013 <div class="welcome-panel-column"> |
1996 <?php if ( current_user_can( 'customize' ) ) : ?> |
2014 <div class="welcome-panel-icon-pages"></div> |
1997 <h3><?php _e( 'Get Started' ); ?></h3> |
2015 <div class="welcome-panel-column-content"> |
1998 <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> |
2016 <h3><?php _e( 'Author rich content with blocks and patterns' ); ?></h3> |
1999 <?php endif; ?> |
2017 <p><?php _e( 'Block patterns are pre-configured block layouts. Use them to get inspired or create new pages in a flash.' ); ?></p> |
2000 <a class="button button-primary button-hero hide-if-customize" href="<?php echo esc_url( admin_url( 'themes.php' ) ); ?>"><?php _e( 'Customize Your Site' ); ?></a> |
2018 <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=page' ) ); ?>"><?php _e( 'Add a new page' ); ?></a> |
2001 <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?> |
2019 </div> |
2002 <?php $themes_link = current_user_can( 'customize' ) ? add_query_arg( 'autofocus[panel]', 'themes', admin_url( 'customize.php' ) ) : admin_url( 'themes.php' ); ?> |
2020 </div> |
2003 <p class="hide-if-no-customize"> |
2021 <div class="welcome-panel-column"> |
2004 <?php |
2022 <div class="welcome-panel-icon-layout"></div> |
2005 /* translators: %s: URL to Themes panel in Customizer or Themes screen. */ |
2023 <div class="welcome-panel-column-content"> |
2006 printf( __( 'or, <a href="%s">change your theme completely</a>' ), $themes_link ); |
2024 <?php if ( $is_block_theme ) : ?> |
2007 ?> |
2025 <h3><?php _e( 'Customize your entire site with block themes' ); ?></h3> |
2008 </p> |
2026 <p><?php _e( 'Design everything on your site — from the header down to the footer, all using blocks and patterns.' ); ?></p> |
2009 <?php endif; ?> |
2027 <a href="<?php echo esc_url( admin_url( 'site-editor.php' ) ); ?>"><?php _e( 'Open site editor' ); ?></a> |
2010 </div> |
2028 <?php else : ?> |
2011 <div class="welcome-panel-column"> |
2029 <h3><?php _e( 'Start Customizing' ); ?></h3> |
2012 <h3><?php _e( 'Next Steps' ); ?></h3> |
2030 <p><?php _e( 'Configure your site’s logo, header, menus, and more in the Customizer.' ); ?></p> |
2013 <ul> |
2031 <?php if ( $can_customize ) : ?> |
2014 <?php if ( 'page' === get_option( 'show_on_front' ) && ! get_option( 'page_for_posts' ) ) : ?> |
2032 <a class="load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Open the Customizer' ); ?></a> |
2015 <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> |
2033 <?php endif; ?> |
2016 <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> |
2034 <?php endif; ?> |
2017 <?php elseif ( 'page' === get_option( 'show_on_front' ) ) : ?> |
2035 </div> |
2018 <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> |
2036 </div> |
2019 <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> |
2037 <div class="welcome-panel-column"> |
2020 <li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Add a blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li> |
2038 <div class="welcome-panel-icon-styles"></div> |
2021 <?php else : ?> |
2039 <div class="welcome-panel-column-content"> |
2022 <li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Write your first blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li> |
2040 <?php if ( $is_block_theme ) : ?> |
2023 <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> |
2041 <h3><?php _e( 'Switch up your site’s look & feel with Styles' ); ?></h3> |
2024 <li><?php printf( '<a href="%s" class="welcome-icon welcome-setup-home">' . __( 'Set up your homepage' ) . '</a>', current_user_can( 'customize' ) ? add_query_arg( 'autofocus[section]', 'static_front_page', admin_url( 'customize.php' ) ) : admin_url( 'options-reading.php' ) ); ?></li> |
2042 <p><?php _e( 'Tweak your site, or give it a whole new look! Get creative — how about a new color palette or font?' ); ?></p> |
2025 <?php endif; ?> |
2043 <a href="<?php echo esc_url( admin_url( 'site-editor.php?styles=open' ) ); ?>"><?php _e( 'Edit styles' ); ?></a> |
2026 <li><?php printf( '<a href="%s" class="welcome-icon welcome-view-site">' . __( 'View your site' ) . '</a>', home_url( '/' ) ); ?></li> |
2044 <?php else : ?> |
2027 </ul> |
2045 <h3><?php _e( 'Discover a new way to build your site.' ); ?></h3> |
2028 </div> |
2046 <p><?php _e( 'There is a new kind of WordPress theme, called a block theme, that lets you build the site you’ve always wanted — with blocks and styles.' ); ?></p> |
2029 <div class="welcome-panel-column welcome-panel-last"> |
2047 <a href="<?php echo esc_url( __( 'https://wordpress.org/support/article/block-themes/' ) ); ?>"><?php _e( 'Learn about block themes' ); ?></a> |
2030 <h3><?php _e( 'More Actions' ); ?></h3> |
2048 <?php endif; ?> |
2031 <ul> |
2049 </div> |
2032 <?php if ( current_theme_supports( 'widgets' ) ) : ?> |
2050 </div> |
2033 <li><?php printf( '<a href="%s" class="welcome-icon welcome-widgets">' . __( 'Manage widgets' ) . '</a>', admin_url( 'widgets.php' ) ); ?></li> |
|
2034 <?php endif; ?> |
|
2035 <?php if ( current_theme_supports( 'menus' ) ) : ?> |
|
2036 <li><?php printf( '<a href="%s" class="welcome-icon welcome-menus">' . __( 'Manage menus' ) . '</a>', admin_url( 'nav-menus.php' ) ); ?></li> |
|
2037 <?php endif; ?> |
|
2038 <?php if ( current_user_can( 'manage_options' ) ) : ?> |
|
2039 <li><?php printf( '<a href="%s" class="welcome-icon welcome-comments">' . __( 'Turn comments on or off' ) . '</a>', admin_url( 'options-discussion.php' ) ); ?></li> |
|
2040 <?php endif; ?> |
|
2041 <li><?php printf( '<a href="%s" class="welcome-icon welcome-learn-more">' . __( 'Learn more about getting started' ) . '</a>', __( 'https://wordpress.org/support/article/first-steps-with-wordpress/' ) ); ?></li> |
|
2042 </ul> |
|
2043 </div> |
|
2044 </div> |
2051 </div> |
2045 </div> |
2052 </div> |
2046 <?php |
2053 <?php |
2047 } |
2054 } |