WordPress.org

Making WordPress.org

Ticket #3704: 3704.patch

File 3704.patch, 1.3 KB (added by dryanpress, 14 months ago)
  • wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php

    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(); 
    2121 *        for organizers.
    2222 */
    2323function 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' ) ) {
    2528                add_filter( 'gutenberg_can_edit_post_type', __NAMESPACE__ . '\disable_gutenberg_on_cpts',           10, 2 );
    2629                add_filter( 'get_edit_post_link',           __NAMESPACE__ . '\add_classic_param_to_edit_links'            );
    2730                add_filter( 'page_row_actions',             __NAMESPACE__ . '\add_gutenberg_edit_link',             10, 2 );