Themes: Prevent installation of themes that require a higher version of PHP or WordPress.

Props afragen.
Fixes #49653. See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@47819 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-05-18 16:01:38 +00:00
parent 581bc56b16
commit a60b30444f
4 changed files with 42 additions and 14 deletions

View File

@@ -827,8 +827,13 @@ function customize_themes_print_templates() {
<button class="button button-primary disabled"><?php _e( 'Live Preview' ); ?></button>
<# } #>
<# } else { #>
<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></button>
<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php _e( 'Install &amp; Preview' ); ?></button>
<# if ( data.compatibleWP && data.compatiblePHP ) { #>
<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></button>
<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php _e( 'Install &amp; Preview' ); ?></button>
<# } else { #>
<button type="button" class="button disabled"><?php _ex( 'Cannot Install', 'theme' ); ?></button>
<button type="button" class="button button-primary disabled"><?php _e( 'Install &amp; Preview' ); ?></button>
<# } #>
<# } #>
</div>
</div>