Ticket #4048: 4048.r6603.diff
File 4048.r6603.diff, 831 bytes (added by , 17 years ago) |
---|
-
plugin.php
99 99 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 100 100 ob_start(); 101 101 @include(ABSPATH . PLUGINDIR . '/' . $plugin); 102 $current[] = $plugin; 103 sort($current); 104 update_option('active_plugins', $current); 105 do_action('activate_' . $plugin); 102 $can_activate = apply_filters( 'before_activate_' . $plugin, true ); 103 if( $can_activate ) { 104 $current[] = $plugin; 105 sort($current); 106 update_option('active_plugins', $current); 107 do_action('activate_' . $plugin); 108 } 106 109 ob_end_clean(); 107 110 } 108 111