Themes: Display a message in Details & Preview modal on Add Themes screen if a theme requires a higher version of PHP or WordPress.
Props afragen, desrosj, SergeyBiryukov. See #48491. git-svn-id: https://develop.svn.wordpress.org/trunk@48637 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b0b11acc6
commit
332ce58d5c
@ -398,12 +398,69 @@ if ( $tab ) {
|
||||
<# } else { #>
|
||||
<span class="no-rating"><?php _e( 'This theme has not been rated yet.' ); ?></span>
|
||||
<# } #>
|
||||
|
||||
<div class="theme-version">
|
||||
<?php
|
||||
/* translators: %s: Theme version. */
|
||||
printf( __( 'Version: %s' ), '{{ data.version }}' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<# if ( ! data.compatible_wp || ! data.compatible_php ) { #>
|
||||
<div class="notice notice-error notice-alt notice-large"><p>
|
||||
<# if ( ! data.compatible_wp && ! data.compatible_php ) { #>
|
||||
<?php
|
||||
_e( 'This theme doesn’t work with your versions of WordPress and PHP.' );
|
||||
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
|
||||
printf(
|
||||
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
|
||||
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
|
||||
self_admin_url( 'update-core.php' ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
||||
} elseif ( current_user_can( 'update_core' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to WordPress Updates screen. */
|
||||
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
||||
self_admin_url( 'update-core.php' )
|
||||
);
|
||||
} elseif ( current_user_can( 'update_php' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to Update PHP page. */
|
||||
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
||||
}
|
||||
?>
|
||||
<# } else if ( ! data.compatible_wp ) { #>
|
||||
<?php
|
||||
_e( 'This theme doesn’t work with your version of WordPress.' );
|
||||
if ( current_user_can( 'update_core' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to WordPress Updates screen. */
|
||||
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
||||
self_admin_url( 'update-core.php' )
|
||||
);
|
||||
}
|
||||
?>
|
||||
<# } else if ( ! data.compatible_php ) { #>
|
||||
<?php
|
||||
_e( 'This theme doesn’t work with your version of PHP.' );
|
||||
if ( current_user_can( 'update_php' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to Update PHP page. */
|
||||
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
||||
}
|
||||
?>
|
||||
<# } #>
|
||||
</p></div>
|
||||
<# } #>
|
||||
|
||||
<div class="theme-description">{{{ data.description }}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user