Making WordPress.org

Changeset 4590


Ignore:
Timestamp:
12/24/2016 10:13:06 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Base: Update Custom CSS output mode for Jetpack 4.4.2

Jetpack 4.4.2 uses a theme_mod to store the output mode now. This should have been done at the same time as r4577 and r4578, but since it was missed, the Base stylesheets were always being output, leading to layout problems.

See https://wordpress.slack.com/archives/meta-wordcamp/p1482565098000606

Location:
sites/trunk/wordcamp.org/public_html/wp-content/themes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/structure/class-wcb-structure.php

    r3275 r4590  
    11<?php
     2
     3use WordCamp\RemoteCSS;
    24
    35class WCB_Structure extends WCB_Loader {
     
    4143        $grid  = wcb_get_option('grid');
    4244
    43         // Check whethec Custom CSS mode is set to Add or Replace.
    44         if ( class_exists( 'Jetpack_Custom_CSS' ) && method_exists( 'Jetpack_Custom_CSS', 'get_current_revision' ) ) {
    45             $safecss_post = Jetpack_Custom_CSS::get_current_revision();
    46             if ( get_post_meta( $safecss_post['ID'], 'custom_css_add', true ) == 'no' )
    47                 return;
     45        // Don't output CSS if Jetpack Custom CSS/RemoteCSS is set to 'replace' mode
     46        if ( 'replace' === RemoteCSS\get_output_mode() ) {
     47            return;
    4848        }
    4949
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/structure/class-wcb-structure.php

    r3275 r4590  
    11<?php
     2
     3use WordCamp\RemoteCSS;
    24
    35class WCB_Structure extends WCB_Loader {
     
    4143        $grid  = wcb_get_option('grid');
    4244
    43         // Check whethec Custom CSS mode is set to Add or Replace.
    44         if ( class_exists( 'Jetpack_Custom_CSS' ) && method_exists( 'Jetpack_Custom_CSS', 'get_current_revision' ) ) {
    45             $safecss_post = Jetpack_Custom_CSS::get_current_revision();
    46             if ( get_post_meta( $safecss_post['ID'], 'custom_css_add', true ) == 'no' )
    47                 return;
     45        // Don't output CSS if Jetpack Custom CSS/RemoteCSS is set to 'replace' mode
     46        if ( 'replace' === RemoteCSS\get_output_mode() ) {
     47            return;
    4848        }
    4949
Note: See TracChangeset for help on using the changeset viewer.