Making WordPress.org

Changeset 2681


Ignore:
Timestamp:
03/03/2016 07:26:13 PM (9 years ago)
Author:
obenland
Message:

W.org Themes: Pages don't need all this themes business.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r2679 r2681  
    120120    }
    121121
    122     if ( empty( $GLOBALS['themes']['themes'] ) ) {
     122    if ( empty( $GLOBALS['themes']['themes'] ) && ! is_singular( 'page' ) ) {
    123123        $classes[] = 'no-results';
    124124    }
     
    160160 */
    161161function wporg_themes_view_templates() {
    162     get_template_part( 'view-templates/theme' );
    163     get_template_part( 'view-templates/theme-preview' );
    164     get_template_part( 'view-templates/theme-single' );
     162    if ( ! is_singular( 'page' ) ) {
     163        get_template_part( 'view-templates/theme' );
     164        get_template_part( 'view-templates/theme-preview' );
     165        get_template_part( 'view-templates/theme-single' );
     166    }
    165167}
    166168add_action( 'wp_footer', 'wporg_themes_view_templates' );
Note: See TracChangeset for help on using the changeset viewer.