diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index adf642867c..5738893a9e 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -811,6 +811,61 @@ function customize_themes_print_templates() {

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

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

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

+ <# } #> +

{{{ data.description }}}

<# if ( data.tags ) { #> diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index fc858b2c87..7dfb092a27 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -692,6 +692,61 @@ function wp_theme_auto_update_setting_template() { ?>

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

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

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

+ <# } #> + <# if ( data.actions.autoupdate ) { #> <# } #> @@ -702,6 +757,7 @@ function wp_theme_auto_update_setting_template() { {{{ data.update }}} <# } #> +

{{{ data.description }}}

<# if ( data.parent ) { #>