Ticket #12089: plugin-activation.patch
File plugin-activation.patch, 798 bytes (added by , 15 years ago) |
---|
-
wp-admin/includes/plugin.php
359 359 wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error 360 360 ob_start(); 361 361 @include(WP_PLUGIN_DIR . '/' . $plugin); 362 if ( ob_get_length() > 0 ) { 363 $output = ob_get_clean(); 364 return new WP_Error('unexpected_output', __('The plugin generated unexpected output.') . '<br />' . htmlspecialchars($output)); 365 } 362 366 do_action( 'activate_plugin', trim( $plugin) ); 363 367 if ( $network_wide ) { 364 368 $current[$plugin] = time();