Themes: Link to an updated documentation on child themes on developer.wordpress.org, instead of Codex.

Props man4toman.
See #46450.
Built from https://develop.svn.wordpress.org/trunk@45080


git-svn-id: http://core.svn.wordpress.org/trunk@44889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-04-01 11:55:52 +00:00
parent 5cca79f806
commit de95fac19c
5 changed files with 33 additions and 21 deletions

View File

@ -241,8 +241,9 @@ class WP_Themes_List_Table extends WP_List_Table {
<?php <?php
if ( $theme->parent() ) { if ( $theme->parent() ) {
printf( printf(
/* translators: %s: link to documentation on child themes */
' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>', ' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>',
__( 'https://codex.wordpress.org/Child_Themes' ), __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ),
$theme->parent()->display( 'Name' ) $theme->parent()->display( 'Name' )
); );
} }

View File

@ -26,20 +26,23 @@ get_current_screen()->add_help_tab(
'id' => 'overview', 'id' => 'overview',
'title' => __( 'Overview' ), 'title' => __( 'Overview' ),
'content' => 'content' =>
'<p>' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '</p>' . '<p>' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '</p>' .
'<p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme&#8217;s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>' . '<p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme&#8217;s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>' .
'<p>' . __( 'For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '</p>' . '<p>' . __( 'For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '</p>' .
'<p id="editor-keyboard-trap-help-1">' . __( 'When using a keyboard to navigate:' ) . '</p>' . '<p id="editor-keyboard-trap-help-1">' . __( 'When using a keyboard to navigate:' ) . '</p>' .
'<ul>' . '<ul>' .
'<li id="editor-keyboard-trap-help-2">' . __( 'In the editing area, the Tab key enters a tab character.' ) . '</li>' . '<li id="editor-keyboard-trap-help-2">' . __( 'In the editing area, the Tab key enters a tab character.' ) . '</li>' .
'<li id="editor-keyboard-trap-help-3">' . __( 'To move away from this area, press the Esc key followed by the Tab key.' ) . '</li>' . '<li id="editor-keyboard-trap-help-3">' . __( 'To move away from this area, press the Esc key followed by the Tab key.' ) . '</li>' .
'<li id="editor-keyboard-trap-help-4">' . __( 'Screen reader users: when in forms mode, you may need to press the Esc key twice.' ) . '</li>' . '<li id="editor-keyboard-trap-help-4">' . __( 'Screen reader users: when in forms mode, you may need to press the Esc key twice.' ) . '</li>' .
'</ul>' . '</ul>' .
'<p>' . __( 'After typing in your edits, click Update File.' ) . '</p>' . '<p>' . __( 'After typing in your edits, click Update File.' ) . '</p>' .
'<p>' . __( '<strong>Advice:</strong> Think very carefully about your site crashing if you are live-editing the theme currently in use.' ) . '</p>' . '<p>' . __( '<strong>Advice:</strong> Think very carefully about your site crashing if you are live-editing the theme currently in use.' ) . '</p>' .
/* translators: %s: link to codex article about child themes */ '<p>' . sprintf(
'<p>' . sprintf( __( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s">child theme</a> instead.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ) . '</p>' . /* translators: %s: link to documentation on child themes */
( is_network_admin() ? '<p>' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '</p>' : '' ), __( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s">child theme</a> instead.' ),
__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' )
) . '</p>' .
( is_network_admin() ? '<p>' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '</p>' : '' ),
) )
); );
@ -341,9 +344,9 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
<p> <p>
<?php <?php
echo sprintf( echo sprintf(
/* translators: %s: Codex URL */ /* translators: %s: link to documentation on child themes */
__( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme&#8217;s CSS, you might want to try <a href="%s">making a child theme</a>.' ), __( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme&#8217;s CSS, you might want to try <a href="%s">making a child theme</a>.' ),
esc_url( __( 'https://codex.wordpress.org/Child_Themes' ) ) esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) )
); );
?> ?>
</p> </p>

View File

@ -387,7 +387,15 @@ function list_theme_updates() {
?> ?>
<h2><?php _e( 'Themes' ); ?></h2> <h2><?php _e( 'Themes' ); ?></h2>
<p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click &#8220;Update Themes&#8221;.' ); ?></p> <p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click &#8220;Update Themes&#8221;.' ); ?></p>
<p><?php printf( __( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ); ?></p> <p>
<?php
printf(
/* translators: %s: link to documentation on child themes */
__( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ),
__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' )
);
?>
</p>
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade"> <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade">
<?php wp_nonce_field( 'upgrade-core' ); ?> <?php wp_nonce_field( 'upgrade-core' ); ?>
<p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p> <p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p>

View File

@ -289,10 +289,10 @@ final class WP_Theme implements ArrayAccess {
$this->template = $this->stylesheet; $this->template = $this->stylesheet;
if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) { if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) {
$error_message = sprintf( $error_message = sprintf(
/* translators: 1: index.php, 2: Codex URL, 3: style.css */ /* translators: 1: index.php, 2: link to documentation, 3: style.css */
__( 'Template is missing. Standalone themes need to have a %1$s template file. <a href="%2$s">Child themes</a> need to have a Template header in the %3$s stylesheet.' ), __( 'Template is missing. Standalone themes need to have a %1$s template file. <a href="%2$s">Child themes</a> need to have a Template header in the %3$s stylesheet.' ),
'<code>index.php</code>', '<code>index.php</code>',
__( 'https://codex.wordpress.org/Child_Themes' ), __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ),
'<code>style.css</code>' '<code>style.css</code>'
); );
$this->errors = new WP_Error( 'theme_no_index', $error_message ); $this->errors = new WP_Error( 'theme_no_index', $error_message );

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.2-beta1-45079'; $wp_version = '5.2-beta1-45080';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.