From f4cf38c010aded5e89bb5580a56e7753904d0163 Mon Sep 17 00:00:00 2001
From: David Ryan <reachdavidryan@gmail.com>
Date: Sun, 8 Jul 2018 17:18:28 -0700
Subject: [PATCH] safer gutenberg active check

check for gutenberg plugin
---
 wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php
index 922f2e2a1..b957a52e9 100644
--- wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php
+++ wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php
@@ -21,7 +21,10 @@ defined( 'WPINC' ) || die();
  *        for organizers.
  */
 function load() {
-	if ( is_plugin_active( 'gutenberg/gutenberg.php' ) ) {
+	/**
+	 * gutenberg_init() is only available when the Gutenberg plugin is active
+	 */
+	if ( function_exists( '\\gutenberg_init' ) ) {
 		add_filter( 'gutenberg_can_edit_post_type', __NAMESPACE__ . '\disable_gutenberg_on_cpts',           10, 2 );
 		add_filter( 'get_edit_post_link',           __NAMESPACE__ . '\add_classic_param_to_edit_links'            );
 		add_filter( 'page_row_actions',             __NAMESPACE__ . '\add_gutenberg_edit_link',             10, 2 );
-- 
2.14.3 (Apple Git-98)

