Make WordPress Core

Ticket #20823: load-plugins-on-activate.patch

File load-plugins-on-activate.patch, 1.0 KB (added by rahal.aboulfeth, 13 years ago)

patch made using hg-svn

  • wp-activate.php

    diff -r 0f439c53f704 wp-activate.php
    a b  
    11<?php
    22define( 'WP_INSTALLING', true );
     3// defined to let enable plugin loading ( so plugin hooks and widgets can work.. )
     4define( 'WP_USER_ACTIVATION', true );
     5
    36
    47/** Sets up the WordPress Environment. */
    58require( dirname(__FILE__) . '/wp-load.php' );
  • wp-includes/load.php

    diff -r 0f439c53f704 wp-includes/load.php
    a b  
    485485                _deprecated_file( 'my-hacks.php', '1.5' );
    486486                array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
    487487        }
    488 
    489         if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) )
     488        // if user activation, should continue loading plugins.
     489        if ( empty( $active_plugins ) || ( defined( 'WP_INSTALLING' ) && !defined('WP_USER_ACTIVATION') ) )
    490490                return $plugins;
    491491
    492492        $network_plugins = is_multisite() ? wp_get_active_network_plugins() : false;