wp/wp-admin/index.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    27 
    27 
    28 if ( wp_is_mobile() ) {
    28 if ( wp_is_mobile() ) {
    29 	wp_enqueue_script( 'jquery-touch-punch' );
    29 	wp_enqueue_script( 'jquery-touch-punch' );
    30 }
    30 }
    31 
    31 
       
    32 // Used in the HTML title tag.
    32 $title       = __( 'Dashboard' );
    33 $title       = __( 'Dashboard' );
    33 $parent_file = 'index.php';
    34 $parent_file = 'index.php';
    34 
    35 
    35 $help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab above the screen title.' ) . '</p>';
    36 $help  = '<p>' . __( 'Welcome to your WordPress Dashboard!' ) . '</p>';
       
    37 $help .= '<p>' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the &#8220;Help&#8221; tab above the screen title.' ) . '</p>';
    36 
    38 
    37 $screen = get_current_screen();
    39 $screen = get_current_screen();
    38 
    40 
    39 $screen->add_help_tab(
    41 $screen->add_help_tab(
    40 	array(
    42 	array(
   104 	)
   106 	)
   105 );
   107 );
   106 
   108 
   107 unset( $help );
   109 unset( $help );
   108 
   110 
       
   111 $wp_version = get_bloginfo( 'version', 'display' );
       
   112 /* translators: %s: WordPress version. */
       
   113 $wp_version_text = sprintf( __( 'Version %s' ), $wp_version );
       
   114 $is_dev_version  = preg_match( '/alpha|beta|RC/', $wp_version );
       
   115 
       
   116 if ( ! $is_dev_version ) {
       
   117 	$version_url = sprintf(
       
   118 		/* translators: %s: WordPress version. */
       
   119 		esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
       
   120 		sanitize_title( $wp_version )
       
   121 	);
       
   122 
       
   123 	$wp_version_text = sprintf(
       
   124 		'<a href="%1$s">%2$s</a>',
       
   125 		$version_url,
       
   126 		$wp_version_text
       
   127 	);
       
   128 }
       
   129 
   109 $screen->set_help_sidebar(
   130 $screen->set_help_sidebar(
   110 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
   131 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
   111 	'<p>' . __( '<a href="https://wordpress.org/support/article/dashboard-screen/">Documentation on Dashboard</a>' ) . '</p>' .
   132 	'<p>' . __( '<a href="https://wordpress.org/support/article/dashboard-screen/">Documentation on Dashboard</a>' ) . '</p>' .
   112 	'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
   133 	'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' .
       
   134 	'<p>' . $wp_version_text . '</p>'
   113 );
   135 );
   114 
   136 
   115 require_once ABSPATH . 'wp-admin/admin-header.php';
   137 require_once ABSPATH . 'wp-admin/admin-header.php';
   116 ?>
   138 ?>
   117 
   139