From de95fac19c0dd52bebdcdd59326fcbfd6d19126c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 1 Apr 2019 11:55:52 +0000 Subject: [PATCH] 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 --- .../includes/class-wp-themes-list-table.php | 3 +- wp-admin/theme-editor.php | 35 ++++++++++--------- wp-admin/update-core.php | 10 +++++- wp-includes/class-wp-theme.php | 4 +-- wp-includes/version.php | 2 +- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index 290b7cbc59..d040b7d20d 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -241,8 +241,9 @@ class WP_Themes_List_Table extends WP_List_Table { parent() ) { printf( + /* translators: %s: link to documentation on child themes */ '

' . __( 'This child theme requires its parent theme, %2$s.' ) . '

', - __( 'https://codex.wordpress.org/Child_Themes' ), + __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), $theme->parent()->display( 'Name' ) ); } diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index bf3dcd0677..844b27588d 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -26,20 +26,23 @@ get_current_screen()->add_help_tab( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => - '

' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '

' . - '

' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme’s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '

' . - '

' . __( '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.' ) . '

' . - '

' . __( 'When using a keyboard to navigate:' ) . '

' . - '' . - '

' . __( 'After typing in your edits, click Update File.' ) . '

' . - '

' . __( 'Advice: Think very carefully about your site crashing if you are live-editing the theme currently in use.' ) . '

' . - /* translators: %s: link to codex article about child themes */ - '

' . sprintf( __( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ) . '

' . - ( is_network_admin() ? '

' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '

' : '' ), + '

' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '

' . + '

' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme’s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '

' . + '

' . __( '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.' ) . '

' . + '

' . __( 'When using a keyboard to navigate:' ) . '

' . + '' . + '

' . __( 'After typing in your edits, click Update File.' ) . '

' . + '

' . __( 'Advice: Think very carefully about your site crashing if you are live-editing the theme currently in use.' ) . '

' . + '

' . sprintf( + /* translators: %s: link to documentation on child themes */ + __( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.' ), + __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) + ) . '

' . + ( is_network_admin() ? '

' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '

' : '' ), ) ); @@ -341,9 +344,9 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :

making a child theme.' ), - esc_url( __( 'https://codex.wordpress.org/Child_Themes' ) ) + esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) ) ); ?>

diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 7239243333..f5d9825299 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -387,7 +387,15 @@ function list_theme_updates() { ?>

-

Please Note: Any customizations you have made to theme files will be lost. Please consider using child themes for modifications.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ); ?>

+

+ Please Note: Any customizations you have made to theme files will be lost. Please consider using child themes for modifications.' ), + __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) + ); + ?> +

diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 0bdd6a43e3..b76f873b0c 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -289,10 +289,10 @@ final class WP_Theme implements ArrayAccess { $this->template = $this->stylesheet; if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) { $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. Child themes need to have a Template header in the %3$s stylesheet.' ), 'index.php', - __( 'https://codex.wordpress.org/Child_Themes' ), + __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), 'style.css' ); $this->errors = new WP_Error( 'theme_no_index', $error_message ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 4499ccabb3..4c076217b9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @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.