Changeset 4811 for trunk/wp-admin/plugins.php
- Timestamp:
- 01/25/2007 08:45:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r4664 r4811 12 12 wp_die(__('Plugin file does not exist.')); 13 13 if (!in_array($plugin, $current)) { 14 wp_redirect('plugins.php?error=true'); // we'll override this later if the plugin can be included without fatal error 15 @include(ABSPATH . PLUGINDIR . '/' . $plugin); 14 16 $current[] = $plugin; 15 17 sort($current); 16 18 update_option('active_plugins', $current); 17 include(ABSPATH . PLUGINDIR . '/' . $plugin);18 19 do_action('activate_' . $plugin); 19 20 } 20 wp_redirect('plugins.php?activate=true'); 21 wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above 21 22 } else if ('deactivate' == $_GET['action']) { 22 23 check_admin_referer('deactivate-plugin_' . $_GET['plugin']); … … 59 60 ?> 60 61 61 <?php if (isset($_GET['activate'])) : ?> 62 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p> 63 </div> 64 <?php endif; ?> 65 <?php if (isset($_GET['deactivate'])) : ?> 66 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p> 67 </div> 62 <?php if ( isset($_GET['error']) ) : ?> 63 <div id="message" class="updated fade"><p><?php _e('Plugin could not be activated because it triggered a <strong>fatal error</strong>.') ?></p></div> 64 <?php elseif ( isset($_GET['activate']) ) : ?> 65 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div> 66 <?php elseif ( isset($_GET['deactivate']) ) : ?> 67 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div> 68 68 <?php endif; ?> 69 69
Note: See TracChangeset
for help on using the changeset viewer.