[wp-trac] [WordPress Trac] #48491: [Theme compatibility] WP/PHP compatibility tests for single site theme updates/activation

WordPress Trac noreply at wordpress.org
Sun Feb 9 21:23:13 UTC 2020


#48491: [Theme compatibility] WP/PHP compatibility tests for single site theme
updates/activation
-------------------------------------------------+-------------------------
 Reporter:  afragen                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.4
Component:  Site Health                          |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing dev-         |     Focuses:
  feedback early servehappy needs-copy-review    |  administration
  has-screenshots                                |
-------------------------------------------------+-------------------------

Comment (by TimothyBlynJacobs):

 For the customizer stuff, it looks like this data can be added in the
 `wp_ajax_query_themes()` PHP function. And adding a modification like this
 in the `tmpl-theme-preview` template in `wp-admin/theme-install.php`.


 {{{
 <# if ( data.installed ) { #>
     <a class="button button-primary activate" href="{{ data.activate_url
 }}"><?php _e( 'Activate' ); ?></a>
 <# } else if ( data.compatible_php ) { #>
     <a href="{{ data.install_url }}" class="button button-primary theme-
 install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e(
 'Install' ); ?></a>
 <# } else { #>
     <a href="{{ data.install_url }}" class="button button-primary theme-
 install disabled" data-name="{{ data.name }}" data-slug="{{ data.id
 }}"><?php _e( 'Install' ); ?></a>
 <# } #>
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48491#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list