X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/38ca813a0e312e2768e5b9519f0415cd0aa84781..80b7979fccf09a75af3f4c111fa27060ae6dbf85:/wp-admin/plugin-editor.php diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 2c710dff..b7758d22 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -22,8 +22,6 @@ $parent_file = 'plugins.php'; wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin')); -wp_admin_css( 'theme-editor' ); - $plugins = get_plugins(); if ( empty($plugins) ) @@ -67,7 +65,8 @@ case 'update': if ( is_plugin_active($file) ) deactivate_plugins($file, true); - update_option('recently_activated', array($file => time()) + (array)get_option('recently_activated')); + if ( ! is_network_admin() ) + update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) ); wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide)); exit; @@ -112,12 +111,18 @@ default: } } - add_contextual_help($current_screen, + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => '

' . __('You can use the editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '

' . '

' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.') . '

' . '

' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Lookup takes you to a web page about that particular function.') . '

' . '

' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '

' . - ( is_network_admin() ? '

' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

' : '' ) . + ( is_network_admin() ? '

' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

' : '' ) + ) ); + + get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . '

' . __('Documentation on Editing Plugins') . '

' . '

' . __('Documentation on Writing Plugins') . '

' . @@ -232,7 +237,7 @@ foreach ( $plugin_files as $plugin_file ) : -

Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?>

+

Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?>