From 68a874a4ddf3cc28b451ec9b1c96c612b269d279 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 22 May 2008 00:06:41 +0000 Subject: [PATCH] wp_admin_css() improvements. Props mdawaffe. see #7011 git-svn-id: http://svn.automattic.com/wordpress/trunk@7979 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 15 ++++++--------- wp-admin/includes/widgets.php | 8 -------- wp-admin/index.php | 6 +----- wp-admin/install.php | 2 +- wp-admin/media.php | 3 ++- wp-admin/plugin-editor.php | 5 +---- wp-admin/press-this.php | 6 ++++-- wp-admin/sidebar.php | 10 ++++++---- wp-admin/theme-editor.php | 5 +---- wp-admin/update.php | 6 +++--- wp-admin/upgrade.php | 2 +- wp-admin/widgets.php | 1 + wp-includes/general-template.php | 4 ++-- wp-includes/js/tinymce/wp-mce-help.php | 4 ++-- wp-includes/script-loader.php | 2 ++ wp-login.php | 4 ++-- 16 files changed, 35 insertions(+), 48 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index afe0c000d5..5faab77df4 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -126,9 +126,12 @@ function wp_iframe($content_func /* ... */) { <?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?> diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index 58626a7205..b29705e4fd 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -285,11 +285,3 @@ function wp_widget_control_ob_filter( $string ) { $string = str_replace( ' ', ' ', $string ); return trim( wp_specialchars( strip_tags( $string ) ) ); } - -function widget_css() { - wp_admin_css( 'css/widgets' ); -} - -add_action( 'admin_head', 'widget_css' ); - -?> diff --git a/wp-admin/index.php b/wp-admin/index.php index be0152019b..3a10bcfc4c 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -26,12 +26,8 @@ jQuery(function($) { } add_action( 'admin_head', 'index_js' ); -function index_css() { - wp_admin_css( 'css/dashboard' ); -} -add_action( 'admin_head', 'index_css' ); - wp_enqueue_script( 'jquery' ); +wp_admin_css( 'dashboard' ); $title = __('Dashboard'); $parent_file = 'index.php'; diff --git a/wp-admin/install.php b/wp-admin/install.php index 5f2a8009c6..ff232126e4 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -16,7 +16,7 @@ header( 'Content-Type: text/html; charset=utf-8' ); <?php _e('WordPress › Installation'); ?> - +

WordPress

diff --git a/wp-admin/media.php b/wp-admin/media.php index 050022cf46..150dea75de 100644 --- a/wp-admin/media.php +++ b/wp-admin/media.php @@ -60,7 +60,8 @@ case 'edit' : add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); wp_enqueue_script( 'wp-ajax-response' ); - add_action('admin_head', 'media_admin_css'); + wp_admin_css( 'media' ); + require( 'admin-header.php' ); diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index a9c534c5bd..8e8c2c2724 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -6,10 +6,7 @@ $parent_file = 'plugins.php'; wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); -add_action( 'admin_head', 'theme_editor_css' ); -function theme_editor_css(){ - wp_admin_css( 'css/theme-editor' ); -} +wp_admin_css( 'theme-editor' ); $plugins = get_plugins(); $plugin_files = array_keys($plugins); diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 8009e54515..bc084446b9 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -195,11 +195,13 @@ if ( empty($_GET['tab']) ) {