From 7fb115c7dd1b13555adca2f74b23bacfd08eb7c6 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Sep 2008 22:37:49 +0000 Subject: [PATCH] Move media settings to options-media.php. see #7552 git-svn-id: http://svn.automattic.com/wordpress/trunk@8905 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 7 +- wp-admin/options-media.php | 131 +++++++++++++++++++++++++++++++++++++ wp-admin/options-misc.php | 88 ------------------------- wp-admin/options.php | 3 +- 4 files changed, 137 insertions(+), 92 deletions(-) create mode 100644 wp-admin/options-media.php diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 86e7ff9a0d..2d77713131 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -64,9 +64,10 @@ $menu[20] = array(__('Settings'), 'manage_options', 'options-general.php'); $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php'); $submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php'); $submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php'); - $submenu['options-general.php'][30] = array(__('Privacy'), 'manage_options', 'options-privacy.php'); - $submenu['options-general.php'][35] = array(__('Permalinks'), 'manage_options', 'options-permalink.php'); - $submenu['options-general.php'][40] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php'); + $submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php'); + $submenu['options-general.php'][35] = array(__('Privacy'), 'manage_options', 'options-privacy.php'); + $submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php'); + $submenu['options-general.php'][45] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php'); $menu[25] = array( __('Plugins'), 'activate_plugins', 'plugins.php' ); $submenu['plugins.php'][5] = array( __('Plugins'), 'activate_plugins', 'plugins.php' ); diff --git a/wp-admin/options-media.php b/wp-admin/options-media.php new file mode 100644 index 0000000000..e03f60e943 --- /dev/null +++ b/wp-admin/options-media.php @@ -0,0 +1,131 @@ + + +
+ +

+
+

+ + + + + + +
+ 'None', 'post' => 'Post URL', 'file' => 'File'); + + $default_link_type = get_option('image_default_link_type'); + if ( empty($default_link_type) ) + $default_link_type = 'file'; + + foreach ($link_types as $type => $name) { ?> + /> + + +
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+/> + +
+ + + + +
+ + + + +
+ 'Auto', 'thumbnail' => 'Thumbnail', 'medium' => 'Medium', 'large' => 'Large', 'full' => 'Full size'); + foreach ($size_names as $size => $name) { ?> + /> + + +
+ 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right'); + + $default_align = get_option('image_default_align'); + if ( empty($default_align) ) + $default_align = 'none'; + + foreach ($alignments as $align => $name) { ?> + /> + + +
+ + + +

+ + + + + +

+ +
+ +
+ + diff --git a/wp-admin/options-misc.php b/wp-admin/options-misc.php index 3023dde658..8acc38f03e 100644 --- a/wp-admin/options-misc.php +++ b/wp-admin/options-misc.php @@ -48,94 +48,6 @@ include('admin-header.php'); -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-/> - -
- - - - -
- - - - -
- 'Auto', 'thumbnail' => 'Thumbnail', 'medium' => 'Medium', 'large' => 'Large', 'full' => 'Full size'); - foreach ($size_names as $size => $name) { ?> - /> - - -
- 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right'); - - $default_align = get_option('image_default_align'); - if ( empty($default_align) ) - $default_align = 'none'; - - foreach ($alignments as $align => $name) { ?> - /> - - -
- 'None', 'post' => 'Post URL', 'file' => 'File'); - foreach ($link_types as $type => $name) { ?> - /> - - -
- - - diff --git a/wp-admin/options.php b/wp-admin/options.php index bd5cb7f36f..823932a447 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -22,9 +22,10 @@ $parent_file = 'options-general.php'; wp_reset_vars(array('action')); $whitelist_options = array( - 'general' => array('blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'comment_registration', 'default_role'), + 'general' => array('blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'comment_registration', 'default_role' ), 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'close_comments_for_old_posts', 'close_comments_days_old' ), 'misc' => array( 'hack_file', 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'large_size_w', 'large_size_h' ), + 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ), 'privacy' => array( 'blog_public' ), 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'gzipcompression', 'show_on_front', 'page_on_front', 'page_for_posts' ), 'writing' => array( 'default_post_edit_rows', 'use_smilies', 'ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),