Making WordPress.org


Ignore:
Timestamp:
12/23/2016 05:27:38 PM (8 years ago)
Author:
iandunn
Message:

WordCamp Site Cloner: Refactor for compatibility with WP 4.7 and Jetpack 4.2.2

WordPress 4.7 added a Customizer feature that allows editing CSS. Jetpack 4.2.2 replaced the Custom CSS module with an entirely new one that is compatible with the Customizer feature, but broke backwards-compatibility with the Site Cloner and Remote CSS plugins.

This commit refactors the Site Cloner to restore compatibility with Jetpack, and add support for the new Core feature.

https://make.wordpress.org/core/2016/10/11/feature-proposal-better-theme-customizations-via-custom-css-with-live-previews/
https://make.wordpress.org/core/2016/11/26/extending-the-custom-css-editor/
https://github.com/Automattic/jetpack/issues/5539
https://github.com/Automattic/jetpack/pull/5804
https://core.trac.wordpress.org/ticket/35395
https://core.trac.wordpress.org/ticket/38672
https://core.trac.wordpress.org/ticket/39270

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/wordcamp-site-cloner.php

    r4285 r4577  
    270270        switch_to_blog( $site_id );
    271271
     272        $theme_mods = get_option( 'theme_mods_' . get_stylesheet() );
     273
    272274        /*
    273275         * Sites with Coming Soon enabled probably don't have a finished design yet, so there's no point in
     
    275277         */
    276278        if ( ! coming_soon_plugin_enabled() ) {
    277             $preprocessor = \Jetpack_Custom_CSS::get_preprocessor();
    278             $preprocessor = isset( $preprocessor[ 'name' ] ) ? $preprocessor[ 'name' ] : 'none';
     279            $preprocessor = isset( $theme_mods['jetpack_custom_css']['preprocessor'] ) ? $theme_mods['jetpack_custom_css']['preprocessor'] : 'none';
    279280
    280281            $sites[ $site_id ] = array(
Note: See TracChangeset for help on using the changeset viewer.