diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-includes/customize/class-wp-customize-theme-control.php --- a/wp/wp-includes/customize/class-wp-customize-theme-control.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-includes/customize/class-wp-customize-theme-control.php Tue Dec 15 13:49:49 2020 +0100 @@ -57,13 +57,13 @@ * @since 4.2.0 */ public function content_template() { - /* translators: %s: theme name */ + /* translators: %s: Theme name. */ $details_label = sprintf( __( 'Details for theme: %s' ), '{{ data.theme.name }}' ); - /* translators: %s: theme name */ + /* translators: %s: Theme name. */ $customize_label = sprintf( __( 'Customize theme: %s' ), '{{ data.theme.name }}' ); - /* translators: %s: theme name */ + /* translators: %s: Theme name. */ $preview_label = sprintf( __( 'Live preview theme: %s' ), '{{ data.theme.name }}' ); - /* translators: %s: theme name */ + /* translators: %s: Theme name. */ $install_label = sprintf( __( 'Install and preview theme: %s' ), '{{ data.theme.name }}' ); ?> <# if ( data.theme.active ) { #> @@ -84,36 +84,157 @@
<# if ( 'installed' === data.theme.type && data.theme.hasUpdate ) { #> -
-

+ <# if ( data.theme.updateResponse.compatibleWP && data.theme.updateResponse.compatiblePHP ) { #> +

+

+ ' . __( 'Update now' ) . '' + ); + } + ?> +

+
+ <# } else { #> +
+

+ <# if ( ! data.theme.updateResponse.compatibleWP && ! data.theme.updateResponse.compatiblePHP ) { #> + Please update WordPress, and then learn more about updating PHP.' ), + self_admin_url( 'update-core.php' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

', '' ); + } elseif ( current_user_can( 'update_core' ) ) { + printf( + /* translators: %s: URL to WordPress Updates screen. */ + ' ' . __( 'Please update WordPress.' ), + self_admin_url( 'update-core.php' ) + ); + } elseif ( current_user_can( 'update_php' ) ) { + printf( + /* translators: %s: URL to Update PHP page. */ + ' ' . __( 'Learn more about updating PHP.' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

', '' ); + } + ?> + <# } else if ( ! data.theme.updateResponse.compatibleWP ) { #> + Please update WordPress.' ), + self_admin_url( 'update-core.php' ) + ); + } + ?> + <# } else if ( ! data.theme.updateResponse.compatiblePHP ) { #> + Learn more about updating PHP.' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

', '' ); + } + ?> + <# } #> +

+
+ <# } #> + <# } #> + + <# if ( ! data.theme.compatibleWP || ! data.theme.compatiblePHP ) { #> +

+ <# if ( ! data.theme.compatibleWP && ! data.theme.compatiblePHP ) { #> Please update WordPress, and then learn more about updating PHP.' ), + self_admin_url( 'update-core.php' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

', '' ); + } elseif ( current_user_can( 'update_core' ) ) { printf( - /* translators: %s: "Update now" button */ - __( 'New version available. %s' ), - '' + /* translators: %s: URL to WordPress Updates screen. */ + ' ' . __( 'Please update WordPress.' ), + self_admin_url( 'update-core.php' ) + ); + } elseif ( current_user_can( 'update_php' ) ) { + printf( + /* translators: %s: URL to Update PHP page. */ + ' ' . __( 'Learn more about updating PHP.' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

', '' ); + } + ?> + <# } else if ( ! data.theme.compatibleWP ) { #> + Please update WordPress.' ), + self_admin_url( 'update-core.php' ) ); } ?> -

-
+ <# } else if ( ! data.theme.compatiblePHP ) { #> + Learn more about updating PHP.' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

', '' ); + } + ?> + <# } #> +

<# } #> <# if ( data.theme.active ) { #>

- Previewing: %s' ), '{{ data.theme.name }}' ); - ?> + {{ data.theme.name }}

@@ -124,7 +245,11 @@

{{ data.theme.name }}

- + <# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #> + + <# } else { #> + + <# } #>

@@ -132,7 +257,11 @@

{{ data.theme.name }}

- + <# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #> + + <# } else { #> + + <# } #>
<# } #>