Making WordPress.org

Changeset 10648


Ignore:
Timestamp:
02/08/2021 06:27:17 AM (5 years ago)
Author:
dd32
Message:

Theme Previewer: Posterity, and it's child themes, cause fatals when this plugin is in use, disable better previews for them.

See https://themes.trac.wordpress.org/ticket/92922#comment:8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wp-themes.com/public_html/wp-content/mu-plugins/pub/starter-content.php

    r10538 r10648  
    8181        // If a theme causes problems, this can block loading.
    8282        $blocked_themes = array(
    83             'posterity', // Customizer polyfill causes E_ERROR: Cannot redeclare posterity_get_user_css()
     83            'posterity', // +child themes - Customizer polyfill causes E_ERROR: Cannot redeclare posterity_get_user_css()
    8484            'finedine',  // Customizer polyfill causes E_ERROR: Uncaught Error: Call to a member function add_partial() on bool
    8585        );
    8686
    87         return (
    88             ! $blocked_themes ||
    89             ! in_array( get_stylesheet(), $blocked_themes )
    90         );
     87        if (
     88            in_array( get_stylesheet(), $blocked_themes ) ||
     89            in_array( get_template(), $blocked_themes )
     90        ) {
     91            return false;
     92        }
     93
     94        return true;
    9195    }
    9296
Note: See TracChangeset for help on using the changeset viewer.