WordPress.org

Make WordPress Core

Ticket #44884: 0001-Added-check-for-constant-existence.patch

File 0001-Added-check-for-constant-existence.patch, 847 bytes (added by dontgo2sleep, 17 months ago)
  • wp-admin/includes/plugin.php

    From 4b8569b2357ad8fd2e912b74343bfd4a2a5d4852 Mon Sep 17 00:00:00 2001
    From: Vladimir Ivanov <ivanov.bg@gmail.com>
    Date: Tue, 11 Sep 2018 00:45:38 +0300
    Subject: [PATCH] Added check for constant existence
    
    ---
     wp-admin/includes/plugin.php | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git wp-admin/includes/plugin.php wp-admin/includes/plugin.php
    index c898fc5..3a86691 100644
    function uninstall_plugin( $plugin ) { 
    10741074                }
    10751075                unset( $uninstallable_plugins );
    10761076
    1077                 define( 'WP_UNINSTALL_PLUGIN', $file );
     1077                if (!defined('WP_UNINSTALL_PLUGIN')) {
     1078                        define('WP_UNINSTALL_PLUGIN', true);
     1079                }
    10781080                wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
    10791081                include( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' );
    10801082