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
|
|
defined( 'WPINC' ) || die(); |
21 | 21 | * for organizers. |
22 | 22 | */ |
23 | 23 | function load() { |
24 | | if ( is_plugin_active( 'gutenberg/gutenberg.php' ) ) { |
| 24 | /** |
| 25 | * gutenberg_init() is only available when the Gutenberg plugin is active |
| 26 | */ |
| 27 | if ( function_exists( '\\gutenberg_init' ) ) { |
25 | 28 | add_filter( 'gutenberg_can_edit_post_type', __NAMESPACE__ . '\disable_gutenberg_on_cpts', 10, 2 ); |
26 | 29 | add_filter( 'get_edit_post_link', __NAMESPACE__ . '\add_classic_param_to_edit_links' ); |
27 | 30 | add_filter( 'page_row_actions', __NAMESPACE__ . '\add_gutenberg_edit_link', 10, 2 ); |