Skip to content

Instantly share code, notes, and snippets.

@ambercouch
Created January 18, 2016 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ambercouch/d5e32542c37717bd5cfd to your computer and use it in GitHub Desktop.
Save ambercouch/d5e32542c37717bd5cfd to your computer and use it in GitHub Desktop.
Contact form 7 breaks when using JP Custom CSS. This is the fix.
<?php
class Jetpack {
/**
* Get $content_width, but with a <s>twist</s> filter.
*/
public static function get_content_width() {
$content_width = isset( $GLOBALS['content_width'] ) ? $GLOBALS['content_width'] : false;
return apply_filters( 'jetpack_content_width', $content_width );
}
/**
* Prevents other plugins breaking when testing the jetpack class
*/
public static function __callStatic($name, $arguments) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment