Making WordPress.org


Ignore:
Timestamp:
04/06/2021 02:28:06 AM (5 years ago)
Author:
dd32
Message:

Theme Preview: Starter Content: Disable starter content for all of SKT Themes themes, as these are not compatible with the feature.

File:
1 edited

Legend:

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

    r10648 r10870  
    8181        // If a theme causes problems, this can block loading.
    8282        $blocked_themes = array(
    83             'posterity', // +child themes - Customizer polyfill causes E_ERROR: Cannot redeclare posterity_get_user_css()
    8483            'finedine',  // Customizer polyfill causes E_ERROR: Uncaught Error: Call to a member function add_partial() on bool
    8584        );
     85
     86        // If a theme authors themes often cause a problem, just block them all.
     87        $blocked_authors = array(
     88            'sktthemes',
     89                // 'posterity', // +child themes - Customizer polyfill causes E_ERROR: Cannot redeclare posterity_get_user_css()
     90                // 'barter', // E_COMPILE_ERROR: Cannot redeclare barter_get_user_css()
     91        );
     92
     93        $theme_author = wp_get_theme()['Author'];
     94        foreach ( $blocked_authors as $author ) {
     95            if ( false !== stripos( $theme_author, str_replace( ' ', '', $author ) ) ) {
     96                $blocked_themes[] = get_stylesheet();
     97            }
     98        }
    8699
    87100        if (
Note: See TracChangeset for help on using the changeset viewer.