From 3b0b11acc632235345fdba8ba6ab73c1dd373cc9 Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
+ <# 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( '
', '' ); + } + ?> + <# } #> +
{{{ data.description }}}
<# if ( data.parent ) { #>